spoko-design-system 0.0.1 → 0.0.2

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 (99) hide show
  1. package/.astro/icon.d.ts +2199 -2192
  2. package/.github/workflows/deploy.yml +39 -39
  3. package/.stackblitzrc +5 -5
  4. package/.vscode/extensions.json +4 -4
  5. package/.vscode/launch.json +11 -11
  6. package/LICENSE +21 -21
  7. package/Layout/Header.astro +111 -89
  8. package/README.md +69 -69
  9. package/astro-i18next.config.mjs +17 -17
  10. package/astro-i18next.config.ts +10 -10
  11. package/astro.config.mjs +45 -42
  12. package/index.ts +6 -6
  13. package/package.json +75 -71
  14. package/public/astro-design-system-logo.svg +10 -10
  15. package/public/fonts/lg.svg +53 -53
  16. package/public/fonts/vwhead-bold-demo.html +549 -549
  17. package/public/fonts/vwhead-regular-demo.html +549 -549
  18. package/public/fonts/vwtext-bold-demo.html +549 -549
  19. package/public/fonts/vwtext-regular-demo.html +549 -549
  20. package/public/github.svg +3 -3
  21. package/public/grid_dot.svg +4 -4
  22. package/public/linkedin.svg +44 -44
  23. package/public/locales/en/translation.json +5 -5
  24. package/public/locales/pl/translation.json +5 -5
  25. package/public/make-scrollable-code-focusable.js +3 -3
  26. package/public/polo.blue.svg +29 -0
  27. package/public/spoko.space.svg +71 -0
  28. package/public/twitter.svg +46 -46
  29. package/sandbox.config.json +11 -11
  30. package/src/MyComponent.astro +8 -8
  31. package/src/components/Badge.vue +19 -19
  32. package/src/components/Badges.vue +24 -23
  33. package/src/components/Breadcrumbs.vue +108 -111
  34. package/src/components/Button.vue +28 -0
  35. package/src/components/CategoryLink.astro +18 -0
  36. package/src/components/Copyright.astro +11 -11
  37. package/src/components/Date.astro +7 -0
  38. package/src/components/FuckRussia.vue +65 -65
  39. package/src/components/HandDrive.astro +30 -30
  40. package/src/components/HeadCommon.astro +40 -40
  41. package/src/components/HeadSEO.astro +41 -41
  42. package/src/components/Header/AstroLogo.astro +7 -27
  43. package/src/components/Header/Header.astro +44 -48
  44. package/src/components/Header/SkipToContent.astro +1 -1
  45. package/src/components/Headline.vue +28 -0
  46. package/src/components/Jumbatron.vue +31 -31
  47. package/src/components/LeftSidebar.astro +44 -44
  48. package/src/components/MainColors.vue +29 -29
  49. package/src/components/MainInput.vue +18 -18
  50. package/src/components/MainTable.vue +40 -45
  51. package/src/components/Modal.astro +30 -0
  52. package/src/components/PageContent.astro +14 -14
  53. package/src/components/PostHeader.astro +104 -0
  54. package/src/components/RightSidebar.astro +15 -11
  55. package/src/components/SlimBanner.vue +59 -59
  56. package/src/components/TableOfContents.astro +11 -11
  57. package/src/components/Translations.vue +27 -0
  58. package/src/components/flags/FlagPL.vue +2 -2
  59. package/src/components/flags/FlagUA.vue +2 -2
  60. package/src/components/layout/Header.astro +50 -69
  61. package/src/config.ts +47 -42
  62. package/src/design.config.ts +73 -92
  63. package/src/env.d.ts +1 -1
  64. package/src/flag-poland.svg +1 -0
  65. package/src/flag-uk.svg +1 -0
  66. package/src/layouts/Layout.astro +51 -0
  67. package/src/layouts/MainLayout.astro +68 -50
  68. package/src/pages/components/badges.mdx +37 -35
  69. package/src/pages/components/breadcrumbs.mdx +100 -103
  70. package/src/pages/components/buttons.mdx +62 -60
  71. package/src/pages/components/copyright.mdx +41 -24
  72. package/src/pages/components/flags.mdx +40 -26
  73. package/src/pages/components/fuck-russia.mdx +39 -16
  74. package/src/pages/components/hand-drive.mdx +33 -27
  75. package/src/pages/components/headline.mdx +129 -0
  76. package/src/pages/components/icons.astro +52 -45
  77. package/src/pages/components/input.mdx +45 -14
  78. package/src/pages/components/jumbatron.mdx +48 -48
  79. package/src/pages/components/modal.mdx +58 -0
  80. package/src/pages/components/post-header.mdx +36 -0
  81. package/src/pages/components/slimbanner.mdx +29 -27
  82. package/src/pages/components/table.mdx +20 -20
  83. package/src/pages/core/colors.mdx +8 -8
  84. package/src/pages/core/introduction.mdx +74 -68
  85. package/src/pages/core/shadows.astro +20 -20
  86. package/src/pages/core/typography.astro +46 -46
  87. package/src/pages/index.astro +67 -52
  88. package/src/pages/patterns/introduction.mdx +60 -61
  89. package/src/styles/_variables.scss +75 -75
  90. package/src/styles/base/_base.scss +158 -158
  91. package/src/styles/base/_typography.scss +147 -147
  92. package/src/styles/content.scss +51 -72
  93. package/src/styles/main.scss +22 -22
  94. package/tailwind.config.cjs +8 -8
  95. package/tsconfig.json +11 -11
  96. package/uno.config.ts +227 -227
  97. package/src/components/MainButton.vue +0 -26
  98. package/src/components/MainStatusPill.vue +0 -32
  99. package/src/pages/components/status-pill.mdx +0 -22
@@ -1,40 +1,40 @@
1
- name: Deploy to GitHub Pages
2
-
3
- on:
4
- # Trigger the workflow every time you push to the `main` branch
5
- # Using a different branch name? Replace `main` with your branch’s name
6
- push:
7
- branches: [ ma ]
8
- # Allows you to run this workflow manually from the Actions tab on GitHub.
9
- workflow_dispatch:
10
-
11
- # Allow this job to clone the repo and create a page deployment
12
- permissions:
13
- contents: read
14
- pages: write
15
- id-token: write
16
-
17
- jobs:
18
- build:
19
- runs-on: ubuntu-latest
20
- steps:
21
- - name: Checkout your repository using git
22
- uses: actions/checkout@v3
23
- - name: Install, build, and upload your site
24
- uses: withastro/action@v1
25
- with:
26
- pnpm@latest
27
- # path: . # The root location of your Astro project inside the repository. (optional)
28
- # node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
29
- # package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
30
-
31
- deploy:
32
- needs: build
33
- runs-on: ubuntu-latest
34
- environment:
35
- name: github-pages
36
- url: ${{ steps.deployment.outputs.page_url }}
37
- steps:
38
- - name: Deploy to GitHub Pages
39
- id: deployment
1
+ name: Deploy to GitHub Pages
2
+
3
+ on:
4
+ # Trigger the workflow every time you push to the `main` branch
5
+ # Using a different branch name? Replace `main` with your branch’s name
6
+ push:
7
+ branches: [ ma ]
8
+ # Allows you to run this workflow manually from the Actions tab on GitHub.
9
+ workflow_dispatch:
10
+
11
+ # Allow this job to clone the repo and create a page deployment
12
+ permissions:
13
+ contents: read
14
+ pages: write
15
+ id-token: write
16
+
17
+ jobs:
18
+ build:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - name: Checkout your repository using git
22
+ uses: actions/checkout@v3
23
+ - name: Install, build, and upload your site
24
+ uses: withastro/action@v1
25
+ with:
26
+ pnpm@latest
27
+ # path: . # The root location of your Astro project inside the repository. (optional)
28
+ # node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional)
29
+ # package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional)
30
+
31
+ deploy:
32
+ needs: build
33
+ runs-on: ubuntu-latest
34
+ environment:
35
+ name: github-pages
36
+ url: ${{ steps.deployment.outputs.page_url }}
37
+ steps:
38
+ - name: Deploy to GitHub Pages
39
+ id: deployment
40
40
  uses: actions/deploy-pages@v1
package/.stackblitzrc CHANGED
@@ -1,6 +1,6 @@
1
- {
2
- "startCommand": "npm start",
3
- "env": {
4
- "ENABLE_CJS_IMPORTS": true
5
- }
1
+ {
2
+ "startCommand": "npm start",
3
+ "env": {
4
+ "ENABLE_CJS_IMPORTS": true
5
+ }
6
6
  }
@@ -1,4 +1,4 @@
1
- {
2
- "recommendations": ["astro-build.astro-vscode"],
3
- "unwantedRecommendations": []
4
- }
1
+ {
2
+ "recommendations": ["astro-build.astro-vscode"],
3
+ "unwantedRecommendations": []
4
+ }
@@ -1,11 +1,11 @@
1
- {
2
- "version": "0.2.0",
3
- "configurations": [
4
- {
5
- "command": "./node_modules/.bin/astro dev",
6
- "name": "Development server",
7
- "request": "launch",
8
- "type": "node-terminal"
9
- }
10
- ]
11
- }
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "command": "./node_modules/.bin/astro dev",
6
+ "name": "Development server",
7
+ "request": "launch",
8
+ "type": "node-terminal"
9
+ }
10
+ ]
11
+ }
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Jordi Enric Roig Ramis
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Jordi Enric Roig Ramis
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,89 +1,111 @@
1
- ---
2
- import { Icon } from 'astro-icon/components';
3
- import Search from "astro-pagefind/components/Search";
4
- // import Search from "components/NavbarSearch.astro";
5
- import { t } from "i18next";
6
- const { translation, locale } = Astro.props;
7
-
8
- import { Image } from 'astro:assets';
9
- import vwLogo from './../../../public/vw.svg'
10
-
11
- const likes = {
12
- list: {
13
- ids: [0, 1, 2]
14
- }
15
- }
16
- ---
17
- <style lang="scss">
18
- .logo {
19
- max-height: 25px;
20
- max-width: 25px;
21
- }
22
- </style>
23
-
24
-
25
- <nav class="nav print-hidden" itemscope itemtype="http://schema.org/WPHeader">
26
- <div class="mx-auto px-4 shadow-md ">
27
- <div class="relative flex items-center justify-between h-24 sm:h-14 flex-wrap pt-1 sm:pt-0">
28
- <div class="flex items-center justify-start sm:items-stretch order-1">
29
- <div class="flex-shrink-0 flex items-center h-8" >
30
- <a class="flex items-center" href={locale !== 'en' ? `/${locale}/` : '/'} title={t('catalog.title')}>
31
- <Image src={vwLogo} alt="VW" width="25" height="25" class="logo mr-2 dark:text-white hover:animate-spin"/>
32
- <span class="text-xl brand text-left leading-none dark:text-white">catalog
33
- <span class="text-xs block leading-none -mt-0.5 text-lightBlue-500"><strong class="text-black font-400">polo</strong>blue</span>
34
- </span>
35
- </a>
36
- </div>
37
- <div class="hidden sm:block sm:ml-6">
38
- <div class="flex space-x-4" itemprop="hasPart">
39
- <!-- <a href="https://uk-polos.net/viewforum.php?f=56" title="UK-Polos.net / Polo 6R/6C" target="_blank" rel="noopener" class="text-gray-400 hover:bg-blue-700 hover:text-white px-3 py-1 rounded-full text-sm font-medium">Forum</a> -->
40
- <a href={`https://polo.blue${locale==='pl'?'/pl':''}`}
41
- class="text-gray-400 hover:bg-blue-700 hover:text-white px-3 py-1 rounded-full text-sm font-medium"
42
- title="Polo 6R Blog" itemprop="url">Blog</a>
43
- <!-- <a href="#" class="text-gray-400 hover:bg-blue-700 hover:text-white px-3 py-1 rounded-full text-sm font-medium">Price Checker</a> -->
44
- </div>
45
- </div>
46
- </div>
47
-
48
- <div class="relative md:block sm:ml-4 w-full sm:w-64 sm:mr-auto order-4 sm:order-2 h-10">
49
- <Search
50
- id="search"
51
- transition:name="search-field"
52
- transition:persist
53
- className="search-container"
54
- uiOptions={{
55
- showImages: true,
56
- showEmptyFilters: false,
57
- resetStyles: true,
58
- translations: {
59
- clear_search: t('search.clear'),
60
- placeholder: t('search.type-to-search'),
61
- search_label: t('search.search_label'),
62
- filters_label: t('search.filters'),
63
- zero_results: t('search.zero-results'),
64
- many_results: `[COUNT] ${t('search.results-for')} [SEARCH_TERM]`,
65
- one_result: `[COUNT] ${t('search.result-for')} [SEARCH_TERM]`,
66
- alt_search: t('search.alt_search'),
67
- search_suggestion: t('search.search_suggestion'),
68
- searching: t('search.searching'),
69
- load_more: t('search.load-more')
70
- }
71
- }}
72
- />
73
- </div>
74
-
75
- <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"
76
- itemprop="hasPart" itemscope itemtype="http://schema.org/SiteNavigationElement"
77
- >
78
- <a class="icon-btn mx-2"
79
- title={t('button.toggle_langs')}
80
- href={translation}
81
- itemprop="url"
82
- data-astro-reload
83
- >
84
- <Icon name="carbon:language" width="1.2em" height="1.2em"/>
85
- </a>
86
- </div>
87
- </div>
88
- </div>
89
- </nav>
1
+ ---
2
+ import { Icon } from "astro-icon/components";
3
+ import Search from "astro-pagefind/components/Search";
4
+ import { t } from "i18next";
5
+ const { translation, locale } = Astro.props;
6
+
7
+ import { Image } from "astro:assets";
8
+ import vwLogo from "./../../../public/vw.svg";
9
+
10
+ const likes = {
11
+ list: {
12
+ ids: [0, 1, 2],
13
+ },
14
+ };
15
+ ---
16
+
17
+ <nav class="nav print-hidden" itemscope itemtype="http://schema.org/WPHeader">
18
+ <div class="mx-auto px-4 shadow-md">
19
+ <div
20
+ class="relative flex items-center justify-between h-24 sm:h-14 flex-wrap pt-1 sm:pt-0"
21
+ >
22
+ <div class="flex items-center justify-start sm:items-stretch order-1">
23
+ <div class="flex-shrink-0 flex items-center h-8">
24
+ <a
25
+ class="flex items-center"
26
+ href={locale !== "en" ? `/${locale}/` : "/"}
27
+ title={t("catalog.title")}
28
+ >
29
+ <Image
30
+ src={vwLogo}
31
+ alt="VW"
32
+ width="25"
33
+ height="25"
34
+ class="logo mr-2 dark:text-white hover:animate-spin"
35
+ />
36
+ <span class="text-xl brand text-left leading-none dark:text-white"
37
+ >catalog
38
+ <span
39
+ class="text-xs block leading-none -mt-0.5 text-lightBlue-500"
40
+ ><strong class="text-black font-400">polo</strong>blue</span
41
+ >
42
+ </span>
43
+ </a>
44
+ </div>
45
+ <div class="hidden sm:block sm:ml-6">
46
+ <div class="flex space-x-4" itemprop="hasPart">
47
+ <a
48
+ href={`https://polo.blue${locale === "pl" ? "/pl" : ""}`}
49
+ class="text-gray-400 hover:bg-blue-700 hover:text-white px-3 py-1 rounded-full text-sm font-medium"
50
+ title="Polo 6R Blog"
51
+ itemprop="url">Blog</a
52
+ >
53
+ </div>
54
+ </div>
55
+ </div>
56
+
57
+ <div
58
+ class="relative md:block sm:ml-4 w-full sm:w-64 sm:mr-auto order-4 sm:order-2 h-10"
59
+ >
60
+ <Search
61
+ id="search"
62
+ transition:name="search-field"
63
+ transition:persist
64
+ className="search-container"
65
+ uiOptions={{
66
+ showImages: true,
67
+ showEmptyFilters: false,
68
+ resetStyles: true,
69
+ translations: {
70
+ clear_search: t("search.clear"),
71
+ placeholder: t("search.type-to-search"),
72
+ search_label: t("search.search_label"),
73
+ filters_label: t("search.filters"),
74
+ zero_results: t("search.zero-results"),
75
+ many_results: `[COUNT] ${t("search.results-for")} [SEARCH_TERM]`,
76
+ one_result: `[COUNT] ${t("search.result-for")} [SEARCH_TERM]`,
77
+ alt_search: t("search.alt_search"),
78
+ search_suggestion: t("search.search_suggestion"),
79
+ searching: t("search.searching"),
80
+ load_more: t("search.load-more"),
81
+ },
82
+ }}
83
+ />
84
+ </div>
85
+
86
+ <div
87
+ 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"
88
+ itemprop="hasPart"
89
+ itemscope
90
+ itemtype="http://schema.org/SiteNavigationElement"
91
+ >
92
+ <a
93
+ class="icon-btn mx-2"
94
+ title={t("button.toggle_langs")}
95
+ href={translation}
96
+ itemprop="url"
97
+ data-astro-reload
98
+ >
99
+ <Icon name="carbon:language" />
100
+ </a>
101
+ </div>
102
+ </div>
103
+ </div>
104
+ </nav>
105
+
106
+ <style lang="scss">
107
+ .logo {
108
+ max-height: 25px;
109
+ max-width: 25px;
110
+ }
111
+ </style>
package/README.md CHANGED
@@ -1,69 +1,69 @@
1
- ---
2
- title: Introduction
3
- description: Docs intro
4
- layout: ../../layouts/MainLayout.astro
5
- ---
6
-
7
- # Spoko Design System
8
-
9
- Astro Design System is the easiest way to start your our design system. Since Astro is compatible with many frameworks, you can import your components and document them right in the markdown files.
10
-
11
- ## Getting started
12
-
13
- ### Adding new sections
14
-
15
- Although it's not required, you can create folders for new sections.
16
-
17
- To show the section on the left side navigation, add it to the navigation config file at `src/config.ts`.
18
-
19
- Example:
20
- https://spoko-design-system.netlify.app/
21
-
22
- ```js
23
- export const SIDEBAR = [
24
- { text: "Core", header: true },
25
- { text: "Introduction", link: "/core/introduction" },
26
- ...,
27
- { text: "Components", header: true },
28
- { text: "Buttons", link: "/components/buttons" },
29
- ...,
30
- { text: "New section", header: true },
31
- { text: "New component", link: "/new-section/new-component.md" },
32
- ];
33
- ```
34
-
35
- ### Adding new pages
36
-
37
- To add new pages just create an .astro or markdown file in `src/pages/[section]/my-page.md`. Remember to add it to the navigation config in `src/config.ts` so it shows up in the left side navigation.
38
-
39
- You're free to organize the pages however you want.
40
-
41
- ### Customizing Core section (colors, typography, shadows...)
42
-
43
- If you want to customize the default colors, typography or shadows you can find the configuration file at `src/config/design.config.ts`.
44
-
45
- Feel free to add new pages to the Core section
46
-
47
- ### Customizing the page layout
48
-
49
- You can find the css for the pages in `src/styles/content.scss`.
50
-
51
- ### Adding your components
52
-
53
- Astro is great for design systems because it allows you to import components from different frameworks like react, vue or svelte.
54
-
55
- To get started check how the `MainButton` component is used in the `src/pages/en/buttons.md` file.
56
-
57
- You can import your component library or create your own and document it easily.
58
-
59
- ### `.component-preview` utility
60
-
61
- There's a class called `.component-preview` that you can use to wrap your component in a grid, and it will look like this:
62
-
63
- <div class="component-preview">
64
- <button class="text-white bg-blue-500 px-4 py-2 rounded-md">Your component</button>
65
- </div>
66
-
67
- ### Have fun!
68
-
69
- Spoko Design System template was made by **[@spoko.space](https://spoko.space)** for personal and commercial use.
1
+ ---
2
+ title: Introduction
3
+ description: Docs intro
4
+ layout: ../../layouts/MainLayout.astro
5
+ ---
6
+
7
+ # Spoko Design System
8
+
9
+ Astro Design System is the easiest way to start your our design system. Since Astro is compatible with many frameworks, you can import your components and document them right in the markdown files.
10
+
11
+ ## Getting started
12
+
13
+ ### Adding new sections
14
+
15
+ Although it's not required, you can create folders for new sections.
16
+
17
+ To show the section on the left side navigation, add it to the navigation config file at `src/config.ts`.
18
+
19
+ Example:
20
+ https://spoko-design-system.netlify.app/
21
+
22
+ ```js
23
+ export const SIDEBAR = [
24
+ { text: "Core", header: true },
25
+ { text: "Introduction", link: "/core/introduction" },
26
+ ...,
27
+ { text: "Components", header: true },
28
+ { text: "Buttons", link: "/components/jumbatron" },
29
+ ...,
30
+ { text: "New section", header: true },
31
+ { text: "New component", link: "/new-section/new-component.md" },
32
+ ];
33
+ ```
34
+
35
+ ### Adding new pages
36
+
37
+ To add new pages just create an .astro or markdown file in `src/pages/[section]/my-page.md`. Remember to add it to the navigation config in `src/config.ts` so it shows up in the left side navigation.
38
+
39
+ You're free to organize the pages however you want.
40
+
41
+ ### Customizing Core section (colors, typography, shadows...)
42
+
43
+ If you want to customize the default colors, typography or shadows you can find the configuration file at `src/config/design.config.ts`.
44
+
45
+ Feel free to add new pages to the Core section
46
+
47
+ ### Customizing the page layout
48
+
49
+ You can find the css for the pages in `src/styles/content.scss`.
50
+
51
+ ### Adding your components
52
+
53
+ Astro is great for design systems because it allows you to import components from different frameworks like react, vue or svelte.
54
+
55
+ To get started check how the `MainButton` component is used in the `src/pages/en/buttons.md` file.
56
+
57
+ You can import your component library or create your own and document it easily.
58
+
59
+ ### `.component-preview` utility
60
+
61
+ There's a class called `.component-preview` that you can use to wrap your component in a grid, and it will look like this:
62
+
63
+ <div class="component-preview">
64
+ <button class="text-white bg-blue-500 px-4 py-2 rounded-md">Your component</button>
65
+ </div>
66
+
67
+ ### Have fun!
68
+
69
+ Spoko Design System template was made by **[@spoko.space](https://spoko.space)** for personal and commercial use.
@@ -1,18 +1,18 @@
1
- /** @type {import('astro-i18next').AstroI18nextConfig} */
2
- export default {
3
- defaultLocale: "en",
4
- locales: ["en", "pl"],
5
- i18next: {
6
- // debug is convenient during development to check for missing keys
7
- debug: true,
8
- initImmediate: false,
9
- // backend: {
10
- // loadPath: './src/locales/{{lng}}.yml',
11
- // },
12
- detection: {}, // Default detection settings
13
- },
14
- i18nextPlugins: {
15
- fsBackend: 'i18next-fs-backend',
16
- LanguageDetector: 'i18next-browser-languagedetector',
17
- },
1
+ /** @type {import('astro-i18next').AstroI18nextConfig} */
2
+ export default {
3
+ defaultLocale: "en",
4
+ locales: ["en", "pl"],
5
+ i18next: {
6
+ // debug is convenient during development to check for missing keys
7
+ debug: true,
8
+ initImmediate: false,
9
+ // backend: {
10
+ // loadPath: './src/locales/{{lng}}.yml',
11
+ // },
12
+ detection: {}, // Default detection settings
13
+ },
14
+ i18nextPlugins: {
15
+ fsBackend: 'i18next-fs-backend',
16
+ LanguageDetector: 'i18next-browser-languagedetector',
17
+ },
18
18
  };
@@ -1,11 +1,11 @@
1
- import type { AstroI18nextConfig } from "astro-i18next";
2
-
3
- const config: AstroI18nextConfig = {
4
- defaultLocale: "en",
5
- locales: ["en", "pl"],
6
- i18nextServer: {
7
- debug: true,
8
- },
9
- };
10
-
1
+ import type { AstroI18nextConfig } from "astro-i18next";
2
+
3
+ const config: AstroI18nextConfig = {
4
+ defaultLocale: "en",
5
+ locales: ["en", "pl"],
6
+ i18nextServer: {
7
+ debug: true,
8
+ },
9
+ };
10
+
11
11
  export default config;