spoko-design-system 0.0.1

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 +2193 -0
  2. package/.github/workflows/deploy.yml +40 -0
  3. package/.stackblitzrc +6 -0
  4. package/.vscode/extensions.json +4 -0
  5. package/.vscode/launch.json +11 -0
  6. package/LICENSE +21 -0
  7. package/Layout/Header.astro +89 -0
  8. package/README.md +69 -0
  9. package/astro-i18next.config.mjs +18 -0
  10. package/astro-i18next.config.ts +11 -0
  11. package/astro.config.mjs +43 -0
  12. package/index.ts +6 -0
  13. package/package.json +71 -0
  14. package/public/Components.jpg +0 -0
  15. package/public/Core.jpg +0 -0
  16. package/public/Patterns.jpg +0 -0
  17. package/public/astro-design-system-logo.svg +10 -0
  18. package/public/default-og-image.png +0 -0
  19. package/public/favicon.ico +0 -0
  20. package/public/fonts/VWHeadline-LtTab.woff2 +0 -0
  21. package/public/fonts/lg.svg +54 -0
  22. package/public/fonts/lg.svg.br +0 -0
  23. package/public/fonts/lg.svg.gz +0 -0
  24. package/public/fonts/lg.ttf +0 -0
  25. package/public/fonts/lg.woff +0 -0
  26. package/public/fonts/lg.woff2 +0 -0
  27. package/public/fonts/nova-mono-v13-latin-regular.woff +0 -0
  28. package/public/fonts/nova-mono-v13-latin-regular.woff2 +0 -0
  29. package/public/fonts/vwhead-bold-demo.html +549 -0
  30. package/public/fonts/vwhead-bold-webfont.woff +0 -0
  31. package/public/fonts/vwhead-bold-webfont.woff2 +0 -0
  32. package/public/fonts/vwhead-light-webfont.woff +0 -0
  33. package/public/fonts/vwhead-light-webfont.woff2 +0 -0
  34. package/public/fonts/vwhead-regular-demo.html +549 -0
  35. package/public/fonts/vwhead-regular-webfont-OLD.woff +0 -0
  36. package/public/fonts/vwhead-regular-webfont-OLD.woff2 +0 -0
  37. package/public/fonts/vwhead-regular-webfont.woff +0 -0
  38. package/public/fonts/vwhead-regular-webfont.woff2 +0 -0
  39. package/public/fonts/vwtext-bold-demo.html +549 -0
  40. package/public/fonts/vwtext-bold-webfont.woff +0 -0
  41. package/public/fonts/vwtext-bold-webfont.woff2 +0 -0
  42. package/public/fonts/vwtext-light-webfont.woff +0 -0
  43. package/public/fonts/vwtext-light-webfont.woff2 +0 -0
  44. package/public/fonts/vwtext-regular-demo.html +549 -0
  45. package/public/fonts/vwtext-regular-webfont.woff +0 -0
  46. package/public/fonts/vwtext-regular-webfont.woff2 +0 -0
  47. package/public/github.svg +3 -0
  48. package/public/grid_dot.svg +4 -0
  49. package/public/linkedin.svg +44 -0
  50. package/public/locales/en/translation.json +6 -0
  51. package/public/locales/pl/translation.json +6 -0
  52. package/public/make-scrollable-code-focusable.js +3 -0
  53. package/public/twitter.svg +46 -0
  54. package/sandbox.config.json +11 -0
  55. package/src/MyComponent.astro +8 -0
  56. package/src/assets/hand-drive.svg +1 -0
  57. package/src/components/Badge.vue +20 -0
  58. package/src/components/Badges.vue +23 -0
  59. package/src/components/Breadcrumbs.vue +111 -0
  60. package/src/components/Copyright.astro +12 -0
  61. package/src/components/FuckRussia.vue +65 -0
  62. package/src/components/HandDrive.astro +31 -0
  63. package/src/components/HeadCommon.astro +40 -0
  64. package/src/components/HeadSEO.astro +41 -0
  65. package/src/components/Header/AstroLogo.astro +27 -0
  66. package/src/components/Header/Header.astro +48 -0
  67. package/src/components/Header/SkipToContent.astro +1 -0
  68. package/src/components/Jumbatron.vue +31 -0
  69. package/src/components/LeftSidebar.astro +44 -0
  70. package/src/components/MainButton.vue +26 -0
  71. package/src/components/MainColors.vue +29 -0
  72. package/src/components/MainInput.vue +18 -0
  73. package/src/components/MainStatusPill.vue +32 -0
  74. package/src/components/MainTable.vue +45 -0
  75. package/src/components/PageContent.astro +14 -0
  76. package/src/components/RightSidebar.astro +11 -0
  77. package/src/components/SlimBanner.vue +60 -0
  78. package/src/components/TableOfContents.astro +12 -0
  79. package/src/components/flags/FlagPL.vue +3 -0
  80. package/src/components/flags/FlagUA.vue +3 -0
  81. package/src/components/layout/Container.astro +7 -0
  82. package/src/components/layout/Header.astro +99 -0
  83. package/src/config.ts +42 -0
  84. package/src/design.config.ts +92 -0
  85. package/src/env.d.ts +2 -0
  86. package/src/layouts/MainLayout.astro +50 -0
  87. package/src/pages/components/badges.mdx +35 -0
  88. package/src/pages/components/breadcrumbs.mdx +103 -0
  89. package/src/pages/components/buttons.mdx +60 -0
  90. package/src/pages/components/copyright.mdx +24 -0
  91. package/src/pages/components/flags.mdx +27 -0
  92. package/src/pages/components/fuck-russia.mdx +16 -0
  93. package/src/pages/components/hand-drive.mdx +27 -0
  94. package/src/pages/components/icons.astro +45 -0
  95. package/src/pages/components/input.mdx +15 -0
  96. package/src/pages/components/jumbatron.mdx +48 -0
  97. package/src/pages/components/slimbanner.mdx +27 -0
  98. package/src/pages/components/status-pill.mdx +22 -0
  99. package/src/pages/components/table.mdx +20 -0
  100. package/src/pages/core/colors.mdx +8 -0
  101. package/src/pages/core/introduction.mdx +68 -0
  102. package/src/pages/core/shadows.astro +21 -0
  103. package/src/pages/core/typography.astro +47 -0
  104. package/src/pages/index.astro +52 -0
  105. package/src/pages/patterns/introduction.mdx +61 -0
  106. package/src/styles/_variables.scss +75 -0
  107. package/src/styles/base/_base.scss +158 -0
  108. package/src/styles/base/_typography.scss +148 -0
  109. package/src/styles/content.scss +72 -0
  110. package/src/styles/main.scss +22 -0
  111. package/tailwind.config.cjs +8 -0
  112. package/tsconfig.json +12 -0
  113. package/uno.config.ts +228 -0
@@ -0,0 +1,18 @@
1
+ <template>
2
+ <label class="group text-left w-full max-w-xs flex flex-col">
3
+ <span
4
+ class="group-hover:text-blue-600 ml-2 text-slate-600 text-sm group-focus-within:text-blue-600"
5
+ >{{ label }}</span
6
+ >
7
+ <input
8
+ class="group-hover:border-blue-500 border px-4 py-2 transition-colors rounded-md w-full focus:ring focus:outline-none focus:border-blue-600"
9
+ type="text"
10
+ />
11
+ </label>
12
+ </template>
13
+
14
+ <script setup lang="ts">
15
+ const props = defineProps<{
16
+ label: string;
17
+ }>();
18
+ </script>
@@ -0,0 +1,32 @@
1
+ <template>
2
+ <span class="px-3 py-1 rounded-xl" :class="classes"><slot></slot></span>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ props: {
8
+ info: {
9
+ type: Boolean,
10
+ },
11
+ success: {
12
+ type: Boolean,
13
+ },
14
+ warning: {
15
+ type: Boolean,
16
+ },
17
+ error: {
18
+ type: Boolean,
19
+ },
20
+ },
21
+ computed: {
22
+ classes() {
23
+ return {
24
+ "text-green-500 bg-green-50": this.success,
25
+ "text-blue-500 bg-blue-50": this.info,
26
+ "text-yellow-600 bg-yellow-50": this.warning,
27
+ "text-red-500 bg-red-50": this.error,
28
+ };
29
+ },
30
+ },
31
+ };
32
+ </script>
@@ -0,0 +1,45 @@
1
+ <template>
2
+ <table class="table-auto text-left border bg-white shadow-md">
3
+ <thead class="bg-slate-800 text-white">
4
+ <tr class="border">
5
+ <th class="px-4 py-2">id</th>
6
+ <th class="px-4 py-2">Name</th>
7
+ <th class="px-4 py-2">Email</th>
8
+ </tr>
9
+ </thead>
10
+ <tbody>
11
+ <tr class="border" v-for="row in tableData" :key="row">
12
+ <td class="px-4 py-2" v-for="key in Object.keys(row)" :key="key">
13
+ {{ row[key] }}
14
+ </td>
15
+ </tr>
16
+ </tbody>
17
+ </table>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ const tableData = [
22
+ {
23
+ id: 1,
24
+ name: "John Doe",
25
+ email: "john@email.com",
26
+ },
27
+ {
28
+ id: 2,
29
+ name: "Jane Doe",
30
+ email: "jane@email.com",
31
+ },
32
+ {
33
+ id: 3,
34
+ name: "Jack Doe",
35
+ email: "jack@email.com",
36
+ },
37
+ {
38
+ id: 4,
39
+ name: "Jill Doe",
40
+ email: "jill@email.com",
41
+ },
42
+ ];
43
+ </script>
44
+
45
+ <style scoped></style>
@@ -0,0 +1,14 @@
1
+ ---
2
+ const { content, githubEditUrl } = Astro.props;
3
+ const title = content.title;
4
+ // const headers = content.astro.headers;
5
+ ---
6
+
7
+ <article id="article" class="content">
8
+ <section class="main-section">
9
+ <nav class="block sm:hidden">
10
+ </nav>
11
+ <slot />
12
+ </section>
13
+ </article>
14
+
@@ -0,0 +1,11 @@
1
+ ---
2
+ import TableOfContents from './TableOfContents.astro';
3
+ const { content } = Astro.props;
4
+ const headers = content.astro?.headers || [];
5
+ ---
6
+
7
+ <nav aria-labelledby="grid-right">
8
+ <div class="px-8">
9
+ <TableOfContents headers={headers} />
10
+ </div>
11
+ </nav>
@@ -0,0 +1,60 @@
1
+ <script lang="ts" setup>
2
+ import { ref } from 'vue';
3
+
4
+ const props = defineProps({
5
+ showCloseButton: {
6
+ type: Boolean,
7
+ default: true,
8
+ required: false,
9
+ },
10
+ })
11
+ const isShow = ref(true)
12
+ const toggleVisibility = () => {
13
+ isShow.value = !isShow.value
14
+ }
15
+ </script>
16
+
17
+ <template>
18
+ <div v-if="isShow" data-pagefind-ignore class="slimbanner bg-lightBlue-500 drop-shadow-md z-2 px-4 sm:px-8 py-3 flex items-center justify-center text-xs sm:text-base leading-none text-white relative print-hidden">
19
+ <span class="inline-block text-4xl w-6 h-3.5 min-w-[1.25rem] mr-3 bg-gradient-to-b stops-[#0057b7_50%,50%,#ffd700_100%]" />
20
+ <span class="leading-none "><span data-text="We stand with our friends and colleagues in Ukraine. To support Ukraine in their time of need visit " />
21
+ <a href="https://polo.blue/support-ukraine/" target="_blank" rel="noopener" class="underline underline-offset-2 hover:text-blue-wrc">this page</a>.
22
+ </span>
23
+
24
+ <button class="ml-3 text-white relative w-5 h-5" v-if="props.showCloseButton" @click="toggleVisibility()" aria-label="Toggle">
25
+ <span class="close"></span>
26
+ </button>
27
+ </div>
28
+ <div v-else data-pagefind-ignore class="px-4 sm:px-8 py-3 flex items-center justify-center text-xs sm:text-base leading-none text-white relative bg-black drop-shadow-md z-2 ">
29
+ <div class="tracking-widest leading-none">
30
+ <span data-text="RUSSIA IS A" /> <span class="underline decoration-red-600 decoration-1 underline-offset-3" data-text="TERRORIST"/> <span data-text="STATE" />
31
+ </div>
32
+ <button class="ml-3 text-red-600 relative w-5 h-5" v-if="props.showCloseButton" @click="toggleVisibility()" aria-label="Toggle">
33
+ <span class="close"></span>
34
+ </button>
35
+ </div>
36
+ </template>
37
+
38
+ <style lang="scss">
39
+ .close {
40
+ @apply absolute top-0 left-0 opacity-50 ;
41
+ }
42
+ .close:hover {
43
+ @apply opacity-100;
44
+ }
45
+ .close:before, .close:after {
46
+ position: absolute;
47
+ left: 0.5rem;
48
+ content: ' ';
49
+ height: 1.25rem;
50
+ width: 2px;
51
+ background-color: #fff;
52
+ }
53
+ .close:before {
54
+ transform: rotate(45deg);
55
+ }
56
+ .close:after {
57
+ transform: rotate(-45deg);
58
+ }
59
+
60
+ </style>
@@ -0,0 +1,12 @@
1
+ ---
2
+ const { headers } = Astro.props;
3
+ ---
4
+ <ul class="flex flex-col gap-4 mt-24">
5
+ { headers.map(({ slug, text }) => {
6
+ return (
7
+ <li class="text-slate-400 hover:text-slate-800 hover:text-slate-900">
8
+ #<a href={`#${slug}`}>{text}</a>
9
+ </li>
10
+ )
11
+ }) }
12
+ </ul>
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <span class="drop-shadow inline-block text-4xl w-6 h-3.5 min-w-[1.25rem] mr-3 bg-gradient-to-b stops-[#fff_50%,50%,#d4213d_100%]" />
3
+ </template>
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <span class="flag-ua" />
3
+ </template>
@@ -0,0 +1,7 @@
1
+ ---
2
+ const { class: className, isFullWidth } = Astro.props;
3
+ ---
4
+
5
+ <div class:list={[`${isFullWidth ? 'max-w-full' : 'max-w-screen-xl'} mx-auto px-5 py-4`, className]}>
6
+ <slot />
7
+ </div>
@@ -0,0 +1,99 @@
1
+ ---
2
+ const { class: className } = Astro.props;
3
+ import { Icon } from 'astro-icon/components';
4
+
5
+ const navItemsLeft = [
6
+ {
7
+ title: 'Components',
8
+ description: 'The building blocks for our UI.',
9
+ url: '/components/buttons',
10
+ img: '/Components.jpg'
11
+ },
12
+ {
13
+ title: 'Patterns',
14
+ description: 'Common patterns for building interfaces.',
15
+ url: '/patterns/introduction',
16
+ img: '/Patterns.jpg'
17
+ }
18
+ ]
19
+
20
+
21
+ // const navItemsRight = [
22
+ // {
23
+ // title: 'Components',
24
+ // description: 'The building blocks for our UI.',
25
+ // url: '/components/buttons',
26
+ // icon: 'carbon:language'
27
+ // },
28
+ // {
29
+ // title: 'Patterns',
30
+ // description: 'Common patterns for building interfaces.',
31
+ // url: '/patterns/introduction',
32
+ // icon: 'carbon:language'
33
+ // }
34
+ // ]
35
+
36
+ ---
37
+
38
+ <nav
39
+ itemscope
40
+ itemtype="http://schema.org/WPHeader"
41
+ class:list={[className, "nav print-hidden mx-auto px-4 shadow-md relative flex items-center justify-between h-24 sm:h-14 flex-wrap sm:flex-nowrap pt-1 sm:pt-0"]}
42
+ >
43
+
44
+ <div class="flex items-center justify-start sm:items-stretch order-1">
45
+ <slot name="logo"/>
46
+
47
+ <div class="hidden sm:block sm:ml-6">
48
+ <div class="flex space-x-4" itemprop="hasPart">
49
+ { navItemsLeft.map(({ title, description, url, img }) => (
50
+ <a href={url}
51
+ class="text-gray-400 hover:bg-blue-700 hover:text-white px-3 py-1 rounded-full text-sm font-medium"
52
+ title={description}
53
+ itemprop="url"
54
+ >
55
+ {title}
56
+ </a>
57
+ ))}
58
+ </div>
59
+ </div>
60
+ </div>
61
+
62
+ <div
63
+ class="relative md:block sm:ml-4 w-full sm:w-64 sm:mr-auto order-4 sm:order-2 h-10">
64
+ <slot name="search"/>
65
+ </div>
66
+
67
+ <div class="flex items-center pr-0 sm:static sm:inset-auto ml-auto sm:ml-6 -mr-2 dark:text-gray-400 print:hidden order-3 sm:order-3 w-20 justify-end"
68
+ itemprop="hasPart" itemscope itemtype="http://schema.org/SiteNavigationElement"
69
+ >
70
+ <!-- <a class="icon-btn mx-2"
71
+ title="s"
72
+ data-astro-reload
73
+ aria-label="asd"
74
+ href="#asd"
75
+ itemprop="url"
76
+ >
77
+ asd
78
+ </a> -->
79
+
80
+
81
+ <a class="icon-btn mx-2"
82
+ title=""
83
+ aria-label=""
84
+ href="#"
85
+ itemprop="url"
86
+ data-astro-reload
87
+ >
88
+ <Icon name="carbon:language" />
89
+ </a>
90
+
91
+ </div>
92
+ </nav>
93
+
94
+ <style lang="scss" is:global>
95
+ nav {
96
+ /* display: grid; */
97
+ place-items: center;
98
+ }
99
+ </style>
package/src/config.ts ADDED
@@ -0,0 +1,42 @@
1
+ export const SITE = {
2
+ title: "Spoko Design System",
3
+ description: "Astro theme to build your design system fast.",
4
+ defaultLanguage: "en_US",
5
+ twitter: "@spokospace",
6
+ github: "spokospace",
7
+ linkedin: "szymonberski",
8
+ };
9
+
10
+ export const OPEN_GRAPH = {
11
+ image: {
12
+ src: "",
13
+ alt: "",
14
+ },
15
+ twitter: "",
16
+ };
17
+
18
+ export const SIDEBAR = [
19
+ { text: "Core", header: true },
20
+ { text: "Introduction", link: "/core/introduction" },
21
+ { text: "Colors", link: "/core/colors" },
22
+ { text: "Typography", link: "/core/typography" },
23
+ { text: "Shadows", link: "/core/shadows" },
24
+
25
+ { text: "Components", header: true },
26
+ { text: "Jumbatron", link: "/components/jumbatron" },
27
+ { text: "SlimBanner", link: "/components/slimbanner" },
28
+ { text: "FuckRussia", link: "/components/fuck-russia" },
29
+ { text: "Flags", link: "/components/flags" },
30
+ { text: "HandDrive", link: "/components/hand-drive" },
31
+ { text: "Badges", link: "/components/badges" },
32
+ { text: "Buttons", link: "/components/buttons" },
33
+ { text: "Copyright", link: "/components/copyright" },
34
+ { text: "Input", link: "/components/input" },
35
+ { text: "Status pills", link: "/components/status-pill" },
36
+ { text: "Table", link: "/components/table" },
37
+ { text: "Icons", link: "/components/icons" },
38
+ { text: "Breadcrumbs", link: "/components/breadcrumbs" },
39
+
40
+ { text: "Patterns", header: true },
41
+ { text: "Introduction", link: "/patterns/introduction" },
42
+ ];
@@ -0,0 +1,92 @@
1
+ export const COLORS = {
2
+ gray: [
3
+ { name: "100", value: "#f3f4f6" },
4
+ { name: "200", value: "#e5e7eb" },
5
+ { name: "300", value: "#b5bbc5" },
6
+ { name: "400", value: "#9ca3af" },
7
+ { name: "500", value: "#64748B" },
8
+ ],
9
+ blue: [
10
+ { name: "50", value: "#eff6ff" },
11
+ { name: "100", value: "#dbeafe" },
12
+ { name: "200", value: "#bfdbfe" },
13
+ { name: "300", value: "#93c5fd" },
14
+ { name: "400", value: "#60a5fa" },
15
+ { name: "500", value: "#3b82f6" },
16
+ { name: "600", value: "#02307d" },
17
+ { name: "700", value: "#001e50" },
18
+ { name: "800", value: "#00437a" },
19
+ { name: "900", value: "#000f28" },
20
+ { name: "901", value: "#0c1a32" },
21
+ { name: "wrc", value: "#0000c8" },
22
+ ],
23
+ lightBlue: [
24
+ { name: "400", value: "#00b0f0" },
25
+ { name: "500", value: "#0099da" },
26
+ { name: "600", value: "#0087c1" },
27
+ { name: "700", value: "#006ea6" },
28
+ ],
29
+ green: [
30
+ { name: "50", value: "#f0fdfc" },
31
+ { name: "100", value: "#e1f9f7" },
32
+ { name: "200", value: "#c3f3eb" },
33
+ { name: "300", value: "#a0ece5" },
34
+ { name: "400", value: "#7ddcd3" },
35
+ { name: "500", value: "#5bc9c0" },
36
+ { name: "600", value: "#4db7b2" },
37
+ { name: "700", value: "#3da69e" },
38
+ { name: "800", value: "#2d8c82" },
39
+ { name: "900", value: "#1e7a6e" },
40
+ ],
41
+ red: [
42
+ { name: "50", value: "#fdf2f2" },
43
+ { name: "100", value: "#fde8e8" },
44
+ { name: "200", value: "#fcd9d9" },
45
+ { name: "300", value: "#fbcbcb" },
46
+ { name: "400", value: "#f8b5b5" },
47
+ { name: "500", value: "#f49f9f" },
48
+ { name: "600", value: "#e57373" },
49
+ { name: "700", value: "#d73a3a" },
50
+ { name: "800", value: "#c62e2e" },
51
+ { name: "900", value: "#ad1c1c" },
52
+ ],
53
+ };
54
+
55
+ export const TYPOGRAPHY = {
56
+ fontFamily: "Inter, system",
57
+ scale: [
58
+ { name: "h1", size: "22pt", weight: "400" },
59
+ { name: "h2", size: "17pt", weight: "500" },
60
+ { name: "h3", size: "13pt", weight: "600" },
61
+ { name: "h4", size: "13pt", weight: "500" },
62
+ { name: "body", size: "13pt", weight: "400" },
63
+ { name: "button", size: "13pt", weight: "400" },
64
+ { name: "caption", size: "10pt", weight: "400" },
65
+ ],
66
+ };
67
+
68
+ export const SHADOWS = {
69
+ types: [
70
+ { name: "xs", value: "0px 2px 4px rgba(0, 0, 0, 0.08)" },
71
+ { name: "sm", value: "0px 4px 8px rgba(0, 0, 0, 0.125)" },
72
+ { name: "md", value: "0px 8px 16px rgba(0, 0, 0, 0.125)" },
73
+ { name: "lg", value: "0px 16px 32px rgba(0, 0, 0, 0.125)" },
74
+ { name: "xl", value: "0px 32px 64px rgba(0, 0, 0, 0.125)" },
75
+ { name: "2xl", value: "0px 64px 128px rgba(0, 0, 0, 0.125)" },
76
+ ],
77
+ };
78
+
79
+
80
+ export const FONTS = {
81
+ types: [
82
+ { name: "vw_textregular", value: "font-textregular" },
83
+ { name: "vw_textregular", value: "font-sans" },
84
+ { name: "vw_textbold", value: "font-textbold" },
85
+ { name: "vw_headbold", value: "font-headbold" },
86
+ { name: "vw_headregular", value: "vw_headregular" },
87
+ { name: "vw_headlight", value: "font-headlight" },
88
+ { name: "vw_textlight", value: "font-textlight" },
89
+ { name: "Nova Mono", value: "font-novamono" },
90
+ { name: "Nova Mono", value: "font-mono" }
91
+ ],
92
+ };
package/src/env.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ /// <reference path="../.astro/types.d.ts" />
2
+ /// <reference types="astro/client" />
@@ -0,0 +1,50 @@
1
+ ---
2
+ import HeadCommon from '../components/HeadCommon.astro';
3
+ import HeadSEO from '../components/HeadSEO.astro';
4
+ import Header from '../components/Header/Header.astro';
5
+ import PageContent from '../components/PageContent.astro';
6
+ import LeftSidebar from '../components/LeftSidebar.astro';
7
+ import RightSidebar from '../components/RightSidebar.astro';
8
+ import * as CONFIG from '../config';
9
+ import { t, changeLanguage } from "i18next";
10
+ import '../styles/main.scss';
11
+ const locale = "en";
12
+ changeLanguage(locale);
13
+
14
+ const { content = {} } = Astro.props;
15
+ const currentPage = Astro.url.pathname;
16
+ // const currentFile = `src/pages${currentPage.replace(/\/$/, '')}.md`;
17
+ const canonicalURL = new URL(Astro.url.pathname, Astro.site).toString();
18
+ console.log('canonicalURL', canonicalURL)
19
+ ---
20
+
21
+ <html dir={content.dir ?? 'ltr'} lang={content.lang ?? 'en-us'} class="initial">
22
+ <head>
23
+ <HeadCommon />
24
+ <HeadSEO {content} canonicalURL={canonicalURL} />
25
+ <title>{content.title ? `${content.title} 🚀 ${CONFIG.SITE.title}` : CONFIG.SITE.title}</title>
26
+ </head>
27
+
28
+ <body class="bg-slate-100">
29
+ <div class="sticky top-0 z-10 w-full">
30
+ <Header currentPage={currentPage} />
31
+ </div>
32
+ <div class="grid grid-cols-12">
33
+ <div class="col-span-3 sticky top-0 pt-12 h-screen flex">
34
+ <div class="ml-auto">
35
+ <LeftSidebar currentPage={currentPage} />
36
+ </div>
37
+ </div>
38
+ <main class="py-4 px-8 pb-32 col-span-6 overflow-auto">
39
+ <div>
40
+ <PageContent content={content}>
41
+ <slot />
42
+ </PageContent>
43
+ </div>
44
+ </main>
45
+ <div class="col-span-3 sticky top-0 h-screen flex">
46
+ <RightSidebar content={content} />
47
+ </div>
48
+ </div>
49
+ </body>
50
+ </html>
@@ -0,0 +1,35 @@
1
+ ---
2
+ title: "Badges"
3
+ layout: "../../layouts/MainLayout.astro"
4
+ ---
5
+ import Badges from '../../components/Badges.vue'
6
+
7
+ ## Badges
8
+
9
+ ### Badges - GTI
10
+ <div class="component-preview">
11
+ <div class="relative min-h-6 ">
12
+ <Badges badges={['GTI']} class:list="top-2" />
13
+ </div>
14
+ </div>
15
+ ```js
16
+ <div class="relative min-h-14 ">
17
+ <Badges badges={['GTI']} class:list="top-2" />
18
+ </div>
19
+
20
+ ```
21
+
22
+
23
+ ### Badges - Motorsport
24
+ <div class="component-preview">
25
+ <div class="relative min-h-6 ">
26
+ <Badges badges={['Motorsport']} class:list="top-2" />
27
+ </div>
28
+ </div>
29
+
30
+ ```js
31
+ <div class="relative min-h-14 ">
32
+ <Badges badges={['Motorsport']} class:list="top-2" />
33
+ </div>
34
+
35
+ ```
@@ -0,0 +1,103 @@
1
+ ---
2
+ title: "Breadcrumbs"
3
+ layout: "../../layouts/MainLayout.astro"
4
+
5
+
6
+ ---
7
+ import Breadcrumbs from '../../components/Breadcrumbs.vue'
8
+
9
+ ## Breadcrumbs
10
+
11
+ Breadcrumbs component
12
+
13
+
14
+ ### show back
15
+
16
+ <div class="component-preview">
17
+ <Breadcrumbs
18
+ breadcrumbs={ [ {"name": "Level1", "path": "level 1"}, {"name": "Level 2", "path": "level2"}, {"name": "Level 3", "path": "level3"} ] }
19
+ data-lang="en"
20
+ product-number="6R0XXXXXX"
21
+ class="py-1 order-0 px-1 max-w-full flex bg-white"
22
+ show-back
23
+ text-back="Back"
24
+ />
25
+ </div>
26
+
27
+ ```js
28
+
29
+ <Breadcrumbs
30
+ breadcrumbs={
31
+ [
32
+ {"name": "Level1", "path": "level 1"},
33
+ {"name": "Level 2", "path": "level2"},
34
+ {"name": "Level 3", "path": "level3"}
35
+ ]
36
+ }
37
+ data-lang="en"
38
+ product-number="6R0XXXXXX"
39
+ class="py-1 order-0 px-1 max-w-full flex bg-white"
40
+ show-back
41
+ text-back="Back"
42
+ />
43
+ ```
44
+
45
+
46
+ ### show home
47
+
48
+ <div class="component-preview">
49
+ <Breadcrumbs
50
+ breadcrumbs={ [ {"name": "Level1", "path": "level 1"}, {"name": "Level 2", "path": "level2"}, {"name": "Level 3", "path": "level3"} ] }
51
+ data-lang="en"
52
+ product-number="6R0XXXXXX"
53
+ class="py-1 order-0 px-1 max-w-full flex bg-white"
54
+ show-home
55
+ />
56
+ </div>
57
+
58
+ ```js
59
+
60
+ <Breadcrumbs
61
+ breadcrumbs={
62
+ [
63
+ {"name": "Level1", "path": "level 1"},
64
+ {"name": "Level 2", "path": "level2"},
65
+ {"name": "Level 3", "path": "level3"}
66
+ ]
67
+ }
68
+ data-lang="en"
69
+ product-number="6R0XXXXXX"
70
+ class="py-1 order-0 px-1 max-w-full flex bg-white"
71
+ show-home
72
+ />
73
+ ```
74
+
75
+
76
+ ### simply
77
+
78
+ <div class="component-preview">
79
+ <Breadcrumbs
80
+ breadcrumbs={ [ {"name": "Level1", "path": "level 1"}, {"name": "Level 2", "path": "level2"}, {"name": "Level 3", "path": "level3"} ] }
81
+ data-lang="en"
82
+ product-number="6R0XXXXXX"
83
+ class="py-1 order-0 px-1 max-w-full flex bg-white"
84
+ />
85
+ </div>
86
+
87
+ ```js
88
+
89
+ <Breadcrumbs
90
+ breadcrumbs={
91
+ [
92
+ {"name": "Level1", "path": "level 1"},
93
+ {"name": "Level 2", "path": "level2"},
94
+ {"name": "Level 3", "path": "level3"}
95
+ ]
96
+ }
97
+ data-lang="en"
98
+ product-number="6R0XXXXXX"
99
+ class="py-1 order-0 px-1 max-w-full flex bg-white"
100
+ show-back
101
+ text-back="Back"
102
+ />
103
+ ```