spoko-design-system 0.0.5 → 0.0.7
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 +14 -2
- package/astro.config.mjs +55 -7
- package/package.json +21 -7
- package/public/pagefind.yml +4 -0
- package/src/components/Button.vue +10 -2
- package/src/components/ButtonCopy.vue +1 -6
- package/src/components/Card.astro +2 -2
- package/src/components/Header/Header.astro +172 -0
- package/src/components/Image.astro +0 -2
- package/src/components/Jumbatron.vue +17 -18
- package/src/components/MainTable.vue +20 -26
- package/src/components/Modal.astro +1 -4
- package/src/components/PageContent.astro +0 -1
- package/src/components/ProductTile.astro +30 -32
- package/src/components/RightSidebar.astro +0 -3
- package/src/config.ts +2 -2
- package/src/design.config.ts +4 -0
- package/src/layouts/Layout.astro +2 -2
- package/src/layouts/MainLayout.astro +7 -7
- package/src/pages/components/badges.mdx +17 -31
- package/src/pages/components/breadcrumbs.mdx +9 -6
- package/src/pages/components/buttons.mdx +106 -13
- package/src/pages/components/card.mdx +58 -4
- package/src/pages/components/copyright.mdx +3 -2
- package/src/pages/components/flags.mdx +17 -8
- package/src/pages/components/fuck-russia.mdx +1 -1
- package/src/pages/components/hand-drive.mdx +4 -4
- package/src/pages/components/headline.mdx +19 -15
- package/src/pages/components/image.mdx +17 -5
- package/src/pages/components/input.mdx +1 -1
- package/src/pages/components/jumbatron.mdx +5 -3
- package/src/pages/components/modal.mdx +3 -3
- package/src/pages/components/post-header.mdx +3 -1
- package/src/pages/components/pr-code.mdx +6 -10
- package/src/pages/components/product-number.mdx +2 -1
- package/src/pages/components/product-tile.mdx +1 -1
- package/src/pages/components/slimbanner.mdx +1 -1
- package/src/pages/components/table.mdx +72 -4
- package/src/pages/core/introduction.mdx +1 -1
- package/src/pages/index.astro +1 -0
- package/src/styles/_variables.scss +6 -15
- package/src/styles/base/_base.scss +14 -5
- package/src/styles/base/_typography.scss +1 -80
- package/src/styles/content.scss +6 -9
- package/src/styles/main.scss +0 -16
- package/uno.config.ts +13 -11
- package/Layout/Header.astro +0 -111
package/README.md
CHANGED
|
@@ -25,8 +25,8 @@ or just clone the repository.
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
Example:
|
|
29
|
-
- https://spoko
|
|
28
|
+
### Example:
|
|
29
|
+
- https://sds.spoko.space/
|
|
30
30
|
|
|
31
31
|
#
|
|
32
32
|
|
|
@@ -36,6 +36,18 @@ Most of the components from this repository can be seen in my projects:
|
|
|
36
36
|
- https://polo.blue
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
### Feateures
|
|
40
|
+
- ⚡️[Vue 3](https://github.com/vuejs/core), [Vite](https://github.com/vitejs/vite), [pnpm](https://pnpm.io/) - born with fastness
|
|
41
|
+
- 🎨 [UnoCSS](https://github.com/antfu/unocss) - the instant on-demand atomic CSS engine
|
|
42
|
+
- 😃 [astro-icon](https://github.com/natemoo-re/astro-icon) - for local icons, sprites and `@iconify-json/*` sets
|
|
43
|
+
- 🍔 [astro-navbar](https://github.com/surjithctly/astro-navbar) - fully responsive and accessible headless navigation bar
|
|
44
|
+
- 🌍 [astro-i18next](https://github.com/yassinedoghri/astro-i18next) - Astro integration of i18next
|
|
45
|
+
- 🔎 [astro-pagefind](https://github.com/shishkin/astro-pagefind) - Astro integration for Pagefind static site search
|
|
46
|
+
- 🗒 [astrojs/mdx](https://github.com/withastro/astro/tree/main/packages/integrations/mdx/) - markdown support
|
|
47
|
+
- 📦 [astro-compress](https://github.com/astro-community/AstroCompress) - compression utilities to your Astro project
|
|
48
|
+
- 🖨 Static-site generation (SSG)
|
|
49
|
+
- 🌠 [View Transitions API](https://docs.astro.build/en/guides/view-transitions/#full-site-view-transitions-spa-mode) - [View Transition API](https://developer.mozilla.org/en-US/docs/Web/API/Document/startViewTransition) - makes it easy to change the DOM in a single step, while creating an animated transition between the two states. It's available in Chrome 111+ ([more details](https://developer.chrome.com/docs/web-platform/view-transitions?hl=en))
|
|
50
|
+
- ☁️ Deploy on Netlify
|
|
39
51
|
|
|
40
52
|
### Adding new sections
|
|
41
53
|
|
package/astro.config.mjs
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import { defineConfig, sharpImageService } from "astro/config";
|
|
2
|
-
// import tailwind from "@astrojs/tailwind";
|
|
3
2
|
import vue from "@astrojs/vue";
|
|
4
3
|
import mdx from '@astrojs/mdx';
|
|
5
4
|
import UnoCSS from '@unocss/astro';
|
|
6
|
-
|
|
5
|
+
import Compress from "astro-compress";
|
|
7
6
|
// https://github.com/yassinedoghri/astro-i18next#readme
|
|
8
7
|
import astroI18next from "astro-i18next";
|
|
9
|
-
|
|
10
8
|
import icon from "astro-icon";
|
|
9
|
+
import sitemap from "@astrojs/sitemap";
|
|
10
|
+
import pagefind from "astro-pagefind";
|
|
11
11
|
|
|
12
12
|
// https://astro.build/config
|
|
13
13
|
export default defineConfig({
|
|
14
|
-
site: "https://spoko
|
|
14
|
+
site: "https://sds.spoko.space/",
|
|
15
15
|
server: {
|
|
16
16
|
port: 1234
|
|
17
17
|
},
|
|
18
18
|
image: {
|
|
19
19
|
service: sharpImageService(),
|
|
20
|
-
domains: ["api.polo.blue", "polo.blue", "media.istockphoto.com", "img.freepik.com"]
|
|
20
|
+
domains: ["placehold.co", "api.polo.blue", "polo.blue", "media.istockphoto.com", "img.freepik.com"]
|
|
21
21
|
},
|
|
22
22
|
integrations: [
|
|
23
23
|
// Enable Vue to support Vue3 components.
|
|
24
24
|
vue(),
|
|
25
25
|
mdx(),
|
|
26
26
|
astroI18next(),
|
|
27
|
-
// tailwind(), // sorry - Uno is better ;-P
|
|
28
27
|
UnoCSS({
|
|
29
28
|
injectReset: true
|
|
30
29
|
}), icon(
|
|
@@ -48,5 +47,54 @@ export default defineConfig({
|
|
|
48
47
|
flowbite: ["arrow-left-outline", "arrow-right-outline", "angle-left-outline", "angle-right-outline", "chevron-left-outline", "chevron-right-outline","map-location-outline", "map-pin-alt-solid", "x-outline", "messages-outline", "arrow-down-to-bracket-outline", "check-outline"]
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
)
|
|
50
|
+
),
|
|
51
|
+
Compress({
|
|
52
|
+
CSS: true,
|
|
53
|
+
HTML: {
|
|
54
|
+
caseSensitive: true,
|
|
55
|
+
collapseBooleanAttributes: true,
|
|
56
|
+
collapseInlineTagWhitespace: false,
|
|
57
|
+
collapseWhitespace: true,
|
|
58
|
+
conservativeCollapse: false,
|
|
59
|
+
continueOnParseError: false,
|
|
60
|
+
customAttrAssign: [],
|
|
61
|
+
customAttrCollapse: "",
|
|
62
|
+
customAttrSurround: [],
|
|
63
|
+
customEventAttributes: [/^on[a-z]{3,}$/],
|
|
64
|
+
decodeEntities: false,
|
|
65
|
+
html5: true,
|
|
66
|
+
ignoreCustomComments: [],
|
|
67
|
+
ignoreCustomFragments: [],
|
|
68
|
+
includeAutoGeneratedTags: true,
|
|
69
|
+
keepClosingSlash: true,
|
|
70
|
+
maxLineLength: null,
|
|
71
|
+
minifyCSS: true,
|
|
72
|
+
minifyJS: true,
|
|
73
|
+
minifyURLs: false,
|
|
74
|
+
preserveLineBreaks: false,
|
|
75
|
+
preventAttributesEscaping: false,
|
|
76
|
+
processConditionalComments: true,
|
|
77
|
+
processScripts: ["module"],
|
|
78
|
+
quoteCharacter: "",
|
|
79
|
+
removeAttributeQuotes: true,
|
|
80
|
+
removeComments: false,
|
|
81
|
+
removeEmptyAttributes: false,
|
|
82
|
+
removeEmptyElements: false,
|
|
83
|
+
removeOptionalTags: false,
|
|
84
|
+
removeRedundantAttributes: true,
|
|
85
|
+
removeScriptTypeAttributes: true,
|
|
86
|
+
removeStyleLinkTypeAttributes: true,
|
|
87
|
+
removeTagWhitespace: true,
|
|
88
|
+
sortAttributes: true,
|
|
89
|
+
sortClassName: true,
|
|
90
|
+
trimCustomFragments: false,
|
|
91
|
+
useShortDoctype: false
|
|
92
|
+
},
|
|
93
|
+
Image: false,
|
|
94
|
+
JavaScript: true,
|
|
95
|
+
SVG: true
|
|
96
|
+
}),
|
|
97
|
+
pagefind(),
|
|
98
|
+
sitemap()
|
|
99
|
+
]
|
|
52
100
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spoko-design-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "astro dev",
|
|
@@ -8,10 +8,29 @@
|
|
|
8
8
|
"build": "astro build",
|
|
9
9
|
"preview": "astro preview"
|
|
10
10
|
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/polo-blue/sds"
|
|
14
|
+
},
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "spokospace",
|
|
17
|
+
"email": "szymon@spoko.space",
|
|
18
|
+
"url": "https://spoko.space"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://sds.spoko.space/",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"keywords": [
|
|
23
|
+
"astro-starter",
|
|
24
|
+
"seo",
|
|
25
|
+
"astro",
|
|
26
|
+
"sds design system",
|
|
27
|
+
"spoko design system"
|
|
28
|
+
],
|
|
11
29
|
"dependencies": {
|
|
12
30
|
"@algolia/client-search": "^4.22.1",
|
|
13
31
|
"@astrojs/mdx": "^2.1.0",
|
|
14
32
|
"@astrojs/node": "^7.0.4",
|
|
33
|
+
"@astrojs/sitemap": "^3.0.5",
|
|
15
34
|
"@astrojs/vue": "^4.0.8",
|
|
16
35
|
"@docsearch/css": "^3.5.2",
|
|
17
36
|
"@docsearch/react": "^3.5.2",
|
|
@@ -45,6 +64,7 @@
|
|
|
45
64
|
"@unocss/preset-wind": "^0.58.4",
|
|
46
65
|
"@unocss/reset": "^0.58.4",
|
|
47
66
|
"@vueuse/core": "^10.7.2",
|
|
67
|
+
"astro-compress": "^2.2.8",
|
|
48
68
|
"astro-i18next": "1.0.0-beta.21",
|
|
49
69
|
"astro-icon": "^1.0.2",
|
|
50
70
|
"astro-navbar": "^2.3.0",
|
|
@@ -54,18 +74,12 @@
|
|
|
54
74
|
"i18next-fs-backend": "^2.3.1",
|
|
55
75
|
"i18next-http-backend": "^2.4.2",
|
|
56
76
|
"i18next-vue": "^3.0.0",
|
|
57
|
-
"preact": "^10.19.3",
|
|
58
|
-
"react": "^18.2.0",
|
|
59
|
-
"react-dom": "^18.2.0",
|
|
60
77
|
"sass": "^1.70.0",
|
|
61
78
|
"unocss": "^0.57.7",
|
|
62
79
|
"vite": "^5.0.12",
|
|
63
80
|
"vue": "^3.4.15"
|
|
64
81
|
},
|
|
65
82
|
"devDependencies": {
|
|
66
|
-
"@astrojs/preact": "^3.1.0",
|
|
67
|
-
"@astrojs/react": "^3.0.9",
|
|
68
|
-
"@astrojs/tailwind": "^5.1.0",
|
|
69
83
|
"@unocss/transformer-variant-group": "^0.58.4",
|
|
70
84
|
"astro": "^4.2.4",
|
|
71
85
|
"unocss": "^0.58.3"
|
|
@@ -5,25 +5,33 @@ const props = defineProps<{
|
|
|
5
5
|
href?: string;
|
|
6
6
|
title?: string;
|
|
7
7
|
primary?: boolean;
|
|
8
|
-
|
|
8
|
+
primaryOutline?: boolean;
|
|
9
9
|
secondary?: boolean;
|
|
10
|
+
secondaryOutline?: boolean;
|
|
11
|
+
tertiary?: boolean;
|
|
12
|
+
tertiaryOutline?: boolean;
|
|
10
13
|
text?: boolean;
|
|
11
14
|
tag?: boolean;
|
|
12
15
|
small?: boolean;
|
|
13
16
|
medium?: boolean;
|
|
17
|
+
rounded?: boolean;
|
|
14
18
|
}>();
|
|
15
19
|
|
|
16
20
|
const tag = props.href && props.href.length ? 'a' : 'button'
|
|
17
21
|
|
|
18
22
|
const classes = {
|
|
19
23
|
"btn-primary": props.primary,
|
|
24
|
+
"btn-primary-outline": props.primaryOutline,
|
|
20
25
|
"btn-secondary": props.secondary,
|
|
26
|
+
"btn-secondary-outline": props.secondaryOutline,
|
|
21
27
|
"btn-tertiary": props.tertiary,
|
|
28
|
+
"btn-tertiary-outline": props.tertiaryOutline,
|
|
22
29
|
"btn-text": props.text,
|
|
23
30
|
"btn-tag": props.tag,
|
|
24
31
|
"btn-sm": props.medium,
|
|
25
32
|
"btn-xs": props.small,
|
|
26
|
-
"btn-normal": !props.small && !props.medium
|
|
33
|
+
"btn-normal": !props.small && !props.medium,
|
|
34
|
+
"rounded-full": props.rounded
|
|
27
35
|
};
|
|
28
36
|
|
|
29
37
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
|
|
3
2
|
import { useClipboard } from "@vueuse/core";
|
|
4
|
-
|
|
5
3
|
import { Icon } from "@iconify/vue";
|
|
6
4
|
import { PropType } from "vue";
|
|
7
5
|
|
|
@@ -30,7 +28,6 @@ const { copy, copied, isSupported } = useClipboard({ source });
|
|
|
30
28
|
|
|
31
29
|
</script>
|
|
32
30
|
|
|
33
|
-
|
|
34
31
|
<template>
|
|
35
32
|
<button v-if="isSupported" :aria-label="String(texts.copy)"
|
|
36
33
|
class="btn-copy has-tooltip" @click="copy()">
|
|
@@ -40,7 +37,6 @@ const { copy, copied, isSupported } = useClipboard({ source });
|
|
|
40
37
|
</template>
|
|
41
38
|
|
|
42
39
|
<style>
|
|
43
|
-
|
|
44
40
|
.tooltip {
|
|
45
41
|
@apply invisible absolute;
|
|
46
42
|
}
|
|
@@ -48,5 +44,4 @@ const { copy, copied, isSupported } = useClipboard({ source });
|
|
|
48
44
|
.has-tooltip:hover .tooltip {
|
|
49
45
|
@apply visible z-50;
|
|
50
46
|
}
|
|
51
|
-
|
|
52
|
-
</style>
|
|
47
|
+
</style>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
const { class: className, imgSrc, imgAlt } = Astro.props;
|
|
2
|
+
const { class: className, imgSrc, imgAlt, href } = Astro.props;
|
|
3
3
|
|
|
4
4
|
import Image from '../components/Image.astro'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<div class="bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700 overflow-hidden">
|
|
8
|
-
<a href=
|
|
8
|
+
<a href={href} class="aspect-ratio-video block relative">
|
|
9
9
|
{ imgSrc && (
|
|
10
10
|
<Image
|
|
11
11
|
imageObject={
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { SITE } from "../../config";
|
|
3
3
|
import SkipToContent from "./SkipToContent.astro";
|
|
4
4
|
import { MenuIcon } from "astro-navbar";
|
|
5
|
+
import Search from "astro-pagefind/components/Search";
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
<header
|
|
@@ -15,6 +16,17 @@ import { MenuIcon } from "astro-navbar";
|
|
|
15
16
|
<div class="flex flex-nowrap">
|
|
16
17
|
<MenuIcon class="w-4 h-4 text-gray-800 lg:hidden mr-4" />
|
|
17
18
|
<a class="text-2xl font-medium block font-textbold" href="/"> SDS</a>
|
|
19
|
+
<Search
|
|
20
|
+
transition:persist
|
|
21
|
+
transition:name="search-field"
|
|
22
|
+
className="search-container"
|
|
23
|
+
id="search"
|
|
24
|
+
uiOptions={{
|
|
25
|
+
showImages: false,
|
|
26
|
+
showFilters: false,
|
|
27
|
+
resetStyles: true,
|
|
28
|
+
}}
|
|
29
|
+
/>
|
|
18
30
|
</div>
|
|
19
31
|
<div class="flex gap-2">
|
|
20
32
|
{
|
|
@@ -42,3 +54,163 @@ import { MenuIcon } from "astro-navbar";
|
|
|
42
54
|
</div>
|
|
43
55
|
</nav>
|
|
44
56
|
</header>
|
|
57
|
+
|
|
58
|
+
<style lang="scss" is:global>
|
|
59
|
+
#search {
|
|
60
|
+
@apply ml-6;
|
|
61
|
+
|
|
62
|
+
&.search-container {
|
|
63
|
+
box-sizing: border-box;
|
|
64
|
+
@apply h-10;
|
|
65
|
+
@apply h-10 border-0 border-gray-800 rounded-3xl;
|
|
66
|
+
}
|
|
67
|
+
.pagefind-ui {
|
|
68
|
+
|
|
69
|
+
@apply font-textlight text-base;
|
|
70
|
+
|
|
71
|
+
&__search-input {
|
|
72
|
+
height: 40px !important;
|
|
73
|
+
border: 0;
|
|
74
|
+
@apply rounded-none sm-rounded-3xl h-10 w-full;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&__result-excerpt,
|
|
78
|
+
__button {
|
|
79
|
+
font-size: 14px !important;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&__filter-name {
|
|
83
|
+
font-size: 12px !important;
|
|
84
|
+
}
|
|
85
|
+
&__drawer:not(.pagefind-ui__hidden) {
|
|
86
|
+
@apply p-4;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&__result-link {
|
|
90
|
+
color: var(--pagefind-ui-primary);
|
|
91
|
+
// font-family: 'vw_headregular';
|
|
92
|
+
font-family: vw_headlight;
|
|
93
|
+
font-size: 1rem;
|
|
94
|
+
|
|
95
|
+
&:before {
|
|
96
|
+
top: 0;
|
|
97
|
+
bottom: 0;
|
|
98
|
+
left: 0;
|
|
99
|
+
right: 0;
|
|
100
|
+
content: "";
|
|
101
|
+
position: absolute;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&__result-excerpt {
|
|
106
|
+
color: var(--pagefind-ui-text);
|
|
107
|
+
order: 3;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&__drawer {
|
|
111
|
+
@apply bg-white md-position-fixed shadow-lg rounded-b-lg border-t border-t-transparent overflow-auto top-17 md:max-w-[calc(100vw-10%)] max-h-[calc(100vh-10%)];
|
|
112
|
+
gap: 30px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&__search-clear {
|
|
116
|
+
height: 38px;
|
|
117
|
+
top: 0;
|
|
118
|
+
@apply sm-rounded-3xl;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&__search-input {
|
|
122
|
+
font-size: 1rem;
|
|
123
|
+
font-weight: 400;
|
|
124
|
+
padding: 0 2.5rem 2px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&__form {
|
|
128
|
+
&:before {
|
|
129
|
+
top: 14px;
|
|
130
|
+
left: 16px;
|
|
131
|
+
width: 14px;
|
|
132
|
+
height: 14px;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&__result {
|
|
137
|
+
padding: 0.875rem 0;
|
|
138
|
+
gap: 1rem;
|
|
139
|
+
@apply position-relative;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&__filter-block {
|
|
143
|
+
padding: 0.875rem 0;
|
|
144
|
+
border-width: 1px;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&__filter-group {
|
|
148
|
+
gap: 0.5rem;
|
|
149
|
+
padding-top: 0.875rem;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&__filter-value {
|
|
153
|
+
gap: 10px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&__filter-checkbox {
|
|
157
|
+
border-radius: 3px;
|
|
158
|
+
margin-top: 1px;
|
|
159
|
+
min-width: calc(16px * var(--pagefind-ui-scale));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
&__result-image {
|
|
163
|
+
@apply drop-shadow-sm w-full h-full object-contain rounded-none;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&__filter-panel {
|
|
167
|
+
// min-width: 220px;
|
|
168
|
+
@apply hidden;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&__filter-label {
|
|
172
|
+
font-size: 0.9rem;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&__button {
|
|
176
|
+
font-weight: 400;
|
|
177
|
+
height: 40px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&__result-tag {
|
|
181
|
+
background: inherit;
|
|
182
|
+
padding: 0;
|
|
183
|
+
color: #9ca3af;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&__result-thumb {
|
|
187
|
+
max-width: 120px;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
&__result-tags {
|
|
191
|
+
margin-top: 0.4rem;
|
|
192
|
+
order: 2;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&__filter-name {
|
|
196
|
+
&:after {
|
|
197
|
+
color: var(--pagefind-ui-primary);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
&__result-title {
|
|
202
|
+
font-size: inherit;
|
|
203
|
+
line-height: 1;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
&__filter-panel,
|
|
207
|
+
&__results-area {
|
|
208
|
+
margin-top: 0;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&__message {
|
|
212
|
+
padding: 0.875rem 0;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
</style>
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
import { Image } from 'astro:assets'
|
|
3
3
|
|
|
4
4
|
const { imageObject } = Astro.props;
|
|
5
|
-
|
|
6
5
|
let inputProps = {};
|
|
7
6
|
|
|
8
|
-
|
|
9
7
|
if (imageObject.index && imageObject.index === 1) {
|
|
10
8
|
inputProps['data-pagefind-meta'] = 'image[src], image_alt[alt]';
|
|
11
9
|
inputProps['loading'] = 'eager'
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { useSlots } from 'vue';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
})
|
|
15
15
|
</script>
|
|
16
16
|
|
|
17
|
-
|
|
18
17
|
<template>
|
|
19
|
-
<div class="relative flex bg-vw " :class="props.small ? 'md:min-h-xs' : 'md:min-h-md'
|
|
18
|
+
<div class="relative flex bg-vw " :class="props.small ? 'md:min-h-xs' : 'md:min-h-md'">
|
|
20
19
|
<div class="max-w-7xl mx-auto my-auto">
|
|
21
|
-
<div class="py-8 lg:w-full"
|
|
20
|
+
<div class="py-8 lg:w-full"
|
|
21
|
+
:class="props.small ? 'sm:py-12 md:py-14 lg:py-16 xl:py-20' : 'sm:py-16 md:py-20 lg:py-28 xl:py-32'">
|
|
22
22
|
<header class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8"> <!-- sm:pt-12 md:pt-16 lg:pt-20 xl:pt-28 -->
|
|
23
23
|
<div class="text-center">
|
|
24
24
|
<h1 class="text-3xl tracking-tight sm:(text-4xl pt-0) md:text-5xl lg:text-6xl font-headlight text-white">
|
|
@@ -38,9 +38,8 @@ import { useSlots } from 'vue';
|
|
|
38
38
|
</template>
|
|
39
39
|
<style lang="scss">
|
|
40
40
|
.bg-vw {
|
|
41
|
-
background: radial-gradient(
|
|
42
|
-
circle at 50% 85%,
|
|
41
|
+
background: radial-gradient(circle at 50% 85%,
|
|
43
42
|
#00437A 0%,
|
|
44
|
-
#001E50 100%
|
|
45
|
-
|
|
43
|
+
#001E50 100%)
|
|
44
|
+
}
|
|
46
45
|
</style>
|
|
@@ -1,14 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = defineProps<{
|
|
3
|
+
data: string;
|
|
4
|
+
}>();
|
|
5
|
+
|
|
6
|
+
const theads = Object.keys(Object.values(props.data)[0])
|
|
7
|
+
|
|
8
|
+
const capitalizeFirstLetter = (text: String) => {
|
|
9
|
+
return text[0].toUpperCase() + text.slice(1)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
1
16
|
<template>
|
|
2
17
|
<table class="table-auto text-left border bg-white shadow-md">
|
|
3
|
-
<thead class="bg-
|
|
18
|
+
<thead class="bg-gray-500 text-white">
|
|
4
19
|
<tr class="border">
|
|
5
|
-
<th class="px-4 py-2">
|
|
6
|
-
|
|
7
|
-
|
|
20
|
+
<th class="px-4 py-2 font-semibold" v-for="thead, index in theads" :key="index">
|
|
21
|
+
{{ capitalizeFirstLetter(thead) }}
|
|
22
|
+
</th>
|
|
8
23
|
</tr>
|
|
9
24
|
</thead>
|
|
10
25
|
<tbody>
|
|
11
|
-
<tr class="border" v-for="row in
|
|
26
|
+
<tr class="border" v-for="row in props.data" :key="row">
|
|
12
27
|
<td class="px-4 py-2" v-for="key in Object.keys(row)" :key="key">
|
|
13
28
|
{{ row[key] }}
|
|
14
29
|
</td>
|
|
@@ -17,24 +32,3 @@
|
|
|
17
32
|
</table>
|
|
18
33
|
</template>
|
|
19
34
|
|
|
20
|
-
<script setup lang="ts">
|
|
21
|
-
const tableData = [
|
|
22
|
-
{
|
|
23
|
-
id: 1,
|
|
24
|
-
name: "Lorem Ipsum",
|
|
25
|
-
email: "lorem@email.com",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: 2,
|
|
29
|
-
name: "Chuck Norris",
|
|
30
|
-
email: "ipsum@email.com",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
id: 3,
|
|
34
|
-
name: "Ipsum Lorem",
|
|
35
|
-
email: "lorem@email.com",
|
|
36
|
-
}
|
|
37
|
-
];
|
|
38
|
-
</script>
|
|
39
|
-
|
|
40
|
-
<style scoped></style>
|
|
@@ -5,10 +5,7 @@ import Button from '../components/Button.vue'
|
|
|
5
5
|
<style lang="scss">
|
|
6
6
|
dialog {
|
|
7
7
|
@apply fixed top-0 left-0 right-0 bottom-0;
|
|
8
|
-
|
|
9
|
-
// left: 50%;
|
|
10
|
-
// top: 50%;
|
|
11
|
-
// transform: translate(-50%, -50%);
|
|
8
|
+
|
|
12
9
|
&::backdrop {
|
|
13
10
|
@apply bg-gray-500/50 fixed;
|
|
14
11
|
top: 0px;
|