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

✔️Added Dynamic "Last Updated" Functionality to All Legal Pages ! #1140

Closed
wants to merge 9 commits into from
Closed
19 changes: 19 additions & 0 deletions Html-Files/appointment.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,27 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Book an Appointment</title>
<link rel="stylesheet" href="./Css-Files/appointStyle.css">
<style>#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #3fbcc0;
z-index: 9999;

}</style>
</head>
<body>
<div id="progressBar"></div>
<script>
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>
<header>
<div class="logo">Doctor's Clinic</div>
</header>
Expand Down
18 changes: 18 additions & 0 deletions Html-Files/customer_agreement.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,29 @@
color: black;
}
</style>
<style>#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #3fbcc0;
z-index: 9999;

}</style>

</head>

<body>
<div id="progressBar"></div>
<script>
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>

<div class="container" id="customer-agreement-container">
<header id="customer-agreement-header">
Expand Down
21 changes: 20 additions & 1 deletion Html-Files/derma.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,30 @@
background-color: #02969bd5;
}
</style>
<style>#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #3fbcc0;
z-index: 9999;

}</style>
</head>

<body>


<div id="progressBar"></div>
<script>
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>


<button class="button home-button" onclick="window.location.href='../index.html#patient-portal'">Rapidoc</button>

Expand Down
11 changes: 11 additions & 0 deletions Html-Files/news.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,9 +418,20 @@
<link rel="stylesheet" href="./Css-Files/aboutus.css" />
<link rel="stylesheet" href="./Css-Files/testimonial.css" />
<script src="chatboxx.js" defer></script>
<style>#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #3fbcc0;
z-index: 9999;

}</style>
</head>

<body>

<div id="progressBar"></div>
<script>
window.onscroll = function () {
Expand Down
63 changes: 63 additions & 0 deletions Html-Files/privacy_policy_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,41 @@
<link rel="stylesheet" href="./Css-Files/aboutus.css" />
<link rel="stylesheet" href="./Css-Files/testimonial.css" />
<script src="chatboxx.js" defer></script>
<style>#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #3fbcc0;
z-index: 9999;

}</style>

<style>
.Lastupdate {
margin-bottom: 14px;
font-size: 20px;
font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, serif;
font-weight: 500;
margin-top: 0px;
}
#last-updated-date {
font-size: 19px;
}
</style>
</head>

<body>
<div id="progressBar"></div>
<script>
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>
<!-- ############# Header ############# -->
<header class="header_container nav-h">
<div class="img">
Expand Down Expand Up @@ -748,6 +780,7 @@

<h1 class="title" id="privacy-policy-title">Privacy Policy</h1>
</header>
<div class="Lastupdate">Last updated: <span id="last-updated-date"></span></div>
<main class="main-content">

<section class="section">
Expand Down Expand Up @@ -945,5 +978,35 @@ <h4>RAPIDOC Newsletter</h4><br>
}
});
</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>
67 changes: 67 additions & 0 deletions Html-Files/terms_and_conditions.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,52 @@
color: black;
}
</style>
<style>#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #3fbcc0;
z-index: 9999;

}</style>

<style>

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

</style>

</head>

<body>

<div id="progressBar"></div>
<script>
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>

<div class="container" id="terms-conditions-container">
<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 @@ -150,7 +189,35 @@ <h2 class="section-title">Contact Information</h2>
</ul>
</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>
20 changes: 19 additions & 1 deletion test.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,27 @@
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
crossorigin="anonymous" referrerpolicy="no-referrer" />


<style>#progressBar {
position: fixed;
top: 0;
left: 0;
width: 0%;
height: 8px;
background-color: #3fbcc0;
z-index: 9999;

}</style>
</head>
<body>
<div id="progressBar"></div>
<script>
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>
<header class="header_container">
<div class="img">
<img id="rd-logo" style="width: 90px; height: auto;" src="/images/rd.png">
Expand Down