-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docs): fix theme switch on SSG (#3435)
* fix(docs): fix theme switch on SSg * chore: update CI commands * chore: remove gradient from loading docs * chore: remove build:analysis script from start:ci * chore: fix jumping header banner * fix(docs): missing page urls, added 404 page --------- Co-authored-by: Yauheni Prakopchyk <[email protected]>
- Loading branch information
Showing
18 changed files
with
89 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<template> | ||
<div class="docs-layout"> | ||
<div class="docs-layout" :key="currentPresetName + isMounted"> | ||
<div v-if="!isMounted" class="docs-layout__loader" /> | ||
<div | ||
ref="header" | ||
class="docs-layout__header" | ||
|
@@ -31,16 +32,14 @@ | |
<script setup lang="ts"> | ||
import { useColors } from 'vuestic-ui' | ||
import { useDocsScroll } from '../composables/useDocsScroll'; | ||
import { useIsMounted } from 'vuestic-ui/src/composables/useIsMounted' | ||
const cookie = useCookie('vuestic-theme') | ||
const { applyPreset } = useColors() | ||
const { currentPresetName } = useColors() | ||
const breakpoints = useBreakpoint() | ||
const isSidebarVisible = ref(!breakpoints.smDown) | ||
const isOptionsVisible = ref(false) | ||
applyPreset(cookie.value || 'light') | ||
watch(() => breakpoints.smDown, (newValue, oldValue) => { | ||
if (newValue && !oldValue) { | ||
isSidebarVisible.value = false | ||
|
@@ -75,6 +74,8 @@ useHead({ | |
{ src: 'https://unpkg.com/[email protected]/dist/ionicons/ionicons.esm.js', type: 'module' }, | ||
], | ||
}) | ||
const isMounted = useIsMounted() | ||
</script> | ||
|
||
<style lang="scss"> | ||
|
@@ -97,6 +98,16 @@ html { | |
overflow: hidden; | ||
font-family: var(--va-font-family); | ||
&__loader { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
z-index: 9999999; | ||
background: var(--va-background-primary); | ||
} | ||
&__header { | ||
width: 100%; | ||
background: var(--va-white); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<template> | ||
<div> | ||
<h1 class="text-center pa-4 py-8">Page not found</h1> | ||
|
||
<div class="text-center gap-2 flex justify-center"> | ||
<va-button | ||
color="#1f2328" | ||
to="https://github.com/epicmaxco/vuestic-ui/issues/new?assignees=&labels=docs&projects=&template=docs-template.md" | ||
> | ||
Make a Github Issue | ||
</va-button> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters