Skip to content

Commit

Permalink
Add dynamic copyright year script to footer
Browse files Browse the repository at this point in the history
Added a JavaScript script to dynamically set the current year in the footer.
  • Loading branch information
SaiTejaswaniBikkasani committed May 31, 2024
1 parent e565d47 commit 6d18e7f
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 18 deletions.
5 changes: 3 additions & 2 deletions Html-files/ContactUpdate.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ <h4>Follow Us</h4>
<p>Stay connected with us on social media for the latest updates, recipes, and foodie adventures.
</p>
<div class="copyright">
&copy; 2024 Foodies - All Rights Reserved | <span id="author">
&copy; <span id="copyright-year"></span> Foodies - All Rights Reserved | <span id="author">
<a href="https://www.linkedin.com/in/khushi-joshi-95a587256/" target="_blank">Khushi Joshi</a>
</span></p>
</div>
Expand All @@ -248,6 +248,7 @@ <h4>Follow Us</h4>
style="position: fixed; bottom: 50px; right: 50px; padding: 10px; background-color: brown;"><i
class="fa-solid fa-angle-up"></i></a>

<script>document.getElementById("copyright-year").textContent = new Date().getFullYear();</script>

<!-- JS Libraries -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
Expand All @@ -264,4 +265,4 @@ <h4>Follow Us</h4>
</script>
</body>

</html>
</html>
5 changes: 3 additions & 2 deletions Html-files/book-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@ <h4>Follow Us</h4>
<p>Stay connected with us on social media for the latest updates, recipes, and foodie adventures.
</p>
<div class="copyright">
&copy; 2024 Foodies - All Rights Reserved | <span id="author">
&copy; <span id="copyright-year"></span> Foodies - All Rights Reserved | <span id="author">
<a href="https://www.linkedin.com/in/khushi-joshi-95a587256/" target="_blank">Khushi Joshi</a>
</span></p>

</div>
</div>
</div>
</footer>
<script>document.getElementById("copyright-year").textContent = new Date().getFullYear();</script>
<script>
const HandleSubmit = () => {
let confirmation_code = Math.floor(Math.random() * 9000);
Expand All @@ -170,4 +171,4 @@ <h4>Follow Us</h4>
</script>
</body>

</html>
</html>
5 changes: 3 additions & 2 deletions Html-files/cart.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,19 +155,20 @@ <h4>Follow Us</h4>
<p>Stay connected with us on social media for the latest updates, recipes, and foodie adventures.</p>

<div class="copyright">
&copy; 2024 Foodies - All Rights Reserved | <span id="author">
&copy; <span id="copyright-year"></span> Foodies - All Rights Reserved | <span id="author">
<a href="https://www.linkedin.com/in/khushi-joshi-95a587256/" target="_blank">Khushi Joshi</a>
</span></p>
</div>
</div>
</div>
</footer>

<script>document.getElementById("copyright-year").textContent = new Date().getFullYear();</script>

<!-- <script src="../cart.js"></script> -->
<script src="cart.js">

</script>
</body>

</html>
</html>
5 changes: 3 additions & 2 deletions Html-files/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,14 @@ <h4>Follow Us</h4>
<p>Stay connected with us on social media for the latest updates, recipes, and foodie adventures.
</p>
<div class="copyright">
&copy; 2024 Foodies - All Rights Reserved | <span id="author">
&copy; <span id="copyright-year"></span> Foodies - All Rights Reserved | <span id="author">
<a href="https://www.linkedin.com/in/khushi-joshi-95a587256/" target="_blank">Khushi Joshi</a>
</span></p>
</div>
</div>
</div>
</footer>
<script>document.getElementById("copyright-year").textContent = new Date().getFullYear();</script>
</body>

</html>
</html>
5 changes: 3 additions & 2 deletions Html-files/contact_GSSoC_contriburted.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ <h4>Follow Us</h4>
<p>Stay connected with us on social media for the latest updates, recipes, and foodie adventures.
</p>
<div class="copyright">
&copy; 2024 Foodies . All Rights Reserved. | Developed by Khushi Joshi</p>
&copy; <span id="copyright-year"></span> Foodies . All Rights Reserved. | Developed by Khushi Joshi</p>

</div>
</div>
</footer>
<script>document.getElementById("copyright-year").textContent = new Date().getFullYear();</script>
</body>

</html>
</html>
6 changes: 4 additions & 2 deletions Html-files/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ <h4>Follow Us</h4>
<p>Stay connected with us on social media for the latest updates, recipes, and foodie adventures.
</p>
<div class="copyright">
&copy; 2024 Foodies - All Rights Reserved | <span id="author">
&copy; <span id="copyright-year"></span> Foodies - All Rights Reserved | <span id="author">
<a href="https://www.linkedin.com/in/khushi-joshi-95a587256/" target="_blank">Khushi Joshi</a>
</span></p>

Expand All @@ -414,6 +414,8 @@ <h4>Follow Us</h4>
</div>
</footer>

<script>document.getElementById("copyright-year").textContent = new Date().getFullYear();</script>

<script src="menu.js">
function redirectLogin() {
window.location.href = "login.html";
Expand All @@ -424,4 +426,4 @@ <h4>Follow Us</h4>
</script>
</body>

</html>
</html>
5 changes: 3 additions & 2 deletions Html-files/services.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,15 @@ <h4>Follow Us</h4>
<p>Stay connected with us on social media for the latest updates, recipes, and foodie adventures.
</p>
<div class="copyright">
&copy; 2024 Foodies - All Rights Reserved | <span id="author">
&copy; <span id="copyright-year"></span> Foodies - All Rights Reserved | <span id="author">
<a href="https://www.linkedin.com/in/khushi-joshi-95a587256/" target="_blank">Khushi Joshi</a>
</span></p>
</div>
</div>
</div>
</footer>

<script>document.getElementById("copyright-year").textContent = new Date().getFullYear();</script>
</body>

</html>
</html>
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ <h4>Follow Us</h4>
<p>Stay connected with us on social media for the latest updates, recipes, and foodie adventures.
</p>
<div class="copyright">
&copy; 2024 Foodies - All Rights Reserved | <span id="author">
&copy; <span id="copyright-year"></span> Foodies - All Rights Reserved | <span id="author">
<a href="https://www.linkedin.com/in/khushi-joshi-95a587256/" target="_blank">Khushi
Joshi</a>
</span></p>
Expand All @@ -422,7 +422,7 @@ <h4>Follow Us</h4>
</button>
<!--Scroll top button finish-->
</div>

<script>document.getElementById("copyright-year").textContent = new Date().getFullYear();</script>
<script>
const heroSlider = document.querySelector("[data-hero-slider]");
const heroSliderItems = document.querySelectorAll("[data-hero-slider-item]");
Expand Down Expand Up @@ -461,7 +461,7 @@ <h4>Follow Us</h4>

heroSliderPrevBtn.addEventListener("click", slidePrev);

// auto slide
// auto slide

let autoSlideInterval;

Expand Down Expand Up @@ -545,4 +545,4 @@ <h4>Follow Us</h4>
</script>
main

</html>
</html>

0 comments on commit 6d18e7f

Please sign in to comment.