From 7b47e350086f985624bee0cd4ee99ceccda1cf76 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Mon, 29 May 2023 19:17:35 +0200 Subject: [PATCH] added back_button to map & panorama && created global js --- index.html | 4 ++-- map.html | 4 +++- res/global.css | 13 +++++++++++++ res/{index/script.js => global.js} | 0 res/map/script.js | 4 ++-- res/panorama.html | 3 +++ 6 files changed, 23 insertions(+), 5 deletions(-) rename res/{index/script.js => global.js} (100%) diff --git a/index.html b/index.html index f8d38d6..7839cb9 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,9 @@ - - + + Fabrika Hrádek Tour diff --git a/map.html b/map.html index eb60fdb..4ed26b1 100644 --- a/map.html +++ b/map.html @@ -7,12 +7,14 @@ Fabrika Hrádek Tour - + + +
diff --git a/res/global.css b/res/global.css index 0ed0253..daea5d2 100644 --- a/res/global.css +++ b/res/global.css @@ -6,4 +6,17 @@ body -o-background-size: cover; background-size: cover; user-select: none; +} + +#back_button +{ + position: fixed; + margin-top: 1vh; + margin-left: 1vh; + font-size: xx-large; + padding: 1vh; + border-radius: 0.5vh; + background-color: #B97C15; + color: #C1BFBE; + border-color: #4D2B09; } \ No newline at end of file diff --git a/res/index/script.js b/res/global.js similarity index 100% rename from res/index/script.js rename to res/global.js diff --git a/res/map/script.js b/res/map/script.js index f85f84b..67dfa1e 100644 --- a/res/map/script.js +++ b/res/map/script.js @@ -62,7 +62,7 @@ window.onload = function() (Math.abs(y - points[i][1]) <= tolerance_y || -Math.abs(y - points[i][1]) >= tolerance_y)) ) { - move(points[i][2], points[i][3], points[i][4]); + move_to_panorama(points[i][2], points[i][3], points[i][4]); break; } } @@ -74,7 +74,7 @@ function open_panorama(img, x, y) open("./res/panorama.html?img=" + img + "&aspect_x=" + x + "&aspect_y=" + y, "_self"); } -function move(img, x, y) +function move_to_panorama(img, x, y) { if (!img.includes(";")) { diff --git a/res/panorama.html b/res/panorama.html index 3373e94..3630c73 100644 --- a/res/panorama.html +++ b/res/panorama.html @@ -7,12 +7,15 @@ + + Fabrika Hrádek Tour +
This browser doesn't seem to support canvas. sorry idk