dylanebert
commited on
Commit
·
b1d8a4c
1
Parent(s):
2b24c01
model page back button
Browse files
viewer/src/routes/models/[slug]/+page.svelte
CHANGED
|
@@ -16,10 +16,15 @@
|
|
| 16 |
const image = event.currentTarget as HTMLImageElement;
|
| 17 |
image.src = placeholderImage;
|
| 18 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</script>
|
| 20 |
|
| 21 |
<div class="container">
|
| 22 |
<div class="header">{data.model.title}</div>
|
|
|
|
| 23 |
<div class="model-container">
|
| 24 |
<div class="model-info">
|
| 25 |
<p class="model-header">Info</p>
|
|
|
|
| 16 |
const image = event.currentTarget as HTMLImageElement;
|
| 17 |
image.src = placeholderImage;
|
| 18 |
}
|
| 19 |
+
|
| 20 |
+
function exit() {
|
| 21 |
+
window.history.back();
|
| 22 |
+
}
|
| 23 |
</script>
|
| 24 |
|
| 25 |
<div class="container">
|
| 26 |
<div class="header">{data.model.title}</div>
|
| 27 |
+
<div class="exit-button" on:pointerdown={exit}>x</div>
|
| 28 |
<div class="model-container">
|
| 29 |
<div class="model-info">
|
| 30 |
<p class="model-header">Info</p>
|
viewer/src/routes/viewer/[slug]/+page.svelte
CHANGED
|
@@ -287,16 +287,6 @@
|
|
| 287 |
}
|
| 288 |
}
|
| 289 |
|
| 290 |
-
.exit-button {
|
| 291 |
-
position: absolute;
|
| 292 |
-
top: 10px;
|
| 293 |
-
right: 16px;
|
| 294 |
-
color: #aaa;
|
| 295 |
-
font-size: 24px;
|
| 296 |
-
cursor: pointer;
|
| 297 |
-
font-weight: bold;
|
| 298 |
-
}
|
| 299 |
-
|
| 300 |
.hud-toggle-btn {
|
| 301 |
position: absolute;
|
| 302 |
right: 0;
|
|
|
|
| 287 |
}
|
| 288 |
}
|
| 289 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 290 |
.hud-toggle-btn {
|
| 291 |
position: absolute;
|
| 292 |
right: 0;
|
viewer/static/global.css
CHANGED
|
@@ -12,6 +12,7 @@ body {
|
|
| 12 |
margin-right: auto;
|
| 13 |
max-height: 100vh;
|
| 14 |
overflow-y: auto;
|
|
|
|
| 15 |
|
| 16 |
@media (min-width: 576px) {
|
| 17 |
max-width: 540px;
|
|
@@ -30,6 +31,20 @@ body {
|
|
| 30 |
}
|
| 31 |
}
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
.header {
|
| 35 |
padding: 20px 0;
|
|
|
|
| 12 |
margin-right: auto;
|
| 13 |
max-height: 100vh;
|
| 14 |
overflow-y: auto;
|
| 15 |
+
position: relative;
|
| 16 |
|
| 17 |
@media (min-width: 576px) {
|
| 18 |
max-width: 540px;
|
|
|
|
| 31 |
}
|
| 32 |
}
|
| 33 |
|
| 34 |
+
.exit-button {
|
| 35 |
+
position: absolute;
|
| 36 |
+
top: 10px;
|
| 37 |
+
right: 16px;
|
| 38 |
+
color: #aaa;
|
| 39 |
+
font-size: 24px;
|
| 40 |
+
cursor: pointer;
|
| 41 |
+
font-weight: bold;
|
| 42 |
+
transition: scale 0.2s ease;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
.exit-button:hover {
|
| 46 |
+
scale: 1.1;
|
| 47 |
+
}
|
| 48 |
|
| 49 |
.header {
|
| 50 |
padding: 20px 0;
|