@casoon/pages-theme 0.12.12 → 0.12.13

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.
@@ -28,6 +28,9 @@ const {
28
28
  tone = 'plain',
29
29
  } = Astro.props;
30
30
  const hasSource = Astro.slots.has('source');
31
+ // An eyebrow that starts with "CASOON" marks the project as one of the family: it is set as a
32
+ // badge with the logo mark, and the rest ("Open Source", "Proof of Concept") follows it.
33
+ const family = eyebrow.match(/^CASOON\b\s*(?:·\s*)?(.*)$/);
31
34
  ---
32
35
 
33
36
  <section class:list={['hero', `is-${layout}`, tone === 'invert' && 'invert']}>
@@ -35,7 +38,21 @@ const hasSource = Astro.slots.has('source');
35
38
  layout === 'split' && (
36
39
  <div class="inner">
37
40
  <div>
38
- <p class="eyebrow">{eyebrow}</p>
41
+ <p class:list={['eyebrow', family && 'family']}>
42
+ {family ? (
43
+ <>
44
+ <span class="mark" aria-hidden="true">
45
+ <svg viewBox="110 92 280 316">
46
+ <path d="M169.49,108.38c-13.22,7.76-23.78,18.14-31.69,31.15-7.9,13.01-11.85,27.49-11.85,43.44v135.58c0,15.52,3.95,29.71,11.85,42.57,7.9,12.86,18.47,23.1,31.69,30.72,13.22,7.62,27.88,11.42,43.97,11.42h160.59v-45.48h-160.59c-11.64,0-21.55-3.91-29.75-11.74-8.19-7.83-12.28-17.21-12.28-28.13v-134.93c0-11.35,4.09-21.01,12.28-28.99,8.19-7.98,18.11-11.96,29.75-11.96h160.59v-45.26h-160.59c-16.09,0-30.75,3.88-43.97,11.64Z" />
47
+ </svg>
48
+ </span>
49
+ <span class="name">CASOON</span>
50
+ {family[1] && <span class="rest">{family[1]}</span>}
51
+ </>
52
+ ) : (
53
+ eyebrow
54
+ )}
55
+ </p>
39
56
  <h1>{title}</h1>
40
57
  <p class="lead">{lead}</p>
41
58
  <slot />
@@ -53,7 +70,21 @@ const hasSource = Astro.slots.has('source');
53
70
  layout === 'stack' && (
54
71
  <div class="inner">
55
72
  <div class="head">
56
- <p class="eyebrow">{eyebrow}</p>
73
+ <p class:list={['eyebrow', family && 'family']}>
74
+ {family ? (
75
+ <>
76
+ <span class="mark" aria-hidden="true">
77
+ <svg viewBox="110 92 280 316">
78
+ <path d="M169.49,108.38c-13.22,7.76-23.78,18.14-31.69,31.15-7.9,13.01-11.85,27.49-11.85,43.44v135.58c0,15.52,3.95,29.71,11.85,42.57,7.9,12.86,18.47,23.1,31.69,30.72,13.22,7.62,27.88,11.42,43.97,11.42h160.59v-45.48h-160.59c-11.64,0-21.55-3.91-29.75-11.74-8.19-7.83-12.28-17.21-12.28-28.13v-134.93c0-11.35,4.09-21.01,12.28-28.99,8.19-7.98,18.11-11.96,29.75-11.96h160.59v-45.26h-160.59c-16.09,0-30.75,3.88-43.97,11.64Z" />
79
+ </svg>
80
+ </span>
81
+ <span class="name">CASOON</span>
82
+ {family[1] && <span class="rest">{family[1]}</span>}
83
+ </>
84
+ ) : (
85
+ eyebrow
86
+ )}
87
+ </p>
57
88
  <h1>{title}</h1>
58
89
  <p class="lead">{lead}</p>
59
90
  </div>
@@ -85,7 +116,21 @@ const hasSource = Astro.slots.has('source');
85
116
  {
86
117
  layout === 'editorial' && (
87
118
  <div class="inner">
88
- <p class="eyebrow">{eyebrow}</p>
119
+ <p class:list={['eyebrow', family && 'family']}>
120
+ {family ? (
121
+ <>
122
+ <span class="mark" aria-hidden="true">
123
+ <svg viewBox="110 92 280 316">
124
+ <path d="M169.49,108.38c-13.22,7.76-23.78,18.14-31.69,31.15-7.9,13.01-11.85,27.49-11.85,43.44v135.58c0,15.52,3.95,29.71,11.85,42.57,7.9,12.86,18.47,23.1,31.69,30.72,13.22,7.62,27.88,11.42,43.97,11.42h160.59v-45.48h-160.59c-11.64,0-21.55-3.91-29.75-11.74-8.19-7.83-12.28-17.21-12.28-28.13v-134.93c0-11.35,4.09-21.01,12.28-28.99,8.19-7.98,18.11-11.96,29.75-11.96h160.59v-45.26h-160.59c-16.09,0-30.75,3.88-43.97,11.64Z" />
125
+ </svg>
126
+ </span>
127
+ <span class="name">CASOON</span>
128
+ {family[1] && <span class="rest">{family[1]}</span>}
129
+ </>
130
+ ) : (
131
+ eyebrow
132
+ )}
133
+ </p>
89
134
  <h1>{title}</h1>
90
135
  <div class="row">
91
136
  <p class="lead">{lead}</p>
@@ -133,6 +178,73 @@ const hasSource = Astro.slots.has('source');
133
178
  border-radius: 50%;
134
179
  background: var(--accent-fill);
135
180
  }
181
+ /* Family badge: logo mark, the name in wide caps, then the rest after a hairline. A slow
182
+ sheen crosses it now and then. */
183
+ .eyebrow.family {
184
+ position: relative;
185
+ display: inline-flex;
186
+ gap: 0;
187
+ padding: 5px 18px 5px 5px;
188
+ overflow: hidden;
189
+ border: 1px solid var(--border-strong);
190
+ border-radius: 999px;
191
+ background: var(--surface);
192
+ box-shadow: var(--shadow);
193
+ font-size: 13px;
194
+ letter-spacing: 0.06em;
195
+ line-height: 1;
196
+ }
197
+ .eyebrow.family::before {
198
+ content: none;
199
+ }
200
+ .eyebrow.family::after {
201
+ content: '';
202
+ position: absolute;
203
+ inset: 0;
204
+ background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.5) 50%, transparent 65%);
205
+ translate: -100% 0;
206
+ animation: family-sheen 7s ease-in-out 1.5s infinite;
207
+ pointer-events: none;
208
+ }
209
+ @keyframes family-sheen {
210
+ 0% {
211
+ translate: -100% 0;
212
+ }
213
+ 25%,
214
+ 100% {
215
+ translate: 100% 0;
216
+ }
217
+ }
218
+ @media (prefers-reduced-motion: reduce) {
219
+ .eyebrow.family::after {
220
+ content: none;
221
+ }
222
+ }
223
+ .mark {
224
+ display: grid;
225
+ place-items: center;
226
+ width: 28px;
227
+ height: 28px;
228
+ border-radius: 50%;
229
+ background: #028baa;
230
+ }
231
+ .mark svg {
232
+ width: 13px;
233
+ height: 13px;
234
+ fill: #fff;
235
+ }
236
+ .name {
237
+ margin-left: 10px;
238
+ font-weight: 700;
239
+ letter-spacing: 0.16em;
240
+ }
241
+ .rest {
242
+ margin-left: 12px;
243
+ padding-left: 12px;
244
+ border-left: 1px solid var(--border-strong);
245
+ color: var(--text);
246
+ font-weight: 500;
247
+ }
136
248
  h1 {
137
249
  margin: 0 0 28px;
138
250
  color: var(--heading);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@casoon/pages-theme",
3
- "version": "0.12.12",
3
+ "version": "0.12.13",
4
4
  "description": "Shared Astro theme for the GitHub Pages sites of CASOON open-source projects",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/styles/base.css CHANGED
@@ -305,3 +305,10 @@ h2.cp-label::before {
305
305
  border: 0;
306
306
  border-top: 1px solid var(--border);
307
307
  }
308
+
309
+ /* Space between the hero's sand ground and whatever a site places right after it. The theme
310
+ sections listed here bring their own top padding; everything else — a site's own aside, card
311
+ or section, and Spotlight — would otherwise sit flush against the hero's lower edge. */
312
+ main > .hero + :not(.facts, .features, .anchor-grid, .faq, .flow, .integrations) {
313
+ margin-top: clamp(40px, 6vw, 72px);
314
+ }