spoko-design-system 0.3.2 → 0.3.8
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 +40 -50
- package/src/components/Category/CategorySidebarToggler.vue +1 -1
- package/src/components/Category/CategoryViewToggler.astro +2 -7
- package/src/components/Category/SubCategoryLink.vue +1 -1
- 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/uno-config/theme/shortcuts/layout.ts +1 -1
- package/src/components/Jumbatron.vue +0 -41
- package/src/pages/components/jumbatron.mdx +0 -95
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
// variants/Default.astro
|
|
3
|
+
interface Props {
|
|
4
|
+
title?: string;
|
|
5
|
+
small?: boolean;
|
|
6
|
+
hasIntroContent: boolean;
|
|
7
|
+
hasSubtitleContent: boolean;
|
|
8
|
+
hasCtaContent: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
title = "",
|
|
13
|
+
small = false,
|
|
14
|
+
hasIntroContent,
|
|
15
|
+
hasSubtitleContent,
|
|
16
|
+
hasCtaContent,
|
|
17
|
+
} = Astro.props;
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
<header
|
|
21
|
+
class:list={[
|
|
22
|
+
"flow content-grid", // globalne klasy
|
|
23
|
+
"jumbotron-header-base bg-vw", // klasy bazowe i tło
|
|
24
|
+
small ? "jumbotron-container-small" : "jumbotron-container-large" // wariant rozmiaru
|
|
25
|
+
]}
|
|
26
|
+
>
|
|
27
|
+
{hasIntroContent ? (
|
|
28
|
+
<slot name="intro" />
|
|
29
|
+
) : (
|
|
30
|
+
<h1 class="jumbotron-title-default" set:html={title} />
|
|
31
|
+
)}
|
|
32
|
+
|
|
33
|
+
{hasSubtitleContent && <slot name="subtitle" />}
|
|
34
|
+
|
|
35
|
+
{hasCtaContent && (
|
|
36
|
+
<div class="jumbotron-cta-wrapper">
|
|
37
|
+
<slot name="cta-content" />
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
</header>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
// variants/Hero.astro
|
|
3
|
+
interface Props {
|
|
4
|
+
title?: string;
|
|
5
|
+
image?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
info?: string;
|
|
8
|
+
backgroundClass?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const {
|
|
12
|
+
title = "",
|
|
13
|
+
image,
|
|
14
|
+
description,
|
|
15
|
+
info,
|
|
16
|
+
backgroundClass
|
|
17
|
+
} = Astro.props;
|
|
18
|
+
|
|
19
|
+
console.log('Received backgroundClass:', backgroundClass); // debug
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
<div class={`relative w-full ${backgroundClass}`}>
|
|
23
|
+
{image && (
|
|
24
|
+
<div class="absolute inset-0 w-full h-full">
|
|
25
|
+
<div class="absolute inset-0 bg-gradient-to-r from-blue-900 to-transparent opacity-90 z-1" />
|
|
26
|
+
<img
|
|
27
|
+
class="w-full h-full object-cover"
|
|
28
|
+
src={image}
|
|
29
|
+
alt={title}
|
|
30
|
+
/>
|
|
31
|
+
</div>
|
|
32
|
+
)}
|
|
33
|
+
|
|
34
|
+
<div class="xl:container mx-auto px-3.5 md:px-8 py-8 h-56 sm:h-72 md:max-h-72 items-center flex">
|
|
35
|
+
<header class="relative z-10 text-white">
|
|
36
|
+
<h1
|
|
37
|
+
class="font-headlight text-3xl sm:text-4xl md:text-5xl xl:text-6xl mt-1 line-clamp-3 leading-tight"
|
|
38
|
+
set:html={title}
|
|
39
|
+
/>
|
|
40
|
+
{description && (
|
|
41
|
+
<div
|
|
42
|
+
class="mb-1 line-clamp-3 text-base sm:text-lg leading-none mt-4"
|
|
43
|
+
set:html={description}
|
|
44
|
+
/>
|
|
45
|
+
)}
|
|
46
|
+
{info && (
|
|
47
|
+
<div
|
|
48
|
+
class="font-medium mb-4 line-clamp-1 text-base sm:text-lg mt-2"
|
|
49
|
+
set:html={info}
|
|
50
|
+
/>
|
|
51
|
+
)}
|
|
52
|
+
</header>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
// variants/Post.astro
|
|
3
|
+
import type { Author, Category } from '../types';
|
|
4
|
+
import CategoryLink from "../../CategoryLink.astro";
|
|
5
|
+
import Date from "../../Date.astro";
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
title?: string;
|
|
9
|
+
image?: string;
|
|
10
|
+
author?: Author;
|
|
11
|
+
date?: string;
|
|
12
|
+
categories?: Category[];
|
|
13
|
+
hasMetadata: boolean;
|
|
14
|
+
hasCategories: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
title = "",
|
|
19
|
+
image,
|
|
20
|
+
author,
|
|
21
|
+
date,
|
|
22
|
+
categories = [],
|
|
23
|
+
hasMetadata,
|
|
24
|
+
hasCategories,
|
|
25
|
+
} = Astro.props;
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<header class="post-header pt-11 w-full justify-center text-white z-2 bg-blue-darkest relative">
|
|
29
|
+
<div class="heading text-white relative flex items-center justify-center mt-auto w-full z-[2]">
|
|
30
|
+
<div class="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">
|
|
31
|
+
<h1 class="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">
|
|
32
|
+
{title}
|
|
33
|
+
</h1>
|
|
34
|
+
|
|
35
|
+
{hasCategories && (
|
|
36
|
+
<div class="order-1">
|
|
37
|
+
<CategoryLink categories={categories} />
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
|
|
41
|
+
{hasMetadata && (
|
|
42
|
+
<div class="order-3 flex items-center text-gray-100">
|
|
43
|
+
{author && (
|
|
44
|
+
<span class="text-sm" title={author.firstName}>
|
|
45
|
+
{author.name}
|
|
46
|
+
</span>
|
|
47
|
+
)}
|
|
48
|
+
{author && date && <span class="mx-1">-</span>}
|
|
49
|
+
{date && <Date date={date} />}
|
|
50
|
+
</div>
|
|
51
|
+
)}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<div class="featured-image-overlay">
|
|
56
|
+
<img
|
|
57
|
+
src={image}
|
|
58
|
+
alt={title}
|
|
59
|
+
class="w-full h-full object-cover block max-w-full"
|
|
60
|
+
/>
|
|
61
|
+
</div>
|
|
62
|
+
</header>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { Author, Category } from '../types';
|
|
3
|
+
import CategoryLink from "../../CategoryLink.astro";
|
|
4
|
+
import Date from "../../Date.astro";
|
|
5
|
+
import { Image } from "astro:assets";
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
title?: string;
|
|
9
|
+
image?: string;
|
|
10
|
+
author?: Author;
|
|
11
|
+
date?: string;
|
|
12
|
+
categories?: Category[];
|
|
13
|
+
hasMetadata: boolean;
|
|
14
|
+
hasCategories: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
title = "",
|
|
19
|
+
image,
|
|
20
|
+
author,
|
|
21
|
+
date,
|
|
22
|
+
categories = [],
|
|
23
|
+
hasMetadata,
|
|
24
|
+
hasCategories,
|
|
25
|
+
} = Astro.props;
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<div class="jumbotron-split-wrapper bg-blue-900 bg-vw">
|
|
29
|
+
<div class="jumbotron-split-container">
|
|
30
|
+
<header class="jumbotron-split-header">
|
|
31
|
+
<div class="heading flex flex-wrap text-white relative items-center justify-center mt-auto w-full z-[2]">
|
|
32
|
+
<div class="jumbotron-split-content">
|
|
33
|
+
<h1 class="jumbotron-split-title" set:html={title} />
|
|
34
|
+
|
|
35
|
+
{hasCategories && (
|
|
36
|
+
<div class="jumbotron-categories">
|
|
37
|
+
<CategoryLink categories={categories} />
|
|
38
|
+
</div>
|
|
39
|
+
)}
|
|
40
|
+
|
|
41
|
+
{hasMetadata && (
|
|
42
|
+
<div class="jumbotron-split-meta">
|
|
43
|
+
{author && (
|
|
44
|
+
<span class="text-sm" title={author.firstName} data-pagefind-ignore>
|
|
45
|
+
{author.name}
|
|
46
|
+
</span>
|
|
47
|
+
)}
|
|
48
|
+
{author && date && <span class="mx-1">-</span>}
|
|
49
|
+
{date && <Date date={date} />}
|
|
50
|
+
</div>
|
|
51
|
+
)}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
{image && (
|
|
56
|
+
<div class="jumbotron-split-image-wrapper">
|
|
57
|
+
<div class="jumbotron-split-image">
|
|
58
|
+
<Image
|
|
59
|
+
class="jumbotron-split-img"
|
|
60
|
+
src={image}
|
|
61
|
+
alt={title}
|
|
62
|
+
width={768}
|
|
63
|
+
height={432}
|
|
64
|
+
loading="eager"
|
|
65
|
+
/>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
)}
|
|
69
|
+
</header>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
import type { Props } from "./Jumbotron/types";
|
|
3
|
+
import BaseJumbotron from "./Jumbotron/index.astro";
|
|
4
|
+
|
|
5
|
+
const props = Astro.props as Props;
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<BaseJumbotron {...props}>
|
|
9
|
+
<slot name="intro" slot="intro" />
|
|
10
|
+
<slot name="subtitle" slot="subtitle" />
|
|
11
|
+
<slot name="cta-content" slot="cta-content" />
|
|
12
|
+
</BaseJumbotron>
|
package/src/config.ts
CHANGED
|
@@ -37,7 +37,7 @@ export const SIDEBAR = [
|
|
|
37
37
|
{ text: "Icons", link: "/components/icons/" },
|
|
38
38
|
{ text: "Image", link: "/components/image/" },
|
|
39
39
|
{ text: "Input", link: "/components/input/" },
|
|
40
|
-
{ text: "
|
|
40
|
+
{ text: "Jumbotron", link: "/components/jumbotron/" },
|
|
41
41
|
{ text: "Modal", link: "/components/modal/" },
|
|
42
42
|
{ text: "PostHeader", link: "/components/post-header/" },
|
|
43
43
|
{ text: "PR-Code", link: "/components/pr-code/" },
|
package/src/layouts/Layout.astro
CHANGED
|
@@ -45,7 +45,7 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString();
|
|
|
45
45
|
createdy by
|
|
46
46
|
</div>
|
|
47
47
|
<img
|
|
48
|
-
class="h-4 w-min md:h-5
|
|
48
|
+
class="h-4 w-min md:h-5"
|
|
49
49
|
src="spoko.space.svg"
|
|
50
50
|
alt="Modern Websites"
|
|
51
51
|
width="126"
|
|
@@ -58,3 +58,4 @@ const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString();
|
|
|
58
58
|
</footer>
|
|
59
59
|
</body>
|
|
60
60
|
</html>
|
|
61
|
+
|
|
@@ -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
|