Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	
		dylanebert
		
	commited on
		
		
					Commit 
							
							·
						
						2b24c01
	
1
								Parent(s):
							
							c185003
								
improved mobile friendliness
Browse files
    	
        viewer/src/routes/models/[slug]/+page.svelte
    CHANGED
    
    | 
         @@ -104,13 +104,22 @@ 
     | 
|
| 104 | 
         
             
                    border: 1px solid #333;
         
     | 
| 105 | 
         
             
                    box-sizing: border-box;
         
     | 
| 106 | 
         
             
                    width: 100%;
         
     | 
| 107 | 
         
            -
                    margin:  
     | 
| 108 | 
         | 
| 109 | 
         
             
                    @media (min-width: 576px) {
         
     | 
| 110 | 
         
             
                        width: 384px;
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 111 | 
         
             
                        margin-top: 0;
         
     | 
| 
         | 
|
| 112 | 
         
             
                    }
         
     | 
| 113 | 
         
            -
                } 
     | 
| 114 | 
         | 
| 115 | 
         
             
                .grid-item {
         
     | 
| 116 | 
         
             
                    @media (min-width: 576px) {
         
     | 
| 
         | 
|
| 104 | 
         
             
                    border: 1px solid #333;
         
     | 
| 105 | 
         
             
                    box-sizing: border-box;
         
     | 
| 106 | 
         
             
                    width: 100%;
         
     | 
| 107 | 
         
            +
                    margin: 0;
         
     | 
| 108 | 
         | 
| 109 | 
         
             
                    @media (min-width: 576px) {
         
     | 
| 110 | 
         
             
                        width: 384px;
         
     | 
| 111 | 
         
            +
                    }
         
     | 
| 112 | 
         
            +
                }
         
     | 
| 113 | 
         
            +
             
     | 
| 114 | 
         
            +
                .grid {
         
     | 
| 115 | 
         
            +
                    margin-top: 10px;
         
     | 
| 116 | 
         
            +
                    margin-left: 0;
         
     | 
| 117 | 
         
            +
             
     | 
| 118 | 
         
            +
                    @media (min-width: 576px) {
         
     | 
| 119 | 
         
             
                        margin-top: 0;
         
     | 
| 120 | 
         
            +
                        margin-left: 10px;
         
     | 
| 121 | 
         
             
                    }
         
     | 
| 122 | 
         
            +
                }
         
     | 
| 123 | 
         | 
| 124 | 
         
             
                .grid-item {
         
     | 
| 125 | 
         
             
                    @media (min-width: 576px) {
         
     | 
    	
        viewer/src/routes/viewer/[slug]/+page.svelte
    CHANGED
    
    | 
         @@ -182,11 +182,16 @@ 
     | 
|
| 182 | 
         
             
                    });
         
     | 
| 183 | 
         
             
                    scene!.clearColor = cachedColor;
         
     | 
| 184 | 
         
             
                }
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 185 | 
         
             
            </script>
         
     | 
| 186 | 
         | 
| 187 | 
         
             
            <div bind:this={container} class="canvas-container hud-expanded">
         
     | 
| 188 | 
         
             
                <div bind:this={overlay} class="loading-overlay" />
         
     | 
| 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">
         
     | 
| 
         @@ -265,25 +270,36 @@ 
     | 
|
| 265 | 
         
             
                    position: absolute;
         
     | 
| 266 | 
         
             
                    top: 0;
         
     | 
| 267 | 
         
             
                    left: 0;
         
     | 
| 268 | 
         
            -
                    width:  
     | 
| 269 | 
         
             
                    height: 100%;
         
     | 
| 270 | 
         
             
                    box-sizing: border-box;
         
     | 
| 271 | 
         
             
                    font-size: 14px;
         
     | 
| 272 | 
         
            -
                    border-right: 1px solid #444;
         
     | 
| 273 | 
         
             
                    background-color: #1a1b1e;
         
     | 
| 274 | 
         
             
                    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
         
     | 
| 275 | 
         
             
                    transition: transform 0.2s ease;
         
     | 
| 276 | 
         
             
                    margin: 0;
         
     | 
| 277 | 
         
            -
                    padding: 0;
         
     | 
| 
         | 
|
| 
         | 
|
| 278 | 
         | 
| 279 | 
         
             
                    @media (max-width: 768px) {
         
     | 
| 280 | 
         
            -
                        width:  
     | 
| 281 | 
         
             
                    }
         
     | 
| 282 | 
         
             
                }
         
     | 
| 283 | 
         | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 284 | 
         
             
                .hud-toggle-btn {
         
     | 
| 285 | 
         
             
                    position: absolute;
         
     | 
| 286 | 
         
            -
                    right:  
     | 
| 287 | 
         
             
                    top: 50%;
         
     | 
| 288 | 
         
             
                    transform: translateY(-50%);
         
     | 
| 289 | 
         
             
                    background-color: #1a1b1e;
         
     | 
| 
         @@ -296,6 +312,7 @@ 
     | 
|
| 296 | 
         
             
                    height: 100%;
         
     | 
| 297 | 
         
             
                    box-sizing: border-box;
         
     | 
| 298 | 
         
             
                    transition: background-color 0.2s ease;
         
     | 
| 
         | 
|
| 299 | 
         
             
                }
         
     | 
| 300 | 
         | 
| 301 | 
         
             
                .hud-toggle-btn:hover {
         
     | 
| 
         @@ -303,7 +320,7 @@ 
     | 
|
| 303 | 
         
             
                }
         
     | 
| 304 | 
         | 
| 305 | 
         
             
                .hud.collapsed {
         
     | 
| 306 | 
         
            -
                    transform: translateX(-100%);
         
     | 
| 307 | 
         
             
                }
         
     | 
| 308 | 
         | 
| 309 | 
         
             
                .section {
         
     | 
| 
         @@ -317,6 +334,7 @@ 
     | 
|
| 317 | 
         
             
                    color: #aaa;
         
     | 
| 318 | 
         
             
                    font-weight: bold;
         
     | 
| 319 | 
         
             
                    padding: 4px;
         
     | 
| 
         | 
|
| 320 | 
         
             
                }
         
     | 
| 321 | 
         | 
| 322 | 
         
             
                .section-title {
         
     | 
| 
         | 
|
| 182 | 
         
             
                    });
         
     | 
| 183 | 
         
             
                    scene!.clearColor = cachedColor;
         
     | 
| 184 | 
         
             
                }
         
     | 
| 185 | 
         
            +
             
     | 
| 186 | 
         
            +
                function exit() {
         
     | 
| 187 | 
         
            +
                    window.history.back();
         
     | 
| 188 | 
         
            +
                }
         
     | 
| 189 | 
         
             
            </script>
         
     | 
| 190 | 
         | 
| 191 | 
         
             
            <div bind:this={container} class="canvas-container hud-expanded">
         
     | 
| 192 | 
         
             
                <div bind:this={overlay} class="loading-overlay" />
         
     | 
| 193 | 
         
             
                <canvas bind:this={canvas} width="512" height="512" />
         
     | 
| 194 | 
         
            +
                <div class="exit-button" on:pointerdown={exit}>x</div>
         
     | 
| 195 | 
         
             
                <div bind:this={hud} class="hud" class:collapsed>
         
     | 
| 196 | 
         
             
                    <button bind:this={hudToggleBtn} class="hud-toggle-btn">(</button>
         
     | 
| 197 | 
         
             
                    <div class="section">
         
     | 
| 
         | 
|
| 270 | 
         
             
                    position: absolute;
         
     | 
| 271 | 
         
             
                    top: 0;
         
     | 
| 272 | 
         
             
                    left: 0;
         
     | 
| 273 | 
         
            +
                    width: 286px;
         
     | 
| 274 | 
         
             
                    height: 100%;
         
     | 
| 275 | 
         
             
                    box-sizing: border-box;
         
     | 
| 276 | 
         
             
                    font-size: 14px;
         
     | 
| 
         | 
|
| 277 | 
         
             
                    background-color: #1a1b1e;
         
     | 
| 278 | 
         
             
                    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3);
         
     | 
| 279 | 
         
             
                    transition: transform 0.2s ease;
         
     | 
| 280 | 
         
             
                    margin: 0;
         
     | 
| 281 | 
         
            +
                    padding: 0 30px 0 0;
         
     | 
| 282 | 
         
            +
                    overflow-x: hidden;
         
     | 
| 283 | 
         
            +
                    overflow-y: auto;
         
     | 
| 284 | 
         | 
| 285 | 
         
             
                    @media (max-width: 768px) {
         
     | 
| 286 | 
         
            +
                        width: 100%;
         
     | 
| 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;
         
     | 
| 303 | 
         
             
                    top: 50%;
         
     | 
| 304 | 
         
             
                    transform: translateY(-50%);
         
     | 
| 305 | 
         
             
                    background-color: #1a1b1e;
         
     | 
| 
         | 
|
| 312 | 
         
             
                    height: 100%;
         
     | 
| 313 | 
         
             
                    box-sizing: border-box;
         
     | 
| 314 | 
         
             
                    transition: background-color 0.2s ease;
         
     | 
| 315 | 
         
            +
                    border-left: 1px solid #444;
         
     | 
| 316 | 
         
             
                }
         
     | 
| 317 | 
         | 
| 318 | 
         
             
                .hud-toggle-btn:hover {
         
     | 
| 
         | 
|
| 320 | 
         
             
                }
         
     | 
| 321 | 
         | 
| 322 | 
         
             
                .hud.collapsed {
         
     | 
| 323 | 
         
            +
                    transform: translateX(calc(-100% + 30px));
         
     | 
| 324 | 
         
             
                }
         
     | 
| 325 | 
         | 
| 326 | 
         
             
                .section {
         
     | 
| 
         | 
|
| 334 | 
         
             
                    color: #aaa;
         
     | 
| 335 | 
         
             
                    font-weight: bold;
         
     | 
| 336 | 
         
             
                    padding: 4px;
         
     | 
| 337 | 
         
            +
                    padding-top: 10px;
         
     | 
| 338 | 
         
             
                }
         
     | 
| 339 | 
         | 
| 340 | 
         
             
                .section-title {
         
     | 
    	
        viewer/static/global.css
    CHANGED
    
    | 
         @@ -33,7 +33,7 @@ body { 
     | 
|
| 33 | 
         | 
| 34 | 
         
             
            .header {
         
     | 
| 35 | 
         
             
                padding: 20px 0;
         
     | 
| 36 | 
         
            -
                font-size:  
     | 
| 37 | 
         
             
                font-weight: bold;
         
     | 
| 38 | 
         
             
                color: #aaa;
         
     | 
| 39 | 
         
             
            }
         
     | 
| 
         | 
|
| 33 | 
         | 
| 34 | 
         
             
            .header {
         
     | 
| 35 | 
         
             
                padding: 20px 0;
         
     | 
| 36 | 
         
            +
                font-size: 24px;
         
     | 
| 37 | 
         
             
                font-weight: bold;
         
     | 
| 38 | 
         
             
                color: #aaa;
         
     | 
| 39 | 
         
             
            }
         
     |