diff --git a/index.html b/index.html index f8d38d6..7839cb9 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,9 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <script src="./res/index/script.js"></script> - + <script src="./res/global.js"></script> <link rel="stylesheet" href="./res/global.css"> + <link rel="stylesheet" href="./res/index/style.css"> <title>Fabrika Hrádek Tour</title> diff --git a/map.html b/map.html index eb60fdb..4ed26b1 100644 --- a/map.html +++ b/map.html @@ -7,12 +7,14 @@ <title>Fabrika Hrádek Tour</title> <link rel="icon" type="image/x-icon" href="http://207.180.212.190/fht/favicon.ico"> - <link rel="stylesheet" href="./res/map/style.css"> <link rel="stylesheet" href="./res/global.css"> + <script src="./res/global.js"></script> + <link rel="stylesheet" href="./res/map/style.css"> <script src="./res/map/script.js"></script> </head> <body> + <button id="back_button" onclick="move('./index.html')">⇽</button> <div class="imgbox"> <img class="center-fit" src="http://207.180.212.190/fht/map.jpg" draggable="false"> </div> 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 @@ <link rel="icon" type="image/x-icon" href="http://207.180.212.190/fht/favicon.ico"> <link rel="stylesheet" href="./global.css"> + <script src="./global.js"></script> + <link rel="stylesheet" href="./panorama/style.css"> <script src="./panorama/script.js"></script> <title>Fabrika Hrádek Tour</title> </head> <body onload="load_panorama()"> + <button id="back_button" onclick="move('../index.html')">⇽</button> <div id="panorama_div"> <canvas id="panorama">This browser doesn't seem to support canvas. sorry idk</canvas> </div>