@natachah/vanilla-frontend 0.4.1 → 1.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.
- package/.gitlab-ci.yml +22 -13
- package/LICENSE.md +1 -1
- package/docs/.vitepress/config.mts +101 -0
- package/docs/base/layout.md +77 -0
- package/docs/base/media.md +146 -0
- package/docs/base/reset.md +33 -0
- package/docs/base/typography.md +296 -0
- package/docs/classes/badge.md +146 -0
- package/docs/classes/breadcrumb.md +54 -0
- package/docs/classes/card.md +171 -0
- package/docs/classes/dropdown.md +180 -0
- package/docs/classes/grid.md +230 -0
- package/docs/classes/list.md +90 -0
- package/docs/components/button.md +254 -0
- package/docs/components/dialog.md +223 -0
- package/docs/components/disclosure.md +169 -0
- package/docs/components/form.md +514 -0
- package/docs/components/loading.md +53 -0
- package/docs/components/popover.md +270 -0
- package/docs/components/progress.md +33 -0
- package/docs/components/table.md +175 -0
- package/docs/index.md +27 -0
- package/docs/javascript/autofill.md +155 -0
- package/docs/javascript/check.md +53 -0
- package/docs/javascript/comfort.md +125 -0
- package/docs/javascript/consent.md +89 -0
- package/docs/javascript/cookie.md +33 -0
- package/docs/javascript/drawer.md +99 -0
- package/docs/javascript/form.md +130 -0
- package/docs/javascript/scroll.md +104 -0
- package/docs/javascript/slider.md +130 -0
- package/docs/javascript/sortable.md +127 -0
- package/docs/javascript/tabpanel.md +72 -0
- package/docs/javascript/toggle.md +182 -0
- package/docs/javascript/trap.md +33 -0
- package/docs/javascript/tree.md +220 -0
- package/docs/prologue/conventions.md +92 -0
- package/docs/prologue/release.md +44 -0
- package/docs/prologue/upgrade.md +21 -0
- package/docs/{pages/demo/layout.html → public/demo/demo.html} +1 -2
- package/docs/start/customization.md +184 -0
- package/docs/start/install.md +80 -0
- package/docs/start/mixin.md +203 -0
- package/docs/vuejs/ComponentPreview.vue +99 -0
- package/js/_slider.js +17 -1
- package/js/{vanilla-frontend.js → vanilla-frontend-doc.js} +30 -33
- package/natachah-vanilla-frontend-1.0.1.tgz +0 -0
- package/package.json +11 -14
- package/public/404.html +22 -0
- package/public/assets/app.zYBRMlen.js +1 -0
- package/public/assets/base_layout.md.DPVON1Hq.js +13 -0
- package/public/assets/base_layout.md.DPVON1Hq.lean.js +1 -0
- package/public/assets/base_media.md.DHSlU0g6.js +24 -0
- package/public/assets/base_media.md.DHSlU0g6.lean.js +1 -0
- package/public/assets/base_reset.md.DD9AA1li.js +3 -0
- package/public/assets/base_reset.md.DD9AA1li.lean.js +1 -0
- package/public/assets/base_typography.md.C9BVN1Re.js +87 -0
- package/public/assets/base_typography.md.C9BVN1Re.lean.js +1 -0
- package/public/assets/chunks/ComponentPreview.Cw4G3qNN.js +27 -0
- package/public/assets/chunks/framework.26dFs73Q.js +4 -0
- package/public/assets/chunks/theme.D1Tljxds.js +1 -0
- package/public/assets/classes_badge.md.EznZXXqT.js +24 -0
- package/public/assets/classes_badge.md.EznZXXqT.lean.js +1 -0
- package/public/assets/classes_breadcrumb.md.DrzF9h9m.js +15 -0
- package/public/assets/classes_breadcrumb.md.DrzF9h9m.lean.js +1 -0
- package/public/assets/classes_card.md.BzNZEHe9.js +41 -0
- package/public/assets/classes_card.md.BzNZEHe9.lean.js +1 -0
- package/public/assets/classes_dropdown.md.CKZ2tv7T.js +70 -0
- package/public/assets/classes_dropdown.md.CKZ2tv7T.lean.js +1 -0
- package/public/assets/classes_grid.md.CKCvlWAg.js +45 -0
- package/public/assets/classes_grid.md.CKCvlWAg.lean.js +1 -0
- package/public/assets/classes_list.md.CjyB8PFK.js +36 -0
- package/public/assets/classes_list.md.CjyB8PFK.lean.js +1 -0
- package/public/assets/components_button.md.CX41PJBd.js +45 -0
- package/public/assets/components_button.md.CX41PJBd.lean.js +1 -0
- package/public/assets/components_dialog.md.JMjidrIE.js +76 -0
- package/public/assets/components_dialog.md.JMjidrIE.lean.js +1 -0
- package/public/assets/components_disclosure.md.BwvLkFL_.js +53 -0
- package/public/assets/components_disclosure.md.BwvLkFL_.lean.js +1 -0
- package/public/assets/components_form.md.C6B5z_6G.js +122 -0
- package/public/assets/components_form.md.C6B5z_6G.lean.js +1 -0
- package/public/assets/components_loading.md.51ktm2_l.js +4 -0
- package/public/assets/components_loading.md.51ktm2_l.lean.js +1 -0
- package/public/assets/components_popover.md.DpbAjVUj.js +102 -0
- package/public/assets/components_popover.md.DpbAjVUj.lean.js +1 -0
- package/public/assets/components_progress.md.H7v6t9h-.js +6 -0
- package/public/assets/components_progress.md.H7v6t9h-.lean.js +1 -0
- package/public/assets/components_table.md.BPrpvUDy.js +75 -0
- package/public/assets/components_table.md.BPrpvUDy.lean.js +1 -0
- package/public/assets/index.md.DNiLOsZD.js +1 -0
- package/public/assets/index.md.DNiLOsZD.lean.js +1 -0
- package/public/assets/inter-italic-cyrillic-ext._dlW9xFb.woff2 +0 -0
- package/public/assets/inter-italic-cyrillic.D7dRslh9.woff2 +0 -0
- package/public/assets/inter-italic-greek-ext.Ct-Tf2bq.woff2 +0 -0
- package/public/assets/inter-italic-greek.DNcpQ8QC.woff2 +0 -0
- package/public/assets/inter-italic-latin-ext.DytegdRQ.woff2 +0 -0
- package/public/assets/inter-italic-latin.COaG5lWR.woff2 +0 -0
- package/public/assets/inter-italic-vietnamese.BI5UxJD-.woff2 +0 -0
- package/public/assets/inter-roman-cyrillic-ext.BeNbU08G.woff2 +0 -0
- package/public/assets/inter-roman-cyrillic.CD0kT8R4.woff2 +0 -0
- package/public/assets/inter-roman-greek-ext.CFAEQ5Ow.woff2 +0 -0
- package/public/assets/inter-roman-greek.Dsf7YjP7.woff2 +0 -0
- package/public/assets/inter-roman-latin-ext.Dl_ayf4-.woff2 +0 -0
- package/public/assets/inter-roman-latin.Cy4MYw_J.woff2 +0 -0
- package/public/assets/inter-roman-vietnamese.CpqCnS2H.woff2 +0 -0
- package/public/assets/javascript_autofill.md.HyVx8c7W.js +49 -0
- package/public/assets/javascript_autofill.md.HyVx8c7W.lean.js +1 -0
- package/public/assets/javascript_check.md.BCbZtUBE.js +13 -0
- package/public/assets/javascript_check.md.BCbZtUBE.lean.js +1 -0
- package/public/assets/javascript_comfort.md.CQm191VA.js +20 -0
- package/public/assets/javascript_comfort.md.CQm191VA.lean.js +1 -0
- package/public/assets/javascript_consent.md.CbDzabMd.js +29 -0
- package/public/assets/javascript_consent.md.CbDzabMd.lean.js +1 -0
- package/public/assets/javascript_cookie.md.CFVe2JRe.js +2 -0
- package/public/assets/javascript_cookie.md.CFVe2JRe.lean.js +1 -0
- package/public/assets/javascript_drawer.md.D_pT0mrZ.js +32 -0
- package/public/assets/javascript_drawer.md.D_pT0mrZ.lean.js +1 -0
- package/public/assets/javascript_form.md.sGYh1L4I.js +40 -0
- package/public/assets/javascript_form.md.sGYh1L4I.lean.js +2 -0
- package/public/assets/javascript_scroll.md.DeOZ4grw.js +30 -0
- package/public/assets/javascript_scroll.md.DeOZ4grw.lean.js +1 -0
- package/public/assets/javascript_slider.md.CIa7pHr9.js +27 -0
- package/public/assets/javascript_slider.md.CIa7pHr9.lean.js +1 -0
- package/public/assets/javascript_sortable.md.CThHVTgW.js +35 -0
- package/public/assets/javascript_sortable.md.CThHVTgW.lean.js +1 -0
- package/public/assets/javascript_tabpanel.md.CxAFdAGU.js +19 -0
- package/public/assets/javascript_tabpanel.md.CxAFdAGU.lean.js +1 -0
- package/public/assets/javascript_toggle.md.C66hpUWF.js +46 -0
- package/public/assets/javascript_toggle.md.C66hpUWF.lean.js +1 -0
- package/public/assets/javascript_trap.md.Dt2Rt__e.js +2 -0
- package/public/assets/javascript_trap.md.Dt2Rt__e.lean.js +1 -0
- package/public/assets/javascript_tree.md.COR-Pj1y.js +72 -0
- package/public/assets/javascript_tree.md.COR-Pj1y.lean.js +1 -0
- package/public/assets/prologue_conventions.md.wCplqeKt.js +34 -0
- package/public/assets/prologue_conventions.md.wCplqeKt.lean.js +1 -0
- package/public/assets/prologue_release.md.CBJGKY_Y.js +1 -0
- package/public/assets/prologue_release.md.CBJGKY_Y.lean.js +1 -0
- package/public/assets/prologue_upgrade.md.E_0GNNE2.js +1 -0
- package/public/assets/prologue_upgrade.md.E_0GNNE2.lean.js +1 -0
- package/public/assets/start_customization.md.C4fmzVYD.js +141 -0
- package/public/assets/start_customization.md.C4fmzVYD.lean.js +1 -0
- package/public/assets/start_install.md.vqLh01mm.js +46 -0
- package/public/assets/start_install.md.vqLh01mm.lean.js +1 -0
- package/public/assets/start_mixin.md.B5VMlbiN.js +85 -0
- package/public/assets/start_mixin.md.B5VMlbiN.lean.js +1 -0
- package/public/assets/style.Dl6gCPEE.css +1 -0
- package/public/base/layout.html +37 -0
- package/public/base/media.html +179 -0
- package/public/base/reset.html +27 -0
- package/public/base/typography.html +320 -0
- package/public/bundles/vanilla-frontend-doc.css +1 -0
- package/public/bundles/vanilla-frontend-doc.js +1 -0
- package/public/bundles/vanilla-frontend.css +1 -0
- package/public/classes/badge.html +205 -0
- package/public/classes/breadcrumb.html +66 -0
- package/public/classes/card.html +222 -0
- package/public/classes/dropdown.html +147 -0
- package/public/classes/grid.html +278 -0
- package/public/classes/list.html +113 -0
- package/public/components/button.html +304 -0
- package/public/components/dialog.html +205 -0
- package/public/components/disclosure.html +130 -0
- package/public/components/form.html +589 -0
- package/public/components/loading.html +107 -0
- package/public/components/popover.html +257 -0
- package/public/components/progress.html +57 -0
- package/public/components/table.html +152 -0
- package/public/demo/demo.html +84 -0
- package/public/hashmap.json +1 -0
- package/public/index.html +25 -0
- package/public/javascript/autofill.html +152 -0
- package/public/javascript/check.html +64 -0
- package/public/javascript/comfort.html +123 -0
- package/public/javascript/consent.html +80 -0
- package/public/javascript/cookie.html +26 -0
- package/public/javascript/drawer.html +83 -0
- package/public/javascript/form.html +117 -0
- package/public/javascript/scroll.html +81 -0
- package/public/javascript/slider.html +78 -0
- package/public/javascript/sortable.html +112 -0
- package/public/javascript/tabpanel.html +70 -0
- package/public/javascript/toggle.html +201 -0
- package/public/javascript/trap.html +26 -0
- package/public/javascript/tree.html +175 -0
- package/public/prologue/conventions.html +58 -0
- package/public/prologue/release.html +25 -0
- package/public/prologue/upgrade.html +25 -0
- package/public/start/customization.html +165 -0
- package/public/start/install.html +70 -0
- package/public/start/mixin.html +109 -0
- package/public/vp-icons.css +0 -0
- package/sandbox/index.html +27 -0
- package/sandbox/js/sandbox-header.js +57 -0
- package/sandbox/js/sandbox-test.js +112 -0
- package/sandbox/pages/base/layout.html +80 -0
- package/sandbox/pages/base/media.html +52 -0
- package/sandbox/pages/base/typography.html +132 -0
- package/sandbox/pages/components/button.html +70 -0
- package/sandbox/pages/components/dialog.html +72 -0
- package/sandbox/pages/components/disclosure.html +77 -0
- package/sandbox/pages/components/form.html +164 -0
- package/sandbox/pages/components/loading.html +32 -0
- package/sandbox/pages/components/popover.html +119 -0
- package/sandbox/pages/components/progress.html +28 -0
- package/sandbox/pages/components/table.html +80 -0
- package/sandbox/pages/customs/badge.html +59 -0
- package/sandbox/pages/customs/breadcrumb.html +34 -0
- package/sandbox/pages/customs/card.html +71 -0
- package/sandbox/pages/customs/dropdown.html +70 -0
- package/sandbox/pages/customs/grid.html +109 -0
- package/sandbox/pages/customs/list.html +43 -0
- package/sandbox/pages/javascript/autofill.html +39 -0
- package/sandbox/pages/javascript/checkall.html +37 -0
- package/sandbox/pages/javascript/comfort.html +41 -0
- package/sandbox/pages/javascript/consent.html +45 -0
- package/sandbox/pages/javascript/form.html +51 -0
- package/sandbox/pages/javascript/scroll.html +44 -0
- package/sandbox/pages/javascript/slider.html +44 -0
- package/sandbox/pages/javascript/sortable.html +56 -0
- package/sandbox/pages/javascript/tabpanel.html +39 -0
- package/sandbox/pages/javascript/toggle.html +72 -0
- package/sandbox/pages/javascript/tree.html +96 -0
- package/sandbox/sandbox.js +26 -0
- package/sandbox/scss/sandbox-header.scss +93 -0
- package/scss/base/_layout.scss +1 -0
- package/scss/base/_reset.scss +5 -0
- package/scss/components/_badge.scss +2 -1
- package/scss/components/_dropdown.scss +2 -2
- package/scss/components/_group.scss +8 -4
- package/scss/components/_popover.scss +74 -0
- package/scss/components/index.scss +1 -0
- package/scss/vanilla-frontend-doc.scss +46 -1
- package/scss/vanilla-frontend-sandbox.scss +34 -0
- package/vite.config.js +30 -0
- package/docs/index.html +0 -36
- package/docs/main-demo.js +0 -2
- package/docs/main.js +0 -34
- package/docs/pages/base/layout.html +0 -131
- package/docs/pages/base/media.html +0 -142
- package/docs/pages/base/reset.html +0 -53
- package/docs/pages/base/typography.html +0 -334
- package/docs/pages/components/button.html +0 -202
- package/docs/pages/components/dialog.html +0 -336
- package/docs/pages/components/disclosure.html +0 -174
- package/docs/pages/components/form.html +0 -427
- package/docs/pages/components/loading.html +0 -58
- package/docs/pages/components/progress.html +0 -47
- package/docs/pages/components/table.html +0 -168
- package/docs/pages/customs/badge.html +0 -150
- package/docs/pages/customs/breadcrumb.html +0 -67
- package/docs/pages/customs/card.html +0 -185
- package/docs/pages/customs/drawer.html +0 -149
- package/docs/pages/customs/dropdown.html +0 -270
- package/docs/pages/customs/grid.html +0 -185
- package/docs/pages/customs/list.html +0 -112
- package/docs/pages/customs/slider.html +0 -273
- package/docs/pages/javascript/autofill.html +0 -170
- package/docs/pages/javascript/checkall.html +0 -59
- package/docs/pages/javascript/comfort.html +0 -146
- package/docs/pages/javascript/consent.html +0 -112
- package/docs/pages/javascript/cookie.html +0 -81
- package/docs/pages/javascript/form.html +0 -199
- package/docs/pages/javascript/scroll.html +0 -209
- package/docs/pages/javascript/sortable.html +0 -167
- package/docs/pages/javascript/tabpanel.html +0 -89
- package/docs/pages/javascript/toggle.html +0 -193
- package/docs/pages/javascript/trap.html +0 -89
- package/docs/pages/javascript/tree.html +0 -256
- package/docs/pages/quick-start/conventions.html +0 -112
- package/docs/pages/quick-start/customization.html +0 -187
- package/docs/pages/quick-start/installation.html +0 -97
- package/docs/pages/quick-start/mixins.html +0 -214
- package/docs/src/js/demo.js +0 -110
- package/docs/src/js/doc-code.js +0 -102
- package/docs/src/js/doc-demo.js +0 -14
- package/docs/src/js/doc-layout.js +0 -117
- package/docs/src/scss/demo.scss +0 -77
- package/docs/src/scss/layout.scss +0 -83
- package/docs/src/scss/style.scss +0 -278
- package/docs/vite.config.mjs +0 -23
- package/esbuild.mjs +0 -25
- package/natachah-vanilla-frontend-0.4.1.tgz +0 -0
- package/vitest.config.js +0 -8
package/.gitlab-ci.yml
CHANGED
|
@@ -15,23 +15,19 @@ unit-test-job:
|
|
|
15
15
|
stage: test
|
|
16
16
|
rules:
|
|
17
17
|
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
|
|
18
|
+
- if: $CI_COMMIT_BRANCH =~ /^hotfix\//
|
|
18
19
|
script:
|
|
19
20
|
- npm test
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
create-docs-job:
|
|
22
23
|
stage: build
|
|
23
24
|
script:
|
|
25
|
+
- npm run assets:build
|
|
26
|
+
- echo "The assets has been generated in docs/public/bundles"
|
|
24
27
|
- npm run docs:build
|
|
25
|
-
- echo "
|
|
26
|
-
- ls -R docs/dist
|
|
27
|
-
- rm -rf public
|
|
28
|
-
- mkdir public
|
|
29
|
-
- cp -a docs/dist/* public/
|
|
30
|
-
- echo "Fichiers dans le répertoire public :"
|
|
31
|
-
- ls -R public
|
|
28
|
+
- echo "Vitepress doc has been generated !"
|
|
32
29
|
artifacts:
|
|
33
30
|
paths:
|
|
34
|
-
# The folder that contains the files to be exposed at the Page URL
|
|
35
31
|
- public
|
|
36
32
|
rules:
|
|
37
33
|
- if: $CI_COMMIT_REF_NAME == "production"
|
|
@@ -41,13 +37,26 @@ publish-job:
|
|
|
41
37
|
environment: production
|
|
42
38
|
rules:
|
|
43
39
|
- if: $CI_COMMIT_REF_NAME == "production"
|
|
40
|
+
- if: $CI_COMMIT_REF_NAME =~ /^support\//
|
|
44
41
|
id_tokens:
|
|
45
42
|
NPM_ID_TOKEN:
|
|
46
43
|
aud: "npm:registry.npmjs.org"
|
|
47
44
|
SIGSTORE_ID_TOKEN:
|
|
48
45
|
aud: sigstore
|
|
49
46
|
script:
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
- |
|
|
48
|
+
# 1. Lire la version réelle dans le package.json
|
|
49
|
+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
|
50
|
+
|
|
51
|
+
# 2. Déterminer le tag NPM
|
|
52
|
+
if [ "$CI_COMMIT_REF_NAME" == "production" ]; then
|
|
53
|
+
EXPORT_TAG="latest"
|
|
54
|
+
else
|
|
55
|
+
EXPORT_TAG="$PACKAGE_VERSION"
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
echo "Publication to NPMJS with the tag: $EXPORT_TAG"
|
|
59
|
+
|
|
60
|
+
# 2. Publication
|
|
61
|
+
npm pack
|
|
62
|
+
npm publish --access public --tag $EXPORT_TAG
|
package/LICENSE.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Copyright (c)
|
|
1
|
+
Copyright (c) 2026 Natacha Herth
|
|
2
2
|
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
4
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { defineConfig } from 'vitepress'
|
|
2
|
+
|
|
3
|
+
// https://vitepress.dev/reference/site-config
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
outDir: '../public',
|
|
6
|
+
title: "Vanilla Frontend",
|
|
7
|
+
description: "Documentation of my package",
|
|
8
|
+
themeConfig: {
|
|
9
|
+
// https://vitepress.dev/reference/default-theme-config
|
|
10
|
+
nav: [
|
|
11
|
+
{ text: 'Home', link: '/' },
|
|
12
|
+
],
|
|
13
|
+
|
|
14
|
+
sidebar: [
|
|
15
|
+
{
|
|
16
|
+
text: 'Prologue',
|
|
17
|
+
items: [
|
|
18
|
+
{ text: 'Release Notes', link: '/prologue/release' },
|
|
19
|
+
{ text: 'Upgrade guide', link: '/prologue/upgrade' },
|
|
20
|
+
{ text: 'Conventions', link: '/prologue/conventions' },
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
text: 'Quick start',
|
|
25
|
+
items: [
|
|
26
|
+
{ text: 'Install', link: '/start/install' },
|
|
27
|
+
{ text: 'Customization', link: '/start/customization' },
|
|
28
|
+
{ text: 'SCSS mixin', link: '/start/mixin' },
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
text: 'Base',
|
|
33
|
+
items: [
|
|
34
|
+
{ text: 'Reset', link: '/base/reset' },
|
|
35
|
+
{ text: 'Layout', link: '/base/layout' },
|
|
36
|
+
{ text: 'Typography', link: '/base/typography' },
|
|
37
|
+
{ text: 'Media', link: '/base/media' },
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
text: 'Components',
|
|
42
|
+
items: [
|
|
43
|
+
{ text: 'Button', link: '/components/button' },
|
|
44
|
+
{ text: 'Dialog', link: '/components/dialog' },
|
|
45
|
+
{ text: 'Disclosure', link: '/components/disclosure' },
|
|
46
|
+
{ text: 'Form', link: '/components/form' },
|
|
47
|
+
{ text: 'Loading', link: '/components/loading' },
|
|
48
|
+
{ text: 'Popover', link: '/components/popover' },
|
|
49
|
+
{ text: 'Progress', link: '/components/progress' },
|
|
50
|
+
{ text: 'Table', link: '/components/table' },
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
{
|
|
55
|
+
text: 'Class components',
|
|
56
|
+
items: [
|
|
57
|
+
{ text: 'Badge', link: '/classes/badge' },
|
|
58
|
+
{ text: 'Breadcrumb', link: '/classes/breadcrumb' },
|
|
59
|
+
{ text: 'Card', link: '/classes/card' },
|
|
60
|
+
{ text: 'Dropdown', link: '/classes/dropdown' },
|
|
61
|
+
{ text: 'Grid', link: '/classes/grid' },
|
|
62
|
+
{ text: 'List', link: '/classes/list' },
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
text: 'Javascript',
|
|
67
|
+
items: [
|
|
68
|
+
{ text: 'Autofill', link: '/javascript/autofill' },
|
|
69
|
+
{ text: 'Check all', link: '/javascript/check' },
|
|
70
|
+
{ text: 'Comfort', link: '/javascript/comfort' },
|
|
71
|
+
{ text: 'Consent', link: '/javascript/consent' },
|
|
72
|
+
{ text: 'Cookie', link: '/javascript/cookie' },
|
|
73
|
+
{ text: 'Drawer', link: '/javascript/drawer' },
|
|
74
|
+
{ text: 'Form helper', link: '/javascript/form' },
|
|
75
|
+
{ text: 'Scroll', link: '/javascript/scroll' },
|
|
76
|
+
{ text: 'Slider', link: '/javascript/slider' },
|
|
77
|
+
{ text: 'Sortable', link: '/javascript/sortable' },
|
|
78
|
+
{ text: 'Tabpanel', link: '/javascript/tabpanel' },
|
|
79
|
+
{ text: 'Toggle', link: '/javascript/toggle' },
|
|
80
|
+
{ text: 'Trap', link: '/javascript/trap' },
|
|
81
|
+
{ text: 'Tree', link: '/javascript/tree' },
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
|
|
86
|
+
footer: {
|
|
87
|
+
message: 'Released under the MIT License.',
|
|
88
|
+
copyright: 'Copyright © 2024-present <a href="https://natachaherth.ch">Natacha Herth</a>'
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
socialLinks: [
|
|
92
|
+
{
|
|
93
|
+
icon: {
|
|
94
|
+
svg: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-gitlab" viewBox="0 0 16 16"><path d="m15.734 6.1-.022-.058L13.534.358a.57.57 0 0 0-.563-.356.6.6 0 0 0-.328.122.6.6 0 0 0-.193.294l-1.47 4.499H5.025l-1.47-4.5A.572.572 0 0 0 2.47.358L.289 6.04l-.022.057A4.044 4.044 0 0 0 1.61 10.77l.007.006.02.014 3.318 2.485 1.64 1.242 1 .755a.67.67 0 0 0 .814 0l1-.755 1.64-1.242 3.338-2.5.009-.007a4.05 4.05 0 0 0 1.34-4.668Z" /></svg>'
|
|
95
|
+
},
|
|
96
|
+
link: 'https://gitlab.com/packages4913705/vanilla-frontend',
|
|
97
|
+
ariaLabel: 'Gitlab'
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
}
|
|
101
|
+
})
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Layout
|
|
2
|
+
|
|
3
|
+
The framework uses a CSS grid to create the default page layout on the body. It features default CSS variables that you can customize, such as the maximum content width, which is set at **1280px**. Since it uses a grid, it includes gaps and columns.
|
|
4
|
+
|
|
5
|
+
Also, the grid template as two content zone available as **full** and **content** that you can use as you wish.
|
|
6
|
+
|
|
7
|
+
But as every website can be different, these value can be changed !
|
|
8
|
+
|
|
9
|
+
```scss
|
|
10
|
+
@use '@natachah/vanilla-frontend/scss/base/layout'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Device Breakpoint Viewport
|
|
14
|
+
|
|
15
|
+
| Device | Breakpoint | Columns | Max-width |
|
|
16
|
+
| ------ | ---------- | ------- | -------- |
|
|
17
|
+
| Mobile | < 720px | 1 | 100% |
|
|
18
|
+
| Tablet | < 1024px | 6 | 100% |
|
|
19
|
+
| Laptop | < 1440px | 12 | 1280px |
|
|
20
|
+
| Desktop | > 1440px | 12 | 1280px |
|
|
21
|
+
|
|
22
|
+
::: code-group
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<body data-preload>
|
|
26
|
+
<header></header>
|
|
27
|
+
<main></main>
|
|
28
|
+
<footer></footer>
|
|
29
|
+
</body>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```scss
|
|
33
|
+
@use '@natachah/vanilla-frontend/scss/base/layout';
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```css [css properties]
|
|
37
|
+
--layout-width
|
|
38
|
+
--layout-gap-block
|
|
39
|
+
--layout-gap-inline
|
|
40
|
+
--layout-columns
|
|
41
|
+
--subgrid-gap-block
|
|
42
|
+
--subgrid-gap-inline
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
:::
|
|
46
|
+
|
|
47
|
+
::: tip
|
|
48
|
+
The `--subgrid-gap-*` are used for the direct child as `<header>`, `<main>` and `<footer>`. It set by default the gap block at **0** and take the layout inline gap.
|
|
49
|
+
:::
|
|
50
|
+
|
|
51
|
+
## Container
|
|
52
|
+
|
|
53
|
+
The default layout include a `.container` and a `.container-full`.
|
|
54
|
+
|
|
55
|
+
The classic container is centered into the page layout and the full container take the full length of the page.
|
|
56
|
+
It's perfect if you need to set a background color to a section.
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<section class="container"></section>
|
|
60
|
+
<section class="container-full"></section>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Subgrid
|
|
64
|
+
|
|
65
|
+
You can re-use the layout grid into a container with the class `.subgrid`. Then you can use the grid-column CSS property to manage the space.
|
|
66
|
+
|
|
67
|
+
::: code-group
|
|
68
|
+
|
|
69
|
+
```html
|
|
70
|
+
<section class="container subgrid"></section>
|
|
71
|
+
<section class="container-full subgrid"></section>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```css [css properties]
|
|
75
|
+
--subgrid-gap-block
|
|
76
|
+
--subgrid-gap-inline
|
|
77
|
+
```
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import ComponentPreview from '../vuejs/ComponentPreview.vue'
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
# Media
|
|
6
|
+
|
|
7
|
+
To implement clean images, videos and audio.
|
|
8
|
+
|
|
9
|
+
```scss
|
|
10
|
+
@use '@natachah/vanilla-frontend/scss/base/media'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Image
|
|
14
|
+
|
|
15
|
+
The image is using the native `<img>` tag with the attributes `srcset`, `alt` and `title`.
|
|
16
|
+
|
|
17
|
+
<ComponentPreview>
|
|
18
|
+
<img src="https://picsum.photos/400/330" srcset="https://picsum.photos/800/660 2x" alt="A random image from lorem picsum" title="This is my picture">
|
|
19
|
+
</ComponentPreview>
|
|
20
|
+
|
|
21
|
+
::: code-group
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<img src="https://picsum.photos/400/330" srcset="https://picsum.photos/800/660 2x" alt="A random image from lorem picsum" title="This is my picture">
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```css [css properties]
|
|
28
|
+
--image-width
|
|
29
|
+
--image-height
|
|
30
|
+
--image-fit
|
|
31
|
+
--image-position
|
|
32
|
+
--image-ratio
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
:::
|
|
36
|
+
|
|
37
|
+
### Picture
|
|
38
|
+
|
|
39
|
+
For responsive and best practice, it's better to use the `<picture>` tag with inside the `<source>` and `<img>` tags.
|
|
40
|
+
|
|
41
|
+
<ComponentPreview>
|
|
42
|
+
<picture>
|
|
43
|
+
<source media="(max-width:576px)" srcset="https://picsum.photos/id/237/200, https://picsum.photos/id/237/400 2x">
|
|
44
|
+
<source media="(max-width:768px)" srcset="https://picsum.photos/id/237/400, https://picsum.photos/id/237/800 2x">
|
|
45
|
+
<source media="(max-width:992px)" srcset="https://picsum.photos/id/237/800, https://picsum.photos/id/237/1600 2x">
|
|
46
|
+
<img src="https://picsum.photos/id/237/200" srcset="https://https://picsum.photos/id/237/400 2x" alt="A random image from lorem picsum" title="This is my picture">
|
|
47
|
+
</picture>
|
|
48
|
+
</ComponentPreview>
|
|
49
|
+
|
|
50
|
+
```html
|
|
51
|
+
<picture>
|
|
52
|
+
<source media="(max-width:576px)" srcset="https://picsum.photos/id/237/200, https://picsum.photos/id/237/400 2x">
|
|
53
|
+
<source media="(max-width:768px)" srcset="https://picsum.photos/id/237/400, https://picsum.photos/id/237/800 2x">
|
|
54
|
+
<source media="(max-width:992px)" srcset="https://picsum.photos/id/237/800, https://picsum.photos/id/237/1600 2x">
|
|
55
|
+
<img src="https://picsum.photos/id/237/200" srcset="https://https://picsum.photos/id/237/400 2x" alt="A random image from lorem picsum" title="This is my picture">
|
|
56
|
+
</picture>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Figure
|
|
60
|
+
|
|
61
|
+
You also can use `<figure>` and `<figcaption>` tags, to display an `<img>` with a nice caption.
|
|
62
|
+
|
|
63
|
+
<ComponentPreview>
|
|
64
|
+
<figure>
|
|
65
|
+
<img src="https://picsum.photos/id/320/400/330" srcset="https://picsum.photos/id/320/800/660 2x" alt="My random image from lorem picsum">
|
|
66
|
+
<figcaption>My image from lorem picsum</figcaption>
|
|
67
|
+
</figure>
|
|
68
|
+
</ComponentPreview>
|
|
69
|
+
|
|
70
|
+
::: tip
|
|
71
|
+
You can also combine `<figure>` with a `<picture>` tag.
|
|
72
|
+
:::
|
|
73
|
+
|
|
74
|
+
::: code-group
|
|
75
|
+
|
|
76
|
+
```html
|
|
77
|
+
<figure>
|
|
78
|
+
<img src="https://picsum.photos/id/320/400/330" srcset="https://picsum.photos/id/320/800/660 2x" alt="My random image from lorem picsum">
|
|
79
|
+
<figcaption>My image from lorem picsum</figcaption>
|
|
80
|
+
</figure>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
```css [css properties]
|
|
84
|
+
--caption-color
|
|
85
|
+
--caption-font-size
|
|
86
|
+
--caption-margin-block
|
|
87
|
+
--caption-margin-inline
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
:::
|
|
91
|
+
|
|
92
|
+
## Video
|
|
93
|
+
|
|
94
|
+
Use the default `<video>` and `<source>` tags.
|
|
95
|
+
|
|
96
|
+
By default the video take 100% width and have a ratio of 16:9.
|
|
97
|
+
|
|
98
|
+
<ComponentPreview>
|
|
99
|
+
<video width="320" height="240" controls>
|
|
100
|
+
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
|
|
101
|
+
</video>
|
|
102
|
+
</ComponentPreview>
|
|
103
|
+
|
|
104
|
+
::: code-group
|
|
105
|
+
|
|
106
|
+
```html
|
|
107
|
+
<video width="320" height="240" controls>
|
|
108
|
+
<source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" type="video/mp4">
|
|
109
|
+
</video>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
```css [css properties]
|
|
113
|
+
--video-width
|
|
114
|
+
--video-height
|
|
115
|
+
--video-fit
|
|
116
|
+
--video-position
|
|
117
|
+
--video-ratio
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
:::
|
|
121
|
+
|
|
122
|
+
## Audio
|
|
123
|
+
|
|
124
|
+
Use the default `<audio>` and `<source>` tags.
|
|
125
|
+
|
|
126
|
+
By default the audio take 100% width.
|
|
127
|
+
|
|
128
|
+
<ComponentPreview>
|
|
129
|
+
<audio controls>
|
|
130
|
+
<source src="http://localhost:5173/public/audio.mp3" type="audio/mpeg">
|
|
131
|
+
</audio>
|
|
132
|
+
</ComponentPreview>
|
|
133
|
+
|
|
134
|
+
::: code-group
|
|
135
|
+
|
|
136
|
+
```html
|
|
137
|
+
<audio controls>
|
|
138
|
+
<source src="http://localhost:5173/public/audio.mp3" type="audio/mpeg">
|
|
139
|
+
</audio>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
```css [css properties]
|
|
143
|
+
--audio-width
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
:::
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Reset
|
|
2
|
+
|
|
3
|
+
The framework include a simple **reboot** to makes browsers render all elements more consistently and in line with modern standards.
|
|
4
|
+
|
|
5
|
+
- Unset all default style *(except display)*
|
|
6
|
+
- Change box-sizing to `border-box` on all element
|
|
7
|
+
- Render media as block with a default 100% width
|
|
8
|
+
- Change the `overflow-wrap` for text
|
|
9
|
+
- Set default size and align for `<svg>`
|
|
10
|
+
- Set `<table>` default width
|
|
11
|
+
- Set default cursor for `draggable`
|
|
12
|
+
- Set default cursor and animation for tree
|
|
13
|
+
- Enable `scroll-behavior` if `prefers-reduced-motion` is not set
|
|
14
|
+
- Set default `<body>` setting + `inert` mode for `<dialog>`
|
|
15
|
+
- Set functionalities on `<body>` for `inert` and `data-preload` attributes
|
|
16
|
+
|
|
17
|
+
To use it, import this file:
|
|
18
|
+
|
|
19
|
+
```scss
|
|
20
|
+
@use '@natachah/vanilla-frontend/scss/base/reset';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Preload
|
|
24
|
+
|
|
25
|
+
If you need to disabled the CSS animation on first load of the page add the data attribute `data-preload` on the `<body>`.
|
|
26
|
+
|
|
27
|
+
And then add this script that will remove the attribute after a timeout:
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
setTimeout(() => {
|
|
31
|
+
document.body.removeAttribute('data-preload')
|
|
32
|
+
}, 10)
|
|
33
|
+
```
|