forked from RelativelyIrrelevant/MidlakesDev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexterior-grounds.html
More file actions
173 lines (156 loc) · 6.38 KB
/
exterior-grounds.html
File metadata and controls
173 lines (156 loc) · 6.38 KB
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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Midlakes Exterior Grounds</title>
<link rel="stylesheet" href="/bootstrap.min.css"/>
<link rel="stylesheet" href="/pannellum.css"/>
<link rel="stylesheet" href="/style.css"/>
<script type="text/javascript" src="/pannellum.js"></script>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.main-container {
display: flex;
flex-direction: column;
min-height: 100vh;
padding: 1rem;
box-sizing: border-box;
}
header {
flex-shrink: 0;
padding-bottom: 1rem;
}
/* Panorama takes ALL remaining space */
#panorama {
width: 100%;
flex: 1;
min-height: 0; /* crucial for flex children */
}
/* Thumbnail strip – fixed height, always visible */
.thumbnail-row {
flex-shrink: 0;
padding: 15px 0;
overflow-x: auto;
white-space: nowrap;
background: rgba(0,0,0,0.05);
border-radius: 8px;
margin-top: 10px;
}
.thumbnail-row img {
height: 75px;
width: auto;
max-width: 100px;
object-fit: cover;
margin: 0 4px;
border: 2px solid #fff;
border-radius: 4px;
cursor: pointer;
transition: all 0.25s;
opacity: 0.85;
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.thumbnail-row img:hover,
.thumbnail-row img.active {
opacity: 1;
transform: scale(1.15);
box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
/* Mobile optimization */
@media (max-width: 768px) {
.main-container { padding: 0.5rem; }
header h3, header h4 { font-size: 1.1rem; }
#navigation { font-size: 0.85rem; }
.thumbnail-row img {
height: 70px;
margin: 0 4px;
}
}
@media (max-width: 480px) {
.thumbnail-row img { height: 65px; }
}
</style>
</head>
<body>
<div class="main-container">
<header class="masthead d-flex flex-column text-center">
<div class="d-flex flex-row align-items-center justify-content-between mb-3">
<h3 class="masthead-brand m-0"><a href="/">Midlakes</a></h3>
<h4 class="m-0" id="filename">Exterior Grounds – View 1</h4>
</div>
<div id="navigation" class="small">
<a href="/exterior-deck.html">Exterior Deck</a> |
<strong><a href="/exterior-grounds.html">Exterior Grounds</a></strong> |
<a href="/exterior-pier.html">Exterior Pier</a> |
<a href="/interior-upstairs.html">Interior Upstairs</a> |
<a href="/interior-main.html">Interior Main</a> |
<a href="/interior-downstairs.html">Interior Downstairs</a>
</div>
</header>
<!-- Panorama fills remaining space -->
<div id="panorama"></div>
<!-- Thumbnails always visible at bottom -->
<div class="thumbnail-row text-center">
<img src="/images/exterior-grounds/ext-grounds-01.jpeg" data-scene="1" class="active" alt="View 1">
<img src="/images/exterior-grounds/ext-grounds-02.jpeg" data-scene="2" alt="View 2">
<img src="/images/exterior-grounds/ext-grounds-03.jpeg" data-scene="3" alt="View 3">
<img src="/images/exterior-grounds/ext-grounds-04.jpeg" data-scene="4" alt="View 4">
<img src="/images/exterior-grounds/ext-grounds-05.jpeg" data-scene="5" alt="View 5">
<img src="/images/exterior-grounds/ext-grounds-06.jpeg" data-scene="6" alt="View 6">
<img src="/images/exterior-grounds/ext-grounds-07.jpeg" data-scene="7" alt="View 7">
<img src="/images/exterior-grounds/ext-grounds-08.jpeg" data-scene="8" alt="View 8">
<img src="/images/exterior-grounds/ext-grounds-09.jpeg" data-scene="9" alt="View 9">
<img src="/images/exterior-grounds/ext-grounds-10.jpeg" data-scene="10" alt="View 10">
</div>
</div>
<script>
const scenes = {
"1": { panorama: "/images/exterior-grounds/ext-grounds-01.jpeg", title: "Exterior Grounds – View 1", hfov: 130 },
"2": { panorama: "/images/exterior-grounds/ext-grounds-02.jpeg", title: "Exterior Grounds – View 2", hfov: 130 },
"3": { panorama: "/images/exterior-grounds/ext-grounds-03.jpeg", title: "Exterior Grounds – View 3", hfov: 130 },
"4": { panorama: "/images/exterior-grounds/ext-grounds-04.jpeg", title: "Exterior Grounds – View 4", hfov: 130 },
"5": { panorama: "/images/exterior-grounds/ext-grounds-05.jpeg", title: "Exterior Grounds – View 5", hfov: 130 },
"6": { panorama: "/images/exterior-grounds/ext-grounds-06.jpeg", title: "Exterior Grounds – View 6", hfov: 130 },
"7": { panorama: "/images/exterior-grounds/ext-grounds-07.jpeg", title: "Exterior Grounds – View 7", hfov: 130 },
"8": { panorama: "/images/exterior-grounds/ext-grounds-08.jpeg", title: "Exterior Grounds – View 8", hfov: 130 },
"9": { panorama: "/images/exterior-grounds/ext-grounds-09.jpeg", title: "Exterior Grounds – View 9", hfov: 130 },
"10": { panorama: "/images/exterior-grounds/ext-grounds-10.jpeg", title: "Exterior Grounds – View 10", hfov: 130 }
};
const viewer = pannellum.viewer('panorama', {
"default": {
"firstScene": "1",
"autoLoad": true,
"autoRotate": -2,
"hfov": 130,
"minHfov": 60,
"maxHfov": 150,
"pitch": -10,
"yaw": 0,
"showControls": true
},
"scenes": scenes
});
// Update title on load
viewer.on('load', function() {
const current = viewer.getScene();
document.getElementById('filename').textContent = scenes[current].title;
if (scenes[current].hfov) viewer.setHfov(scenes[current].hfov, true);
});
// Thumbnail clicks
document.querySelectorAll('.thumbnail-row img').forEach(thumb => {
thumb.addEventListener('click', function() {
const sceneId = this.dataset.scene;
viewer.loadScene(sceneId);
document.querySelectorAll('.thumbnail-row img').forEach(t => t.classList.remove('active'));
this.classList.add('active');
});
});
// Responsive resize
window.addEventListener('resize', () => viewer.resize());
</script>
</body>
</html>