-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic.html
More file actions
251 lines (223 loc) · 7.08 KB
/
Copy pathbasic.html
File metadata and controls
251 lines (223 loc) · 7.08 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Header Pro — Demo</title>
<style>
/* ---- Simulate a minimal Squarespace 7.1 page ---- */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: #f9fafb;
color: #111;
}
/* ---- Simulated native Squarespace header ---- */
[data-nc-group='header'] {
width: 100%;
background: #fff;
}
.header-inner {
display: flex;
align-items: center;
justify-content: space-between;
max-width: 1280px;
margin: 0 auto;
padding: 16px 32px;
gap: 32px;
}
.header-branding a {
font-size: 20px;
font-weight: 700;
color: #111;
text-decoration: none;
}
.header-nav-list {
display: flex;
gap: 28px;
list-style: none;
}
.header-nav-list a {
text-decoration: none;
color: #111;
font-size: 15px;
}
.header-actions {
display: flex;
align-items: center;
gap: 12px;
}
/* ---- Demo sections ---- */
.demo-hero {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
text-align: center;
padding: 40px 20px;
}
.demo-hero h1 {
font-size: clamp(2rem, 5vw, 4rem);
font-weight: 800;
color: #111;
margin-bottom: 16px;
}
.demo-hero p {
font-size: 1.125rem;
color: #555;
max-width: 560px;
}
.demo-section {
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80px 40px;
text-align: center;
}
.demo-section:nth-child(even) {
background: #f1f5f9;
}
.demo-section h2 {
font-size: 2rem;
font-weight: 700;
margin-bottom: 12px;
}
.demo-section p {
color: #555;
max-width: 480px;
}
/* ---- Preset switcher ---- */
.preset-bar {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.85);
border-radius: 999px;
padding: 10px 20px;
display: flex;
gap: 10px;
z-index: 99999;
}
.preset-bar button {
border: none;
background: rgba(255, 255, 255, 0.12);
color: #fff;
padding: 6px 16px;
border-radius: 999px;
cursor: pointer;
font-size: 13px;
transition: background 0.2s;
}
.preset-bar button:hover,
.preset-bar button.active {
background: #3b82f6;
}
</style>
</head>
<body>
<!-- ===== Simulated Squarespace Header ===== -->
<header data-nc-group="header">
<div class="header-inner">
<div class="header-branding">
<a href="#">MyBrand</a>
</div>
<nav>
<ul class="header-nav-list">
<li class="header-nav-item">
<a href="#" aria-current="page">Home</a>
</li>
<li class="header-nav-item header-nav-item--folder" data-folder="about">
<a href="#">About</a>
<!-- Simulated folder sub-nav -->
<ul class="header-nav-folder-content" style="display:none">
<li><a href="#">Our Story</a></li>
<li><a href="#">Team</a></li>
<li><a href="#">Careers</a></li>
</ul>
</li>
<li class="header-nav-item">
<a href="#">Services</a>
</li>
<li class="header-nav-item">
<a href="#">Blog</a>
</li>
<li class="header-nav-item">
<a href="#">Contact</a>
</li>
</ul>
</nav>
<div class="header-actions">
<!-- CTA will be injected here by the plugin -->
</div>
</div>
</header>
<!-- ===== Page Content ===== -->
<section class="demo-hero">
<h1>Header Pro Demo</h1>
<p>
Scroll down to see sticky behavior, auto-hide, and scroll shadow. Use the preset switcher
at the bottom to reload with different styles.
</p>
</section>
<section class="demo-section">
<h2>Section Two</h2>
<p>Keep scrolling to experience auto-hide and reveal behaviors.</p>
</section>
<section class="demo-section">
<h2>Section Three</h2>
<p>The glassy preset adds a beautiful frosted-glass effect with an animated blue line.</p>
</section>
<section class="demo-section">
<h2>Section Four</h2>
<p>The tech preset adds a dark background with electric blue accents and a glitch hover effect.</p>
</section>
<!-- ===== Preset Switcher ===== -->
<div class="preset-bar" id="presetBar">
<button onclick="loadPreset('default')" id="btn-default">Default</button>
<button onclick="loadPreset('minimal')" id="btn-minimal">Minimal</button>
<button onclick="loadPreset('glassy')" id="btn-glassy">Glassy</button>
<button onclick="loadPreset('tech')" id="btn-tech">Tech</button>
</div>
<!-- ===== Header Pro Plugin ===== -->
<!--
In production, replace the src below with the CDN URL:
https://cdn.jsdelivr.net/gh/clonegarden/squarespaceplugins@latest/header-pro/header-pro.min.js
-->
<script id="header-pro-script" src="../header-pro.js?preset=glassy&ctaEnabled=true&ctaText=Get+Started&ctaUrl=%23&scrollShadow=true&autoHide=true&dropdownMode=list&debug=true"></script>
<script>
// Simple preset switcher that reloads the page with a new preset param
function loadPreset(preset) {
const params = new URLSearchParams(window.location.search);
params.set('demo-preset', preset);
window.location.search = params.toString();
}
// Apply active class to current preset button
(function () {
const params = new URLSearchParams(window.location.search);
const active = params.get('demo-preset') || 'glassy';
const btn = document.getElementById('btn-' + active);
if (btn) btn.classList.add('active');
// Swap preset in script src if a demo-preset param is present
const scriptEl = document.getElementById('header-pro-script');
if (scriptEl && params.get('demo-preset')) {
const ctaPresets = { glassy: true, tech: true };
const cta = ctaPresets[active] ? '&ctaEnabled=true&ctaText=Get+Started&ctaUrl=%23' : '';
scriptEl.src =
'../header-pro.js?preset=' +
active +
cta +
'&scrollShadow=true&autoHide=true&dropdownMode=list&debug=true';
}
})();
</script>
</body>
</html>