spoko-design-system 0.3.3 → 0.3.9
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/README.md +2 -2
- package/astro.config.mjs +7 -2
- package/index.ts +1 -1
- package/package.json +119 -119
- package/src/components/Category/CategoryDetails.astro +91 -101
- package/src/components/Category/CategorySidebarToggler.vue +1 -1
- package/src/components/Category/CategoryViewToggler.astro +26 -25
- package/src/components/Jumbotron/index.astro +153 -0
- package/src/components/Jumbotron/styles.css +0 -0
- package/src/components/Jumbotron/types.ts +29 -0
- package/src/components/Jumbotron/variants/Default.astro +40 -0
- package/src/components/Jumbotron/variants/Hero.astro +54 -0
- package/src/components/Jumbotron/variants/Post.astro +62 -0
- package/src/components/Jumbotron/variants/PostSplit.astro +71 -0
- package/src/components/Jumbotron.astro +12 -0
- package/src/config.ts +1 -1
- package/src/layouts/Layout.astro +2 -1
- package/src/pages/components/image.mdx +1 -1
- package/src/pages/components/jumbotron.mdx +360 -0
- package/src/pages/index.astro +13 -8
- package/uno-config/theme/colors.ts +0 -2
- package/uno-config/theme/container.ts +25 -0
- package/uno-config/theme/index.ts +3 -0
- package/uno-config/theme/shortcuts/components.ts +1 -1
- package/uno-config/theme/shortcuts/index.ts +3 -1
- package/uno-config/theme/shortcuts/jumbotron.ts +44 -0
- package/src/components/Jumbatron.vue +0 -41
- package/src/pages/components/jumbatron.mdx +0 -95
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Jumbotron"
|
|
3
|
+
layout: "../../layouts/MainLayout.astro"
|
|
4
|
+
---
|
|
5
|
+
import Jumbotron from '../../components/Jumbotron.astro'
|
|
6
|
+
import Button from '../../components/Button.vue'
|
|
7
|
+
|
|
8
|
+
# Jumbotron
|
|
9
|
+
|
|
10
|
+
A Jumbotron indicates a big box for calling extra attention to some special content or information. It provides various layouts through different variants to suit your content presentation needs.
|
|
11
|
+
|
|
12
|
+
## Table of Contents
|
|
13
|
+
- [Best Practices](#best-practices)
|
|
14
|
+
- [Responsive Behavior](#responsive-behavior)
|
|
15
|
+
- [Variants](#variants)
|
|
16
|
+
- [Default Variant](#default-variant-classic)
|
|
17
|
+
- [Small Variant](#small-variant)
|
|
18
|
+
- [Hero Variant](#hero-variant)
|
|
19
|
+
- [Post Variant](#post-variant-full-overlay)
|
|
20
|
+
- [Post Split Variant](#post-split-variant)
|
|
21
|
+
- [Component API](#component-api)
|
|
22
|
+
- [Accessibility](#accessibility)
|
|
23
|
+
|
|
24
|
+
## Best Practices
|
|
25
|
+
- Use the `default` variant for main content sections and general announcements
|
|
26
|
+
- Use the `hero` variant for page headers with background images and important messaging
|
|
27
|
+
- Use the `post` variant for blog posts and articles with full-width image overlays
|
|
28
|
+
- Use the `post-split` variant when you need to display image alongside content
|
|
29
|
+
- Consider using `small` prop for less important or secondary sections
|
|
30
|
+
|
|
31
|
+
## Responsive Behavior
|
|
32
|
+
The component adapts to different screen sizes:
|
|
33
|
+
- On mobile: Stacks content vertically, adjusts font sizes and padding
|
|
34
|
+
- On tablet: Optimizes layout and spacing
|
|
35
|
+
- On desktop: Full layout with optimal content width and spacing
|
|
36
|
+
|
|
37
|
+
## Default Variant (Classic)
|
|
38
|
+
The default variant is ideal for primary content sections. It supports custom intro, subtitle, and CTA content with centered layout.
|
|
39
|
+
|
|
40
|
+
<div class="component-preview !block">
|
|
41
|
+
<Jumbotron
|
|
42
|
+
variant="default"
|
|
43
|
+
title={`Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.`}
|
|
44
|
+
>
|
|
45
|
+
<p slot="subtitle"
|
|
46
|
+
class="mt-3 text-base text-gray-200 sm:mt-5 text-lg md:text-xl lg:mx-0 md:mt-5"
|
|
47
|
+
>Nunc posuere massa eget turpis laoreet ultrices eget vel massa.</p>
|
|
48
|
+
<Fragment slot="cta-content">
|
|
49
|
+
<Button primary rounded href="#" title="short text">
|
|
50
|
+
Read More
|
|
51
|
+
</Button>
|
|
52
|
+
</Fragment>
|
|
53
|
+
</Jumbotron>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
```js
|
|
57
|
+
<Jumbotron
|
|
58
|
+
variant="default"
|
|
59
|
+
title={`Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.`}
|
|
60
|
+
>
|
|
61
|
+
<p slot="subtitle"
|
|
62
|
+
class="mt-3 text-base text-gray-200 sm:mt-5 text-lg md:text-xl lg:mx-0 md:mt-5"
|
|
63
|
+
>
|
|
64
|
+
Nunc posuere massa eget turpis laoreet ultrices eget vel massa.
|
|
65
|
+
</p>
|
|
66
|
+
<Fragment slot="cta-content">
|
|
67
|
+
<Button primary rounded href="#" title="short text">
|
|
68
|
+
Read More
|
|
69
|
+
</Button>
|
|
70
|
+
</Fragment>
|
|
71
|
+
</Jumbotron>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Small Variant
|
|
75
|
+
A more compact version of the default variant, useful for secondary content sections or when vertical space is limited.
|
|
76
|
+
|
|
77
|
+
<div class="component-preview">
|
|
78
|
+
<Jumbotron
|
|
79
|
+
variant="default"
|
|
80
|
+
small
|
|
81
|
+
title={`Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.`}
|
|
82
|
+
>
|
|
83
|
+
<p slot="subtitle"
|
|
84
|
+
class="mt-5 sm:mt-8 sm:flex sm:justify-center"
|
|
85
|
+
>Nunc posuere massa eget turpis laoreet ultrices eget vel massa.</p>
|
|
86
|
+
</Jumbotron>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
```js
|
|
90
|
+
<Jumbotron
|
|
91
|
+
variant="default"
|
|
92
|
+
small
|
|
93
|
+
title={`Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.`}
|
|
94
|
+
>
|
|
95
|
+
<p slot="subtitle"
|
|
96
|
+
class="mt-5 sm:mt-8 sm:flex sm:justify-center"
|
|
97
|
+
>
|
|
98
|
+
Nunc posuere massa eget turpis laoreet ultrices eget vel massa.
|
|
99
|
+
</p>
|
|
100
|
+
</Jumbotron>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Hero Variant
|
|
104
|
+
Perfect for page headers and key sections that need visual impact. Features a background image with gradient overlay and optional description and info text.
|
|
105
|
+
|
|
106
|
+
<div class="component-preview">
|
|
107
|
+
<Jumbotron
|
|
108
|
+
variant="hero"
|
|
109
|
+
title="<b>Main Hero</b> Title"
|
|
110
|
+
description="Detailed description of the hero section goes here."
|
|
111
|
+
info="<span>Additional</span> information can be displayed here"
|
|
112
|
+
image="https://img.freepik.com/free-photo/nature-beauty-tropical-rainforest-adventure-tranquility-freshness-generated-by-artificial-intellingence_25030-62539.jpg?size=1920&ext=jpg"
|
|
113
|
+
/>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
```js
|
|
117
|
+
<Jumbotron
|
|
118
|
+
variant="hero"
|
|
119
|
+
title="<b>Main Hero</b> Title"
|
|
120
|
+
description="Detailed description of the hero section goes here."
|
|
121
|
+
info="<span>Additional</span> information can be displayed here"
|
|
122
|
+
image="https://img.freepik.com/free-photo/nature-beauty-tropical-rainforest-adventure-tranquility-freshness-generated-by-artificial-intellingence_25030-62539.jpg?size=1920&ext=jpg"
|
|
123
|
+
/>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Hero Variant without image
|
|
127
|
+
When used without an image, the hero variant provides a clean, simple header with a solid background color.
|
|
128
|
+
|
|
129
|
+
<div class="component-preview">
|
|
130
|
+
<Jumbotron
|
|
131
|
+
variant="hero"
|
|
132
|
+
title="<b>Simple Hero</b> Title"
|
|
133
|
+
description="A clean and simple hero section without background image."
|
|
134
|
+
info="Perfect for text-focused content sections"
|
|
135
|
+
/>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
```js
|
|
139
|
+
<Jumbotron
|
|
140
|
+
variant="hero"
|
|
141
|
+
title="<b>Simple Hero</b> Title"
|
|
142
|
+
description="A clean and simple hero section without background image."
|
|
143
|
+
info="Perfect for text-focused content sections"
|
|
144
|
+
/>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Hero Variant with Different Backgrounds
|
|
148
|
+
Hero variant supports different background classes to match your design needs.
|
|
149
|
+
|
|
150
|
+
<div class="component-preview">
|
|
151
|
+
<Jumbotron
|
|
152
|
+
variant="hero"
|
|
153
|
+
title="<b>Blue Darker Background</b> (Default)"
|
|
154
|
+
description="Uses the default bg-blue-darker background"
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
```js
|
|
158
|
+
<div class="component-preview">
|
|
159
|
+
<Jumbotron
|
|
160
|
+
variant="hero"
|
|
161
|
+
title="<b>Blue Darker Background</b> (Default)"
|
|
162
|
+
description="Uses the default bg-blue-darker background"
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
```
|
|
166
|
+
<br/>
|
|
167
|
+
|
|
168
|
+
<div class="component-preview">
|
|
169
|
+
<Jumbotron
|
|
170
|
+
variant="hero"
|
|
171
|
+
title="<b>Blue Darkest Background</b>"
|
|
172
|
+
description="Uses blue-darkest background"
|
|
173
|
+
backgroundClass="bg-blue-darkest"
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
176
|
+
```js
|
|
177
|
+
<div class="component-preview">
|
|
178
|
+
<Jumbotron
|
|
179
|
+
variant="hero"
|
|
180
|
+
title="<b>Blue Darkest Background</b>"
|
|
181
|
+
description="Uses blue-darkest background"
|
|
182
|
+
backgroundClass="bg-blue-darkest"
|
|
183
|
+
/>
|
|
184
|
+
</div>
|
|
185
|
+
```
|
|
186
|
+
<br/>
|
|
187
|
+
|
|
188
|
+
<div class="component-preview">
|
|
189
|
+
<Jumbotron
|
|
190
|
+
variant="hero"
|
|
191
|
+
title="<b>Accent Background</b>"
|
|
192
|
+
description="Uses accent-darker background"
|
|
193
|
+
backgroundClass="bg-accent-darker"
|
|
194
|
+
/>
|
|
195
|
+
</div>
|
|
196
|
+
|
|
197
|
+
```js
|
|
198
|
+
<div class="component-preview">
|
|
199
|
+
<Jumbotron
|
|
200
|
+
variant="hero"
|
|
201
|
+
title="<b>Accent Background</b>"
|
|
202
|
+
description="Uses accent-darker background"
|
|
203
|
+
backgroundClass="bg-accent-darker"
|
|
204
|
+
/>
|
|
205
|
+
</div>
|
|
206
|
+
```
|
|
207
|
+
<br/>
|
|
208
|
+
|
|
209
|
+
<div class="component-preview">
|
|
210
|
+
<Jumbotron
|
|
211
|
+
variant="hero"
|
|
212
|
+
title="<b>Gradient Background</b>"
|
|
213
|
+
description="Uses custom gradient background"
|
|
214
|
+
backgroundClass="bg-vw"
|
|
215
|
+
/>
|
|
216
|
+
</div>
|
|
217
|
+
```js
|
|
218
|
+
<div class="component-preview">
|
|
219
|
+
<Jumbotron
|
|
220
|
+
variant="hero"
|
|
221
|
+
title="<b>Gradient Background</b>"
|
|
222
|
+
description="Uses custom gradient background"
|
|
223
|
+
backgroundClass="bg-vw"
|
|
224
|
+
/>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
## Post Variant (Full Overlay)
|
|
229
|
+
Designed for blog posts and articles, featuring a full-width image overlay with metadata support for author, date, and categories.
|
|
230
|
+
|
|
231
|
+
<div class="component-preview">
|
|
232
|
+
<Jumbotron
|
|
233
|
+
variant="post"
|
|
234
|
+
title="Blog Post Title"
|
|
235
|
+
image="https://img.freepik.com/free-photo/nature-beauty-tropical-rainforest-adventure-tranquility-freshness-generated-by-artificial-intellingence_25030-62539.jpg?size=1920&ext=jpg"
|
|
236
|
+
categories={[
|
|
237
|
+
{ name: 'Technology', uri: '#' },
|
|
238
|
+
{ name: 'Design', uri: '#' }
|
|
239
|
+
]}
|
|
240
|
+
author={{
|
|
241
|
+
firstName: "John",
|
|
242
|
+
name: "John Doe"
|
|
243
|
+
}}
|
|
244
|
+
date="2024-02-12"
|
|
245
|
+
/>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
```js
|
|
249
|
+
<Jumbotron
|
|
250
|
+
variant="post"
|
|
251
|
+
title="Blog Post Title"
|
|
252
|
+
image="https://img.freepik.com/free-photo/nature-beauty-tropical-rainforest-adventure-tranquility-freshness-generated-by-artificial-intellingence_25030-62539.jpg?size=1920&ext=jpg"
|
|
253
|
+
categories={[
|
|
254
|
+
{ name: 'Technology', uri: '#' },
|
|
255
|
+
{ name: 'Design', uri: '#' }
|
|
256
|
+
]}
|
|
257
|
+
author={{
|
|
258
|
+
firstName: "John",
|
|
259
|
+
name: "John Doe"
|
|
260
|
+
}}
|
|
261
|
+
date="2024-02-12"
|
|
262
|
+
/>
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## Post Split Variant
|
|
266
|
+
A two-column layout variant for posts where image and content need equal emphasis. Great for featured articles or important announcements.
|
|
267
|
+
|
|
268
|
+
<div class="component-preview pb-0 !block">
|
|
269
|
+
<Jumbotron
|
|
270
|
+
variant="post-split"
|
|
271
|
+
title="<b>Formatted</b> Blog Post Title <small>Lorem Ipsum</small>"
|
|
272
|
+
image="http://localhost:1234/_image?href=https%3A%2F%2Fimg.freepik.com%2Ffree-photo%2Fnature-beauty-tropical-rainforest-adventure-tranquility-freshness-generated-by-artificial-intellingence_25030-62539.jpg%3Fsize%3D960%26ext%3Djpg&w=1200&h=675&f=webp"
|
|
273
|
+
categories={[
|
|
274
|
+
{ name: 'Technology', uri: '#' },
|
|
275
|
+
{ name: 'Design', uri: '#' }
|
|
276
|
+
]}
|
|
277
|
+
author={{
|
|
278
|
+
firstName: "John",
|
|
279
|
+
name: "John Doe"
|
|
280
|
+
}}
|
|
281
|
+
date="2024-02-12"
|
|
282
|
+
/>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
```js
|
|
286
|
+
<Jumbotron
|
|
287
|
+
variant="post-split"
|
|
288
|
+
title="<b>Formatted</b> Blog Post Title <small>Lorem Ipsum</small>"
|
|
289
|
+
image="path/to/image.jpg"
|
|
290
|
+
categories={[
|
|
291
|
+
{ name: 'Technology', uri: '#' },
|
|
292
|
+
{ name: 'Design', uri: '#' }
|
|
293
|
+
]}
|
|
294
|
+
author={{
|
|
295
|
+
firstName: "John",
|
|
296
|
+
name: "John Doe"
|
|
297
|
+
}}
|
|
298
|
+
date="2024-02-12"
|
|
299
|
+
/>
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
## Custom Intro Slot Example
|
|
303
|
+
Shows how to fully customize the header section using the intro slot. Useful for complex layouts or custom styling.
|
|
304
|
+
|
|
305
|
+
<div class="component-preview">
|
|
306
|
+
<Jumbotron variant="default" small>
|
|
307
|
+
<h2 slot="intro" class="text-3xl text-white sm:(text-3xl pt-0) md:text-4xl lg:text-5xl">
|
|
308
|
+
Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.
|
|
309
|
+
</h2>
|
|
310
|
+
<p slot="subtitle"
|
|
311
|
+
class="mt-5 sm:mt-8 sm:flex sm:justify-center"
|
|
312
|
+
>Nunc posuere massa eget turpis laoreet ultrices eget vel massa.</p>
|
|
313
|
+
</Jumbotron>
|
|
314
|
+
</div>
|
|
315
|
+
|
|
316
|
+
```js
|
|
317
|
+
<Jumbotron variant="default" small>
|
|
318
|
+
<h2 slot="intro" class="text-3xl text-white sm:(text-3xl pt-0) md:text-4xl lg:text-5xl">
|
|
319
|
+
Lorem ipsum dolor sit amet, <span class="text-accent-light">consectetur</span> adipiscing elit.
|
|
320
|
+
</h2>
|
|
321
|
+
<p slot="subtitle"
|
|
322
|
+
class="mt-5 sm:mt-8 sm:flex sm:justify-center"
|
|
323
|
+
>
|
|
324
|
+
Nunc posuere massa eget turpis laoreet ultrices eget vel massa.
|
|
325
|
+
</p>
|
|
326
|
+
</Jumbotron>
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
## Component API
|
|
330
|
+
|
|
331
|
+
### Common Props
|
|
332
|
+
- `variant`: Layout variant ('default' | 'hero' | 'post' | 'post-split')
|
|
333
|
+
- default: 'default'
|
|
334
|
+
- `title`: Main heading text. Supports HTML markup for styling.
|
|
335
|
+
- `image`: Image URL (required for hero, post and post-split variants)
|
|
336
|
+
|
|
337
|
+
### Default & Hero Props
|
|
338
|
+
- `small`: Reduces vertical padding (useful for secondary content)
|
|
339
|
+
- `description`: Secondary text below title (hero variant only)
|
|
340
|
+
- `info`: Additional information text (hero variant only)
|
|
341
|
+
|
|
342
|
+
### Post Variants Props
|
|
343
|
+
- `date`: Publication date string
|
|
344
|
+
- `author`: Author information object
|
|
345
|
+
- `firstName`: Author's first name (used in title attribute)
|
|
346
|
+
- `name`: Full author name (displayed)
|
|
347
|
+
- `categories`: Array of category objects for post categorization
|
|
348
|
+
- `name`: Category display name
|
|
349
|
+
- `uri`: Category link URL
|
|
350
|
+
|
|
351
|
+
### Slots
|
|
352
|
+
- `intro`: Replaces the default title with custom content. Useful for complex headings or custom markup.
|
|
353
|
+
- `subtitle`: Additional content below the title. Supports markdown and HTML.
|
|
354
|
+
- `cta-content`: Call to action content (buttons, links etc.) - wrapped in centered container.
|
|
355
|
+
|
|
356
|
+
## Accessibility
|
|
357
|
+
- Use semantic HTML markup in slots
|
|
358
|
+
- Ensure proper contrast for text over background images
|
|
359
|
+
- Provide meaningful alt text for images
|
|
360
|
+
- Title text supports HTML markup for better semantics and styling
|
package/src/pages/index.astro
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { changeLanguage } from "i18next";
|
|
3
3
|
import { Icon } from "astro-icon/components";
|
|
4
4
|
import { SITE } from "../config";
|
|
5
|
-
import
|
|
5
|
+
import Jumbotron from "../components/Jumbotron.astro";
|
|
6
6
|
import Layout from "../layouts/Layout.astro";
|
|
7
7
|
import Headline from "../components/Headline.vue";
|
|
8
8
|
import Button from "../components/Button.vue";
|
|
@@ -33,7 +33,7 @@ const navItems = [
|
|
|
33
33
|
|
|
34
34
|
<Layout>
|
|
35
35
|
<div class="bg-slate-100 min-h-screen text-center">
|
|
36
|
-
<
|
|
36
|
+
<Jumbotron title={SITE.title}>
|
|
37
37
|
<p
|
|
38
38
|
slot="subtitle"
|
|
39
39
|
class="mt-3 text-base text-gray-200 sm:mt-5 text-lg md:text-xl lg:mx-0 md:mt-5"
|
|
@@ -41,7 +41,7 @@ const navItems = [
|
|
|
41
41
|
/>
|
|
42
42
|
|
|
43
43
|
<Button
|
|
44
|
-
slot="cta"
|
|
44
|
+
slot="cta-content"
|
|
45
45
|
href="/core/introduction/"
|
|
46
46
|
title="Spoko Design System"
|
|
47
47
|
primary
|
|
@@ -49,7 +49,7 @@ const navItems = [
|
|
|
49
49
|
>
|
|
50
50
|
Read More
|
|
51
51
|
</Button>
|
|
52
|
-
</
|
|
52
|
+
</Jumbotron>
|
|
53
53
|
<nav>
|
|
54
54
|
<div
|
|
55
55
|
class="px-4 flex-col flex flex-wrap md:flex-nowrap gap-4 max-w-5xl mx-auto text-left mt-12 md:(px-0 flex-row)"
|
|
@@ -105,16 +105,16 @@ const navItems = [
|
|
|
105
105
|
<Headline underline as="div" class="mx-auto text-gray-900" textSize="3xl">Examples:</Headline>
|
|
106
106
|
<ul class="grid text-2xl pt-6 lg:(auto-cols-max grid-flow-col py-6) text-left">
|
|
107
107
|
<li class="leading-5 me-6 mb-4 lg:mb-0">
|
|
108
|
-
<a href="https://catalog.polo.blue" class="
|
|
108
|
+
<a href="https://catalog.polo.blue" class="example-link" target="_blank"> catalog.polo.blue</a>
|
|
109
109
|
</li>
|
|
110
110
|
<li class="leading-5 me-6 mb-4 lg:mb-0">
|
|
111
|
-
<a href="https://polo.blue" class="
|
|
111
|
+
<a href="https://polo.blue" class="example-link" target="_blank"> polo.blue</a>
|
|
112
112
|
</li>
|
|
113
113
|
<li class="leading-5 me-6 mb-4 lg:mb-0">
|
|
114
|
-
<a href="https://spoko.space" class="
|
|
114
|
+
<a href="https://spoko.space" class="example-link" target="_blank"> spoko.space</a>
|
|
115
115
|
</li>
|
|
116
116
|
<li class="leading-5 me-6 mb-4 lg:mb-0">
|
|
117
|
-
<a href="https://sale.polo.blue/" class="
|
|
117
|
+
<a href="https://sale.polo.blue/" class="example-link" target="_blank">sale.polo.blue</a>
|
|
118
118
|
</li>
|
|
119
119
|
</ul>
|
|
120
120
|
</div>
|
|
@@ -124,3 +124,8 @@ const navItems = [
|
|
|
124
124
|
</div>
|
|
125
125
|
<script is:inline></script>
|
|
126
126
|
</Layout>
|
|
127
|
+
<style>
|
|
128
|
+
.example-link {
|
|
129
|
+
@apply transition ease-in-out delay-200 duration-300 text-blue-medium hover:(text-accent-light decoration-blue-medium) underline decoration-white;
|
|
130
|
+
}
|
|
131
|
+
</style>
|
|
@@ -20,7 +20,6 @@ export const colors = {
|
|
|
20
20
|
|
|
21
21
|
// Secondary colors - accent palette
|
|
22
22
|
accent: {
|
|
23
|
-
lightest: '#00b0f0',
|
|
24
23
|
light: '#0099da',
|
|
25
24
|
default: '#0087c1', // Default accent
|
|
26
25
|
dark: '#006ea6',
|
|
@@ -36,7 +35,6 @@ export const colors = {
|
|
|
36
35
|
default: '#9ca3af', // Base gray
|
|
37
36
|
dark: '#6a767d',
|
|
38
37
|
darker: '#4b5563',
|
|
39
|
-
black: '#000000', // Pure black
|
|
40
38
|
},
|
|
41
39
|
|
|
42
40
|
// Slate colors - gray-blue palette
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// uno-config/theme/container.ts
|
|
2
|
+
import { breakpoints } from './breakpoints';
|
|
3
|
+
|
|
4
|
+
export const container = {
|
|
5
|
+
center: true,
|
|
6
|
+
padding: {
|
|
7
|
+
sm: '1rem',
|
|
8
|
+
md: '2rem',
|
|
9
|
+
lg: '3rem',
|
|
10
|
+
xl: '4rem',
|
|
11
|
+
'2xl': '5rem',
|
|
12
|
+
'3xl': '5rem',
|
|
13
|
+
'4xl': '5rem',
|
|
14
|
+
},
|
|
15
|
+
maxWidth: {
|
|
16
|
+
sm: breakpoints.sm,
|
|
17
|
+
md: breakpoints.md,
|
|
18
|
+
lg: breakpoints.lg,
|
|
19
|
+
xl: breakpoints.xl,
|
|
20
|
+
'2xl': breakpoints['2xl'],
|
|
21
|
+
// For larger breakpoints, keep the 2xl width
|
|
22
|
+
'3xl': breakpoints['2xl'],
|
|
23
|
+
'4xl': breakpoints['2xl'],
|
|
24
|
+
},
|
|
25
|
+
};
|
|
@@ -5,6 +5,7 @@ import { breakpoints } from './breakpoints';
|
|
|
5
5
|
import { dimensions } from './dimensions';
|
|
6
6
|
import { effects } from './effects';
|
|
7
7
|
import { gridTemplates } from './grid';
|
|
8
|
+
import { container } from './container';
|
|
8
9
|
|
|
9
10
|
export const theme = {
|
|
10
11
|
colors,
|
|
@@ -14,6 +15,7 @@ export const theme = {
|
|
|
14
15
|
gridTemplateColumn: gridTemplates.columns,
|
|
15
16
|
breakpoints,
|
|
16
17
|
screens: breakpoints,
|
|
18
|
+
container,
|
|
17
19
|
};
|
|
18
20
|
|
|
19
21
|
export {
|
|
@@ -23,4 +25,5 @@ export {
|
|
|
23
25
|
dimensions,
|
|
24
26
|
effects,
|
|
25
27
|
gridTemplates,
|
|
28
|
+
container,
|
|
26
29
|
};
|
|
@@ -34,7 +34,7 @@ export const componentShortcuts = [
|
|
|
34
34
|
// Category related
|
|
35
35
|
['category-section', `pb-4 w-full ${COLORS.bgWhite} mb-4 overflow-x-hidden ${LAYOUT.flex.wrap} max-w-full`],
|
|
36
36
|
['category-tile', `${LAYOUT.flex.wrap} sm:flex-nowrap content-between w-64 min-w-64 lg:(w-28.57% min-w-28.57%) 2xl:(w-24.09% min-w-24.09%) 3xl:(w-19.60% min-w-19.60%) flex ml-1 lg:ml-1.5 first:ml-4`],
|
|
37
|
-
['category-toggler', `sm:bg-opacity-20 pt-1 ${LAYOUT.flex.center} hover:text-accent-light text-neutral-light hover:text-blue-lightest px-4 leading-7 pb-0.5 md:pl-0`],
|
|
37
|
+
['category-toggler', `w-8 sm:bg-opacity-20 pt-1 ${LAYOUT.flex.center} hover:text-accent-light text-neutral-light hover:text-blue-lightest px-4 leading-7 pb-0.5 md:pl-0`],
|
|
38
38
|
['category-link', 'w-full sm:w-auto text-neutral-default hover:(bg-gray-50 sm:bg-inherit) py-2 sm:py-0 text-lg font-medium text-left px-3 block sm:(text-base leading-4 mb-1.5) md:(px-4 py-1 table-cell)'],
|
|
39
39
|
['category-carousel__link', `uppercase ml-auto px-4 text-xs ${LAYOUT.flex.alignCenter} mt-3 hover:underline`],
|
|
40
40
|
|
|
@@ -4,6 +4,7 @@ import { buttonShortcuts } from './buttons';
|
|
|
4
4
|
import { layoutShortcuts } from './layout';
|
|
5
5
|
import { componentShortcuts } from './components';
|
|
6
6
|
import { productShortcuts } from './product';
|
|
7
|
+
import { jumbotronShortcuts } from './jumbotron';
|
|
7
8
|
|
|
8
9
|
const convertToShortcuts = (shortcuts: string[][]): UserShortcuts => {
|
|
9
10
|
return Object.fromEntries(shortcuts.map(([name, value]) => [name, value]));
|
|
@@ -13,5 +14,6 @@ export const shortcuts: UserShortcuts = {
|
|
|
13
14
|
...convertToShortcuts(buttonShortcuts),
|
|
14
15
|
...convertToShortcuts(layoutShortcuts),
|
|
15
16
|
...convertToShortcuts(componentShortcuts),
|
|
16
|
-
...convertToShortcuts(productShortcuts)
|
|
17
|
+
...convertToShortcuts(productShortcuts),
|
|
18
|
+
...convertToShortcuts(jumbotronShortcuts),
|
|
17
19
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// shortcuts/jumbotron.ts
|
|
2
|
+
import { COLORS, LAYOUT, TRANSITIONS, IMAGE_STYLES } from './constants'
|
|
3
|
+
|
|
4
|
+
export const jumbotronShortcuts = [
|
|
5
|
+
// Default variant
|
|
6
|
+
['jumbotron-header-base', 'relative mx-auto my-auto lg:w-full text-center py-8'],
|
|
7
|
+
['jumbotron-container-small', 'md:min-h-xs sm:py-12 md:py-14 lg:py-16 xl:py-20'],
|
|
8
|
+
['jumbotron-container-large', 'md:min-h-md sm:py-16 md:py-20 lg:py-28 xl:py-32'],
|
|
9
|
+
['jumbotron-title-default', 'text-3xl headline-light text-white sm:(text-4xl pt-0) md:text-5xl lg:text-6xl'],
|
|
10
|
+
['jumbotron-cta-wrapper', 'mt-5 sm:(mt-8 flex justify-center)'],
|
|
11
|
+
|
|
12
|
+
// Hero variant
|
|
13
|
+
['jumbotron-hero-wrapper', 'relative w-full'],
|
|
14
|
+
['jumbotron-hero-image', 'absolute inset-0 w-full h-full'],
|
|
15
|
+
['jumbotron-hero-overlay', 'absolute inset-0 bg-gradient-to-r from-blue-900 to-transparent opacity-90 z-1'],
|
|
16
|
+
['jumbotron-hero-container', 'xl:container mx-auto px-3.5 md:px-8 py-8 h-56 sm:h-72 md:max-h-72 items-center flex'],
|
|
17
|
+
['jumbotron-hero-header', 'relative z-10 text-white'],
|
|
18
|
+
['jumbotron-hero-title', 'font-headlight text-3xl sm:text-4xl md:text-5xl xl:text-6xl mt-1 line-clamp-3 leading-tight'],
|
|
19
|
+
|
|
20
|
+
// Post variant
|
|
21
|
+
['jumbotron-post-header', 'post-header pt-11 w-full justify-center text-white z-2 relative'],
|
|
22
|
+
['jumbotron-post-heading', 'heading text-white relative flex items-center justify-center mt-auto w-full z-[2]'],
|
|
23
|
+
['jumbotron-post-container', 'w-full sm:max-w-[640px] md:max-w-3xl lg:max-w-5xl xl:max-w-7xl 2xl:max-w-[1536px] px-4 py-5 flex flex-col flex-wrap'],
|
|
24
|
+
['jumbotron-post-title', 'font-headlight text-2xl mb-1 sm:text-3xl md:(text-4xl mb-3) xl:text-6xl mt-1 order-2 line-clamp-3 pb-1'],
|
|
25
|
+
|
|
26
|
+
// Metadata and categories
|
|
27
|
+
['jumbotron-meta', 'order-3 flex items-center text-gray-100'],
|
|
28
|
+
['jumbotron-categories', 'order-1'],
|
|
29
|
+
|
|
30
|
+
// Content styles
|
|
31
|
+
['jumbotron-description', 'mb-1 line-clamp-3 text-base sm:text-lg leading-none mt-4'],
|
|
32
|
+
['jumbotron-info', 'font-medium mb-4 line-clamp-1 text-base sm:text-lg mt-2'],
|
|
33
|
+
|
|
34
|
+
// Post Split variant
|
|
35
|
+
['jumbotron-split-wrapper', 'w-full'],
|
|
36
|
+
['jumbotron-split-container', 'xl:container mx-auto px-3.5 md:px-0'],
|
|
37
|
+
['jumbotron-split-header', 'w-full justify-center text-white z-2 mt-auto md:(grid grid-cols-2) pb-4 mb-8'],
|
|
38
|
+
['jumbotron-split-content', 'container px-3.5 py-5 md:py-0 flex flex-wrap'],
|
|
39
|
+
['jumbotron-split-title', 'font-headlight text-3xl md:(text-4xl mb-3) xl:text-11 mt-1 order-2 line-clamp-3 pb-1 w-full'],
|
|
40
|
+
['jumbotron-split-meta', 'order-3 flex items-center text-gray-100'],
|
|
41
|
+
['jumbotron-split-image-wrapper', 'relative -mb-8 md:(mt-4 -ml-4 mr-4)'],
|
|
42
|
+
['jumbotron-split-image', 'relative shadow-xl md:max-h-112'],
|
|
43
|
+
['jumbotron-split-img', 'aspect-video'] // border-white border-4
|
|
44
|
+
];
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useSlots } from 'vue';
|
|
3
|
-
|
|
4
|
-
const slots = useSlots()
|
|
5
|
-
const hasSlot = (name) => {
|
|
6
|
-
return !!slots[name];
|
|
7
|
-
}
|
|
8
|
-
const props = defineProps({
|
|
9
|
-
small: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: null,
|
|
12
|
-
required: false,
|
|
13
|
-
},
|
|
14
|
-
intro: {
|
|
15
|
-
type: String,
|
|
16
|
-
default: '',
|
|
17
|
-
required: false,
|
|
18
|
-
}
|
|
19
|
-
})
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<template>
|
|
23
|
-
<header class="relative flow content-grid bg-vw mx-auto my-auto py-8 lg:w-full text-center" :class="props.small ? 'md:min-h-xs sm:py-12 md:py-14 lg:py-16 xl:py-20' : 'md:min-h-md sm:py-16 md:py-20 lg:py-28 xl:py-32'">
|
|
24
|
-
|
|
25
|
-
<slot name="intro">
|
|
26
|
-
<h1 class="text-3xl headline-light text-white sm:(text-4xl pt-0) md:text-5xl lg:text-6xl " v-html="props.intro" />
|
|
27
|
-
</slot>
|
|
28
|
-
|
|
29
|
-
<slot name="subtitle" />
|
|
30
|
-
<div class="mt-5 sm:(mt-8 flex justify-center)" v-if="hasSlot('cta')">
|
|
31
|
-
<slot name="cta" />
|
|
32
|
-
</div>
|
|
33
|
-
</header>
|
|
34
|
-
</template>
|
|
35
|
-
<style>
|
|
36
|
-
.bg-vw {
|
|
37
|
-
background: radial-gradient(circle at 50% 85%,
|
|
38
|
-
#00437A 0%,
|
|
39
|
-
#001E50 100%)
|
|
40
|
-
}
|
|
41
|
-
</style>
|