From c4969ec81f22f3c884c8bfa02d69718d8b1de3b9 Mon Sep 17 00:00:00 2001 From: Subhajit-2023-44 Date: Fri, 8 Nov 2024 17:18:10 +0530 Subject: [PATCH] done --- templates/index.html | 30 +++- templates/profile.html | 81 ++++++--- templates/profileedit.html | 336 +++++++++++++++++++++++++++++++++++++ templates/testp.js | 64 +++---- 4 files changed, 454 insertions(+), 57 deletions(-) create mode 100644 templates/profileedit.html diff --git a/templates/index.html b/templates/index.html index d8d06cc..0532249 100644 --- a/templates/index.html +++ b/templates/index.html @@ -384,12 +384,34 @@

Buy Stock

- + + + - - Profile Icon - + + Profile Icon + + + + + + + + + +
+
+ + + Home + + +

Edit Profile

+
+
+

Select Avatar

+
+ + + + + +
+
+
+

Edit Details

+ + + + +
+ +
+ + + + + + \ No newline at end of file diff --git a/templates/testp.js b/templates/testp.js index 891c89e..87f42cb 100644 --- a/templates/testp.js +++ b/templates/testp.js @@ -1,32 +1,40 @@ // Get current timestamp const getCurrentTimestamp = () => { - return new Date().getTime(); - }; - - // Store last active timestamp in LocalStorage - const storeLastActive = () => { - const lastActive = getCurrentTimestamp(); - localStorage.setItem('lastActive', lastActive); - }; - - // Get last active timestamp from LocalStorage - const getLastActive = () => { - return localStorage.getItem('lastActive'); - }; - - // Update last active timestamp on page load and interaction - document.addEventListener('DOMContentLoaded', storeLastActive); - document.addEventListener('click', storeLastActive); - document.addEventListener('scroll', storeLastActive); - document.addEventListener('keydown', storeLastActive); - - // Example usage: - const displayLastActive = () => { - const lastActive = getLastActive(); - const formattedTime = new Date(parseInt(lastActive)).toLocaleString(); - document.getElementById('last-active').innerHTML = Last active: ${formattedTime}; - }; - - displayLastActive(); + return new Date().getTime(); +}; + + +// Store last active timestamp in LocalStorage +const storeLastActive = () => { + const lastActive = getCurrentTimestamp(); + localStorage.setItem('lastActive', lastActive); +}; + + +// Get last active timestamp from LocalStorage +const getLastActive = () => { + return localStorage.getItem('lastActive'); +}; + + +// Update last active timestamp on page load and interaction +document.addEventListener('DOMContentLoaded', storeLastActive); +document.addEventListener('click', storeLastActive); +document.addEventListener('scroll', storeLastActive); +document.addEventListener('keydown', storeLastActive); + + +// Example usage: +const displayLastActive = () => { + const lastActive = getLastActive(); + if (lastActive) { + const formattedTime = new Date(parseInt(lastActive)).toLocaleString(); + document.getElementById('last-active').innerHTML = `Last active: ${formattedTime}`; + } +}; + + +// Display the last active time on page load +document.addEventListener('DOMContentLoaded', displayLastActive);