Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✔️Implemented Dynamic "Last Updated" Functionality to All Legal Pages ! #1583

Merged
merged 3 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions Html-files/Licensing.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@
text-shadow: #FC0 1px 0 6px;
text-decoration: none;
}

.Lastupdate {
margin-top: 18px;
font-size: 20px !important;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, serif !important;
font-weight: 500;
margin-bottom: 15px;
color: rgb(35, 35, 35) !important;
}

#last-updated-date {
font-size: 18px;
color: rgb(27, 27, 27) !important;
}


</style>
<style> #progressBar {
position: fixed;
Expand Down Expand Up @@ -194,6 +210,11 @@ <h1>Licensing Page</h1>
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.</p>

<div class="Lastupdate">
Last updated: <span id="last-updated-date"></span>
</div>

</div>
<hr>
<footer class="copyright-footer">
Expand Down Expand Up @@ -337,6 +358,46 @@ <h4>Follow Us</h4>
</div>
</footer>

<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);

// Update the date dynamically
function updateLastUpdatedDate() {
const dateElement = document.getElementById("last-updated-date");
const now = new Date();
const day = now.getDate();
const monthNames = [
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
];
const month = monthNames[now.getMonth()]; // Get the full month name
const year = now.getFullYear();
dateElement.textContent = `${month} ${day}, ${year}`;
}

// Update the date weekly
function updateWeekly() {
const now = new Date();
const dayOfWeek = now.getDay(); // 0 (Sunday) to 6 (Saturday)
const timeUntilNextUpdate = (7 - dayOfWeek) * 24 * 60 * 60 * 1000; // Time until next Sunday
updateLastUpdatedDate();
setTimeout(updateWeekly, timeUntilNextUpdate);
}

// Initialize weekly updates
updateWeekly();
});
</script>


<button id="scroll-top-button" class="scroll-top-button" onclick="goToTop()">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="white"
class="arrow">
Expand Down
58 changes: 58 additions & 0 deletions Html-files/privacy.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@
text-shadow: #FC0 1px 0 6px;
text-decoration: none;
}

.Lastupdate {
margin-top: 18px;
font-size: 20px !important;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, serif !important;
font-weight: 500;
margin-bottom: 15px;
color: rgb(35, 35, 35) !important;
}

#last-updated-date {
font-size: 18px;
color: rgb(27, 27, 27) !important;
}

</style>
<style> #progressBar {
position: fixed;
Expand Down Expand Up @@ -170,6 +185,10 @@
<main class="main-container">
<h1>PRIVACY POLICY</h1>
<hr>
<div class="Lastupdate">
Last updated: <span id="last-updated-date"></span>
</div>

<section class="pri-section">
<p>Foodie is a food ordering website that aims to provide users with a seamless experience for ordering food online, taking orders for pickup, and booking tables for dining in. The website showcases the quality and specialties of the food offered, along with a variety of services to cater to different user preferences.</p>
</section>
Expand Down Expand Up @@ -343,6 +362,45 @@ <h4>Follow Us</h4>
</div>
</footer>

<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);

// Update the date dynamically
function updateLastUpdatedDate() {
const dateElement = document.getElementById("last-updated-date");
const now = new Date();
const day = now.getDate();
const monthNames = [
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
];
const month = monthNames[now.getMonth()]; // Get the full month name
const year = now.getFullYear();
dateElement.textContent = `${month} ${day}, ${year}`;
}

// Update the date weekly
function updateWeekly() {
const now = new Date();
const dayOfWeek = now.getDay(); // 0 (Sunday) to 6 (Saturday)
const timeUntilNextUpdate = (7 - dayOfWeek) * 24 * 60 * 60 * 1000; // Time until next Sunday
updateLastUpdatedDate();
setTimeout(updateWeekly, timeUntilNextUpdate);
}

// Initialize weekly updates
updateWeekly();
});
</script>

<button id="scroll-top-button" class="scroll-top-button" onclick="goToTop()">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="white"
class="arrow">
Expand Down
58 changes: 58 additions & 0 deletions Html-files/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@
text-shadow: #FC0 1px 0 6px;
text-decoration: none;
}

.Lastupdate {
margin-top: 18px;
font-size: 20px !important;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, serif !important;
font-weight: 500;
margin-bottom: 15px;
color: rgb(35, 35, 35) !important;
}

#last-updated-date {
font-size: 18px;
color: rgb(27, 27, 27) !important;
}


</style>
<style> #progressBar {
position: fixed;
Expand Down Expand Up @@ -170,6 +186,9 @@
<main class= "main-container">
<h1>TERMS AND CONDITIONS</h1>
<hr>
<div class="Lastupdate">
Last updated: <span id="last-updated-date"></span>
</div>
<section class="terms-section">
<p>Foodie is a food ordering website that aims to provide users with a seamless experience for ordering food online, taking orders for pickup, and booking tables for dining in. The website showcases the quality and specialties of the food offered, along with a variety of services to cater to different user preferences.</p>
</section>
Expand Down Expand Up @@ -378,6 +397,45 @@ <h4>Follow Us</h4>
</svg>
</button>

<script>
document.addEventListener("DOMContentLoaded", () => {
setTimeout(() => {
const loader = document.getElementById("loader");
if (loader) {
loader.style.display = "none";
} else {
console.error("Element with ID 'loader' not found.");
}
}, 500);

// Update the date dynamically
function updateLastUpdatedDate() {
const dateElement = document.getElementById("last-updated-date");
const now = new Date();
const day = now.getDate();
const monthNames = [
"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
];
const month = monthNames[now.getMonth()]; // Get the full month name
const year = now.getFullYear();
dateElement.textContent = `${month} ${day}, ${year}`;
}

// Update the date weekly
function updateWeekly() {
const now = new Date();
const dayOfWeek = now.getDay(); // 0 (Sunday) to 6 (Saturday)
const timeUntilNextUpdate = (7 - dayOfWeek) * 24 * 60 * 60 * 1000; // Time until next Sunday
updateLastUpdatedDate();
setTimeout(updateWeekly, timeUntilNextUpdate);
}

// Initialize weekly updates
updateWeekly();
});
</script>


<script src="https://unpkg.com/aos@next/dist/aos.js"></script>
<script src="Html-files/top.js"></script>
Expand Down
Loading