@casoon/pages-theme 0.12.13 → 0.12.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Header.astro +78 -15
- package/components/Hero.astro +16 -17
- package/package.json +1 -1
- package/styles/tokens.css +1 -1
package/components/Header.astro
CHANGED
|
@@ -41,7 +41,18 @@ const nav = [
|
|
|
41
41
|
}
|
|
42
42
|
</ul>
|
|
43
43
|
<span class="sep" aria-hidden="true"></span>
|
|
44
|
-
{
|
|
44
|
+
{
|
|
45
|
+
config.repo && (
|
|
46
|
+
<a class="cta" href={`https://github.com/${config.repo}`}>
|
|
47
|
+
GitHub
|
|
48
|
+
<span class="arrow" aria-hidden="true">
|
|
49
|
+
<svg viewBox="0 0 24 24" width="15" height="15">
|
|
50
|
+
<path d="M5 12h14M13 6l6 6-6 6" />
|
|
51
|
+
</svg>
|
|
52
|
+
</span>
|
|
53
|
+
</a>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
45
56
|
</nav>
|
|
46
57
|
</div>
|
|
47
58
|
<button class="theme" type="button" data-theme-toggle aria-label={s.darkTheme} aria-pressed="false" hidden>
|
|
@@ -58,7 +69,7 @@ const nav = [
|
|
|
58
69
|
</header>
|
|
59
70
|
|
|
60
71
|
<style>
|
|
61
|
-
/* Floating white pill over the page. */
|
|
72
|
+
/* Floating white pill over the page, as wide as the hero. */
|
|
62
73
|
.header {
|
|
63
74
|
position: sticky;
|
|
64
75
|
top: 0;
|
|
@@ -70,13 +81,14 @@ const nav = [
|
|
|
70
81
|
display: flex;
|
|
71
82
|
align-items: center;
|
|
72
83
|
gap: 20px;
|
|
73
|
-
max-width:
|
|
84
|
+
max-width: 1240px;
|
|
74
85
|
height: var(--header-h);
|
|
75
86
|
margin: 0 auto;
|
|
76
|
-
padding: 0
|
|
87
|
+
padding: 0 8px 0 24px;
|
|
88
|
+
border: 1px solid var(--border);
|
|
77
89
|
border-radius: 40px;
|
|
78
90
|
background: var(--surface);
|
|
79
|
-
box-shadow: 0
|
|
91
|
+
box-shadow: 0 16px 56px rgb(18 20 15 / 0.1);
|
|
80
92
|
pointer-events: auto;
|
|
81
93
|
}
|
|
82
94
|
.home {
|
|
@@ -134,25 +146,56 @@ const nav = [
|
|
|
134
146
|
list-style: none;
|
|
135
147
|
}
|
|
136
148
|
nav a {
|
|
137
|
-
display:
|
|
138
|
-
|
|
149
|
+
display: grid;
|
|
150
|
+
place-items: center;
|
|
151
|
+
min-height: 44px;
|
|
152
|
+
padding: 0 14px;
|
|
139
153
|
border-radius: 999px;
|
|
140
154
|
color: var(--heading);
|
|
141
|
-
font-size:
|
|
155
|
+
font-size: 14.5px;
|
|
142
156
|
font-weight: 500;
|
|
157
|
+
letter-spacing: -0.012em;
|
|
143
158
|
white-space: nowrap;
|
|
159
|
+
transition: background-color 0.2s;
|
|
144
160
|
}
|
|
145
|
-
nav a:hover
|
|
146
|
-
color: var(--accent);
|
|
147
|
-
}
|
|
161
|
+
nav a:hover,
|
|
148
162
|
nav a[aria-current='page'] {
|
|
163
|
+
background: color-mix(in srgb, var(--heading) 6%, transparent);
|
|
149
164
|
color: var(--heading);
|
|
150
|
-
font-weight: 600;
|
|
151
165
|
}
|
|
166
|
+
/* Pill with the arrow in its own white circle on the right. */
|
|
152
167
|
nav a.cta {
|
|
153
|
-
|
|
168
|
+
display: flex;
|
|
169
|
+
gap: 12px;
|
|
170
|
+
min-height: 46px;
|
|
171
|
+
padding: 0 4px 0 18px;
|
|
154
172
|
background: linear-gradient(180deg, var(--accent-top) 0%, var(--accent-fill) 25%, var(--accent-fill) 100%);
|
|
155
173
|
color: #fff;
|
|
174
|
+
font-weight: 600;
|
|
175
|
+
}
|
|
176
|
+
nav a.cta:hover {
|
|
177
|
+
background: var(--accent);
|
|
178
|
+
color: #fff;
|
|
179
|
+
}
|
|
180
|
+
.arrow {
|
|
181
|
+
display: grid;
|
|
182
|
+
place-items: center;
|
|
183
|
+
width: 38px;
|
|
184
|
+
height: 38px;
|
|
185
|
+
border-radius: 999px;
|
|
186
|
+
background: #fff;
|
|
187
|
+
color: var(--accent-fill);
|
|
188
|
+
transition: transform 0.3s;
|
|
189
|
+
}
|
|
190
|
+
nav a.cta:hover .arrow {
|
|
191
|
+
transform: translateX(2px);
|
|
192
|
+
}
|
|
193
|
+
.arrow svg {
|
|
194
|
+
fill: none;
|
|
195
|
+
stroke: currentColor;
|
|
196
|
+
stroke-width: 2;
|
|
197
|
+
stroke-linecap: round;
|
|
198
|
+
stroke-linejoin: round;
|
|
156
199
|
}
|
|
157
200
|
.sep {
|
|
158
201
|
width: 1px;
|
|
@@ -235,7 +278,17 @@ const nav = [
|
|
|
235
278
|
display: none;
|
|
236
279
|
}
|
|
237
280
|
nav a {
|
|
238
|
-
|
|
281
|
+
min-height: 36px;
|
|
282
|
+
padding: 0 10px;
|
|
283
|
+
}
|
|
284
|
+
nav a.cta {
|
|
285
|
+
gap: 8px;
|
|
286
|
+
min-height: 36px;
|
|
287
|
+
padding: 0 3px 0 12px;
|
|
288
|
+
}
|
|
289
|
+
.arrow {
|
|
290
|
+
width: 30px;
|
|
291
|
+
height: 30px;
|
|
239
292
|
}
|
|
240
293
|
}
|
|
241
294
|
@media (max-width: 900px) {
|
|
@@ -272,7 +325,17 @@ const nav = [
|
|
|
272
325
|
display: none;
|
|
273
326
|
}
|
|
274
327
|
[data-wide] nav a {
|
|
275
|
-
|
|
328
|
+
min-height: 36px;
|
|
329
|
+
padding: 0 10px;
|
|
330
|
+
}
|
|
331
|
+
[data-wide] nav a.cta {
|
|
332
|
+
gap: 8px;
|
|
333
|
+
min-height: 36px;
|
|
334
|
+
padding: 0 3px 0 12px;
|
|
335
|
+
}
|
|
336
|
+
[data-wide] .arrow {
|
|
337
|
+
width: 30px;
|
|
338
|
+
height: 30px;
|
|
276
339
|
}
|
|
277
340
|
}
|
|
278
341
|
</style>
|
package/components/Hero.astro
CHANGED
|
@@ -184,13 +184,12 @@ const family = eyebrow.match(/^CASOON\b\s*(?:·\s*)?(.*)$/);
|
|
|
184
184
|
position: relative;
|
|
185
185
|
display: inline-flex;
|
|
186
186
|
gap: 0;
|
|
187
|
-
padding:
|
|
187
|
+
padding: 3px 12px 3px 3px;
|
|
188
188
|
overflow: hidden;
|
|
189
|
-
border: 1px solid var(--border
|
|
189
|
+
border: 1px solid var(--border);
|
|
190
190
|
border-radius: 999px;
|
|
191
|
-
background: var(--surface);
|
|
192
|
-
|
|
193
|
-
font-size: 13px;
|
|
191
|
+
background: color-mix(in srgb, var(--surface) 60%, transparent);
|
|
192
|
+
font-size: 11px;
|
|
194
193
|
letter-spacing: 0.06em;
|
|
195
194
|
line-height: 1;
|
|
196
195
|
}
|
|
@@ -201,7 +200,7 @@ const family = eyebrow.match(/^CASOON\b\s*(?:·\s*)?(.*)$/);
|
|
|
201
200
|
content: '';
|
|
202
201
|
position: absolute;
|
|
203
202
|
inset: 0;
|
|
204
|
-
background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.
|
|
203
|
+
background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.3) 50%, transparent 65%);
|
|
205
204
|
translate: -100% 0;
|
|
206
205
|
animation: family-sheen 7s ease-in-out 1.5s infinite;
|
|
207
206
|
pointer-events: none;
|
|
@@ -223,26 +222,26 @@ const family = eyebrow.match(/^CASOON\b\s*(?:·\s*)?(.*)$/);
|
|
|
223
222
|
.mark {
|
|
224
223
|
display: grid;
|
|
225
224
|
place-items: center;
|
|
226
|
-
width:
|
|
227
|
-
height:
|
|
225
|
+
width: 20px;
|
|
226
|
+
height: 20px;
|
|
228
227
|
border-radius: 50%;
|
|
229
228
|
background: #028baa;
|
|
230
229
|
}
|
|
231
230
|
.mark svg {
|
|
232
|
-
width:
|
|
233
|
-
height:
|
|
231
|
+
width: 9px;
|
|
232
|
+
height: 9px;
|
|
234
233
|
fill: #fff;
|
|
235
234
|
}
|
|
236
235
|
.name {
|
|
237
|
-
margin-left:
|
|
238
|
-
font-weight:
|
|
239
|
-
letter-spacing: 0.
|
|
236
|
+
margin-left: 8px;
|
|
237
|
+
font-weight: 600;
|
|
238
|
+
letter-spacing: 0.14em;
|
|
240
239
|
}
|
|
241
240
|
.rest {
|
|
242
|
-
margin-left:
|
|
243
|
-
padding-left:
|
|
244
|
-
border-left: 1px solid var(--border
|
|
245
|
-
color: var(--
|
|
241
|
+
margin-left: 9px;
|
|
242
|
+
padding-left: 9px;
|
|
243
|
+
border-left: 1px solid var(--border);
|
|
244
|
+
color: var(--muted);
|
|
246
245
|
font-weight: 500;
|
|
247
246
|
}
|
|
248
247
|
h1 {
|
package/package.json
CHANGED
package/styles/tokens.css
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
--font-sans: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
41
41
|
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
42
|
-
--header-h:
|
|
42
|
+
--header-h: 66px;
|
|
43
43
|
--max: 1100px;
|
|
44
44
|
|
|
45
45
|
/* Terminal surface: dark in both themes. */
|