Spaces:
Running
Running
Commit
·
53a2109
1
Parent(s):
07cc8b7
mobile improvements
Browse files
viewer/src/routes/models/[slug]/+page.svelte
CHANGED
@@ -21,6 +21,17 @@
|
|
21 |
<div class="container">
|
22 |
<div class="header">{data.model.title}</div>
|
23 |
<div class="model-container">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
<div class="grid-container">
|
25 |
<div class="grid">
|
26 |
{#each data.scenes as scene}
|
@@ -36,17 +47,6 @@
|
|
36 |
{/each}
|
37 |
</div>
|
38 |
</div>
|
39 |
-
<div class="model-info">
|
40 |
-
<p class="model-header">Info</p>
|
41 |
-
<table class="table">
|
42 |
-
{#if data.model.paper}
|
43 |
-
<tr>
|
44 |
-
<td>Paper</td>
|
45 |
-
<td><a href={data.model.paper} target="_blank">Link</a></td>
|
46 |
-
</tr>
|
47 |
-
{/if}
|
48 |
-
</table>
|
49 |
-
</div>
|
50 |
</div>
|
51 |
</div>
|
52 |
|
|
|
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>
|
26 |
+
<table class="table">
|
27 |
+
{#if data.model.paper}
|
28 |
+
<tr>
|
29 |
+
<td>Paper</td>
|
30 |
+
<td><a href={data.model.paper} target="_blank">Link</a></td>
|
31 |
+
</tr>
|
32 |
+
{/if}
|
33 |
+
</table>
|
34 |
+
</div>
|
35 |
<div class="grid-container">
|
36 |
<div class="grid">
|
37 |
{#each data.scenes as scene}
|
|
|
47 |
{/each}
|
48 |
</div>
|
49 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
</div>
|
51 |
</div>
|
52 |
|
viewer/src/routes/viewer/[slug]/+page.svelte
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
|
6 |
export let data: {
|
7 |
scene: {
|
|
|
8 |
url: string;
|
9 |
};
|
10 |
};
|
@@ -188,6 +189,9 @@
|
|
188 |
<canvas bind:this={canvas} width="512" height="512" />
|
189 |
<div bind:this={hud} class="hud" class:collapsed>
|
190 |
<button bind:this={hudToggleBtn} class="hud-toggle-btn">(</button>
|
|
|
|
|
|
|
191 |
<div class="section">
|
192 |
<div class="section-title">Stats</div>
|
193 |
<div class="info-panel">
|
@@ -220,13 +224,13 @@
|
|
220 |
flex-direction: column;
|
221 |
justify-content: center;
|
222 |
align-items: center;
|
223 |
-
width:
|
224 |
-
height:
|
225 |
overflow: hidden;
|
226 |
}
|
227 |
|
228 |
.canvas-container.hud-expanded {
|
229 |
-
padding-left:
|
230 |
}
|
231 |
|
232 |
.loading-overlay {
|
@@ -261,7 +265,7 @@
|
|
261 |
position: absolute;
|
262 |
top: 0;
|
263 |
left: 0;
|
264 |
-
width:
|
265 |
height: 100%;
|
266 |
box-sizing: border-box;
|
267 |
font-size: 14px;
|
@@ -271,6 +275,10 @@
|
|
271 |
transition: transform 0.2s ease;
|
272 |
margin: 0;
|
273 |
padding: 0;
|
|
|
|
|
|
|
|
|
274 |
}
|
275 |
|
276 |
.hud-toggle-btn {
|
@@ -304,13 +312,20 @@
|
|
304 |
box-sizing: border-box;
|
305 |
}
|
306 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
.section-title {
|
308 |
font-size: 11px;
|
309 |
font-weight: light;
|
310 |
text-transform: uppercase;
|
311 |
color: #aaa;
|
312 |
width: 100%;
|
313 |
-
padding: 4px
|
314 |
}
|
315 |
|
316 |
.info-panel {
|
|
|
5 |
|
6 |
export let data: {
|
7 |
scene: {
|
8 |
+
title: string;
|
9 |
url: string;
|
10 |
};
|
11 |
};
|
|
|
189 |
<canvas bind:this={canvas} width="512" height="512" />
|
190 |
<div bind:this={hud} class="hud" class:collapsed>
|
191 |
<button bind:this={hudToggleBtn} class="hud-toggle-btn">(</button>
|
192 |
+
<div class="section">
|
193 |
+
<div class="title">{data.scene.title}</div>
|
194 |
+
</div>
|
195 |
<div class="section">
|
196 |
<div class="section-title">Stats</div>
|
197 |
<div class="info-panel">
|
|
|
224 |
flex-direction: column;
|
225 |
justify-content: center;
|
226 |
align-items: center;
|
227 |
+
width: 100wh;
|
228 |
+
height: 100vh;
|
229 |
overflow: hidden;
|
230 |
}
|
231 |
|
232 |
.canvas-container.hud-expanded {
|
233 |
+
padding-left: 256px;
|
234 |
}
|
235 |
|
236 |
.loading-overlay {
|
|
|
265 |
position: absolute;
|
266 |
top: 0;
|
267 |
left: 0;
|
268 |
+
width: 256px;
|
269 |
height: 100%;
|
270 |
box-sizing: border-box;
|
271 |
font-size: 14px;
|
|
|
275 |
transition: transform 0.2s ease;
|
276 |
margin: 0;
|
277 |
padding: 0;
|
278 |
+
|
279 |
+
@media (max-width: 768px) {
|
280 |
+
width: calc(100% - 30px);
|
281 |
+
}
|
282 |
}
|
283 |
|
284 |
.hud-toggle-btn {
|
|
|
312 |
box-sizing: border-box;
|
313 |
}
|
314 |
|
315 |
+
.title {
|
316 |
+
font-size: 16px;
|
317 |
+
color: #aaa;
|
318 |
+
font-weight: bold;
|
319 |
+
padding: 4px;
|
320 |
+
}
|
321 |
+
|
322 |
.section-title {
|
323 |
font-size: 11px;
|
324 |
font-weight: light;
|
325 |
text-transform: uppercase;
|
326 |
color: #aaa;
|
327 |
width: 100%;
|
328 |
+
padding: 4px;
|
329 |
}
|
330 |
|
331 |
.info-panel {
|