Skip to content

Commit 769c128

Browse files
committed
Short Introduction to JavaScript
1 parent 16680bb commit 769c128

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

starter/09-Omnifood-Optimizations/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
src="https://unpkg.com/ionicons@5.4.0/dist/ionicons/ionicons.js"
2727
></script>
2828

29+
<script defer src="js/script.js"></script>
30+
2931
<title>Omnifood</title>
3032
</head>
3133
<body>
@@ -646,7 +648,8 @@ <h2 class="heading-secondary">Get your first meal for free!</h2>
646648
</ul>
647649

648650
<p class="copyright">
649-
Copyright &copy; 2027 by Omnifood, Inc. All rights reserved.
651+
Copyright &copy; <span class="year">2027</span> by Omnifood, Inc.
652+
All rights reserved.
650653
</p>
651654
</div>
652655

starter/09-Omnifood-Optimizations/script.js renamed to starter/09-Omnifood-Optimizations/js/script.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
const yearEl = document.querySelector(".year");
2+
const currentYear = new Date().getFullYear();
3+
yearEl.textContent = currentYear;
4+
15
///////////////////////////////////////////////////////////
26
// Fixing flexbox gap property missing in some Safari versions
37
function checkFlexGap() {

0 commit comments

Comments
 (0)