diff --git a/common/js/trekungen.js b/common/js/trekungen.js index 3f23f6f..02173fb 100644 --- a/common/js/trekungen.js +++ b/common/js/trekungen.js @@ -11,6 +11,8 @@ const TREKS = [ 'denvegaser', 'via603', 'sierraround', 'phoever', 'amtrak8', const offcanvasTitle = document.querySelector('#offcanvasTitle'); const trekTitle = document.querySelector('#trekTitle'); const trekYouTube = document.querySelector('#trekYouTube'); +const trekWebPage = document.querySelector('#trekWebPage'); +const trekGitHub = document.querySelector('#trekGitHub'); const offcanvas = new bootstrap.Offcanvas(document.querySelector('#offcanvas')); // OpenLayers components @@ -68,6 +70,8 @@ function updateOffcanvas(trek) { .then((response) => response.json()) .then((json) => { trekTitle.textContent = json.title; trekYouTube.src = json.youtube; + trekWebPage.href = document.location.href + trek, + trekWebPage.hidden = (json.hasWebPage !== true), trekGitHub.href = TREKUNGEN_GITHUB + trek }); offcanvasTitle.textContent = trek; offcanvas.show(); diff --git a/denvegaser/overview.json b/denvegaser/overview.json index a8b4412..4d3973d 100644 --- a/denvegaser/overview.json +++ b/denvegaser/overview.json @@ -1,4 +1,5 @@ { "title": "Denver to Las Vegas roundtrip on scenic byways", - "youtube": "https://www.youtube.com/embed/videoseries?si=kqP-Vkp7r0FaX5Cy&list=PLuoY9uzz-lDHwVTLOTdI0hVyUgSXRSK1r" + "youtube": "https://www.youtube.com/embed/videoseries?si=kqP-Vkp7r0FaX5Cy&list=PLuoY9uzz-lDHwVTLOTdI0hVyUgSXRSK1r", + "hasWebPage": true } \ No newline at end of file diff --git a/index.html b/index.html index 40bc7a1..bf4c3b4 100644 --- a/index.html +++ b/index.html @@ -94,6 +94,10 @@

referrerpolicy="strict-origin-when-cross-origin" allowfullscreen> +

+ +

Source