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

✔️ Fix "Last Updated" Functionality in ALL Legal Pages! #757

Merged
merged 3 commits into from
Aug 10, 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
51 changes: 51 additions & 0 deletions pages/licensing.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@
<!-- Logo of the game -->
<link rel="icon" href="../assets/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../assets/favicon.ico" type="image/x-icon" />
<style>

.Lastupdate {
margin-bottom: 14px;
font-size: 15px;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, serif;
font-weight: 500;
margin-top: 0px;
}

#last-updated-date {
font-size: 15px;
}

</style>
</head>

<body>
Expand Down Expand Up @@ -63,6 +78,9 @@ <h2 class="section-title">MIT License</h2>
SOFTWARE.
</pre>
</section>
<div class="Lastupdate">
Last updated: <span id="last-updated-date"></span>
</div>
</main>
<center>
<button class="back-button">
Expand All @@ -79,6 +97,39 @@ <h2 class="section-title">MIT License</h2>
yearSpan.textContent = currentYear;
});
</script>

<script>

document.addEventListener("DOMContentLoaded", () => {
function updateLastUpdatedDate() {
const dateElement = document.getElementById("last-updated-date");
if (dateElement) {
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()];
const year = now.getFullYear();
// Use backticks for template literals
dateElement.textContent = `${month} ${day}, ${year}`;
}
}

// Initialize the date update
updateLastUpdatedDate();
});

window.onscroll = function () {
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var scrolled = (winScroll / height) * 100;
document.getElementById("progressBar").style.width = scrolled + "%";
};

</script>

</body>

</html>
53 changes: 51 additions & 2 deletions pages/privacypolicy.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@
<!-- Logo of the game -->
<link rel="icon" href="../assets/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../assets/favicon.ico" type="image/x-icon" />
<style>

.Lastupdate {
margin-bottom: 14px;
font-size: 15px;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, serif;
font-weight: 500;
margin-top: 0px;
}

#last-updated-date {
font-size: 15px;
}

</style>
</head>

<body>
Expand All @@ -29,7 +44,9 @@ <h1 class="title" id="privacy-policy-title">Privacy Policy</h1>
</header>
<main class="main-content">
<section class="section">
Last updated: <span id="last-updated-date"></span>
<div class="Lastupdate">
Last updated: <span id="last-updated-date"></span>
</div>
<h2 class="section-title">Introduction</h2>
<p class="section-content">
Welcome to Dot Box. We value your privacy and are committed to
Expand Down Expand Up @@ -149,7 +166,39 @@ <h2 class="section-title">Contact Us</h2>
</center>
</div>
</div>
<script src="../js/updateDates.js"></script>

<script>

document.addEventListener("DOMContentLoaded", () => {
function updateLastUpdatedDate() {
const dateElement = document.getElementById("last-updated-date");
if (dateElement) {
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()];
const year = now.getFullYear();
// Use backticks for template literals
dateElement.textContent = `${month} ${day}, ${year}`;
}
}

// Initialize the date update
updateLastUpdatedDate();
});

window.onscroll = function () {
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var scrolled = (winScroll / height) * 100;
document.getElementById("progressBar").style.width = scrolled + "%";
};

</script>

</body>

</html>
53 changes: 51 additions & 2 deletions pages/termsofservice.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,23 @@
<!-- Logo of the game -->
<link rel="icon" href="../assets/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="../assets/favicon.ico" type="image/x-icon" />

<style>

.Lastupdate {
margin-bottom: 14px;
font-size: 15px;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, serif;
font-weight: 500;
margin-top: 0px;
}

#last-updated-date {
font-size: 15px;
}

</style>

</head>

<body>
Expand All @@ -29,7 +46,9 @@ <h1 class="title" id="terms-conditions-title">Terms Of Services</h1>
</header>
<main class="main-content" id="terms-conditions-main">
<section class="section">
Last updated: <span id="last-updated-date"></span>
<div class="Lastupdate">
Last updated: <span id="last-updated-date"></span>
</div>
<h2 class="section-title">Introduction</h2>
<p class="section-content">
These terms and conditions outline the rules and regulations for
Expand Down Expand Up @@ -110,7 +129,37 @@ <h2 class="section-title">Contact Information</h2>
</center>
</div>
</div>
<script src="../js/updateDates.js"></script>
<script>

document.addEventListener("DOMContentLoaded", () => {
function updateLastUpdatedDate() {
const dateElement = document.getElementById("last-updated-date");
if (dateElement) {
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()];
const year = now.getFullYear();
// Use backticks for template literals
dateElement.textContent = `${month} ${day}, ${year}`;
}
}

// Initialize the date update
updateLastUpdatedDate();
});

window.onscroll = function () {
var winScroll = document.body.scrollTop || document.documentElement.scrollTop;
var height = document.documentElement.scrollHeight - document.documentElement.clientHeight;
var scrolled = (winScroll / height) * 100;
document.getElementById("progressBar").style.width = scrolled + "%";
};

</script>
</body>

</html>
Loading