Skip to content

Commit

Permalink
Update copyright year dynamically across multiple HTML files
Browse files Browse the repository at this point in the history
  • Loading branch information
AVNI-THEEXPLORER committed Jan 7, 2025
1 parent b8598dd commit adff33c
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 58 deletions.
21 changes: 13 additions & 8 deletions Html-files/Electronic.html
Original file line number Diff line number Diff line change
Expand Up @@ -1094,16 +1094,21 @@ <h2 style="font-family: var(--ff-philosopher); color: black">
</p>
<div class="copyright">
<p style="font-family: var(--ff-philosopher); color: white">
&copy; 2024 Retro . All Rights Reserved. |
&copy; <span id="currentYear"></span> Retro. All Rights Reserved. |
<span id="author">
<a
href="https://www.linkedin.com"
target="_blank"
style="text-decoration: none; color: white"
>Retro Team</a
>
<a
href="https://www.linkedin.com"
target="_blank"
style="text-decoration: none; color: white"
>Retro Team</a>
</span>
</p>
</p>

<script>
// JavaScript to dynamically set the current year
document.getElementById("currentYear").textContent = new Date().getFullYear();
</script>

</div>
<div>
<button id="sr" style="z-index: 1000">
Expand Down
6 changes: 5 additions & 1 deletion Html-files/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ <h3 class="f-title f_600 t_color f_size_18">Follow Us</h3>
<div class="container">
<div class="row align-items-center">
<div class="col-lg-6 col-sm-7">
<p class="mb-0 f_400">&copy; 2024 Retro. All Rights Reserved.</p>
<p class="mb-0 f_400">&copy; <span id="currentYear"></span> Retro. All Rights Reserved.</p>
</div>
<div class="col-lg-6 col-sm-5 text-right">
<p>Made with ❤️ by <a href="https://www.linkedin.com" target="_blank">Retro Team</a></p>
Expand Down Expand Up @@ -921,6 +921,10 @@ <h3 class="f-title f_600 t_color f_size_18">Follow Us</h3>
});
});

</script>
<script>
// Get the current year and update the span element
document.getElementById('currentYear').textContent = new Date().getFullYear();
</script>
<script>
window.embeddedChatbotConfig = {
Expand Down
50 changes: 32 additions & 18 deletions Html-files/blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ <h3 style="font-family: var(--ff-philosopher); color: hsl(357, 82%, 35%);">Conta
<h4 style="font-family: var(--ff-philosopher);color: hsl(203, 30%, 26%);">Follow Us</h4>

<div class="social-icons">

<p class="mb-0 f_400">&copy; <span id="currentYear"></span> Retro. All Rights Reserved.</p>

<a class="fa-brands fa-facebook" href="https://facebook.com" ></a>
<a class="fa-brands fa-instagram" href="https://instagram.com" ></a>
Expand All @@ -792,11 +792,18 @@ <h4 style="font-family: var(--ff-philosopher);color: hsl(203, 30%, 26%);">Follow
</div>
<p style="font-family: var(--ff-philosopher);background-color: hsl(20, 43%, 93%);color: hsl(203, 30%, 26%);margin-bottom:0;">Stay connected with us on social media for the latest updates, latest collection, and vintage adventures.
</p>
<div class="copyright" style="font-family: var(--ff-philosopher);background-color: hsl(20, 43%, 93%);color: black;">

&copy; 2024 Retro . All Rights Reserved. | Developed by <span id="author">
<div class="copyright" style="font-family: var(--ff-philosopher); background-color: hsl(20, 43%, 93%); color: black;">
&copy; <span id="currentYear"></span> Retro. All Rights Reserved. | Developed by
<span id="author">
<a href="https://www.linkedin.com" target="_blank" style="text-decoration: none;">Retro Team</a>
</span>
</div>

<script>
// JavaScript to dynamically set the current year
document.getElementById("currentYear").textContent = new Date().getFullYear();
</script>

<div>
<button id="sr" style="z-index: 1000; display: block;">
<div class="circle1">
Expand All @@ -814,29 +821,32 @@ <h4 style="font-family: var(--ff-philosopher);color: hsl(203, 30%, 26%);">Follow
<script>
// Initialize data in localStorage if it doesn't exist
if (!localStorage.getItem('blogPosts')) {
localStorage.setItem('blogPosts', JSON.stringify([
{
id: 1,
title: "10 Must-Visit Destinations for 2024",
content: "As we enter 2024, the world of travel continues to evolve...",
author: "Travel Expert",
date: "May 15, 2024",
category: "Destinations",
tags: ["2024", "travel", "destinations"],
comments: []
},
// Add more sample posts here
]));
const currentYear = new Date().getFullYear(); // Get the current year dynamically
localStorage.setItem('blogPosts', JSON.stringify([
{
id: 1,
title: `10 Must-Visit Destinations for ${currentYear}`,
content: `As we enter ${currentYear}, the world of travel continues to evolve...`,
author: "Travel Expert",
date: `May 15, ${currentYear}`, // Adjust this date format if needed
category: "Destinations",
tags: [currentYear.toString(), "travel", "destinations"],
comments: []
},
// Add more sample posts here
]));
}

if (!localStorage.getItem('categories')) {
localStorage.setItem('categories', JSON.stringify(["Destinations", "Sustainable Travel", "Budget Travel", "Solo Travel", "Food"]));
}

if (!localStorage.getItem('tags')) {
localStorage.setItem('tags', JSON.stringify(["2024", "travel", "destinations", "sustainable", "budget", "solo", "food"]));
const currentYear = new Date().getFullYear(); // Get the current year dynamically
localStorage.setItem('tags', JSON.stringify([currentYear.toString(), "travel", "destinations", "sustainable", "budget", "solo", "food"]));
}


// Function to get data from localStorage
function getLocalData(key) {
return JSON.parse(localStorage.getItem(key));
Expand Down Expand Up @@ -1326,5 +1336,9 @@ <h2>Manage Tags</h2>
// Initialize the blog when the DOM is fully loaded
document.addEventListener('DOMContentLoaded', initializeBlog);
</script>
<script>
// Get the current year and update the span element
document.getElementById('currentYear').textContent = new Date().getFullYear();
</script>
</body>
</html>
6 changes: 5 additions & 1 deletion Html-files/booknow.html
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,12 @@ <h2 style="color: black;">Our Services</h2>
</section>
</div>
<footer>
<p>&copy; 2024 Retro. All rights reserved.</p>
<p>&copy; <span id="currentYear"></span> Retro. All Rights Reserved.</p>
</footer>
<script>
// Get the current year and update the span element
document.getElementById('currentYear').textContent = new Date().getFullYear();
</script>
<script>
window.embeddedChatbotConfig = {
chatbotId: "dGlQ5bP-F7GodLWzgrVAx",
Expand Down
15 changes: 11 additions & 4 deletions Html-files/cart.html
Original file line number Diff line number Diff line change
Expand Up @@ -530,12 +530,19 @@ <h4 style="color: hsl(203, 30%,26%);font-family: var(--ff-philosopher);">Follow
<p style="margin-bottom:0;font-family: var(--ff-philosopher);">Stay connected with us on social media for the
latest updates, latest collection, and vintage adventures.
</p>
<div class="copyright" style="color: hsl(203, 30%,26%);font-family: var(--ff-philosopher);">
© 2024 Retro . All Rights Reserved. | <span id="author">
<a href="https://www.linkedin.com" target="_blank" style="text-decoration: none;">Retro Team</a>
<div class="copyright" style="color: hsl(203, 30%,26%); font-family: var(--ff-philosopher);">
&copy; <span id="currentYear"></span> Retro. All Rights Reserved. |
<span id="author">
<a href="https://www.linkedin.com" target="_blank" style="text-decoration: none;">Retro Team</a>
</span>
<p></p>
</div>
</div>

<script>
// JavaScript to dynamically set the current year
document.getElementById("currentYear").textContent = new Date().getFullYear();
</script>

<div>
<button id="sr" style="z-index: 1000;">
<div class="circle1">
Expand Down
13 changes: 10 additions & 3 deletions Html-files/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -871,11 +871,18 @@ <h4 style="font-family: var(--ff-philosopher);color: hsl(203, 30%, 26%);">Follow
</div>
<p style="font-family: var(--ff-philosopher);background-color: hsl(20, 43%, 93%);color: hsl(203, 30%, 26%);margin-bottom:0;">Stay connected with us on social media for the latest updates, latest collection, and vintage adventures.
</p>
<div class="copyright" style="font-family: var(--ff-philosopher);background-color: hsl(20, 43%, 93%);color: black;">

&copy; 2024 Retro . All Rights Reserved. | Developed by <span id="author">
<div class="copyright" style="font-family: var(--ff-philosopher); background-color: hsl(20, 43%, 93%); color: black;">
&copy; <span id="currentYear"></span> Retro. All Rights Reserved. | Developed by
<span id="author">
<a href="https://www.linkedin.com" target="_blank" style="text-decoration: none;">Retro Team</a>
</span>
</div>

<script>
// JavaScript to dynamically set the current year
document.getElementById("currentYear").textContent = new Date().getFullYear();
</script>

<div>
<button id="sr" style="z-index: 1000; display: block;">
<div class="circle1">
Expand Down
19 changes: 10 additions & 9 deletions Html-files/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -836,15 +836,16 @@ <h4 style="font-family: var(--ff-philosopher);color: hsl(304, 14%, 46%);">Follow
</p>
<div class="copyright">
<p style="font-family: var(--ff-philosopher);">
&copy; 2024 Retro . All Rights Reserved. | Developed by <span id="author">
<a href="https://www.linkedin.com" target="_blank" style="text-decoration: none;">Retro
Team</a>
</span></p>




</div>
&copy; <span id="currentYear"></span> Retro. All Rights Reserved. | Developed by
<span id="author">
<a href="https://www.linkedin.com" target="_blank" style="text-decoration: none;">Retro Team</a>
</span>
</p>
</div>
<script>
// Get the current year and update the span element
document.getElementById('currentYear').textContent = new Date().getFullYear();
</script>
<div>
<button id="sr" style="z-index: 1000;">
<div class="circle1">
Expand Down
18 changes: 13 additions & 5 deletions Html-files/reviews.html
Original file line number Diff line number Diff line change
Expand Up @@ -847,13 +847,21 @@ <h4 style="font-family: var(--ff-philosopher);color: hsl(203, 30%, 26%);">Follow
<a class="fa-brands fa-snapchat" href="https://www.snapchat.com" ></a>

</div>
<p style="font-family: var(--ff-philosopher);background-color: hsl(20, 43%, 93%);color: hsl(203, 30%, 26%);margin-bottom:0;">Stay connected with us on social media for the latest updates, latest collection, and vintage adventures.
</p>
<div class="copyright" style="font-family: var(--ff-philosopher);background-color: hsl(20, 43%, 93%);color: black;">

&copy; 2024 Retro . All Rights Reserved. | Developed by <span id="author">
<div>
<p style="font-family: var(--ff-philosopher); background-color: hsl(20, 43%, 93%); color: hsl(203, 30%, 26%); margin-bottom: 0;">
Stay connected with us on social media for the latest updates, latest collection, and vintage adventures.
</p>
&copy; <span id="currentYear"></span> Retro. All Rights Reserved. | Developed by
<span id="author">
<a href="https://www.linkedin.com" target="_blank" style="text-decoration: none;">Retro Team</a>
</span>
</div>

<script>
// JavaScript to dynamically set the current year
document.getElementById("currentYear").textContent = new Date().getFullYear();
</script>

<div>
<button id="sr" style="z-index: 1000; display: block;">
<div class="circle1">
Expand Down
25 changes: 16 additions & 9 deletions Html-files/services.html
Original file line number Diff line number Diff line change
Expand Up @@ -716,15 +716,22 @@ <h3 style="font-family: var(--ff-philosopher); color: hsl(203, 30%, 26%);">Conta
updates, latest collection, and vintage adventures.
</p>
<div class="copyright">
<p
style="font-family: var(--ff-philosopher);color: hsl(203, 30%, 26%);">
&copy; 2024 Retro . All Rights Reserved. | <span
id="author">
<a href="https://www.linkedin.com"
target="_blank"
style="text-decoration: none;">Retro
Team</a>
</span></p>
<p style="font-family: var(--ff-philosopher); color: hsl(203, 30%, 26%);">
&copy; <span id="currentYear"></span> Retro. All Rights Reserved. |
<span id="author">
<a href="https://www.linkedin.com" target="_blank" style="text-decoration: none;">Retro Team</a>
</span>
</p>

<script>
// JavaScript to dynamically set the current year
document.getElementById("currentYear").textContent = new Date().getFullYear();
</script>

<script>
// Get the current year and update the span element
document.getElementById('currentYear').textContent = new Date().getFullYear();
</script>

</div>
<div>
Expand Down

0 comments on commit adff33c

Please sign in to comment.