From 409e647646fb1782a4e9ea9ce3ddb48c69b794bd Mon Sep 17 00:00:00 2001 From: Leo <95978312+yaefdb@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:35:06 +0800 Subject: [PATCH] update --- consumerWebsite/public/css/api.css | 25 +++++- consumerWebsite/public/js/learnmore.js | 74 +++++++++++----- consumerWebsite/views/api.ejs | 114 ++++++++++++++++--------- consumerWebsite/views/contact.ejs | 1 + consumerWebsite/views/learnmore.ejs | 2 +- consumerWebsite/views/profile.ejs | 5 +- consumerWebsite/views/top.ejs | 3 - 7 files changed, 152 insertions(+), 72 deletions(-) diff --git a/consumerWebsite/public/css/api.css b/consumerWebsite/public/css/api.css index d3d44b1..f5d527e 100644 --- a/consumerWebsite/public/css/api.css +++ b/consumerWebsite/public/css/api.css @@ -523,4 +523,27 @@ body.one-content-column-version .content thead { .cf:before, .cf:after { content: ""; display: block; } .cf:after { clear: both; } -.ie6 .cf { zoom: 1 } \ No newline at end of file +.ie6 .cf { zoom: 1 } + + + +.generate-key-button { + float: right; /* Align the button to the right */ + margin-right: 85%; + margin-top: -40px; /* Adjust the margin-top value based on your layout */ + /* Add any additional styling you want for the button */ +} + +#content-get-api .generate-key-button { + background-color: #4caf50; /* Green background color */ + color: white; /* White text color */ + padding: 5px 11px; /* Padding for the button */ + border: none; /* Remove button border */ + border-radius: 5px; /* Add border-radius for rounded corners */ + cursor: pointer; /* Add pointer cursor on hover */ + font-size: 14px; /* Font size */ +} + +#content-get-api .generate-key-button:hover { + background-color: #45a049; /* Darker green on hover */ +} \ No newline at end of file diff --git a/consumerWebsite/public/js/learnmore.js b/consumerWebsite/public/js/learnmore.js index c965824..2e4a440 100644 --- a/consumerWebsite/public/js/learnmore.js +++ b/consumerWebsite/public/js/learnmore.js @@ -1,28 +1,60 @@ document.addEventListener("DOMContentLoaded", function () { function updateAdditionalInfo(region) { const infoContainer = document.getElementById("additional-info"); - // Replace the following with actual data retrieval based on the region - const aqi = "15"; - const temperature = "25°C"; - const humidity = "60%"; +// Replace the following with actual data retrieval based on the region +const aqi = "15"; +const temperature = "25°C"; +const humidity = "60%"; +const pm25 = "10"; +const pm10 = "20"; +const so2 = "5"; +const o3 = "35"; +const co = "0.5"; +const no2 = "15"; + +infoContainer.innerHTML = ` +
@@ -360,6 +358,38 @@
+ You can generate API Keys here: +
+Name | +Public Key | +Private Key | +Key Type | +Created | +
---|---|---|---|---|
API Key | +GR234-We34 | +greR-234-fEG | +Type | +2024-01-22 | +