fix(theme): fix theme without fonts emitting inter (#2588)

pull/2589/head
Divyansh Singh 1 year ago committed by GitHub
parent 9fee5542cb
commit 71eb11f72e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,6 +1,5 @@
<script setup lang="ts"> <script setup lang="ts">
import { useRoute } from 'vitepress' import { useRoute } from 'vitepress'
import { useSidebar } from 'vitepress/theme'
import { computed, provide, useSlots, watch } from 'vue' import { computed, provide, useSlots, watch } from 'vue'
import VPBackdrop from './components/VPBackdrop.vue' import VPBackdrop from './components/VPBackdrop.vue'
import VPContent from './components/VPContent.vue' import VPContent from './components/VPContent.vue'
@ -10,7 +9,7 @@ import VPNav from './components/VPNav.vue'
import VPSidebar from './components/VPSidebar.vue' import VPSidebar from './components/VPSidebar.vue'
import VPSkipLink from './components/VPSkipLink.vue' import VPSkipLink from './components/VPSkipLink.vue'
import { useData } from './composables/data' import { useData } from './composables/data'
import { useCloseSidebarOnEscape } from './composables/sidebar' import { useCloseSidebarOnEscape, useSidebar } from './composables/sidebar'
const { const {
isOpen: isSidebarOpen, isOpen: isSidebarOpen,

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { useSidebar } from 'vitepress/theme'
import NotFound from '../NotFound.vue' import NotFound from '../NotFound.vue'
import { useData } from '../composables/data' import { useData } from '../composables/data'
import { useSidebar } from '../composables/sidebar'
import VPDoc from './VPDoc.vue' import VPDoc from './VPDoc.vue'
import VPHome from './VPHome.vue' import VPHome from './VPHome.vue'
import VPPage from './VPPage.vue' import VPPage from './VPPage.vue'

@ -1,8 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { useRoute } from 'vitepress' import { useRoute } from 'vitepress'
import { useSidebar } from 'vitepress/theme'
import { computed } from 'vue' import { computed } from 'vue'
import { useData } from '../composables/data' import { useData } from '../composables/data'
import { useSidebar } from '../composables/sidebar'
import VPDocAside from './VPDocAside.vue' import VPDocAside from './VPDocAside.vue'
import VPDocFooter from './VPDocFooter.vue' import VPDocFooter from './VPDocFooter.vue'
import VPDocOutlineDropdown from './VPDocOutlineDropdown.vue' import VPDocOutlineDropdown from './VPDocOutlineDropdown.vue'

@ -1,6 +1,6 @@
<script setup lang="ts"> <script setup lang="ts">
import { useSidebar } from 'vitepress/theme'
import { useData } from '../composables/data' import { useData } from '../composables/data'
import { useSidebar } from '../composables/sidebar'
const { theme } = useData() const { theme } = useData()
const { hasSidebar } = useSidebar() const { hasSidebar } = useSidebar()

@ -1,9 +1,9 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useWindowScroll } from '@vueuse/core' import { useWindowScroll } from '@vueuse/core'
import { onContentUpdated } from 'vitepress' import { onContentUpdated } from 'vitepress'
import { useSidebar } from 'vitepress/theme'
import { computed, shallowRef } from 'vue' import { computed, shallowRef } from 'vue'
import { useData } from '../composables/data' import { useData } from '../composables/data'
import { useSidebar } from '../composables/sidebar'
import { getHeaders, type MenuItem } from '../composables/outline' import { getHeaders, type MenuItem } from '../composables/outline'
import VPLocalNavOutlineDropdown from './VPLocalNavOutlineDropdown.vue' import VPLocalNavOutlineDropdown from './VPLocalNavOutlineDropdown.vue'
import VPIconAlignLeft from './icons/VPIconAlignLeft.vue' import VPIconAlignLeft from './icons/VPIconAlignLeft.vue'

@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { useWindowScroll } from '@vueuse/core' import { useWindowScroll } from '@vueuse/core'
import { useSidebar } from 'vitepress/theme'
import { computed } from 'vue' import { computed } from 'vue'
import { useSidebar } from '../composables/sidebar'
import VPNavBarAppearance from './VPNavBarAppearance.vue' import VPNavBarAppearance from './VPNavBarAppearance.vue'
import VPNavBarExtra from './VPNavBarExtra.vue' import VPNavBarExtra from './VPNavBarExtra.vue'
import VPNavBarHamburger from './VPNavBarHamburger.vue' import VPNavBarHamburger from './VPNavBarHamburger.vue'

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { useSidebar } from 'vitepress/theme'
import { useData } from '../composables/data' import { useData } from '../composables/data'
import { useLangs } from '../composables/langs' import { useLangs } from '../composables/langs'
import { useSidebar } from '../composables/sidebar'
import { normalizeLink } from '../support/utils' import { normalizeLink } from '../support/utils'
import VPImage from './VPImage.vue' import VPImage from './VPImage.vue'

@ -1,7 +1,7 @@
<script lang="ts" setup> <script lang="ts" setup>
import { clearAllBodyScrollLocks, disableBodyScroll } from 'body-scroll-lock' import { clearAllBodyScrollLocks, disableBodyScroll } from 'body-scroll-lock'
import { useSidebar } from 'vitepress/theme'
import { ref, watchPostEffect } from 'vue' import { ref, watchPostEffect } from 'vue'
import { useSidebar } from '../composables/sidebar'
import VPSidebarItem from './VPSidebarItem.vue' import VPSidebarItem from './VPSidebarItem.vue'
const { sidebarGroups, hasSidebar } = useSidebar() const { sidebarGroups, hasSidebar } = useSidebar()

@ -1,6 +1,6 @@
import { useMediaQuery } from '@vueuse/core' import { useMediaQuery } from '@vueuse/core'
import { useSidebar } from 'vitepress/theme'
import { computed } from 'vue' import { computed } from 'vue'
import { useSidebar } from './sidebar'
export function useAside() { export function useAside() {
const { hasSidebar } = useSidebar() const { hasSidebar } = useSidebar()

Loading…
Cancel
Save