spoko-design-system 0.0.1 → 0.0.5

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.
Files changed (113) hide show
  1. package/.astro/icon.d.ts +8109 -10
  2. package/.github/workflows/deploy.yml +39 -39
  3. package/.stackblitzrc +5 -5
  4. package/.vscode/extensions.json +5 -4
  5. package/.vscode/launch.json +11 -11
  6. package/.vscode/settings.json +6 -0
  7. package/LICENSE +21 -21
  8. package/Layout/Header.astro +111 -89
  9. package/README.md +94 -69
  10. package/astro-i18next.config.mjs +17 -17
  11. package/astro-i18next.config.ts +10 -10
  12. package/astro.config.mjs +51 -42
  13. package/index.ts +6 -6
  14. package/package.json +25 -17
  15. package/public/astro-design-system-logo.svg +10 -10
  16. package/public/favicon.ico +0 -0
  17. package/public/favicon.svg +0 -0
  18. package/public/fonts/lg.svg +53 -53
  19. package/public/fonts/vwhead-bold-demo.html +549 -549
  20. package/public/fonts/vwhead-regular-demo.html +549 -549
  21. package/public/fonts/vwtext-bold-demo.html +549 -549
  22. package/public/fonts/vwtext-regular-demo.html +549 -549
  23. package/public/github.svg +3 -3
  24. package/public/grid_dot.svg +4 -4
  25. package/public/linkedin.svg +44 -44
  26. package/public/locales/en/translation.json +8 -5
  27. package/public/locales/pl/translation.json +8 -5
  28. package/public/make-scrollable-code-focusable.js +3 -3
  29. package/public/polo.blue.svg +29 -0
  30. package/public/spoko.space.svg +71 -0
  31. package/public/twitter.svg +46 -46
  32. package/sandbox.config.json +11 -11
  33. package/src/MyComponent.astro +8 -8
  34. package/src/components/Badge.vue +19 -19
  35. package/src/components/Badges.vue +24 -23
  36. package/src/components/Breadcrumbs.vue +108 -111
  37. package/src/components/Button.vue +37 -0
  38. package/src/components/ButtonCopy.vue +52 -0
  39. package/src/components/Card.astro +25 -0
  40. package/src/components/CategoryLink.astro +18 -0
  41. package/src/components/Copyright.astro +11 -11
  42. package/src/components/Date.astro +7 -0
  43. package/src/components/FuckRussia.vue +65 -65
  44. package/src/components/HandDrive.astro +29 -30
  45. package/src/components/HeadCommon.astro +40 -40
  46. package/src/components/HeadSEO.astro +41 -41
  47. package/src/components/Header/AstroLogo.astro +7 -27
  48. package/src/components/Header/Header.astro +44 -48
  49. package/src/components/Header/SkipToContent.astro +1 -1
  50. package/src/components/Headline.vue +60 -0
  51. package/src/components/Image.astro +30 -0
  52. package/src/components/Jumbatron.vue +46 -31
  53. package/src/components/LeftSidebar.astro +45 -44
  54. package/src/components/MainColors.vue +29 -29
  55. package/src/components/MainInput.vue +18 -18
  56. package/src/components/MainTable.vue +40 -45
  57. package/src/components/Modal.astro +30 -0
  58. package/src/components/PageContent.astro +14 -14
  59. package/src/components/PostHeader.astro +104 -0
  60. package/src/components/PrCode.vue +156 -0
  61. package/src/components/ProductNumber.astro +117 -0
  62. package/src/components/ProductTile.astro +54 -0
  63. package/src/components/RightSidebar.astro +15 -11
  64. package/src/components/SlimBanner.vue +59 -59
  65. package/src/components/TableOfContents.astro +11 -11
  66. package/src/components/Translations.vue +27 -0
  67. package/src/components/flags/FlagPL.vue +2 -2
  68. package/src/components/flags/FlagUA.vue +2 -2
  69. package/src/components/layout/Header.astro +50 -69
  70. package/src/config.ts +51 -42
  71. package/src/design.config.ts +73 -92
  72. package/src/env.d.ts +1 -1
  73. package/src/flag-poland.svg +1 -0
  74. package/src/flag-uk.svg +1 -0
  75. package/src/layouts/Layout.astro +43 -0
  76. package/src/layouts/MainLayout.astro +60 -50
  77. package/src/pages/components/badges.mdx +69 -35
  78. package/src/pages/components/breadcrumbs.mdx +136 -103
  79. package/src/pages/components/buttons.mdx +143 -60
  80. package/src/pages/components/card.mdx +40 -0
  81. package/src/pages/components/copyright.mdx +41 -24
  82. package/src/pages/components/flags.mdx +40 -26
  83. package/src/pages/components/fuck-russia.mdx +39 -16
  84. package/src/pages/components/hand-drive.mdx +38 -27
  85. package/src/pages/components/headline.mdx +148 -0
  86. package/src/pages/components/icons.astro +54 -45
  87. package/src/pages/components/image.mdx +502 -0
  88. package/src/pages/components/input.mdx +45 -14
  89. package/src/pages/components/jumbatron.mdx +71 -48
  90. package/src/pages/components/modal.mdx +64 -0
  91. package/src/pages/components/post-header.mdx +58 -0
  92. package/src/pages/components/pr-code.mdx +41 -0
  93. package/src/pages/components/product-number.mdx +65 -0
  94. package/src/pages/components/product-tile.mdx +39 -0
  95. package/src/pages/components/slimbanner.mdx +29 -27
  96. package/src/pages/components/table.mdx +39 -20
  97. package/src/pages/core/colors.mdx +8 -8
  98. package/src/pages/core/introduction.mdx +74 -68
  99. package/src/pages/core/shadows.astro +20 -20
  100. package/src/pages/core/typography.astro +46 -46
  101. package/src/pages/index.astro +70 -52
  102. package/src/pages/patterns/introduction.mdx +60 -61
  103. package/src/styles/_variables.scss +75 -75
  104. package/src/styles/base/_base.scss +166 -158
  105. package/src/styles/base/_typography.scss +147 -147
  106. package/src/styles/content.scss +66 -71
  107. package/src/styles/main.scss +22 -22
  108. package/tailwind.config.cjs +8 -8
  109. package/tsconfig.json +11 -11
  110. package/uno.config.ts +246 -227
  111. package/src/components/MainButton.vue +0 -26
  112. package/src/components/MainStatusPill.vue +0 -32
  113. package/src/pages/components/status-pill.mdx +0 -22
@@ -1,40 +1,40 @@
1
- ---
2
-
3
- ---
4
-
5
- <!-- Global Metadata -->
6
- <meta charset="utf-8" />
7
- <meta name="viewport" content="width=device-width" />
8
-
9
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
10
- <link rel="alternate icon" type="image/x-icon" href="/favicon.ico" />
11
-
12
- <link rel="sitemap" href="/sitemap.xml" />
13
-
14
- <!-- Preload Fonts -->
15
- <link rel="preconnect" href="https://fonts.googleapis.com" />
16
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
17
- <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital@0;1&display=swap" rel="stylesheet" />
18
-
19
- <!-- Scrollable a11y code helper -->
20
- <script src="/make-scrollable-code-focusable.js" is:inline></script>
21
-
22
- <!-- This is intentionally inlined to avoid FOUC -->
23
- <script is:inline>
24
- // const root = document.documentElement;
25
- // const theme = localStorage.getItem('theme');
26
- // if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
27
- // root.classList.add('dark');
28
- // } else {
29
- // root.classList.remove('dark');
30
- // }
31
- </script>
32
-
33
- <!-- Global site tag (gtag.js) - Google Analytics -->
34
- <!-- <script async src="https://www.googletagmanager.com/gtag/js?id=" is:inline></script>
35
- <script>
36
- window.dataLayer = window.dataLayer || [];
37
- function gtag(){dataLayer.push(arguments);}
38
- gtag('js', new Date());
39
- gtag('config', '');
40
- </script> -->
1
+ ---
2
+
3
+ ---
4
+
5
+ <!-- Global Metadata -->
6
+ <meta charset="utf-8" />
7
+ <meta name="viewport" content="width=device-width" />
8
+
9
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
10
+ <link rel="alternate icon" type="image/x-icon" href="/favicon.ico" />
11
+
12
+ <link rel="sitemap" href="/sitemap.xml" />
13
+
14
+ <!-- Preload Fonts -->
15
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
16
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
17
+ <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital@0;1&display=swap" rel="stylesheet" />
18
+
19
+ <!-- Scrollable a11y code helper -->
20
+ <script src="/make-scrollable-code-focusable.js" is:inline></script>
21
+
22
+ <!-- This is intentionally inlined to avoid FOUC -->
23
+ <script is:inline>
24
+ // const root = document.documentElement;
25
+ // const theme = localStorage.getItem('theme');
26
+ // if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
27
+ // root.classList.add('dark');
28
+ // } else {
29
+ // root.classList.remove('dark');
30
+ // }
31
+ </script>
32
+
33
+ <!-- Global site tag (gtag.js) - Google Analytics -->
34
+ <!-- <script async src="https://www.googletagmanager.com/gtag/js?id=" is:inline></script>
35
+ <script>
36
+ window.dataLayer = window.dataLayer || [];
37
+ function gtag(){dataLayer.push(arguments);}
38
+ gtag('js', new Date());
39
+ gtag('config', '');
40
+ </script> -->
@@ -1,41 +1,41 @@
1
- ---
2
- import { SITE, OPEN_GRAPH } from '../config';
3
- export interface Props {
4
- content: any;
5
- site: any;
6
- canonicalURL: URL | string;
7
- }
8
- const { content = {}, canonicalURL } = Astro.props;
9
- const formattedContentTitle = content.title ? `${content.title} 🚀 ${SITE.title}` : SITE.title;
10
- // const imageSrc = content?.image?.src ?? OPEN_GRAPH.image.src;
11
- // const canonicalImageSrc = new URL(imageSrc, Astro.site);
12
- const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt;
13
- ---
14
-
15
- <!-- Page Metadata -->
16
- <link rel="canonical" href={canonicalURL} />
17
-
18
- <!-- OpenGraph Tags -->
19
- <meta property="og:title" content={formattedContentTitle} />
20
- <meta property="og:type" content="article" />
21
- <meta property="og:url" content={canonicalURL} />
22
- <meta property="og:locale" content={content.ogLocale ?? SITE.defaultLanguage} />
23
- <!-- <meta property="og:image" content={canonicalImageSrc} /> -->
24
- <meta property="og:image:alt" content={imageAlt} />
25
- <meta name="description" property="og:description" content={content.description ? content.description : SITE.description} />
26
- <meta property="og:site_name" content={SITE.title} />
27
-
28
- <!-- Twitter Tags -->
29
- <meta name="twitter:card" content="summary_large_image" />
30
- <meta name="twitter:site" content={OPEN_GRAPH.twitter} />
31
- <meta name="twitter:title" content={formattedContentTitle} />
32
- <meta name="twitter:description" content={content.description ? content.description : SITE.description} />
33
- <!-- <meta name="twitter:image" content={canonicalImageSrc} /> -->
34
- <meta name="twitter:image:alt" content={imageAlt} />
35
-
36
- <!--
37
- TODO: Add json+ld data, maybe https://schema.org/APIReference makes sense?
38
- Docs: https://developers.google.com/search/docs/advanced/structured-data/intro-structured-data
39
- https://www.npmjs.com/package/schema-dts seems like a great resource for implementing this.
40
- Even better, there's a React component that integrates with `schema-dts`: https://github.com/google/react-schemaorg
41
- -->
1
+ ---
2
+ import { SITE, OPEN_GRAPH } from '../config';
3
+ export interface Props {
4
+ content: any;
5
+ site: any;
6
+ canonicalURL: URL | string;
7
+ }
8
+ const { content = {}, canonicalURL } = Astro.props;
9
+ const formattedContentTitle = content.title ? `${content.title} 🚀 ${SITE.title}` : SITE.title;
10
+ // const imageSrc = content?.image?.src ?? OPEN_GRAPH.image.src;
11
+ // const canonicalImageSrc = new URL(imageSrc, Astro.site);
12
+ const imageAlt = content?.image?.alt ?? OPEN_GRAPH.image.alt;
13
+ ---
14
+
15
+ <!-- Page Metadata -->
16
+ <link rel="canonical" href={canonicalURL} />
17
+
18
+ <!-- OpenGraph Tags -->
19
+ <meta property="og:title" content={formattedContentTitle} />
20
+ <meta property="og:type" content="article" />
21
+ <meta property="og:url" content={canonicalURL} />
22
+ <meta property="og:locale" content={content.ogLocale ?? SITE.defaultLanguage} />
23
+ <!-- <meta property="og:image" content={canonicalImageSrc} /> -->
24
+ <meta property="og:image:alt" content={imageAlt} />
25
+ <meta name="description" property="og:description" content={content.description ? content.description : SITE.description} />
26
+ <meta property="og:site_name" content={SITE.title} />
27
+
28
+ <!-- Twitter Tags -->
29
+ <meta name="twitter:card" content="summary_large_image" />
30
+ <meta name="twitter:site" content={OPEN_GRAPH.twitter} />
31
+ <meta name="twitter:title" content={formattedContentTitle} />
32
+ <meta name="twitter:description" content={content.description ? content.description : SITE.description} />
33
+ <!-- <meta name="twitter:image" content={canonicalImageSrc} /> -->
34
+ <meta name="twitter:image:alt" content={imageAlt} />
35
+
36
+ <!--
37
+ TODO: Add json+ld data, maybe https://schema.org/APIReference makes sense?
38
+ Docs: https://developers.google.com/search/docs/advanced/structured-data/intro-structured-data
39
+ https://www.npmjs.com/package/schema-dts seems like a great resource for implementing this.
40
+ Even better, there's a React component that integrates with `schema-dts`: https://github.com/google/react-schemaorg
41
+ -->
@@ -1,27 +1,7 @@
1
- ---
2
- const { size } = Astro.props;
3
- ---
4
-
5
- <svg class="logo" width={size} height={size} viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
6
- <style>
7
- #flame {
8
- fill: var(--theme-text-accent);
9
- }
10
- #a {
11
- fill: var(--theme-text-accent);
12
- }
13
- </style>
14
- <title>Logo</title>
15
- <path
16
- id="a"
17
- fill-rule="evenodd"
18
- clip-rule="evenodd"
19
- d="M163.008 18.929c1.944 2.413 2.935 5.67 4.917 12.181l43.309 142.27a180.277 180.277 0 00-51.778-17.53l-28.198-95.29a3.67 3.67 0 00-7.042.01l-27.857 95.232a180.225 180.225 0 00-52.01 17.557l43.52-142.281c1.99-6.502 2.983-9.752 4.927-12.16a15.999 15.999 0 016.484-4.798c2.872-1.154 6.271-1.154 13.07-1.154h31.085c6.807 0 10.211 0 13.086 1.157a16.004 16.004 0 016.487 4.806z"
20
- ></path>
21
- <path
22
- id="flame"
23
- fill-rule="evenodd"
24
- clip-rule="evenodd"
25
- d="M168.19 180.151c-7.139 6.105-21.39 10.268-37.804 10.268-20.147 0-37.033-6.272-41.513-14.707-1.602 4.835-1.961 10.367-1.961 13.902 0 0-1.056 17.355 11.015 29.426 0-6.268 5.081-11.349 11.349-11.349 10.743 0 10.731 9.373 10.721 16.977v.679c0 11.542 7.054 21.436 17.086 25.606a23.27 23.27 0 01-2.339-10.2c0-11.008 6.463-15.107 13.974-19.87 5.976-3.79 12.616-8.001 17.192-16.449a31.024 31.024 0 003.743-14.82c0-3.299-.513-6.479-1.463-9.463z"
26
- ></path>
27
- </svg>
1
+ ---
2
+ import { Icon } from "astro-icon/components";
3
+
4
+ const { size } = Astro.props;
5
+ ---
6
+
7
+ <Icon name="noto-v1:letter-s" />
@@ -1,48 +1,44 @@
1
- ---
2
- import { SITE } from '../../config';
3
- import SkipToContent from './SkipToContent.astro';
4
-
5
- const { currentPage } = Astro.props;
6
- ---
7
-
8
- <header class="p-3 bg-slate-100 bg-opacity-80 backdrop-blur-md border-b text-slate-900">
9
- <SkipToContent />
10
- <nav title="Top Navigation" class="max-w-7xl mx-auto flex justify-between items-center px-4">
11
- <div>
12
- <a class="text-lg font-medium" href="/">
13
- <h1>
14
- {SITE.title ?? "Documentation"}
15
- </h1>
16
- </a>
17
- </div>
18
- <div class="flex gap-2">
19
-
20
- <!-- <button onclick="toggleDarkMode()">theme</button> -->
21
- { SITE.twitter &&
22
- (<a title="Twitter" class="opacity-90 hover:opacity-100 hover:bg-blue-100 p-2 rounded-full transition-colors" href={'https://twitter.com/'+SITE.twitter}>
23
- <img class="h-7" src="/twitter.svg" alt="twitter logo">
24
- </a>)
25
- }
26
- {
27
- SITE.github &&
28
- (<a title="Github" class="opacity-80 hover:opacity-100 hover:bg-slate-200 p-2 rounded-full transition-colors" href={'https://github.com/'+SITE.github}>
29
- <img class="h-7" src="/github.svg" alt="github logo">
30
- </a>)
31
- }
32
- {
33
- SITE.linkedin &&
34
- (<a title="linkedin" class="opacity-80 hover:opacity-100 hover:bg-blue-50 p-2 rounded-full transition-colors" href={'https://linkedin.com/in/'+SITE.linkedin}>
35
- <img class="h-7" src="/linkedin.svg" alt="linkedin logo">
36
- </a>)
37
- }
38
- </div>
39
- </nav>
40
- </header>
41
-
42
- <script is:inline>
43
- // function toggleDarkMode() {
44
- // const body = document.body;
45
- // body.classList.toggle('dark');
46
- // console.log('dark mode toggled');
47
- // }
48
- </script>
1
+ ---
2
+ import { SITE } from "../../config";
3
+ import SkipToContent from "./SkipToContent.astro";
4
+ import { MenuIcon } from "astro-navbar";
5
+ ---
6
+
7
+ <header
8
+ class="p-3 bg-blue-600 bg-opacity-10 backdrop-blur-md border-b text-slate-900"
9
+ >
10
+ <SkipToContent />
11
+ <nav
12
+ title="Top Navigation"
13
+ class="mx-auto flex justify-between items-center px-4"
14
+ >
15
+ <div class="flex flex-nowrap">
16
+ <MenuIcon class="w-4 h-4 text-gray-800 lg:hidden mr-4" />
17
+ <a class="text-2xl font-medium block font-textbold" href="/"> SDS</a>
18
+ </div>
19
+ <div class="flex gap-2">
20
+ {
21
+ SITE.github && (
22
+ <a
23
+ title="Github"
24
+ class="opacity-80 hover:opacity-100 hover:bg-slate-200 p-2 rounded-full transition-colors"
25
+ href={"https://github.com/" + SITE.github}
26
+ >
27
+ <img class="h-7" src="/github.svg" alt="github logo" />
28
+ </a>
29
+ )
30
+ }
31
+ {
32
+ SITE.linkedin && (
33
+ <a
34
+ title="linkedin"
35
+ class="opacity-80 hover:opacity-100 hover:bg-blue-50 p-2 rounded-full transition-colors"
36
+ href={"https://linkedin.com/in/" + SITE.linkedin}
37
+ >
38
+ <img class="h-7" src="/linkedin.svg" alt="linkedin logo" />
39
+ </a>
40
+ )
41
+ }
42
+ </div>
43
+ </nav>
44
+ </header>
@@ -1 +1 @@
1
- <a href="#article" class="sr-only focus:not-sr-only skiplink"><span>Skip to Content</span></a>
1
+ <a href="#article" class="sr-only focus:not-sr-only skiplink"><span>Skip to Content</span></a>
@@ -0,0 +1,60 @@
1
+ <script setup lang="ts">
2
+ import type { PropType } from 'vue'
3
+
4
+
5
+ const props = defineProps({
6
+ as: {
7
+ type: String as PropType<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span'>,
8
+ default: null,
9
+ required: true,
10
+ },
11
+ textSize: {
12
+ type: String as PropType<'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl'>,
13
+ required: false,
14
+ default: null
15
+ },
16
+ underline: {
17
+ type: Boolean,
18
+ required: false,
19
+ default: false
20
+ }
21
+ })
22
+
23
+ </script>
24
+
25
+ <template>
26
+ <component :is="props.as" class="mb-2.5 flex sm:block md:flex items-center leading-none"
27
+ :class="`headline ${props.textSize ? `text-${props.textSize}` : 'text-xl'} ${props.underline ? 'headline--underline' : ''}`">
28
+ <!-- default -->
29
+ <slot />
30
+
31
+ </component>
32
+ </template>
33
+
34
+ <style lang="scss">
35
+
36
+ .headline--underline {
37
+ @apply relative pb-4;
38
+
39
+ &:after {
40
+ content: "";
41
+ position: absolute;
42
+ left: 0;
43
+ bottom: 0;
44
+ height: 3px;
45
+ width: 55px;
46
+ background-color: var(--primary);
47
+ }
48
+
49
+ &:before {
50
+ content: "";
51
+ position: absolute;
52
+ left: 0;
53
+ bottom: 1px;
54
+ height: 1px;
55
+ width: 95%;
56
+ max-width: 255px;
57
+ background-color: #64748b
58
+ }
59
+ }
60
+ </style>
@@ -0,0 +1,30 @@
1
+ ---
2
+ import { Image } from 'astro:assets'
3
+
4
+ const { imageObject } = Astro.props;
5
+
6
+ let inputProps = {};
7
+
8
+
9
+ if (imageObject.index && imageObject.index === 1) {
10
+ inputProps['data-pagefind-meta'] = 'image[src], image_alt[alt]';
11
+ inputProps['loading'] = 'eager'
12
+ }
13
+
14
+ if (imageObject.srcset && imageObject.srcset.length) {
15
+ inputProps['widths'] = imageObject.srcset
16
+ }
17
+
18
+ ---
19
+ <Image
20
+ src={imageObject.src}
21
+ alt={imageObject.alt}
22
+ height={imageObject.height}
23
+ width={imageObject.width}
24
+ itemprop="image"
25
+ format="avif"
26
+ data-pagefind-index-attrs="alt"
27
+ onerror="this.style.display='none';"
28
+ class={`h-full w-full select-none pointer-none ${imageObject.class || 'object-cover'}`}
29
+ { ...inputProps}
30
+ />
@@ -1,31 +1,46 @@
1
- <template>
2
- <div class="relative bg-vw md:min-h-md">
3
- <div class="max-w-7xl mx-auto">
4
- <div
5
- class=" pb-8 sm:pb-16 md:pb-20 lg:w-full lg:pb-28 xl:pb-32"
6
- >
7
- <header
8
- class="mx-auto max-w-7xl px-4 sm:pt-12 sm:px-6 md:pt-16 lg:pt-20 lg:px-8 xl:pt-28"
9
- >
10
- <div class="text-center">
11
- <h1
12
- class="text-2xl pt-6 sm:pt-0 sm:text-5xl md:text-6xl tracking-tight font-headlight text-white"
13
- >
14
- <slot name="intro" />
15
- <!-- <span v-html="t('home.intro')"></span> -->
16
- <!-- <small class="block text-2xl">aaa</small> -->
17
- </h1>
18
- <slot name="subtitle" />
19
- <div
20
- class="mt-5 sm:mt-8 sm:flex sm:justify-center"
21
- >
22
- <div>
23
- <slot name="cta" />
24
- </div>
25
- </div>
26
- </div>
27
- </header>
28
- </div>
29
- </div>
30
- </div>
31
- </template>
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
+ })
15
+ </script>
16
+
17
+
18
+ <template>
19
+ <div class="relative flex bg-vw " :class="props.small ? 'md:min-h-xs' : 'md:min-h-md' ">
20
+ <div class="max-w-7xl mx-auto my-auto">
21
+ <div class="py-8 lg:w-full" :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
+ <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
+ <div class="text-center">
24
+ <h1 class="text-3xl tracking-tight sm:(text-4xl pt-0) md:text-5xl lg:text-6xl font-headlight text-white">
25
+ <slot name="intro" />
26
+ </h1>
27
+ <slot name="subtitle" />
28
+ <div class="mt-5 sm:mt-8 sm:flex sm:justify-center" v-if="hasSlot('cta')">
29
+ <div>
30
+ <slot name="cta" />
31
+ </div>
32
+ </div>
33
+ </div>
34
+ </header>
35
+ </div>
36
+ </div>
37
+ </div>
38
+ </template>
39
+ <style lang="scss">
40
+ .bg-vw {
41
+ background: radial-gradient(
42
+ circle at 50% 85%,
43
+ #00437A 0%,
44
+ #001E50 100%
45
+ )}
46
+ </style>
@@ -1,44 +1,45 @@
1
- ---
2
- import { SIDEBAR } from '../config';
3
- const { currentPage } = Astro.props;
4
- const currentPageMatch = currentPage.slice(1);
5
-
6
- const isCurrentPage = (item) => {
7
- if (item.link) {
8
- return item.link.includes(currentPageMatch);
9
- }
10
- return false;
11
- };
12
-
13
- const getLinkClasses = (link) => {
14
- const baseClasses = "block py-2 px-6 my-1 transition-colors border-l hover:border-slate-400 text-slate-500 hover:text-slate-900"
15
-
16
- if (isCurrentPage(link)) {
17
- return baseClasses + " border-slate-500 text-slate-900";
18
- } else {
19
- return baseClasses;
20
- }
21
- }
22
- ---
23
- <aside title="Site Navigation">
24
- <!-- <Debug content={navigation} /> -->
25
- <nav aria-labelledby="grid-left" class="w-64 p-4 border-r">
26
- <ul>
27
- {SIDEBAR.map(item => (item.header ?
28
- <h2 class="mt-4 font-semibold text-slate-700">{item.text}</h2> :
29
- <li class={getLinkClasses(item)}>
30
- <a href={item.link}>{item.text}</a>
31
- </li>))}
32
- </ul>
33
- </nav>
34
- </aside>
35
-
36
- <script is:inline>
37
- window.addEventListener('DOMContentLoaded', (event) => {
38
- var target = document.querySelector('[aria-current="page"]');
39
- if (target && target.offsetTop > window.innerHeight - 100) {
40
- document.querySelector('.nav-groups').scrollTop = target.offsetTop;
41
- }
42
- });
43
- </script>
44
-
1
+ ---
2
+ import { SIDEBAR } from '../config';
3
+ import { Astronav, MenuItems} from "astro-navbar";
4
+ const { currentPage } = Astro.props;
5
+ const currentPageMatch = currentPage.slice(1);
6
+
7
+ const isCurrentPage = (item) => {
8
+ if (item.link) {
9
+ return item.link.includes(currentPageMatch);
10
+ }
11
+ return false;
12
+ };
13
+
14
+ const getLinkClasses = (link) => {
15
+ const baseClasses = "block py-1.5 px-6 my-1 transition-colors border-l hover:border-slate-400 text-slate-500 hover:text-slate-900"
16
+
17
+ if (isCurrentPage(link)) {
18
+ return baseClasses + " border-slate-500 text-slate-900";
19
+ } else {
20
+ return baseClasses;
21
+ }
22
+ }
23
+ ---
24
+ <Astronav>
25
+ <MenuItems class="hidden z-20 bg-blue-gray-100 w-64 h-full overflow-y-auto px-4 border-r pb-3 absolute lg:(relative bg-blue-500 bg-opacity-5 flex)">
26
+ <ul class="mt-0 mb-auto">
27
+ {SIDEBAR.map(item => (item.header ?
28
+ <h2 class="mt-4 font-semibold text-slate-700">{item.text}</h2> :
29
+ <li class={getLinkClasses(item)}>
30
+ <a href={item.link}>{item.text}</a>
31
+ </li>
32
+ ))}
33
+ </ul>
34
+ </MenuItems>
35
+ </Astronav>
36
+
37
+ <script is:inline>
38
+ window.addEventListener('DOMContentLoaded', (event) => {
39
+ var target = document.querySelector('[aria-current="page"]');
40
+ if (target && target.offsetTop > window.innerHeight - 100) {
41
+ document.querySelector('.nav-groups').scrollTop = target.offsetTop;
42
+ }
43
+ });
44
+ </script>
45
+
@@ -1,29 +1,29 @@
1
- <template>
2
- <div class="flex flex-col space-y-12">
3
- <div v-for="name in colorNames" :key="name">
4
- <h3 class="capitalize">{{ name }}</h3>
5
- <div class="grid grid-cols-5 md:grid-cols-10">
6
- <div v-for="color in COLORS[name]" :key="color">
7
- <div
8
- class="h-12 transition-all"
9
- :style="`background: ${color.value}`"
10
- ></div>
11
- <div
12
- class="text-sm flex flex-col text-center font-mono text-slate-500"
13
- >
14
- <span>{{ color.name }}</span>
15
- <span class="uppercase text-xs">{{ color.value }}</span>
16
- </div>
17
- </div>
18
- </div>
19
- </div>
20
- </div>
21
- </template>
22
-
23
- <script setup lang="ts">
24
- import { COLORS } from "../design.config";
25
-
26
- const colorNames = Object.keys(COLORS);
27
- </script>
28
-
29
- <style scoped></style>
1
+ <template>
2
+ <div class="flex flex-col space-y-12">
3
+ <div v-for="name in colorNames" :key="name">
4
+ <h3 class="capitalize">{{ name }}</h3>
5
+ <div class="grid grid-cols-3 md:grid-cols-9">
6
+ <div v-for="color in COLORS[name]" :key="color" class="mb-6">
7
+ <div
8
+ class="h-12 transition-all"
9
+ :style="`background: ${color.value}`"
10
+ ></div>
11
+ <div
12
+ class="text-sm flex flex-col text-center font-mono text-slate-500"
13
+ >
14
+ <span>{{ color.name }}</span>
15
+ <span class="uppercase text-xs">{{ color.value }}</span>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ </div>
21
+ </template>
22
+
23
+ <script setup lang="ts">
24
+ import { COLORS } from "../design.config";
25
+
26
+ const colorNames = Object.keys(COLORS);
27
+ </script>
28
+
29
+ <style scoped></style>