Skip to content

Commit

Permalink
fix(docs): 🐛 ReferenceError: document is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
luthfimasruri committed Jul 16, 2022
1 parent 94acc2b commit 0d2f8ac
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 101 deletions.
63 changes: 63 additions & 0 deletions docs/content/.vitepress/theme/components/Loading.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<script setup lang="ts"></script>

<template>
<div class="loading">
<span>L</span>
<span>o</span>
<span>a</span>
<span>d</span>
<span>i</span>
<span>n</span>
<span>g</span>
<span>.</span>
<span>.</span>
<span>.</span>
</div>
</template>

<style scoped>
.loading {
text-align: left;
}
.loading span {
display: inline-block;
padding-right: 0.1em;
margin: 0 -0.075em;
animation: loading 0.7s infinite alternate;
}
.loading span:nth-child(2) {
animation-delay: 0.1s;
}
.loading span:nth-child(3) {
animation-delay: 0.2s;
}
.loading span:nth-child(4) {
animation-delay: 0.3s;
}
.loading span:nth-child(5) {
animation-delay: 0.4s;
}
.loading span:nth-child(6) {
animation-delay: 0.5s;
}
.loading span:nth-child(7) {
animation-delay: 0.6s;
}
.loading span:nth-child(8) {
animation-delay: 0.7s;
}
.loading span:nth-child(9) {
animation-delay: 0.8s;
}
.loading span:nth-child(10) {
animation-delay: 0.9s;
}
@keyframes loading {
0% {
transform: scale(1);
}
100% {
transform: scale(0.8);
}
}
</style>
17 changes: 11 additions & 6 deletions docs/content/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import { h } from 'vue'
import { h, defineAsyncComponent } from 'vue'
import Theme from 'vitepress/theme'
import HomeDemo from './components/HomeDemo.vue'
import Loading from './components/Loading.vue'

import './styles/tailwind.css'
import './styles/vars.css'

const QuillEditor = defineAsyncComponent({
loader: () =>
import('@vueup/vue-quill').then((VueQuill) => VueQuill.QuillEditor),
loadingComponent: Loading,
})

import { QuillEditor } from '@vueup/vue-quill'
import '@vueup/vue-quill/dist/vue-quill.core.css' // import styles
import '@vueup/vue-quill/dist/vue-quill.bubble.css' // for bubble theme
import '@vueup/vue-quill/dist/vue-quill.snow.css' // for snow theme

import './styles/tailwind.css'
import './styles/vars.css'
// import './styles/custom.css'

export default {
enhanceApp({ app, router, siteData }) {
// app is the Vue 3 app instance from `createApp()`. router is VitePress'
Expand Down
60 changes: 0 additions & 60 deletions docs/content/.vitepress/theme/styles/base.css

This file was deleted.

35 changes: 0 additions & 35 deletions docs/content/.vitepress/theme/styles/custom.css

This file was deleted.

0 comments on commit 0d2f8ac

Please sign in to comment.