added back_button to map & panorama && created global js

This commit is contained in:
Václav Šmejkal 2023-05-29 19:17:35 +02:00
parent 381b738a80
commit 7b47e35008
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
6 changed files with 23 additions and 5 deletions

View File

@ -5,9 +5,9 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <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/global.css">
<link rel="stylesheet" href="./res/index/style.css"> <link rel="stylesheet" href="./res/index/style.css">
<title>Fabrika Hrádek Tour</title> <title>Fabrika Hrádek Tour</title>

View File

@ -7,12 +7,14 @@
<title>Fabrika Hrádek Tour</title> <title>Fabrika Hrádek Tour</title>
<link rel="icon" type="image/x-icon" href="http://207.180.212.190/fht/favicon.ico"> <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"> <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> <script src="./res/map/script.js"></script>
</head> </head>
<body> <body>
<button id="back_button" onclick="move('./index.html')">&#8701;</button>
<div class="imgbox"> <div class="imgbox">
<img class="center-fit" src="http://207.180.212.190/fht/map.jpg" draggable="false"> <img class="center-fit" src="http://207.180.212.190/fht/map.jpg" draggable="false">
</div> </div>

View File

@ -7,3 +7,16 @@ body
background-size: cover; background-size: cover;
user-select: none; 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;
}

View File

@ -62,7 +62,7 @@ window.onload = function()
(Math.abs(y - points[i][1]) <= tolerance_y || -Math.abs(y - points[i][1]) >= tolerance_y)) (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; break;
} }
} }
@ -74,7 +74,7 @@ function open_panorama(img, x, y)
open("./res/panorama.html?img=" + img + "&aspect_x=" + x + "&aspect_y=" + y, "_self"); 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(";")) if (!img.includes(";"))
{ {

View File

@ -7,12 +7,15 @@
<link rel="icon" type="image/x-icon" href="http://207.180.212.190/fht/favicon.ico"> <link rel="icon" type="image/x-icon" href="http://207.180.212.190/fht/favicon.ico">
<link rel="stylesheet" href="./global.css"> <link rel="stylesheet" href="./global.css">
<script src="./global.js"></script>
<link rel="stylesheet" href="./panorama/style.css"> <link rel="stylesheet" href="./panorama/style.css">
<script src="./panorama/script.js"></script> <script src="./panorama/script.js"></script>
<title>Fabrika Hrádek Tour</title> <title>Fabrika Hrádek Tour</title>
</head> </head>
<body onload="load_panorama()"> <body onload="load_panorama()">
<button id="back_button" onclick="move('../index.html')">&#8701;</button>
<div id="panorama_div"> <div id="panorama_div">
<canvas id="panorama">This browser doesn't seem to support canvas. sorry idk</canvas> <canvas id="panorama">This browser doesn't seem to support canvas. sorry idk</canvas>
</div> </div>