mirror of
https://github.com/tachiyomiorg/website.git
synced 2024-10-31 23:15:05 +01:00
Update eslint setup and fix some errors
Still has a bunch of errors that can't be auto-fixed though.
This commit is contained in:
parent
ef61c80230
commit
e0da86ca0c
@ -1,12 +0,0 @@
|
|||||||
*.sh
|
|
||||||
*.md
|
|
||||||
*.woff
|
|
||||||
*.ttf
|
|
||||||
.vscode
|
|
||||||
.idea
|
|
||||||
.husky
|
|
||||||
.local
|
|
||||||
dist
|
|
||||||
node_modules
|
|
||||||
!docs/.vitepress
|
|
||||||
docs/.vitepress/cache
|
|
@ -1,39 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
root: true,
|
|
||||||
extends: ["@antfu"],
|
|
||||||
rules: {
|
|
||||||
"comma-dangle": ["error", "only-multiline"],
|
|
||||||
"quotes": "off",
|
|
||||||
"no-tabs": "off",
|
|
||||||
"arrow-parens": ["error", "always"],
|
|
||||||
"@typescript-eslint/quotes": ["error", "double", { avoidEscape: true }],
|
|
||||||
"indent": "off",
|
|
||||||
"semi": ["error", "never"],
|
|
||||||
"@typescript-eslint/indent": ["error", "tab"],
|
|
||||||
"@typescript-eslint/brace-style": ["error", "1tbs"],
|
|
||||||
"@typescript-eslint/semi": ["error", "never"],
|
|
||||||
"vue/no-extra-parens": "off",
|
|
||||||
"vue/html-indent": ["error", "tab"],
|
|
||||||
"curly": ["error", "all"],
|
|
||||||
"brace-style": ["error", "1tbs"],
|
|
||||||
"no-console": "off",
|
|
||||||
"no-debugger": "off",
|
|
||||||
"vue/multi-word-component-names": "off",
|
|
||||||
"vue/comment-directive": "off",
|
|
||||||
"no-unused-vars": "off",
|
|
||||||
"vue/no-parsing-error": [
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
"x-invalid-end-tag": false,
|
|
||||||
"missing-semicolon-after-character-reference": false,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
/* --ECMAScript 6 ES6-- */
|
|
||||||
"no-useless-escape": "off",
|
|
||||||
"no-unused-expressions": [
|
|
||||||
"error",
|
|
||||||
{ allowShortCircuit: true, allowTernary: true },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}
|
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"extends": "markdownlint/style/prettier"
|
"extends": "markdownlint/style/prettier"
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: ["stylelint-stylus"],
|
plugins: ['stylelint-stylus'],
|
||||||
rules: {
|
rules: {
|
||||||
"stylus/pythonic": "never",
|
'stylus/pythonic': 'never',
|
||||||
"stylus/declaration-colon": "always",
|
'stylus/declaration-colon': 'always',
|
||||||
"stylus/semicolon": "never",
|
'stylus/semicolon': 'never',
|
||||||
"stylus/single-line-comment-double-slash-space-after": "always",
|
'stylus/single-line-comment-double-slash-space-after': 'always',
|
||||||
"stylus/property-no-unknown": null,
|
'stylus/property-no-unknown': null,
|
||||||
"stylus/selector-type-no-unknown": null,
|
'stylus/selector-type-no-unknown': null,
|
||||||
"stylus/selector-list-comma": "always",
|
'stylus/selector-list-comma': 'always',
|
||||||
"stylus/indentation": [
|
'stylus/indentation': [
|
||||||
"tab",
|
'tab',
|
||||||
{
|
{
|
||||||
indentInsideParens: "twice",
|
indentInsideParens: 'twice',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
"rule-empty-line-before": [
|
'rule-empty-line-before': [
|
||||||
"always",
|
'always',
|
||||||
{
|
{
|
||||||
except: ["first-nested"],
|
except: ['first-nested'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
extends: ["stylelint-stylus/standard"],
|
extends: ['stylelint-stylus/standard'],
|
||||||
}
|
}
|
||||||
|
63
website/eslint.config.js
Normal file
63
website/eslint.config.js
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
import antfu from '@antfu/eslint-config'
|
||||||
|
import { FlatCompat } from '@eslint/eslintrc'
|
||||||
|
|
||||||
|
const compat = new FlatCompat()
|
||||||
|
|
||||||
|
export default antfu({
|
||||||
|
ignores: [
|
||||||
|
'*.sh',
|
||||||
|
'*.md',
|
||||||
|
'*.woff',
|
||||||
|
'*.ttf',
|
||||||
|
'.vscode/**',
|
||||||
|
'.idea/**',
|
||||||
|
'.husky/**',
|
||||||
|
'.local/**',
|
||||||
|
'dist/**',
|
||||||
|
'node_modules/**',
|
||||||
|
'!docs/.vitepress/**',
|
||||||
|
'docs/.vitepress/cache/**',
|
||||||
|
],
|
||||||
|
|
||||||
|
...compat.config({
|
||||||
|
rules: {
|
||||||
|
'comma-dangle': ['error', 'only-multiline'],
|
||||||
|
'quotes': 'off',
|
||||||
|
'no-tabs': 'off',
|
||||||
|
'arrow-parens': ['error', 'always'],
|
||||||
|
'@typescript-eslint/quotes': [
|
||||||
|
'error',
|
||||||
|
'double',
|
||||||
|
{ avoidEscape: true },
|
||||||
|
],
|
||||||
|
'indent': 'off',
|
||||||
|
'semi': ['error', 'never'],
|
||||||
|
'@typescript-eslint/indent': ['error', 'tab'],
|
||||||
|
'@typescript-eslint/brace-style': ['error', '1tbs'],
|
||||||
|
'@typescript-eslint/semi': ['error', 'never'],
|
||||||
|
'vue/no-extra-parens': 'off',
|
||||||
|
'vue/html-indent': ['error', 'tab'],
|
||||||
|
'curly': ['error', 'all'],
|
||||||
|
'brace-style': ['error', '1tbs'],
|
||||||
|
'no-console': 'off',
|
||||||
|
'no-debugger': 'off',
|
||||||
|
'vue/multi-word-component-names': 'off',
|
||||||
|
'vue/comment-directive': 'off',
|
||||||
|
'no-unused-vars': 'off',
|
||||||
|
'vue/no-parsing-error': [
|
||||||
|
2,
|
||||||
|
{
|
||||||
|
'x-invalid-end-tag': false,
|
||||||
|
'missing-semicolon-after-character-reference': false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
|
||||||
|
/* --ECMAScript 6 ES6-- */
|
||||||
|
'no-useless-escape': 'off',
|
||||||
|
'no-unused-expressions': [
|
||||||
|
'error',
|
||||||
|
{ allowShortCircuit: true, allowTernary: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
})
|
@ -1,87 +1,88 @@
|
|||||||
{
|
{
|
||||||
"name": "tachiyomi-website",
|
"name": "tachiyomi-website",
|
||||||
"version": "3.0.0",
|
"type": "module",
|
||||||
"description": "Official website for the Tachiyomi app.",
|
"version": "3.0.0",
|
||||||
"license": "MPL-2.0",
|
"private": true,
|
||||||
"private": true,
|
"description": "Official website for the Tachiyomi app.",
|
||||||
"type": "module",
|
"license": "MPL-2.0",
|
||||||
"engines": {
|
"repository": {
|
||||||
"node": ">=20",
|
"type": "git",
|
||||||
"pnpm": ">=8"
|
"url": "git+https://github.com/tachiyomiorg/website.git"
|
||||||
},
|
},
|
||||||
"repository": {
|
"bugs": {
|
||||||
"type": "git",
|
"url": "https://github.com/tachiyomiorg/website/issues"
|
||||||
"url": "git+https://github.com/tachiyomiorg/website.git"
|
},
|
||||||
},
|
"engines": {
|
||||||
"bugs": {
|
"node": ">=20",
|
||||||
"url": "https://github.com/tachiyomiorg/website/issues"
|
"pnpm": ">=8"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"test": "pnpm lint && pnpm build && pnpm preview",
|
"test": "pnpm lint && pnpm build && pnpm preview",
|
||||||
"dev": "vitepress dev src",
|
"dev": "vitepress dev src",
|
||||||
"build": "vitepress build src",
|
"build": "vitepress build src",
|
||||||
"preview": "vitepress preview src",
|
"preview": "vitepress preview src",
|
||||||
"lint": "pnpm lint:es && pnpm lint:mdl && pnpm lint:style",
|
"lint": "pnpm lint:es && pnpm lint:mdl && pnpm lint:style",
|
||||||
"lint:fix": "pnpm lint:es:fix && pnpm lint:style:fix",
|
"lint:fix": "pnpm lint:es:fix && pnpm lint:style:fix",
|
||||||
"lint:es": "eslint . --ext .vue,.js,.ts,.cjs,.mjs,.jsx,.tsx",
|
"lint:es": "eslint . ",
|
||||||
"lint:es:fix": "eslint . --ext .vue,.js,.ts,.cjs,.mjs,.jsx,.tsx --fix",
|
"lint:es:fix": "eslint . --fix",
|
||||||
"lint:mdl": "markdownlint \"**/*.md\" \".github/**/*.md\" --enable sentences-per-line --disable MD025 MD033",
|
"lint:mdl": "markdownlint \"**/*.md\" \".github/**/*.md\" --enable sentences-per-line --disable MD025 MD033",
|
||||||
"lint:style": "stylelint \"**/*.{styl,vue}\" \"src/.vitepress/**/*.{styl,vue}\"",
|
"lint:style": "stylelint \"**/*.{styl,vue}\" \"src/.vitepress/**/*.{styl,vue}\"",
|
||||||
"lint:style:fix": "stylelint --fix \"**/*.{styl,vue}\" \"src/.vitepress/**/*.{styl,vue}\""
|
"lint:style:fix": "stylelint --fix \"**/*.{styl,vue}\" \"src/.vitepress/**/*.{styl,vue}\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iconify-prerendered/vue-mdi": "0.23.1698215149",
|
"@iconify-prerendered/vue-mdi": "0.23.1698215149",
|
||||||
"@octokit/rest": "20.0.2",
|
"@octokit/rest": "20.0.2",
|
||||||
"@octokit/types": "12.2.0",
|
"@octokit/types": "12.2.0",
|
||||||
"@tanstack/vue-query": "5.8.1",
|
"@tanstack/vue-query": "5.8.1",
|
||||||
"@vueuse/core": "10.6.0",
|
"@vueuse/core": "10.6.0",
|
||||||
"axios": "1.6.1",
|
"axios": "1.6.1",
|
||||||
"element-plus": "2.4.2",
|
"element-plus": "2.4.2",
|
||||||
"lodash.groupby": "4.6.0",
|
"lodash.groupby": "4.6.0",
|
||||||
"markdown-it": "13.0.2",
|
"markdown-it": "13.0.2",
|
||||||
"markdown-it-shortcode-tag": "1.1.0",
|
"markdown-it-shortcode-tag": "1.1.0",
|
||||||
"moment": "2.29.4"
|
"moment": "2.29.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@antfu/eslint-config": "1.1.1",
|
"@antfu/eslint-config": "^1.1.1",
|
||||||
"@mdit/plugin-attrs": "0.6.5",
|
"@eslint/eslintrc": "^2.1.3",
|
||||||
"@mdit/plugin-figure": "0.6.5",
|
"@mdit/plugin-attrs": "0.6.5",
|
||||||
"@mdit/plugin-img-lazyload": "0.6.5",
|
"@mdit/plugin-figure": "0.6.5",
|
||||||
"@mdit/plugin-img-mark": "0.6.5",
|
"@mdit/plugin-img-lazyload": "0.6.5",
|
||||||
"@mdit/plugin-img-size": "0.6.5",
|
"@mdit/plugin-img-mark": "0.6.5",
|
||||||
"@mdit/plugin-include": "0.6.5",
|
"@mdit/plugin-img-size": "0.6.5",
|
||||||
"@resvg/resvg-js": "2.6.0",
|
"@mdit/plugin-include": "0.6.5",
|
||||||
"@types/gtag.js": "0.0.18",
|
"@resvg/resvg-js": "2.6.0",
|
||||||
"@types/lodash.groupby": "4.6.9",
|
"@types/gtag.js": "0.0.18",
|
||||||
"@types/markdown-it": "13.0.6",
|
"@types/lodash.groupby": "4.6.9",
|
||||||
"@types/node": "20.9.0",
|
"@types/markdown-it": "13.0.6",
|
||||||
"@typescript-eslint/eslint-plugin": "6.10.0",
|
"@types/node": "20.9.0",
|
||||||
"@typescript-eslint/parser": "6.10.0",
|
"@typescript-eslint/eslint-plugin": "6.10.0",
|
||||||
"eslint": "8.53.0",
|
"@typescript-eslint/parser": "6.10.0",
|
||||||
"eslint-config-standard": "17.1.0",
|
"eslint": "8.53.0",
|
||||||
"eslint-plugin-vue": "9.18.1",
|
"eslint-config-standard": "17.1.0",
|
||||||
"feed": "4.2.2",
|
"eslint-plugin-vue": "9.18.1",
|
||||||
"lint-staged": "15.0.2",
|
"feed": "4.2.2",
|
||||||
"markdownlint": "0.31.1",
|
"lint-staged": "15.0.2",
|
||||||
"markdownlint-cli": "0.37.0",
|
"markdownlint": "0.31.1",
|
||||||
"sentences-per-line": "0.2.1",
|
"markdownlint-cli": "0.37.0",
|
||||||
"stylelint": "15.11.0",
|
"sentences-per-line": "0.2.1",
|
||||||
"stylelint-stylus": "0.18.0",
|
"stylelint": "15.11.0",
|
||||||
"stylus": "0.61.0",
|
"stylelint-stylus": "0.18.0",
|
||||||
"unplugin-element-plus": "0.8.0",
|
"stylus": "0.61.0",
|
||||||
"vite-plugin-eslint": "1.8.1",
|
"unplugin-element-plus": "0.8.0",
|
||||||
"vitepress": "1.0.0-rc.25",
|
"vite-plugin-eslint": "1.8.1",
|
||||||
"vitepress-plugin-tabs": "0.4.1",
|
"vitepress": "1.0.0-rc.25",
|
||||||
"vue": "3.3.8",
|
"vitepress-plugin-tabs": "0.4.1",
|
||||||
"vue-eslint-parser": "9.3.2",
|
"vue": "3.3.8",
|
||||||
"x-satori": "0.1.5"
|
"vue-eslint-parser": "9.3.2",
|
||||||
},
|
"x-satori": "0.1.5"
|
||||||
"simple-git-hooks": {
|
},
|
||||||
"pre-commit": "pnpm lint-staged"
|
"simple-git-hooks": {
|
||||||
},
|
"pre-commit": "pnpm lint-staged"
|
||||||
"lint-staged": {
|
},
|
||||||
"*.{styl,vue}": "stylelint --fix",
|
"lint-staged": {
|
||||||
"*.{html,json}": "prettier --write"
|
"*.{styl,vue}": "stylelint --fix",
|
||||||
}
|
"*.{html,json}": "prettier --write"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,8 +41,11 @@ dependencies:
|
|||||||
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@antfu/eslint-config':
|
'@antfu/eslint-config':
|
||||||
specifier: 1.1.1
|
specifier: ^1.1.1
|
||||||
version: 1.1.1(eslint@8.53.0)(typescript@5.2.2)
|
version: 1.1.1(eslint@8.53.0)(typescript@5.2.2)
|
||||||
|
'@eslint/eslintrc':
|
||||||
|
specifier: ^2.1.3
|
||||||
|
version: 2.1.3
|
||||||
'@mdit/plugin-attrs':
|
'@mdit/plugin-attrs':
|
||||||
specifier: 0.6.5
|
specifier: 0.6.5
|
||||||
version: 0.6.5(markdown-it@13.0.2)
|
version: 0.6.5(markdown-it@13.0.2)
|
||||||
@ -87,7 +90,7 @@ devDependencies:
|
|||||||
version: 8.53.0
|
version: 8.53.0
|
||||||
eslint-config-standard:
|
eslint-config-standard:
|
||||||
specifier: 17.1.0
|
specifier: 17.1.0
|
||||||
version: 17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.53.0)
|
version: 17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.3.1)(eslint-plugin-promise@6.1.1)(eslint@8.53.0)
|
||||||
eslint-plugin-vue:
|
eslint-plugin-vue:
|
||||||
specifier: 9.18.1
|
specifier: 9.18.1
|
||||||
version: 9.18.1(eslint@8.53.0)
|
version: 9.18.1(eslint@8.53.0)
|
||||||
@ -693,7 +696,7 @@ packages:
|
|||||||
ajv: 6.12.6
|
ajv: 6.12.6
|
||||||
debug: 4.3.4
|
debug: 4.3.4
|
||||||
espree: 9.6.1
|
espree: 9.6.1
|
||||||
globals: 13.21.0
|
globals: 13.23.0
|
||||||
ignore: 5.2.4
|
ignore: 5.2.4
|
||||||
import-fresh: 3.3.0
|
import-fresh: 3.3.0
|
||||||
js-yaml: 4.1.0
|
js-yaml: 4.1.0
|
||||||
@ -2663,7 +2666,7 @@ packages:
|
|||||||
parse-gitignore: 2.0.0
|
parse-gitignore: 2.0.0
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint-config-standard@17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.2.0)(eslint-plugin-promise@6.1.1)(eslint@8.53.0):
|
/eslint-config-standard@17.1.0(eslint-plugin-import@2.28.1)(eslint-plugin-n@16.3.1)(eslint-plugin-promise@6.1.1)(eslint@8.53.0):
|
||||||
resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==}
|
resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==}
|
||||||
engines: {node: '>=12.0.0'}
|
engines: {node: '>=12.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@ -2674,7 +2677,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
eslint: 8.53.0
|
eslint: 8.53.0
|
||||||
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)
|
eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.10.0)(eslint@8.53.0)
|
||||||
eslint-plugin-n: 16.2.0(eslint@8.53.0)
|
eslint-plugin-n: 16.3.1(eslint@8.53.0)
|
||||||
eslint-plugin-promise: 6.1.1(eslint@8.53.0)
|
eslint-plugin-promise: 6.1.1(eslint@8.53.0)
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
@ -2850,24 +2853,6 @@ packages:
|
|||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/eslint-plugin-n@16.2.0(eslint@8.53.0):
|
|
||||||
resolution: {integrity: sha512-AQER2jEyQOt1LG6JkGJCCIFotzmlcCZFur2wdKrp1JX2cNotC7Ae0BcD/4lLv3lUAArM9uNS8z/fsvXTd0L71g==}
|
|
||||||
engines: {node: '>=16.0.0'}
|
|
||||||
peerDependencies:
|
|
||||||
eslint: '>=7.0.0'
|
|
||||||
dependencies:
|
|
||||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.53.0)
|
|
||||||
builtins: 5.0.1
|
|
||||||
eslint: 8.53.0
|
|
||||||
eslint-plugin-es-x: 7.2.0(eslint@8.53.0)
|
|
||||||
get-tsconfig: 4.7.0
|
|
||||||
ignore: 5.2.4
|
|
||||||
is-core-module: 2.13.0
|
|
||||||
minimatch: 3.1.2
|
|
||||||
resolve: 1.22.6
|
|
||||||
semver: 7.5.4
|
|
||||||
dev: true
|
|
||||||
|
|
||||||
/eslint-plugin-n@16.3.1(eslint@8.53.0):
|
/eslint-plugin-n@16.3.1(eslint@8.53.0):
|
||||||
resolution: {integrity: sha512-w46eDIkxQ2FaTHcey7G40eD+FhTXOdKudDXPUO2n9WNcslze/i/HT2qJ3GXjHngYSGDISIgPNhwGtgoix4zeOw==}
|
resolution: {integrity: sha512-w46eDIkxQ2FaTHcey7G40eD+FhTXOdKudDXPUO2n9WNcslze/i/HT2qJ3GXjHngYSGDISIgPNhwGtgoix4zeOw==}
|
||||||
engines: {node: '>=16.0.0'}
|
engines: {node: '>=16.0.0'}
|
||||||
|
@ -1,41 +1,41 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { inject, onMounted, ref } from "vue"
|
import { inject, onMounted, ref } from 'vue'
|
||||||
import { useData } from "vitepress"
|
import { useData } from 'vitepress'
|
||||||
|
|
||||||
import VPIconMoon from "vitepress/dist/client/theme-default/components/icons/VPIconMoon.vue"
|
import VPIconMoon from 'vitepress/dist/client/theme-default/components/icons/VPIconMoon.vue'
|
||||||
import VPIconSun from "vitepress/dist/client/theme-default/components/icons/VPIconSun.vue"
|
import VPIconSun from 'vitepress/dist/client/theme-default/components/icons/VPIconSun.vue'
|
||||||
|
|
||||||
const { isDark } = useData()
|
const { isDark } = useData()
|
||||||
|
|
||||||
const toggleAppearance = inject("toggle-appearance", () => {
|
const toggleAppearance = inject('toggle-appearance', () => {
|
||||||
isDark.value = !isDark.value
|
isDark.value = !isDark.value
|
||||||
})
|
})
|
||||||
|
|
||||||
const supportsViewTransition = ref(false)
|
const supportsViewTransition = ref(false)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
supportsViewTransition.value = "startViewTransition" in document
|
supportsViewTransition.value = 'startViewTransition' in document
|
||||||
&& window.matchMedia("(prefers-reduced-motion: no-preference)").matches
|
&& window.matchMedia('(prefers-reduced-motion: no-preference)').matches
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
role="switch"
|
role="switch"
|
||||||
title="Toggle dark mode"
|
title="Toggle dark mode"
|
||||||
class="CustomSwitchAppearance"
|
class="CustomSwitchAppearance"
|
||||||
:aria-checked="isDark"
|
:aria-checked="isDark"
|
||||||
:data-view-transition="supportsViewTransition"
|
:data-view-transition="supportsViewTransition"
|
||||||
@click="toggleAppearance"
|
@click="toggleAppearance"
|
||||||
>
|
>
|
||||||
<ClientOnly>
|
<ClientOnly>
|
||||||
<Transition name="fade" mode="out-in">
|
<Transition name="fade" mode="out-in">
|
||||||
<VPIconSun v-if="!isDark" class="sun" />
|
<VPIconSun v-if="!isDark" class="sun" />
|
||||||
<VPIconMoon v-else class="moon" />
|
<VPIconMoon v-else class="moon" />
|
||||||
</Transition>
|
</Transition>
|
||||||
</ClientOnly>
|
</ClientOnly>
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { IconRssBox } from "@iconify-prerendered/vue-mdi"
|
import { IconRssBox } from '@iconify-prerendered/vue-mdi'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<a href="/feed.rss" class="rss" title="RSS feed for the news archive">
|
<a href="/feed.rss" class="rss" title="RSS feed for the news archive">
|
||||||
<IconRssBox />
|
<IconRssBox />
|
||||||
<span>RSS feed</span>
|
<span>RSS feed</span>
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
@ -23,13 +23,13 @@ You can copy the following example and edit the details as needed:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"title": "Example Title",
|
"title": "Example Title",
|
||||||
"author": "Example Author",
|
"author": "Example Author",
|
||||||
"artist": "Example Artist",
|
"artist": "Example Artist",
|
||||||
"description": "Example Description",
|
"description": "Example Description",
|
||||||
"genre": ["genre 1", "genre 2", "etc"],
|
"genre": ["genre 1", "genre 2", "etc"],
|
||||||
"status": "0",
|
"status": "0",
|
||||||
"_status values": ["0 = Unknown", "1 = Ongoing", "2 = Completed", "3 = Licensed", "4 = Publishing finished", "5 = Cancelled", "6 = On hiatus"]
|
"_status values": ["0 = Unknown", "1 = Ongoing", "2 = Completed", "3 = Licensed", "4 = Publishing finished", "5 = Cancelled", "6 = On hiatus"]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
::: tip
|
::: tip
|
||||||
|
@ -1,22 +1,23 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "esnext",
|
"target": "esnext",
|
||||||
|
"jsx": "preserve",
|
||||||
|
"lib": ["esnext", "dom"],
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"strict": true,
|
|
||||||
"jsx": "preserve",
|
|
||||||
"sourceMap": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"lib": ["esnext", "dom"],
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"types": ["vite/client", "@types/gtag.js"],
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./docs/.vitepress/*"]
|
"@/*": ["./docs/.vitepress/*"]
|
||||||
}
|
},
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"types": ["vite/client", "@types/gtag.js"],
|
||||||
|
"strict": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
|
"references": [{ "path": "./tsconfig.node.json" }],
|
||||||
"include": [
|
"include": [
|
||||||
"typings/**/*.d.ts",
|
"typings/**/*.d.ts",
|
||||||
"docs/**/*.vue",
|
"docs/**/*.vue",
|
||||||
@ -28,6 +29,5 @@
|
|||||||
],
|
],
|
||||||
"exclude": ["**/node_modules/**", "dist/**"],
|
"exclude": ["**/node_modules/**", "dist/**"],
|
||||||
"extensions": [".js", ".ts", ".tsx", ".jsx", ".vue"],
|
"extensions": [".js", ".ts", ".tsx", ".jsx", ".vue"],
|
||||||
"references": [{ "path": "./tsconfig.node.json" }],
|
|
||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
"composite": true,
|
"composite": true,
|
||||||
"module": "esnext",
|
"module": "esnext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"allowSyntheticDefaultImports": true,
|
"types": ["vite/client"],
|
||||||
"types": ["vite/client"]
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"exclude": ["**/node_modules/**", "dist/**"]
|
"exclude": ["**/node_modules/**", "dist/**"]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user