set copyright date to current year
This commit is contained in:
parent
4684ccd512
commit
d410e1141b
|
@ -35,6 +35,6 @@
|
|||
<li class="footer__term"><a class="footer__link" href="{{ "terms-and-conditions" | relURL }}">Terms and Conditions</a></li>
|
||||
<li class="footer__term"><a class="footer__link" href="{{ "privacy-policy" | relURL }}">Privacy Policy</a></li>
|
||||
</ul>
|
||||
<p class="footer__attr">Copyright © <span id="js-copy-date">2020</span> ‐ <a class="footer__link" rel="nofollow" href="https://rayelliott.dev">rayelliott.dev</a></p>
|
||||
<p class="footer__attr">Copyright © <span id="js-copy-date">2019</span> ‐ <a class="footer__link" rel="nofollow" href="https://rayelliott.dev">rayelliott.dev</a></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
|
|
@ -49,6 +49,14 @@ function initMapbox() {
|
|||
.addTo(map);
|
||||
}
|
||||
|
||||
function setCopyDate() {
|
||||
const el = document.getElementById("js-copy-date");
|
||||
if (el) {
|
||||
const year = new Date().getFullYear();
|
||||
el.innerHTML = year;
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("DOMContentLoaded", () => {
|
||||
const swup = new Swup({
|
||||
plugins: [new SwupPreloadPlugin(), new SwupScrollPlugin()]
|
||||
|
@ -60,6 +68,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
initMapbox();
|
||||
});
|
||||
|
||||
setCopyDate();
|
||||
initBlocks();
|
||||
initMapbox();
|
||||
});
|
||||
|
|
Reference in New Issue