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 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>

View File

@ -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')">&#8701;</button>
<div class="imgbox">
<img class="center-fit" src="http://207.180.212.190/fht/map.jpg" draggable="false">
</div>

View File

@ -7,3 +7,16 @@ body
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;
}

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))
)
{
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(";"))
{

View File

@ -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')">&#8701;</button>
<div id="panorama_div">
<canvas id="panorama">This browser doesn't seem to support canvas. sorry idk</canvas>
</div>