Skip to content

Commit

Permalink
Merge pull request #1141 from Tejashri-Taral/Last_update
Browse files Browse the repository at this point in the history
✔️Added Dynamic "Last Updated" Functionality to All Legal Pages !
  • Loading branch information
varshith257 authored Aug 4, 2024
2 parents 1a485b9 + d487d32 commit 65df5b8
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
45 changes: 45 additions & 0 deletions Html-Files/privacy_policy_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,20 @@
z-index: 9999;
}
</style>
<style>

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

</style>
</head>

<body>
Expand Down Expand Up @@ -881,6 +895,7 @@
<header class="header" id="privacy-policy-header">
<h1 class="title" id="privacy-policy-title" id="downloadSection">Privacy Policy</h1>
</header>
<div class="Lastupdate">Last updated: <span id="last-updated-date"></span></div>
<main class="main-content">
<section class="section">
<h2 class="section-title">Introduction</h2>
Expand Down Expand Up @@ -1125,5 +1140,35 @@ <h4>RAPIDOC Newsletter</h4>


</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>
45 changes: 45 additions & 0 deletions Html-Files/terms_and_conditions.html
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,21 @@


</style>

<style>

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

</style>
</head>

<body>
Expand Down Expand Up @@ -1147,6 +1162,7 @@
<header class="header" id="terms-conditions-header">
<h1 class="title" id="terms-conditions-title">Terms and Conditions</h1>
</header>
<div class="Lastupdate">Last updated: <span id="last-updated-date"></span></div>
<main class="main-content" id="terms-conditions-main">
<section class="section">
<h2 class="section-title">Introduction</h2>
Expand Down Expand Up @@ -1319,6 +1335,35 @@ <h4>RAPIDOC Newsletter</h4>
</div>
</div>
</footer>
<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>

0 comments on commit 65df5b8

Please sign in to comment.