diff --git a/front/ui-docs/.vitepress/config.ts b/front/ui-docs/.vitepress/config.ts index c3aebf843..4fd49d97d 100644 --- a/front/ui-docs/.vitepress/config.ts +++ b/front/ui-docs/.vitepress/config.ts @@ -22,8 +22,10 @@ export default defineConfig({ { text: 'Alert', link: '/components/ui/alert' }, { text: 'Card', link: '/components/ui/card' }, { - text: 'Content Navigation', + text: 'Navigation', + link: '/navigation', items: [ + { text: 'Link', link: 'components/ui/link' }, { text: 'Pagination', link: '/components/ui/pagination' }, { text: 'Table of Contents', link: '/components/ui/toc' }, { text: 'Tabs', link: '/components/ui/tabs' }, @@ -57,11 +59,14 @@ export default defineConfig({ { text: "Using `columns`", link: "/components/ui/layout/columns" }, ] }, - { text: 'Link', link: 'components/ui/link' }, { text: 'Loader', link: '/components/ui/loader' }, { text: 'Modal', link: '/components/ui/modal' }, - { text: 'Pill', link: '/components/ui/pill' }, - { text: 'List of pills', link: '/components/ui/pills' }, + { text: 'Pill', + link: '/components/ui/pill', + items: [ + { text: 'List of pills', link: '/components/ui/pills' } + ] + }, ], }, ], diff --git a/front/ui-docs/.vitepress/theme/Theme.vue b/front/ui-docs/.vitepress/theme/Theme.vue index 263960be7..fa076239f 100644 --- a/front/ui-docs/.vitepress/theme/Theme.vue +++ b/front/ui-docs/.vitepress/theme/Theme.vue @@ -16,6 +16,14 @@ const { Theme } = DefaultTheme } .Layout { + --vp-c-text-1: color-mix(in oklab, light-dark(var(--fw-gray-970), var(--fw-beige-100)) 100%, transparent); + --vp-c-text-2: color-mix(in oklab, light-dark(var(--fw-gray-970), var(--fw-beige-100)) 60%, transparent); + + --vp-c-bg: color-mix(in oklab, light-dark(white, var(--fw-gray-950)) 50%, transparent); + --vp-c-bg-soft: color-mix(in oklab, light-dark(var(--fw-beige-300), var(--fw-gray-970)) 50%, transparent); + + --vp-c-gutter: light-dark(transparent, var(--fw-gray-970)); + --vp-local-nav-bg-color: light-dark(transparent, var(--fw-gray-970)); --vp-code-block-bg: light-dark(var(--fw-beige-200), var(--fw-gray-900)); --vp-c-bg-alt: light-dark(var(--fw-beige-300), var(--fw-gray-850)); --vp-c-divider: light-dark(var(--fw-beige-300), var(--fw-gray-850)); @@ -30,10 +38,20 @@ const { Theme } = DefaultTheme font-size: 14px; } +.vp-doc div[class*="language-"]:has(+h1){ + width: min-content; + float: right; + margin: -4px -32px -4px -4px; + background: transparent; + &>pre { + padding-right: 32px; + } +} + .language-template:has(~.preview){ - flex-grow:1; - &~.preview{ - flex-grow:0; + flex-grow: 1; + &~.preview { + flex-grow: 0; } } diff --git a/front/ui-docs/designing-pages.md b/front/ui-docs/designing-pages.md index ffd98850f..bb49e813c 100644 --- a/front/ui-docs/designing-pages.md +++ b/front/ui-docs/designing-pages.md @@ -24,18 +24,27 @@ The page grid consists of 46px wide tracks, separated by 32px wide gaps. [See ex Use the [Layout Section component](/components/ui/layout/section) to structure the page into separate sections, each with a heading. Make sure the heading level hierarchy makes sense. +```vue-html +
+ + + +
+``` + + +
-Sections and their contentsare automatically aligned to the default grid. +Sections and their contents are automatically aligned to the default grid. -## Navigation +--- -When most of the screen changes, users perceive it as a page navigation. They will expect the "back" button to bring them to the precious screen. In addition, they may expect the URL to contain the current page for sharing. - -This makes a component a "page". In this sense, modals are pages. - -Not everything we want to share with the Url replaces most of the screen. What about switching a filter? + diff --git a/front/ui-docs/index.md b/front/ui-docs/index.md index 1dcaf141c..43707d287 100644 --- a/front/ui-docs/index.md +++ b/front/ui-docs/index.md @@ -26,24 +26,24 @@ Check out the design system on our Penpot. - - - - diff --git a/front/ui-docs/navigation.md b/front/ui-docs/navigation.md new file mode 100644 index 000000000..8001a4dba --- /dev/null +++ b/front/ui-docs/navigation.md @@ -0,0 +1,27 @@ + + +# Navigation + +When most of the screen changes, users perceive it as a page navigation. They will expect the "back" button to bring them to the precious screen. In addition, they may expect the URL to contain the current page for sharing. + +This makes a component a "page". In this sense, modals are pages. + +Not everything we want to share with the Url replaces most of the screen. What about switching a filter?