Add loading indicator

This commit is contained in:
Andrew Illarionov 2024-06-20 00:33:16 +03:00
parent 7a3cdcc1da
commit 673948bce9
3 changed files with 37 additions and 36 deletions

View File

@ -31,6 +31,7 @@ useHead({
<LazySwipeControls v-if="!reader" class="block sm:hidden" /> <LazySwipeControls v-if="!reader" class="block sm:hidden" />
</ClientOnly> </ClientOnly>
<NuxtLoadingIndicator />
<NuxtLayout name="card"> <NuxtLayout name="card">
<template #footer> <template #footer>
<footer <footer

View File

@ -31,14 +31,13 @@ export default defineNuxtConfig({
pageTransition: { name: 'page', mode: 'out-in' }, pageTransition: { name: 'page', mode: 'out-in' },
rootId: 'ender-app', rootId: 'ender-app',
}, },
devtools: { colorMode: {
enabled: true, preference: 'system',
}, fallback: 'dark',
features: { classPrefix: '',
inlineStyles: false, classSuffix: '',
}, componentName: 'NuxtTheme',
experimental: { storageKey: 'ecmatheme',
inlineRouteRules: true,
}, },
components: { components: {
dirs: [ dirs: [
@ -49,26 +48,6 @@ export default defineNuxtConfig({
}, },
], ],
}, },
css: ['~/assets/styles/main.scss'],
plugins: [],
modules: [
'@pinia/nuxt',
'@nuxt/content',
'@nuxtjs/seo',
'@nuxtjs/google-fonts',
'@nuxtjs/tailwindcss',
'@nuxtjs/color-mode',
'@nuxt/eslint',
['@nuxtjs/stylelint-module', { failOnError: true, lintOnStart: false }],
],
colorMode: {
preference: 'system',
fallback: 'dark',
classPrefix: '',
classSuffix: '',
componentName: 'NuxtTheme',
storageKey: 'ecmatheme',
},
content: { content: {
markdown: { markdown: {
remarkPlugins: ['remark-reading-time'], remarkPlugins: ['remark-reading-time'],
@ -108,13 +87,15 @@ export default defineNuxtConfig({
], ],
}, },
}, },
nitro: { css: ['~/assets/styles/main.scss'],
prerender: { devtools: {
crawlLinks: true, enabled: true,
autoSubfolderIndex: true, },
failOnError: true, experimental: {
routes: ['/robots.txt', '/sitemap.xml'], inlineRouteRules: true,
}, },
features: {
inlineStyles: false,
}, },
googleFonts: { googleFonts: {
download: true, download: true,
@ -123,6 +104,24 @@ export default defineNuxtConfig({
Alexandria: true, Alexandria: true,
}, },
}, },
modules: [
'@pinia/nuxt',
'@nuxt/content',
'@nuxtjs/seo',
'@nuxtjs/google-fonts',
'@nuxtjs/tailwindcss',
'@nuxtjs/color-mode',
'@nuxt/eslint',
['@nuxtjs/stylelint-module', { failOnError: true, lintOnStart: false }],
],
nitro: {
prerender: {
crawlLinks: true,
autoSubfolderIndex: true,
failOnError: true,
routes: ['/robots.txt', '/sitemap.xml'],
},
},
linkChecker: { linkChecker: {
failOnError: true, failOnError: true,
report: { report: {
@ -130,6 +129,7 @@ export default defineNuxtConfig({
markdown: true, markdown: true,
}, },
}, },
plugins: [],
robots: { robots: {
enabled: true, enabled: true,
blockNonSeoBots: false, blockNonSeoBots: false,

View File

@ -12,7 +12,7 @@
"lint:js": "eslint --ext \".js,.ts,.vue\" --ignore-path .gitignore .", "lint:js": "eslint --ext \".js,.ts,.vue\" --ignore-path .gitignore .",
"lint:prettier": "prettier --check .", "lint:prettier": "prettier --check .",
"lint": "npm run lint:js && npm run lint:style && npm run lint:prettier", "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier",
"lintfix": "prettier --write --list-different . && npm run lint:js -- --fix" "lint:fix": "prettier --write --list-different . && npm run lint:js -- --fix"
}, },
"devDependencies": { "devDependencies": {
"@nuxt/content": "^2.12.1", "@nuxt/content": "^2.12.1",