Merge pull request #52 from Newtbot/newest

Newest
This commit is contained in:
noot 2024-01-22 17:03:09 +08:00 committed by GitHub
commit d819ac71b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
15 changed files with 365 additions and 128 deletions

View File

@ -524,3 +524,26 @@ body.one-content-column-version .content thead {
.cf:before, .cf:after { content: ""; display: block; }
.cf:after { clear: both; }
.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 */
}

View File

@ -4,7 +4,7 @@
form {
background-color: #fff;
padding: 20px;
padding: 25px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
width: 66%;

View File

@ -0,0 +1,100 @@
.btn-delete {
background-color: red;
color: white;
}
.ui-w-80 {
width: 80px !important;
height: auto;
}
.btn-default {
border-color: rgba(24,28,33,0.1);
background: rgba(0,0,0,0);
color: #4E5155;
}
label.btn {
margin-bottom: 0;
}
.btn-outline-primary {
border-color: #26B4FF;
background: transparent;
color: #26B4FF;
}
.btn {
cursor: pointer;
}
.text-light {
color: #babbbc !important;
}
.btn-facebook {
border-color: rgba(0,0,0,0);
background: #3B5998;
color: #fff;
}
.btn-instagram {
border-color: rgba(0,0,0,0);
background: #000;
color: #fff;
}
.card {
background-clip: padding-box;
box-shadow: 0 1px 4px rgba(24,28,33,0.012);
}
.row-bordered {
overflow: hidden;
}
.account-settings-fileinput {
position: absolute;
visibility: hidden;
width: 1px;
height: 1px;
opacity: 0;
}
.account-settings-links .list-group-item.active {
font-weight: bold !important;
}
html:not(.dark-style) .account-settings-links .list-group-item.active {
background: transparent !important;
}
.account-settings-multiselect ~ .select2-container {
width: 100% !important;
}
.light-style .account-settings-links .list-group-item {
padding: 0.85rem 1.5rem;
border-color: rgba(24, 28, 33, 0.03) !important;
}
.light-style .account-settings-links .list-group-item.active {
color: #4e5155 !important;
}
.material-style .account-settings-links .list-group-item {
padding: 0.85rem 1.5rem;
border-color: rgba(24, 28, 33, 0.03) !important;
}
.material-style .account-settings-links .list-group-item.active {
color: #4e5155 !important;
}
.dark-style .account-settings-links .list-group-item {
padding: 0.85rem 1.5rem;
border-color: rgba(255, 255, 255, 0.03) !important;
}
.dark-style .account-settings-links .list-group-item.active {
color: #fff !important;
}
.light-style .account-settings-links .list-group-item.active {
color: #4E5155 !important;
}
.light-style .account-settings-links .list-group-item {
padding: 0.85rem 1.5rem;
border-color: rgba(24,28,33,0.03) !important;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@ -5,10 +5,17 @@ document.addEventListener("DOMContentLoaded", function () {
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 = `
<div class="additional-info-box">
<h3>Additional Information - ${region}</h3>
<button id="downloadCsvButton">Download CSV</button>
<div class="info-item">
<span class="info-label">Air Quality Index:</span>
<span class="info-value">${aqi}</span>
@ -21,9 +28,34 @@ document.addEventListener("DOMContentLoaded", function () {
<span class="info-label">Humidity:</span>
<span class="info-value">${humidity}</span>
</div>
<div class="info-item">
<span class="info-label">PM2.5:</span>
<span class="info-value">${pm25}</span>
</div>
<div class="info-item">
<span class="info-label">PM10:</span>
<span class="info-value">${pm10}</span>
</div>
<div class="info-item">
<span class="info-label">SO2:</span>
<span class="info-value">${so2}</span>
</div>
<div class="info-item">
<span class="info-label">O3:</span>
<span class="info-value">${o3}</span>
</div>
<div class="info-item">
<span class="info-label">CO:</span>
<span class="info-value">${co}</span>
</div>
<div class="info-item">
<span class="info-label">NO2:</span>
<span class="info-value">${no2}</span>
</div>
</div>
`;
// Remove the 'active' class from all info-box elements
const infoBoxes = document.querySelectorAll('.info-box');
infoBoxes.forEach(box => box.classList.remove('active'));

View File

@ -66,11 +66,17 @@ router.get("/profile", function (req, res, next) {
res.render("profile");
});
//forgot password page
router.get("/forgotpassword", function (req, res, next) {
res.render("forgotpassword");
});
//resetted password page
router.get("/resetpassword", function (req, res, next) {
res.render("resetpassword");
});
//contact page
router.get("/contact", function (req, res, next) {
res.render("contact");
@ -82,5 +88,4 @@ router.get("/api", function (req, res, next) {
});
module.exports = router;

View File

@ -6,6 +6,7 @@
!-->
<%- include('top') %>
<link rel="stylesheet" href="css/api.css" media="all">
<body class="one-content-column-version">
<div class="left-menu">
@ -38,8 +39,8 @@
<li class="scroll-to-link active" data-target="content-get-started">
<a>GET STARTED</a>
</li>
<li class="scroll-to-link" data-target="content-get-characters">
<a>Get Data From API</a>
<li class="scroll-to-link" data-target="content-get-api">
<a>Generate API</a>
</li>
<li class="scroll-to-link" data-target="content-errors">
<a>Errors</a>
@ -86,7 +87,8 @@
<td>Authorization</td>
<td>JSON</td>
<td>Your API key.</td>
<td>(Required) Example: curl https://api.teeseng.uk/api/v0/location -H "Authorization: {provide your
<td>(Required) Example: curl https://api.teeseng.uk/api/v0/location -H "Authorization:
{provide your
API key here}"</td>
</td>
</tr>
@ -118,7 +120,8 @@
<td>Authorization</td>
<td>JSON</td>
<td>(Required) Your API key.</td>
<td>Example: curl https://api.teeseng.uk/api/v0/location -H "Authorization: {provide your
<td>Example: curl https://api.teeseng.uk/api/v0/location -H "Authorization: {provide
your
API key here}"</td>
</td>
</tr>
@ -133,7 +136,8 @@
<br>
<br>
Example :<br>
<code class="higlighted break-word">curl https://api.teeseng.uk/api/v0/location/new -H "Content-Type: application/json" -X POST -d '{"name": "SAMPLE", "added_by": "system" , "description": "test"}'</code>
<code
class="higlighted break-word">curl https://api.teeseng.uk/api/v0/location/new -H "Content-Type: application/json" -X POST -d '{"name": "SAMPLE", "added_by": "system" , "description": "test"}'</code>
<br>
<br>
Return Response :<br>
@ -154,7 +158,8 @@
<td>Authorization</td>
<td>JSON</td>
<td>Your API key.</td>
<td>(Required) Example: curl https://api.teeseng.uk/api/v0/location/new -H "Authorization: {provide your
<td>(Required) Example: curl https://api.teeseng.uk/api/v0/location/new -H
"Authorization: {provide your
API key here}"</td>
</td>
</tr>
@ -162,7 +167,8 @@
<td>Location name</td>
<td>JSON</td>
<td>Location name.</td>
<td>(Required) Location name. Example: curl https://api.teeseng.uk/api/v0/location/new -H "Authorization: provide
<td>(Required) Location name. Example: curl https://api.teeseng.uk/api/v0/location/new
-H "Authorization: provide
your API key here" -d '{"name":"Location name"}'</td>
</td>
</tr>
@ -170,7 +176,8 @@
<td>Added by </td>
<td>JSON</td>
<td>System or Admin</td>
<td>(Required) System or Admin Example: curl https://api.teeseng.uk/api/v0/location/new -H "Authorization: provide
<td>(Required) System or Admin Example: curl https://api.teeseng.uk/api/v0/location/new
-H "Authorization: provide
your API key here" -d '{"added_by":"system"}'</td>
</td>
</tr>
@ -178,7 +185,8 @@
<td>Description</td>
<td>JSON</td>
<td>Description of Location</td>
<td>(Required) System or Admin Example: curl https://api.teeseng.uk/api/v0/location/new -H "Authorization: provide
<td>(Required) System or Admin Example: curl https://api.teeseng.uk/api/v0/location/new
-H "Authorization: provide
your API key here" -d '{"description":"test"}'</td>
</td>
</tr>
@ -194,7 +202,8 @@
<br>
<br>
Example :<br>
<code class="higlighted break-word">curl https://api.teeseng.uk/api/v0/location/update -H "Content-Type: application/json" -X POST -d '{"id": "7" , "name": "SAMPLE", "added_by": "system" , "description": "test"}'</code>
<code
class="higlighted break-word">curl https://api.teeseng.uk/api/v0/location/update -H "Content-Type: application/json" -X POST -d '{"id": "7" , "name": "SAMPLE", "added_by": "system" , "description": "test"}'</code>
<br>
<br>
Return Response :<br>
@ -215,7 +224,8 @@
<td>Authorization</td>
<td>JSON</td>
<td>Your API key.</td>
<td>(Required) example: curl https://api.teeseng.uk/api/v0/location/update -H "Authorization: {provide your
<td>(Required) example: curl https://api.teeseng.uk/api/v0/location/update -H
"Authorization: {provide your
API key here}"</td>
</td>
</tr>
@ -223,7 +233,8 @@
<td>ID</td>
<td>JSON</td>
<td>Location ID</td>
<td>(Required) Location ID Example: curl https://api.teeseng.uk/api/v0/location/update -H "Authorization: provide
<td>(Required) Location ID Example: curl https://api.teeseng.uk/api/v0/location/update
-H "Authorization: provide
your API key here" -d '{"id": "7"}'</td>
</td>
</tr>
@ -231,7 +242,8 @@
<td>Location name</td>
<td>JSON</td>
<td>Location name.</td>
<td>(Optional) Location name. Example: curl https://api.teeseng.uk/api/v0/location/new -H "Authorization: provide
<td>(Optional) Location name. Example: curl https://api.teeseng.uk/api/v0/location/new
-H "Authorization: provide
your API key here" -d '{"name":"Location name"}'</td>
</td>
</tr>
@ -239,7 +251,8 @@
<td>Added by </td>
<td>JSON</td>
<td>System or Admin</td>
<td>(Optional) System or Admin Example: curl https://api.teeseng.uk/api/v0/location/new -H "Authorization: provide
<td>(Optional) System or Admin Example: curl https://api.teeseng.uk/api/v0/location/new
-H "Authorization: provide
your API key here" -d '{"added_by":"system"}'</td>
</td>
</tr>
@ -247,7 +260,8 @@
<td>Description</td>
<td>JSON</td>
<td>Description of Location</td>
<td>(Optional) System or Admin Example: curl https://api.teeseng.uk/api/v0/location/new -H "Authorization: provide
<td>(Optional) System or Admin Example: curl https://api.teeseng.uk/api/v0/location/new
-H "Authorization: provide
your API key here" -d '{"description":"test"}'</td>
</td>
</tr>
@ -263,7 +277,8 @@
<br>
<br>
Example :<br>
<code class="higlighted break-word">curl https://api.teeseng.uk/api/v0/location/delete -H "Content-Type: application/json" -X POST -d '{"id": "7"}'</code>
<code
class="higlighted break-word">curl https://api.teeseng.uk/api/v0/location/delete -H "Content-Type: application/json" -X POST -d '{"id": "7"}'</code>
</p>
<br>
<h4>QUERY PARAMETERS</h4>
@ -280,7 +295,8 @@
<td>Authorization</td>
<td>JSON</td>
<td>Your API key.</td>
<td>(Required) example: curl https://api.teeseng.uk/api/v0/location/delete -H "Authorization: {provide your
<td>(Required) example: curl https://api.teeseng.uk/api/v0/location/delete -H
"Authorization: {provide your
API key here}"</td>
</td>
</tr>
@ -288,7 +304,8 @@
<td>ID</td>
<td>JSON</td>
<td>Location ID</td>
<td>(Required) Location ID Example: curl https://api.teeseng.uk/api/v0/location/delete -H "Authorization: provide
<td>(Required) Location ID Example: curl https://api.teeseng.uk/api/v0/location/delete
-H "Authorization: provide
your API key here" -d '{"id": "7"}'</td>
</td>
</tr>
@ -296,24 +313,6 @@
</table>
</div>
<div class="overflow-hidden content-section" id="content-errors">
<h2>Errors</h2>
<p>
@ -359,6 +358,38 @@
</tbody>
</table>
</div>
<div class="overflow-hidden content-section" id="content-get-api">
<div class="api-keys-header">
<h2>API Keys</h2>
<button class="generate-key-button">Generate Key</button>
<p>
You can generate API Keys here:
</p>
<table>
<thead>
<tr>
<th>Name</th>
<th>Public Key</th>
<th>Private Key</th>
<th>Key Type</th>
<th>Created</th>
</tr>
</thead>
<tbody>
<tr>
<td>API Key</td>
<td>GR234-We34</td>
<td>greR-234-fEG</td>
<td>Type</td>
<td>2024-01-22</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

View File

@ -86,7 +86,6 @@
<script src="js/search.js"></script>
<script src="js/api.js"></script>
</body>
</html>

View File

@ -1,4 +1,5 @@
<%- include('top') %>
<link href="css/contact.css" rel="stylesheet" />
<!-- full Title -->
<div class="full-title">

View File

@ -4,7 +4,7 @@
<section class="wrapper">
<div class="form">
<header>Reset Password</header>
<form action="resetpassword.html">
<form action="/resetpassword">
<input type="text" id="email" placeholder="Email" required />
<input type="password" id="password" placeholder="Password" required />
<input type="password" id="confirmPassword" placeholder="Confirm Password" required />

View File

@ -1,4 +1,5 @@
<%- include('top') %>
<link href="css/learnmore.css" rel="stylesheet" />
<br>
<br>

View File

@ -1,8 +1,6 @@
<%- include('top') %>
<script type="text/javascript">
// Require login to see this page.
app.auth.forceLogin()
</script>
<link href="css/profile.css" rel="stylesheet" />
<div class="full-title">
<div class="container">
@ -13,52 +11,102 @@
<br>
<br>
<div class="container light-style flex-grow-1 container-p-y">
<div class="centered-content">
<div class="container">
<div class="row">
<div class="col-md-3 border-right">
<div class="d-flex flex-column align-items-center text-center p-3 py-5"><img
class="rounded-circle mt-5" width="150px"
src="https://st3.depositphotos.com/15648834/17930/v/600/depositphotos_179308454-stock-illustration-unknown-person-silhouette-glasses-profile.jpg">
<div class="card overflow-hidden">
<div class="row no-gutters row-bordered row-border-light">
<div class="col-md-3 pt-0">
<div class="list-group list-group-flush account-settings-links">
<a class="list-group-item list-group-item-action active" data-toggle="list"
href="#account-general">General</a>
<a class="list-group-item list-group-item-action" data-toggle="list"
href="#account-change-password">Change password</a>
</div>
</div>
<div class="col-md-5 border-right">
<div class="p-3 py-5">
<div class="d-flex justify-content-between align-items-center mb-3">
<h4 class="text-right">Profile Settings</h4>
<div class="col-md-9">
<div class="tab-content">
<div class="tab-pane fade active show" id="account-general">
<div class="card-body media align-items-center">
<img src="https://bootdey.com/img/Content/avatar/avatar1.png" alt=""
class="d-block ui-w-80">
<br>
<div class="media-body ml-4">
<label class="btn btn-outline-primary">
Upload new photo
<input type="file" class="account-settings-fileinput">
</label> &nbsp;
<div class="text-light small mt-1">Allowed JPG, GIF or PNG. Max size of 800K</div>
</div>
<div class="row mt-2">
<div class="col-md-6"><label class="labels">Name</label><input type="text"
class="form-control" placeholder="first name" value=""></div>
<div class="col-md-6"><label class="labels">Surname</label><input type="text"
class="form-control" value="" placeholder="surname"></div>
</div>
<div class="row mt-3">
<div class="col-md-12"><label class="labels">Mobile Number</label><input type="text"
class="form-control" placeholder="enter phone number" value=""></div>
<div class="col-md-12"><label class="labels">Address</label><input type="text"
class="form-control" placeholder="enter address" value=""></div>
<div class="col-md-12"><label class="labels">Email</label><input type="text"
class="form-control" placeholder="enter email" value=""></div>
<div class="col-md-12"><label class="labels">Password</label><input type="text"
class="form-control" placeholder="enter password" value=""></div>
<div class="col-md-12"><label class="labels">Password</label><input type="text"
class="form-control" placeholder="re enter password" value=""></div>
<hr class="border-light m-0">
<div class="card-body">
<div class="form-group">
<label class="form-label">Username</label>
<input type="text" class="form-control mb-1" value="">
</div>
<div class="mt-2 text-center">
<button class="btn btn-sm btn-secondary change-password-button" type="button">Change
Password</button>
<div class="form-group">
<label class="form-label">First Name</label>
<input type="text" class="form-control" value="">
</div>
<div class="mt-5 text-center"><button class="btn btn-primary profile-button" type="button">Save
Profile</button></div>
<div class="form-group">
<label class="form-label">Last Name</label>
<input type="text" class="form-control" value="">
</div>
<div class="form-group">
<label class="form-label">E-mail</label>
<input type="text" class="form-control mb-1" value="">
<div class="alert alert-warning mt-3">
Your email is not confirmed. Please check your inbox.<br>
<a href="javascript:void(0)">Resend confirmation</a>
</div>
</div>
<div class="form-group">
<label class="form-label">Phone Number</label>
<input type="text" class="form-control" value="">
</div>
<div class="form-group">
<label class="form-label">Address</label>
<input type="text" class="form-control" value="">
</div>
</div>
</div>
<div class="tab-pane fade" id="account-change-password">
<div class="card-body pb-2">
<div class="form-group">
<label class="form-label">Current password</label>
<input type="password" class="form-control">
</div>
<div class="form-group">
<label class="form-label">New password</label>
<input type="password" class="form-control">
</div>
<div class="form-group">
<label class="form-label">Repeat new password</label>
<input type="password" class="form-control">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="text-right mt-3">
<button type="button" class="btn btn-primary">Save changes</button>&nbsp;
<button type="button" class="btn btn-default">Cancel</button>
<button type="button" class="btn btn-delete">Delete Account</button>
</div>
</div>
<br>
<%- include('bot') %>

View File

@ -21,9 +21,6 @@
<!-- Custom styles for this template -->
<link href="css/all.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
<link href="css/learnmore.css" rel="stylesheet" />
<link href="css/contact.css" rel="stylesheet" />
<link rel="stylesheet" href="css/api.css" media="all" />
<!-- weird api page cdn -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />