Spaces:
Running
Running
File size: 7,854 Bytes
84db9cd 13a86db 84db9cd 64908c9 84db9cd 64908c9 13a86db 64908c9 84db9cd 64908c9 84db9cd 13a86db 64908c9 84db9cd 13a86db 84db9cd 64908c9 84db9cd 64908c9 13a86db 64908c9 13a86db 64908c9 13a86db 64908c9 13a86db 64908c9 13a86db 64908c9 13a86db 64908c9 13a86db 84db9cd 64908c9 84db9cd 64908c9 84db9cd 64908c9 84db9cd 64908c9 0c5419e 757635a d715957 757635a f8e98b9 ac64eb8 84db9cd 64908c9 0c5419e 64908c9 84db9cd 13a86db 64908c9 ac64eb8 64908c9 84db9cd 13a86db 64908c9 13a86db 64908c9 13a86db 84db9cd 9b1df56 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Visualizer of Design Model of Nomadic Echo Interior</title>
<style>
/* Reset defaults */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #f5f5f5;
color: #333;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
display: flex;
flex-direction: column;
min-height: 100vh;
}
header {
background: linear-gradient(135deg, #4b79a1, #283e51);
color: #fff;
padding: 2rem 1rem;
text-align: center;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
header h1 {
font-size: 2rem;
letter-spacing: 1px;
}
/* Container for the toggle button */
.button-wrapper {
text-align: center;
margin: 1.5rem 0;
}
.hint-button {
padding: 0.75rem 1.5rem;
background-color: #4b79a1;
color: #fff;
border: none;
border-radius: 8px;
font-size: 1rem;
cursor: pointer;
transition: background-color 0.2s ease;
}
.hint-button:hover {
background-color: #3a5f7a;
}
main {
flex: 1;
display: flex;
justify-content: center;
padding: 0 1rem 2rem;
}
.content-wrapper {
display: flex;
width: 100%;
max-width: 1200px;
gap: 1.5rem;
justify-content: center;
}
/* Viewer container */
.viewer-container {
background-color: #fff;
border-radius: 12px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
overflow: hidden;
display: flex;
flex-direction: column;
/* Start at 70% width */
flex: 0 0 70%;
transition: flex 0.3s ease;
}
/* Class to shrink viewer to 50% */
.half-width {
flex: 0 0 50% !important;
}
.viewer-header {
background-color: #283e51;
color: #fff;
padding: 1rem;
text-align: center;
font-size: 1.25rem;
letter-spacing: 0.5px;
}
.sketchfab-embed-wrapper {
position: relative;
width: 100%;
/* 16:9 aspect ratio */
padding-top: 56.25%;
}
.sketchfab-embed-wrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
border-radius: 0 0 12px 12px;
}
.credits {
text-align: right;
font-size: 0.8rem;
color: #777;
padding: 0.5rem 1rem;
}
.credits a {
color: #4b79a1;
text-decoration: none;
}
/* Plan container (hidden initially) */
.plan-container {
background-color: #fff;
border-radius: 12px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
overflow: hidden;
display: none; /* hidden by default */
flex-direction: column;
/* Will become half-width when shown */
flex: 0 0 50%;
transition: flex 0.3s ease;
}
/* Plan image wrapper to maintain 16:9 aspect ratio */
.plan-image-wrapper {
position: relative;
width: 100%;
padding-top: 56.25%;
background-color: #000;
}
.plan-image-wrapper img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: contain;
}
footer {
background-color: #283e51;
color: #fff;
text-align: center;
padding: 1rem;
font-size: 0.9rem;
}
@media (max-width: 900px) {
.content-wrapper {
flex-direction: column;
align-items: center;
}
.viewer-container,
.plan-container {
flex: 0 0 100% !important;
max-width: 100%;
}
}
@media (max-width: 600px) {
header h1 {
font-size: 1.5rem;
}
.viewer-header {
font-size: 1rem;
}
.hint-button {
width: 80%;
font-size: 0.9rem;
}
}
</style>
</head>
<body>
<header>
<h1>Visualizer of Design Model of Nomadic Echo Interior</h1>
</header>
<!-- Button placed outside the render card -->
<div class="button-wrapper">
<button class="hint-button" id="hintBtn">Show Floor Plan</button>
</div>
<!-- src="https://sketchfab.com/models/3d0aefaafa9c4143a9e67e67895dc4da/embed?autostart=1&camera=0&preload=1" -->
<main>
<div class="content-wrapper">
<!-- Viewer Panel (initially 70% width) -->
<div class="viewer-container" id="viewerPanel">
<div class="viewer-header">Explore the 3D Model</div>
<div class="sketchfab-embed-wrapper">
<iframe
title="25d4c696-c992-43d5-ab5a-03212692591a"
src="https://sketchfab.com/models/36ae900f302a4cf18568411621d6e6a0/embed?autostart=1&camera=0&preload=1"
allow="autoplay; fullscreen; xr-spatial-tracking"
xr-spatial-tracking
execution-while-out-of-viewport
execution-while-not-rendered
web-share
></iframe>
</div>
<div class="credits">
Model by <a href="https://sketchfab.com/Ibdzs" target="_blank" rel="noopener">Dorjzodovsuren Batjargal</a>
on <a href="https://sketchfab.com" target="_blank" rel="noopener">Sketchfab</a>
</div>
</div>
<!-- Plan Panel (hidden initially, will appear at 50% width) -->
<div class="plan-container" id="planPanel">
<div class="plan-image-wrapper">
<img src="plan_image.jpg" alt="Floor Plan of Nomadic Echo Interior" />
</div>
</div>
</div>
</main>
<br>
<main>
<div class="content-wrapper">
<!-- Viewer Panel (initially 70% width) -->
<div class="viewer-container" id="viewerPanel">
<div class="viewer-header">Explore the 3D Model</div>
<div class="sketchfab-embed-wrapper">
<iframe
title="25d4c696-c992-43d5-ab5a-03212692591a"
src="https://sketchfab.com/models/a82ea39d346f4521a488c628db820657/embed?autostart=1&camera=0&preload=1"
allow="autoplay; fullscreen; xr-spatial-tracking"
xr-spatial-tracking
execution-while-out-of-viewport
execution-while-not-rendered
web-share
></iframe>
</div>
<div class="credits">
Model by <a href="https://sketchfab.com/Ibdzs" target="_blank" rel="noopener">Dorjzodovsuren Batjargal</a>
on <a href="https://sketchfab.com" target="_blank" rel="noopener">Sketchfab</a>
</div>
</div>
<!-- Plan Panel (hidden initially, will appear at 50% width) -->
<div class="plan-container" id="planPanel">
<div class="plan-image-wrapper">
<img src="IMG_1251.JPG" alt="Floor Plan of Nomadic Echo Interior" />
</div>
</div>
</div>
</main>
<footer>
© 2025 Nomadic Echo Interior • All rights reserved
</footer>
<script>
const hintBtn = document.getElementById('hintBtn');
const viewerPanel = document.getElementById('viewerPanel');
const planPanel = document.getElementById('planPanel');
let planVisible = false;
hintBtn.addEventListener('click', () => {
planVisible = !planVisible;
if (planVisible) {
// Show plan panel at 50%, shrink viewer to 50%
planPanel.style.display = 'flex';
viewerPanel.classList.add('half-width');
planPanel.classList.add('half-width');
hintBtn.textContent = 'Hide Floor Plan';
} else {
// Hide plan panel, set viewer back to 70%
planPanel.style.display = 'none';
viewerPanel.classList.remove('half-width');
planPanel.classList.remove('half-width');
hintBtn.textContent = 'Show Floor Plan';
}
});
</script>
</body>
</html>
|