diff --git a/website/.editorconfig b/website/.editorconfig index 9fecd7fe..11695dbd 100644 --- a/website/.editorconfig +++ b/website/.editorconfig @@ -2,12 +2,8 @@ root = true [*] end_of_line = lf -indent_style = tab -indent_size = 4 +indent_style = space +indent_size = 2 charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true - -[*.yml] -indent_style = space -indent_size = 2 diff --git a/website/.stylelintrc.cjs b/website/.stylelintrc.cjs index 63aaa240..f34e26ef 100644 --- a/website/.stylelintrc.cjs +++ b/website/.stylelintrc.cjs @@ -9,7 +9,7 @@ module.exports = { 'stylus/selector-type-no-unknown': null, 'stylus/selector-list-comma': 'always', 'stylus/indentation': [ - 'tab', + 2, { indentInsideParens: 'twice', }, diff --git a/website/eslint.config.js b/website/eslint.config.js index 6eb74cf1..3c5f41d3 100644 --- a/website/eslint.config.js +++ b/website/eslint.config.js @@ -19,6 +19,9 @@ export default antfu({ 'docs/.vitepress/cache/**', ], + typescript: true, + vue: true, + ...compat.config({ rules: { 'comma-dangle': ['error', 'only-multiline'], diff --git a/website/src/.vitepress/config.ts b/website/src/.vitepress/config.ts index 226d1bc4..858d3142 100644 --- a/website/src/.vitepress/config.ts +++ b/website/src/.vitepress/config.ts @@ -1,72 +1,76 @@ -import process from "node:process" -import { URL, fileURLToPath } from "node:url" -import { defineConfig, loadEnv } from "vitepress" -import ElementPlus from "unplugin-element-plus/vite" +import process from 'node:process' +import { URL, fileURLToPath } from 'node:url' +import { defineConfig, loadEnv } from 'vitepress' +import ElementPlus from 'unplugin-element-plus/vite' -import markdownConfig from "./config/markdownConfig" +import markdownConfig from './config/markdownConfig' // For use with loading Markdown plugins -import themeConfig from "./config/themeConfig" +import themeConfig from './config/themeConfig' // Theme related config -import headConfig from "./config/headConfig" // Provides how to generate Meta head tags +import headConfig from './config/headConfig' -import generateMeta from "./config/hooks/generateMeta" +// Provides how to generate Meta head tags + +import generateMeta from './config/hooks/generateMeta' // Enhanced meta generation -import generateFeed from "./config/hooks/generateFeed" // Allows generation of RSS feed -import generateOgImages from "./config/hooks/generateOgImages" +import generateFeed from './config/hooks/generateFeed' -const title = "Tachiyomi" -const description = "Discover and read manga, webtoons, comics, and more – easier than ever on your Android device." +// Allows generation of RSS feed +import generateOgImages from './config/hooks/generateOgImages' -const env = loadEnv("", process.cwd()) -const hostname: string = env.VITE_HOSTNAME || "http://localhost:4173" +const title = 'Tachiyomi' +const description = 'Discover and read manga, webtoons, comics, and more – easier than ever on your Android device.' + +const env = loadEnv('', process.cwd()) +const hostname: string = env.VITE_HOSTNAME || 'http://localhost:4173' export default defineConfig({ - outDir: "../dist", - lastUpdated: true, - cleanUrls: true, - title, - description, - sitemap: { - hostname, - }, - head: headConfig, - markdown: markdownConfig, - themeConfig, - transformHead: async (context) => generateMeta(context, hostname), - buildEnd: async (context) => { - generateFeed(context, hostname) - generateOgImages(context) - }, - vite: { - resolve: { - alias: [ - { - // Used to show the release version on navbar. - find: /^.*\/VPNavBarMenu\.vue$/, - replacement: fileURLToPath( - new URL("./theme/components/CustomNavBarMenu.vue", import.meta.url), - ), - }, - { - find: /^.*VPNavScreenMenu\.vue$/, - replacement: fileURLToPath( - new URL("./theme/components/CustomNavScreenMenu.vue", import.meta.url), - ), - }, - { - find: /^.*VPSwitchAppearance\.vue$/, - replacement: fileURLToPath( - new URL("./theme/components/CustomSwitchAppearance.vue", import.meta.url), - ), - }, - ], - }, - plugins: [ElementPlus({})], - ssr: { - noExternal: ["element-plus"], - }, - }, + outDir: '../dist', + lastUpdated: true, + cleanUrls: true, + title, + description, + sitemap: { + hostname, + }, + head: headConfig, + markdown: markdownConfig, + themeConfig, + transformHead: async context => generateMeta(context, hostname), + buildEnd: async (context) => { + generateFeed(context, hostname) + generateOgImages(context) + }, + vite: { + resolve: { + alias: [ + { + // Used to show the release version on navbar. + find: /^.*\/VPNavBarMenu\.vue$/, + replacement: fileURLToPath( + new URL('./theme/components/CustomNavBarMenu.vue', import.meta.url), + ), + }, + { + find: /^.*VPNavScreenMenu\.vue$/, + replacement: fileURLToPath( + new URL('./theme/components/CustomNavScreenMenu.vue', import.meta.url), + ), + }, + { + find: /^.*VPSwitchAppearance\.vue$/, + replacement: fileURLToPath( + new URL('./theme/components/CustomSwitchAppearance.vue', import.meta.url), + ), + }, + ], + }, + plugins: [ElementPlus({})], + ssr: { + noExternal: ['element-plus'], + }, + }, }) diff --git a/website/src/.vitepress/config/constants.ts b/website/src/.vitepress/config/constants.ts index 9fe681da..afd031ca 100644 --- a/website/src/.vitepress/config/constants.ts +++ b/website/src/.vitepress/config/constants.ts @@ -1,6 +1,6 @@ export const GITHUB_EXTENSION_JSON - = "https://raw.githubusercontent.com/tachiyomiorg/tachiyomi-extensions/repo/index.json" -export const GITHUB_STABLE_API = "https://api.github.com/repos/tachiyomiorg/tachiyomi/releases/latest" -export const GITHUB_STABLE_RELEASE = "https://github.com/tachiyomiorg/tachiyomi/releases/latest" -export const GITHUB_PREVIEW_API = "https://api.github.com/repos/tachiyomiorg/android-app-preview/releases/latest" -export const GITHUB_PREVIEW_RELEASE = "https://github.com/tachiyomiorg/android-app-preview/releases/latest" + = 'https://raw.githubusercontent.com/tachiyomiorg/tachiyomi-extensions/repo/index.json' +export const GITHUB_STABLE_API = 'https://api.github.com/repos/tachiyomiorg/tachiyomi/releases/latest' +export const GITHUB_STABLE_RELEASE = 'https://github.com/tachiyomiorg/tachiyomi/releases/latest' +export const GITHUB_PREVIEW_API = 'https://api.github.com/repos/tachiyomiorg/android-app-preview/releases/latest' +export const GITHUB_PREVIEW_RELEASE = 'https://github.com/tachiyomiorg/android-app-preview/releases/latest' diff --git a/website/src/.vitepress/config/headConfig.ts b/website/src/.vitepress/config/headConfig.ts index 39003496..149432bb 100644 --- a/website/src/.vitepress/config/headConfig.ts +++ b/website/src/.vitepress/config/headConfig.ts @@ -1,59 +1,59 @@ -import type { HeadConfig } from "vitepress" +import type { HeadConfig } from 'vitepress' const headConfig: HeadConfig[] = [ - ["meta", { name: "darkreader-lock" }], + ['meta', { name: 'darkreader-lock' }], - ["meta", { name: "theme-color", content: "#818CF8" }], - ["meta", { name: "msapplication-TileColor", content: "#818CF8" }], + ['meta', { name: 'theme-color', content: '#818CF8' }], + ['meta', { name: 'msapplication-TileColor', content: '#818CF8' }], - ["meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }], - ["meta", { name: "referrer", content: "no-referrer-when-downgrade" }], + ['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0' }], + ['meta', { name: 'referrer', content: 'no-referrer-when-downgrade' }], - ["link", { rel: "icon", type: "image/x-icon", href: "/favicon.ico" }], - [ - "link", - { - rel: "icon", - type: "image/png", - sizes: "32x32", - href: "/favicon-32x32.png", - }, - ], - [ - "link", - { - rel: "icon", - type: "image/png", - sizes: "16x16", - href: "/favicon-16x16.png", - }, - ], - ["link", { rel: "manifest", href: "/site.webmanifest" }], - ["link", { rel: "mask-icon", href: "/safari-pinned-tab.svg", color: "#818CF8" }], - [ - "link", - { - rel: "apple-touch-icon", - type: "image/x-icon", - sizes: "180x180", - href: "/favicon.ico", - }, - ], + ['link', { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }], + [ + 'link', + { + rel: 'icon', + type: 'image/png', + sizes: '32x32', + href: '/favicon-32x32.png', + }, + ], + [ + 'link', + { + rel: 'icon', + type: 'image/png', + sizes: '16x16', + href: '/favicon-16x16.png', + }, + ], + ['link', { rel: 'manifest', href: '/site.webmanifest' }], + ['link', { rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#818CF8' }], + [ + 'link', + { + rel: 'apple-touch-icon', + type: 'image/x-icon', + sizes: '180x180', + href: '/favicon.ico', + }, + ], - ["meta", { name: "twitter:card", content: "summary" }], - ["meta", { name: "twitter:site", content: "@tachiyomiorg" }], - ["meta", { name: "twitter:creator", content: "@tachiyomiorg" }], + ['meta', { name: 'twitter:card', content: 'summary' }], + ['meta', { name: 'twitter:site', content: '@tachiyomiorg' }], + ['meta', { name: 'twitter:creator', content: '@tachiyomiorg' }], - ["meta", { property: "og:site_name", content: "Tachiyomi" }], - [ - "meta", - { - property: "og:description", - content: "Discover and read manga, webtoons, comics, and more – easier than ever on your Android device.", - }, - ], - ["meta", { property: "og:locale", content: "en_US" }], - ["meta", { property: "og:type", content: "website" }], + ['meta', { property: 'og:site_name', content: 'Tachiyomi' }], + [ + 'meta', + { + property: 'og:description', + content: 'Discover and read manga, webtoons, comics, and more – easier than ever on your Android device.', + }, + ], + ['meta', { property: 'og:locale', content: 'en_US' }], + ['meta', { property: 'og:type', content: 'website' }], ] export default headConfig diff --git a/website/src/.vitepress/config/hooks/generateFeed.ts b/website/src/.vitepress/config/hooks/generateFeed.ts index 5491bb84..70b76da4 100644 --- a/website/src/.vitepress/config/hooks/generateFeed.ts +++ b/website/src/.vitepress/config/hooks/generateFeed.ts @@ -1,61 +1,61 @@ -import path from "node:path" -import { writeFileSync } from "node:fs" -import { Feed, type Item } from "feed" -import { type SiteConfig, createContentLoader } from "vitepress" +import path from 'node:path' +import { writeFileSync } from 'node:fs' +import { Feed, type Item } from 'feed' +import { type SiteConfig, createContentLoader } from 'vitepress' async function generateFeed(config: SiteConfig, hostname: string) { - const feed = new Feed({ - title: config.site.title, - description: config.site.description, - id: hostname, - link: hostname, - language: "en", - image: `${hostname}/img/logo.png`, - favicon: `${hostname}/favicon.ico`, - copyright: `Copyright © 2015 - ${new Date().getFullYear()} Javier Tomás`, - }) - const json: Item[] = [] + const feed = new Feed({ + title: config.site.title, + description: config.site.description, + id: hostname, + link: hostname, + language: 'en', + image: `${hostname}/img/logo.png`, + favicon: `${hostname}/favicon.ico`, + copyright: `Copyright © 2015 - ${new Date().getFullYear()} Javier Tomás`, + }) + const json: Item[] = [] - const posts = await createContentLoader("news/*.md", { - excerpt: true, - render: true, - includeSrc: true, - }).load() + const posts = await createContentLoader('news/*.md', { + excerpt: true, + render: true, + includeSrc: true, + }).load() - // Filter everything that"s not of type `article` (e.g. index.md) - const filteredPosts = posts.filter((post) => post.frontmatter.type === "article") + // Filter everything that"s not of type `article` (e.g. index.md) + const filteredPosts = posts.filter(post => post.frontmatter.type === 'article') - filteredPosts.sort((a, b) => +new Date(b.frontmatter.date as string) - +new Date(a.frontmatter.date as string)) + filteredPosts.sort((a, b) => +new Date(b.frontmatter.date as string) - +new Date(a.frontmatter.date as string)) - for (const { url, frontmatter, html, src } of filteredPosts) { - const fullUrl = `${hostname}${url}` + for (const { url, frontmatter, html, src } of filteredPosts) { + const fullUrl = `${hostname}${url}` - // Strip `​` from `html` string - const content = (html ?? "") - .replace(/​/g, "") - .replace(//g, ``) + // Strip `​` from `html` string + const content = (html ?? '') + .replace(/​/g, '') + .replace(//g, ``) - const markdown = (src ?? "") - .replace(/^---.*---/s, "") - .replace(/]\((\/.*?)\)/g, `](${hostname}$1)`) - .replace(/^# .*$/m, "") - .trim() + const markdown = (src ?? '') + .replace(/^---.*---/s, '') + .replace(/]\((\/.*?)\)/g, `](${hostname}$1)`) + .replace(/^# .*$/m, '') + .trim() - const post = { - title: frontmatter.title, - id: fullUrl, - link: fullUrl, - description: frontmatter.description, - content, - date: frontmatter.date, - } satisfies Item + const post = { + title: frontmatter.title, + id: fullUrl, + link: fullUrl, + description: frontmatter.description, + content, + date: frontmatter.date, + } satisfies Item - feed.addItem(post) - json.push({ ...post, content: markdown }) - } + feed.addItem(post) + json.push({ ...post, content: markdown }) + } - writeFileSync(path.join(config.outDir, "feed.rss"), feed.rss2()) - writeFileSync(path.join(config.outDir, "news.json"), JSON.stringify(json)) + writeFileSync(path.join(config.outDir, 'feed.rss'), feed.rss2()) + writeFileSync(path.join(config.outDir, 'news.json'), JSON.stringify(json)) } export default generateFeed diff --git a/website/src/.vitepress/config/hooks/generateMeta.ts b/website/src/.vitepress/config/hooks/generateMeta.ts index 76932924..253fdea9 100644 --- a/website/src/.vitepress/config/hooks/generateMeta.ts +++ b/website/src/.vitepress/config/hooks/generateMeta.ts @@ -1,131 +1,133 @@ -import type { HeadConfig, TransformContext } from "vitepress" +import type { HeadConfig, TransformContext } from 'vitepress' function generateMeta(context: TransformContext, hostname: string) { - const head: HeadConfig[] = [] - const { pageData } = context + const head: HeadConfig[] = [] + const { pageData } = context - const url = `${hostname}/${pageData.relativePath.replace(/((^|\/)index)?\.md$/, "$2")}` + const url = `${hostname}/${pageData.relativePath.replace(/((^|\/)index)?\.md$/, '$2')}` - head.push(["link", { rel: "canonical", href: url }]) - head.push(["meta", { property: "og:url", content: url }]) - head.push(["meta", { name: "twitter:url", content: url }]) - head.push(["meta", { name: "twitter:card", content: "summary_large_image" }]) + head.push(['link', { rel: 'canonical', href: url }]) + head.push(['meta', { property: 'og:url', content: url }]) + head.push(['meta', { name: 'twitter:url', content: url }]) + head.push(['meta', { name: 'twitter:card', content: 'summary_large_image' }]) - if (pageData.frontmatter.theme) { - head.push(["meta", { name: "theme-color", content: pageData.frontmatter.theme }]) - } - if (pageData.frontmatter.type) { - head.push(["meta", { property: "og:type", content: pageData.frontmatter.type }]) - } - if (pageData.frontmatter.customMetaTitle) { - head.push([ - "meta", - { - property: "og:title", - content: pageData.frontmatter.customMetaTitle, - }, - ]) - head.push([ - "meta", - { - name: "twitter:title", - content: pageData.frontmatter.customMetaTitle, - }, - ]) - head.push(["meta", { property: "og:site_name", content: "" }]) - } else { - head.push(["meta", { property: "og:title", content: pageData.frontmatter.title }]) - head.push(["meta", { name: "twitter:title", content: pageData.frontmatter.title }]) - } - if (pageData.frontmatter.description) { - head.push([ - "meta", - { - property: "og:description", - content: pageData.frontmatter.description, - }, - ]) - head.push([ - "meta", - { - name: "twitter:description", - content: pageData.frontmatter.description, - }, - ]) - } - if (pageData.frontmatter.image) { - head.push([ - "meta", - { - property: "og:image", - content: `${hostname}/${pageData.frontmatter.image.replace(/^\//, "")}`, - }, - ]) - head.push([ - "meta", - { - name: "twitter:image", - content: `${hostname}/${pageData.frontmatter.image.replace(/^\//, "")}`, - }, - ]) - } else { - const url = pageData.filePath.replace("index.md", "").replace(".md", "") - const imageUrl = `${url}/__og_image__/og.png`.replace(/\/\//g, "/").replace(/^\//, "") + if (pageData.frontmatter.theme) + head.push(['meta', { name: 'theme-color', content: pageData.frontmatter.theme }]) - head.push(["meta", { property: "og:image", content: `${hostname}/${imageUrl}` }]) - head.push(["meta", { property: "og:image:width", content: "1200" }]) - head.push(["meta", { property: "og:image:height", content: "628" }]) - head.push(["meta", { property: "og:image:type", content: "image/png" }]) - head.push(["meta", { property: "og:image:alt", content: pageData.frontmatter.title }]) - head.push(["meta", { name: "twitter:image", content: `${hostname}/${imageUrl}` }]) - head.push(["meta", { name: "twitter:image:width", content: "1200" }]) - head.push(["meta", { name: "twitter:image:height", content: "628" }]) - head.push(["meta", { name: "twitter:image:alt", content: pageData.frontmatter.title }]) - } - if (pageData.frontmatter.tag) { - head.push(["meta", { property: "article:tag", content: pageData.frontmatter.tag }]) - } - if (pageData.frontmatter.date) { - head.push([ - "meta", - { - property: "article:published_time", - content: pageData.frontmatter.date, - }, - ]) - } - if (pageData.lastUpdated && pageData.frontmatter.lastUpdated !== false) { - head.push([ - "meta", - { - property: "article:modified_time", - content: new Date(pageData.lastUpdated).toISOString(), - }, - ]) - } + if (pageData.frontmatter.type) + head.push(['meta', { property: 'og:type', content: pageData.frontmatter.type }]) - if (pageData.filePath === "news/index.md") { - head.push([ - "link", - { - rel: "alternate", - type: "application/rss+xml", - title: "RSS feed for the news archive", - href: `${hostname}/feed.rss`, - }, - ]) - head.push([ - "link", - { - rel: "alternate", - type: "application/json", - title: "JSON of the news archive", - href: `${hostname}/news.json`, - }, - ]) - } + if (pageData.frontmatter.customMetaTitle) { + head.push([ + 'meta', + { + property: 'og:title', + content: pageData.frontmatter.customMetaTitle, + }, + ]) + head.push([ + 'meta', + { + name: 'twitter:title', + content: pageData.frontmatter.customMetaTitle, + }, + ]) + head.push(['meta', { property: 'og:site_name', content: '' }]) + } + else { + head.push(['meta', { property: 'og:title', content: pageData.frontmatter.title }]) + head.push(['meta', { name: 'twitter:title', content: pageData.frontmatter.title }]) + } + if (pageData.frontmatter.description) { + head.push([ + 'meta', + { + property: 'og:description', + content: pageData.frontmatter.description, + }, + ]) + head.push([ + 'meta', + { + name: 'twitter:description', + content: pageData.frontmatter.description, + }, + ]) + } + if (pageData.frontmatter.image) { + head.push([ + 'meta', + { + property: 'og:image', + content: `${hostname}/${pageData.frontmatter.image.replace(/^\//, '')}`, + }, + ]) + head.push([ + 'meta', + { + name: 'twitter:image', + content: `${hostname}/${pageData.frontmatter.image.replace(/^\//, '')}`, + }, + ]) + } + else { + const url = pageData.filePath.replace('index.md', '').replace('.md', '') + const imageUrl = `${url}/__og_image__/og.png`.replace(/\/\//g, '/').replace(/^\//, '') - return head + head.push(['meta', { property: 'og:image', content: `${hostname}/${imageUrl}` }]) + head.push(['meta', { property: 'og:image:width', content: '1200' }]) + head.push(['meta', { property: 'og:image:height', content: '628' }]) + head.push(['meta', { property: 'og:image:type', content: 'image/png' }]) + head.push(['meta', { property: 'og:image:alt', content: pageData.frontmatter.title }]) + head.push(['meta', { name: 'twitter:image', content: `${hostname}/${imageUrl}` }]) + head.push(['meta', { name: 'twitter:image:width', content: '1200' }]) + head.push(['meta', { name: 'twitter:image:height', content: '628' }]) + head.push(['meta', { name: 'twitter:image:alt', content: pageData.frontmatter.title }]) + } + if (pageData.frontmatter.tag) + head.push(['meta', { property: 'article:tag', content: pageData.frontmatter.tag }]) + + if (pageData.frontmatter.date) { + head.push([ + 'meta', + { + property: 'article:published_time', + content: pageData.frontmatter.date, + }, + ]) + } + if (pageData.lastUpdated && pageData.frontmatter.lastUpdated !== false) { + head.push([ + 'meta', + { + property: 'article:modified_time', + content: new Date(pageData.lastUpdated).toISOString(), + }, + ]) + } + + if (pageData.filePath === 'news/index.md') { + head.push([ + 'link', + { + rel: 'alternate', + type: 'application/rss+xml', + title: 'RSS feed for the news archive', + href: `${hostname}/feed.rss`, + }, + ]) + head.push([ + 'link', + { + rel: 'alternate', + type: 'application/json', + title: 'JSON of the news archive', + href: `${hostname}/news.json`, + }, + ]) + } + + return head } export default generateMeta diff --git a/website/src/.vitepress/config/hooks/generateOgImages.ts b/website/src/.vitepress/config/hooks/generateOgImages.ts index 0c8d4565..7e850f16 100644 --- a/website/src/.vitepress/config/hooks/generateOgImages.ts +++ b/website/src/.vitepress/config/hooks/generateOgImages.ts @@ -1,111 +1,110 @@ -import { mkdir, readFile, writeFile } from "node:fs/promises" -import { dirname, resolve } from "node:path" -import { fileURLToPath } from "node:url" -import { createContentLoader } from "vitepress" -import type { ContentData, SiteConfig } from "vitepress" -import { type SatoriOptions, satoriVue } from "x-satori/vue" -import { renderAsync } from "@resvg/resvg-js" +import { mkdir, readFile, writeFile } from 'node:fs/promises' +import { dirname, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' +import { createContentLoader } from 'vitepress' +import type { ContentData, SiteConfig } from 'vitepress' +import { type SatoriOptions, satoriVue } from 'x-satori/vue' +import { renderAsync } from '@resvg/resvg-js' const __dirname = dirname(fileURLToPath(import.meta.url)) -const __fonts = resolve(__dirname, "../../fonts") +const __fonts = resolve(__dirname, '../../fonts') async function generateOgImages(config: SiteConfig) { - const pages = await createContentLoader("**/*.md", { excerpt: true }).load() - const template = await readFile(resolve(__dirname, "../../theme/components/OgImageTemplate.vue"), "utf-8") + const pages = await createContentLoader('**/*.md', { excerpt: true }).load() + const template = await readFile(resolve(__dirname, '../../theme/components/OgImageTemplate.vue'), 'utf-8') - const fonts: SatoriOptions["fonts"] = [ - { - name: "Inter", - data: await readFile(resolve(__fonts, "Inter-Regular.otf")), - weight: 400, - style: "normal", - }, - { - name: "Inter", - data: await readFile(resolve(__fonts, "Inter-Medium.otf")), - weight: 500, - style: "normal", - }, - { - name: "Inter", - data: await readFile(resolve(__fonts, "Inter-SemiBold.otf")), - weight: 600, - style: "normal", - }, - { - name: "Inter", - data: await readFile(resolve(__fonts, "Inter-Bold.otf")), - weight: 700, - style: "normal", - }, - ] + const fonts: SatoriOptions['fonts'] = [ + { + name: 'Inter', + data: await readFile(resolve(__fonts, 'Inter-Regular.otf')), + weight: 400, + style: 'normal', + }, + { + name: 'Inter', + data: await readFile(resolve(__fonts, 'Inter-Medium.otf')), + weight: 500, + style: 'normal', + }, + { + name: 'Inter', + data: await readFile(resolve(__fonts, 'Inter-SemiBold.otf')), + weight: 600, + style: 'normal', + }, + { + name: 'Inter', + data: await readFile(resolve(__fonts, 'Inter-Bold.otf')), + weight: 700, + style: 'normal', + }, + ] - const filteredPages = pages.filter((p) => p.frontmatter.image === undefined) + const filteredPages = pages.filter(p => p.frontmatter.image === undefined) - for (const page of filteredPages) { - await generateImage({ - page, - template, - outDir: config.outDir, - fonts, - }) - } + for (const page of filteredPages) { + await generateImage({ + page, + template, + outDir: config.outDir, + fonts, + }) + } } export default generateOgImages interface GenerateImagesOptions { - page: ContentData - template: string - outDir: string - fonts: SatoriOptions["fonts"] + page: ContentData + template: string + outDir: string + fonts: SatoriOptions['fonts'] } function getDir(url: string) { - if (url.startsWith("/docs/faq/")) { - return "FAQ" - } else if (url.startsWith("/docs/guides/")) { - return "Guide" - } else if (url.startsWith("/news/") && url !== "/news/") { - return "News" - } + if (url.startsWith('/docs/faq/')) + return 'FAQ' + else if (url.startsWith('/docs/guides/')) + return 'Guide' + else if (url.startsWith('/news/') && url !== '/news/') + return 'News' - return undefined + return undefined } async function generateImage({ page, template, outDir, fonts }: GenerateImagesOptions) { - const { frontmatter, url } = page + const { frontmatter, url } = page - const options: SatoriOptions = { - width: 1200, - height: 628, - fonts, - props: { - title: - frontmatter.layout === "home" - ? frontmatter.hero.name ?? frontmatter.title - : frontmatter.customMetaTitle ?? frontmatter.title, - description: - frontmatter.layout === "home" - ? frontmatter.hero.tagline ?? frontmatter.description - : frontmatter.description, - dir: getDir(url), - }, - } + const options: SatoriOptions = { + width: 1200, + height: 628, + fonts, + props: { + title: + frontmatter.layout === 'home' + ? frontmatter.hero.name ?? frontmatter.title + : frontmatter.customMetaTitle ?? frontmatter.title, + description: + frontmatter.layout === 'home' + ? frontmatter.hero.tagline ?? frontmatter.description + : frontmatter.description, + dir: getDir(url), + }, + } - const svg = await satoriVue(options, template) + const svg = await satoriVue(options, template) - const render = await renderAsync(svg, { - fitTo: { - mode: "width", - value: 1200, - }, - }) + const render = await renderAsync(svg, { + fitTo: { + mode: 'width', + value: 1200, + }, + }) - const outputFolder = resolve(outDir, url.substring(1), "__og_image__") - const outputFile = resolve(outputFolder, "og.png") + const outputFolder = resolve(outDir, url.substring(1), '__og_image__') + const outputFile = resolve(outputFolder, 'og.png') - await mkdir(outputFolder, { recursive: true }) + await mkdir(outputFolder, { recursive: true }) - return await writeFile(outputFile, render.asPng()) + return await writeFile(outputFile, render.asPng()) } diff --git a/website/src/.vitepress/config/markdownConfig.ts b/website/src/.vitepress/config/markdownConfig.ts index 5e2f5136..71f61f85 100644 --- a/website/src/.vitepress/config/markdownConfig.ts +++ b/website/src/.vitepress/config/markdownConfig.ts @@ -1,29 +1,29 @@ -import type { MarkdownOptions } from "vitepress" +import type { MarkdownOptions } from 'vitepress' -import { attrs } from "@mdit/plugin-attrs" -import { figure } from "@mdit/plugin-figure" -import { imgLazyload } from "@mdit/plugin-img-lazyload" -import { imgMark } from "@mdit/plugin-img-mark" -import { imgSize } from "@mdit/plugin-img-size" -import { include } from "@mdit/plugin-include" -import { tabsMarkdownPlugin } from "vitepress-plugin-tabs" -import shortcode_plugin from "markdown-it-shortcode-tag" -import shortcodes from "./shortcodes" +import { attrs } from '@mdit/plugin-attrs' +import { figure } from '@mdit/plugin-figure' +import { imgLazyload } from '@mdit/plugin-img-lazyload' +import { imgMark } from '@mdit/plugin-img-mark' +import { imgSize } from '@mdit/plugin-img-size' +import { include } from '@mdit/plugin-include' +import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs' +import shortcode_plugin from 'markdown-it-shortcode-tag' +import shortcodes from './shortcodes' const markdownConfig: MarkdownOptions = { - config: (md) => { - md - .use(attrs) - .use(figure) - .use(imgLazyload) - .use(imgMark) - .use(imgSize) - .use(include, { - currentPath: (env) => env.filePath, - }) - .use(tabsMarkdownPlugin) - .use(shortcode_plugin, shortcodes) - }, + config: (md) => { + md + .use(attrs) + .use(figure) + .use(imgLazyload) + .use(imgMark) + .use(imgSize) + .use(include, { + currentPath: env => env.filePath, + }) + .use(tabsMarkdownPlugin) + .use(shortcode_plugin, shortcodes) + }, } export default markdownConfig diff --git a/website/src/.vitepress/config/navigation/navbar.ts b/website/src/.vitepress/config/navigation/navbar.ts index 5396968b..60cb3da5 100644 --- a/website/src/.vitepress/config/navigation/navbar.ts +++ b/website/src/.vitepress/config/navigation/navbar.ts @@ -1,30 +1,30 @@ -import type { DefaultTheme } from "vitepress" +import type { DefaultTheme } from 'vitepress' const nav: DefaultTheme.NavItem[] = [ - { - text: "Get v{app_version}", - activeMatch: "^/*?(download|changelogs)/*?$", - items: [ - { - text: "Download", - link: "/download/", - }, - { - text: "Changelogs", - link: "/changelogs/", - }, - ], - }, - { - text: "Docs", - link: "/docs/guides/getting-started", - activeMatch: "/docs/", - }, - { - text: "News", - link: "/news/", - activeMatch: "/news/", - }, + { + text: 'Get v{app_version}', + activeMatch: '^/*?(download|changelogs)/*?$', + items: [ + { + text: 'Download', + link: '/download/', + }, + { + text: 'Changelogs', + link: '/changelogs/', + }, + ], + }, + { + text: 'Docs', + link: '/docs/guides/getting-started', + activeMatch: '/docs/', + }, + { + text: 'News', + link: '/news/', + activeMatch: '/news/', + }, ] export default nav diff --git a/website/src/.vitepress/config/navigation/sidebar.ts b/website/src/.vitepress/config/navigation/sidebar.ts index bbe177df..ebf6c5f6 100644 --- a/website/src/.vitepress/config/navigation/sidebar.ts +++ b/website/src/.vitepress/config/navigation/sidebar.ts @@ -1,130 +1,130 @@ -import type { DefaultTheme } from "vitepress" +import type { DefaultTheme } from 'vitepress' const sidebar: DefaultTheme.SidebarMulti = { - "/download/": defaultSidebar(), - "/extensions/": defaultSidebar(), - "/docs/": defaultSidebar(), - "/forks/": defaultSidebar(), - "/changelogs/": defaultSidebar(), - "/news/": defaultSidebar(), - "/sandbox/": defaultSidebar(), + '/download/': defaultSidebar(), + '/extensions/': defaultSidebar(), + '/docs/': defaultSidebar(), + '/forks/': defaultSidebar(), + '/changelogs/': defaultSidebar(), + '/news/': defaultSidebar(), + '/sandbox/': defaultSidebar(), } function defaultSidebar(): DefaultTheme.SidebarItem[] { - return [ - { - items: [ - { - text: "Download", - link: "/download/", - }, - { - text: "Extensions", - link: "/extensions/", - }, - { - text: "Changelogs", - link: "/changelogs/", - }, - { - text: "Forks", - link: "/forks/", - }, - { - text: "Contribute", - link: "/docs/contribute", - }, - ], - }, - { - text: "Frequently Asked Questions", - items: [ - { text: "General", link: "/docs/faq/general" }, - { - text: "Library", - link: "/docs/faq/library", - }, - { - text: "Browse", - link: "/docs/faq/browse/", - collapsed: true, - items: [ - { text: "Extensions", link: "/docs/faq/browse/extensions" }, - { - text: "Local source", - link: "/docs/faq/browse/local-source", - }, - ], - }, - { - text: "Downloads", - link: "/docs/faq/downloads", - }, - { - text: "Reader", - link: "/docs/faq/reader", - }, - { - text: "Settings", - link: "/docs/faq/settings", - }, - { - text: "Android 11+", - link: "/docs/faq/android-11+", - }, - ], - }, - { - text: "Guides", - items: [ - { - text: "Getting started", - link: "/docs/guides/getting-started", - }, - { - text: "Troubleshooting", - link: "/docs/guides/troubleshooting/", - collapsed: true, - items: [ - { - text: "Common issues", - link: "/docs/guides/troubleshooting/common-issues", - }, - { - text: "Diagnosis", - link: "/docs/guides/troubleshooting/diagnosis", - }, - ], - }, - { - text: "Source migration", - link: "/docs/guides/source-migration", - }, - { text: "Backups", link: "/docs/guides/backups" }, - { text: "Tracking", link: "/docs/guides/tracking" }, - { text: "Categories", link: "/docs/guides/categories" }, - { - text: "Local source", - link: "/docs/guides/local-source/", - collapsed: true, - items: [ - { - text: "Advanced editing", - link: "/docs/guides/local-source/advanced", - }, - ], - }, - { - text: "Reader settings", - link: "/docs/guides/reader-settings", - }, - { - text: "Shizuku", - link: "/docs/guides/shizuku", - }, - ], - }, - ] + return [ + { + items: [ + { + text: 'Download', + link: '/download/', + }, + { + text: 'Extensions', + link: '/extensions/', + }, + { + text: 'Changelogs', + link: '/changelogs/', + }, + { + text: 'Forks', + link: '/forks/', + }, + { + text: 'Contribute', + link: '/docs/contribute', + }, + ], + }, + { + text: 'Frequently Asked Questions', + items: [ + { text: 'General', link: '/docs/faq/general' }, + { + text: 'Library', + link: '/docs/faq/library', + }, + { + text: 'Browse', + link: '/docs/faq/browse/', + collapsed: true, + items: [ + { text: 'Extensions', link: '/docs/faq/browse/extensions' }, + { + text: 'Local source', + link: '/docs/faq/browse/local-source', + }, + ], + }, + { + text: 'Downloads', + link: '/docs/faq/downloads', + }, + { + text: 'Reader', + link: '/docs/faq/reader', + }, + { + text: 'Settings', + link: '/docs/faq/settings', + }, + { + text: 'Android 11+', + link: '/docs/faq/android-11+', + }, + ], + }, + { + text: 'Guides', + items: [ + { + text: 'Getting started', + link: '/docs/guides/getting-started', + }, + { + text: 'Troubleshooting', + link: '/docs/guides/troubleshooting/', + collapsed: true, + items: [ + { + text: 'Common issues', + link: '/docs/guides/troubleshooting/common-issues', + }, + { + text: 'Diagnosis', + link: '/docs/guides/troubleshooting/diagnosis', + }, + ], + }, + { + text: 'Source migration', + link: '/docs/guides/source-migration', + }, + { text: 'Backups', link: '/docs/guides/backups' }, + { text: 'Tracking', link: '/docs/guides/tracking' }, + { text: 'Categories', link: '/docs/guides/categories' }, + { + text: 'Local source', + link: '/docs/guides/local-source/', + collapsed: true, + items: [ + { + text: 'Advanced editing', + link: '/docs/guides/local-source/advanced', + }, + ], + }, + { + text: 'Reader settings', + link: '/docs/guides/reader-settings', + }, + { + text: 'Shizuku', + link: '/docs/guides/shizuku', + }, + ], + }, + ] } export default sidebar diff --git a/website/src/.vitepress/config/scripts/languages.ts b/website/src/.vitepress/config/scripts/languages.ts index f6ff6245..be6c46c1 100644 --- a/website/src/.vitepress/config/scripts/languages.ts +++ b/website/src/.vitepress/config/scripts/languages.ts @@ -1,21 +1,20 @@ export function simpleLangName(code: string) { - if (code === "all") { - return "All" - } - const namesInEnglish = new Intl.DisplayNames(["en"], { type: "language" }) - return capitalize(namesInEnglish.of(code)!, "en") + if (code === 'all') + return 'All' + + const namesInEnglish = new Intl.DisplayNames(['en'], { type: 'language' }) + return capitalize(namesInEnglish.of(code)!, 'en') } export function langName(code: string) { - if (code === "all") { - return "All" - } + if (code === 'all') + return 'All' - const namesInEnglish = new Intl.DisplayNames(["en"], { type: "language" }) - const namesInNative = new Intl.DisplayNames([code], { type: "language" }) - return `${capitalize(namesInEnglish.of(code)!, "en")} - ${capitalize(namesInNative.of(code)!, code)}` + const namesInEnglish = new Intl.DisplayNames(['en'], { type: 'language' }) + const namesInNative = new Intl.DisplayNames([code], { type: 'language' }) + return `${capitalize(namesInEnglish.of(code)!, 'en')} - ${capitalize(namesInNative.of(code)!, code)}` } function capitalize(string: string, locale: string) { - return string.charAt(0).toLocaleUpperCase(locale) + string.substring(1) + return string.charAt(0).toLocaleUpperCase(locale) + string.substring(1) } diff --git a/website/src/.vitepress/config/shortcodes.ts b/website/src/.vitepress/config/shortcodes.ts index 71b76a70..f89f0f72 100644 --- a/website/src/.vitepress/config/shortcodes.ts +++ b/website/src/.vitepress/config/shortcodes.ts @@ -1,91 +1,89 @@ const iconMappings = { - alertDecagramOutline: '', - backupRestore: '', - bookmarkBoxOutline: '', - bookOpenOutline: '', - cloudOffOutline: '', - codeTags: '', - cog: '', - compassOutline: '', - dotsHorizontal: '', - downloadOutline: '', - glasses: '', - helpCircleOutline: '', - history: '', - informationOutline: '', - labelOutline: '', - paletteOutline: '', - queryStats: '', - security: '', - sync: '', + alertDecagramOutline: '', + backupRestore: '', + bookmarkBoxOutline: '', + bookOpenOutline: '', + cloudOffOutline: '', + codeTags: '', + cog: '', + compassOutline: '', + dotsHorizontal: '', + downloadOutline: '', + glasses: '', + helpCircleOutline: '', + history: '', + informationOutline: '', + labelOutline: '', + paletteOutline: '', + queryStats: '', + security: '', + sync: '', } interface Navigation { - name: string - icon?: string - dependsOn?: string + name: string + icon?: string + dependsOn?: string } const navigationMappings: Record = { - // Main menus - "main_library": { name: "Library", icon: iconMappings.bookmarkBoxOutline }, - "main_updates": { name: "Updates", icon: iconMappings.alertDecagramOutline }, - "main_history": { name: "History", icon: iconMappings.history }, - "main_browse": { name: "Browse", icon: iconMappings.compassOutline }, - "main_more": { name: "More", icon: iconMappings.dotsHorizontal }, + // Main menus + 'main_library': { name: 'Library', icon: iconMappings.bookmarkBoxOutline }, + 'main_updates': { name: 'Updates', icon: iconMappings.alertDecagramOutline }, + 'main_history': { name: 'History', icon: iconMappings.history }, + 'main_browse': { name: 'Browse', icon: iconMappings.compassOutline }, + 'main_more': { name: 'More', icon: iconMappings.dotsHorizontal }, - // Browse menu - "sources": { name: "Sources", dependsOn: "main_browse" }, - "extensions": { name: "Extensions", dependsOn: "main_browse" }, - "migrate": { name: "Migrate", dependsOn: "main_browse" }, + // Browse menu + 'sources': { name: 'Sources', dependsOn: 'main_browse' }, + 'extensions': { name: 'Extensions', dependsOn: 'main_browse' }, + 'migrate': { name: 'Migrate', dependsOn: 'main_browse' }, - // More menu - "downloaded-only": { name: "Downloaded only", icon: iconMappings.cloudOffOutline, dependsOn: "main_more" }, - "incognito-mode": { name: "Incognito mode", icon: iconMappings.glasses, dependsOn: "main_more" }, - "download-queue": { name: "Download queue", icon: iconMappings.downloadOutline, dependsOn: "main_more" }, - "categories": { name: "Categories", icon: iconMappings.labelOutline, dependsOn: "main_more" }, - "statistics": { name: "Statistics", icon: iconMappings.queryStats, dependsOn: "main_more" }, - "backup-and-restore": { name: "Backup and restore", icon: iconMappings.backupRestore, dependsOn: "main_more" }, - "settings": { name: "Settings", icon: iconMappings.cog, dependsOn: "main_more" }, - "about": { name: "About", icon: iconMappings.informationOutline, dependsOn: "main_more" }, - "help": { name: "Help", icon: iconMappings.helpCircleOutline, dependsOn: "main_more" }, + // More menu + 'downloaded-only': { name: 'Downloaded only', icon: iconMappings.cloudOffOutline, dependsOn: 'main_more' }, + 'incognito-mode': { name: 'Incognito mode', icon: iconMappings.glasses, dependsOn: 'main_more' }, + 'download-queue': { name: 'Download queue', icon: iconMappings.downloadOutline, dependsOn: 'main_more' }, + 'categories': { name: 'Categories', icon: iconMappings.labelOutline, dependsOn: 'main_more' }, + 'statistics': { name: 'Statistics', icon: iconMappings.queryStats, dependsOn: 'main_more' }, + 'backup-and-restore': { name: 'Backup and restore', icon: iconMappings.backupRestore, dependsOn: 'main_more' }, + 'settings': { name: 'Settings', icon: iconMappings.cog, dependsOn: 'main_more' }, + 'about': { name: 'About', icon: iconMappings.informationOutline, dependsOn: 'main_more' }, + 'help': { name: 'Help', icon: iconMappings.helpCircleOutline, dependsOn: 'main_more' }, - // Settings submenu - "appearance": { name: "Appearance", icon: iconMappings.paletteOutline, dependsOn: "settings" }, - "library": { name: "Library", icon: iconMappings.bookmarkBoxOutline, dependsOn: "settings" }, - "downloads": { name: "Downloads", icon: iconMappings.downloadOutline, dependsOn: "settings" }, - "tracking": { name: "Tracking", icon: iconMappings.sync, dependsOn: "settings" }, - "browse": { name: "Browse", icon: iconMappings.compassOutline, dependsOn: "settings" }, - "security-and-privacy": { name: "Security and privacy", icon: iconMappings.security, dependsOn: "settings" }, - "reader": { name: "Reader", icon: iconMappings.bookOpenOutline, dependsOn: "settings" }, - "advanced": { name: "Advanced", icon: iconMappings.codeTags, dependsOn: "settings" }, + // Settings submenu + 'appearance': { name: 'Appearance', icon: iconMappings.paletteOutline, dependsOn: 'settings' }, + 'library': { name: 'Library', icon: iconMappings.bookmarkBoxOutline, dependsOn: 'settings' }, + 'downloads': { name: 'Downloads', icon: iconMappings.downloadOutline, dependsOn: 'settings' }, + 'tracking': { name: 'Tracking', icon: iconMappings.sync, dependsOn: 'settings' }, + 'browse': { name: 'Browse', icon: iconMappings.compassOutline, dependsOn: 'settings' }, + 'security-and-privacy': { name: 'Security and privacy', icon: iconMappings.security, dependsOn: 'settings' }, + 'reader': { name: 'Reader', icon: iconMappings.bookOpenOutline, dependsOn: 'settings' }, + 'advanced': { name: 'Advanced', icon: iconMappings.codeTags, dependsOn: 'settings' }, } function generateNavigationHtml(navKey: string) { - const navData = navigationMappings[navKey] + const navData = navigationMappings[navKey] - if (!navData) { - return "Unsupported Navigation!" - } + if (!navData) + return 'Unsupported Navigation!' - const { name, icon, dependsOn } = navData + const { name, icon, dependsOn } = navData - const iconHtml = icon ?? "" - let html = `${iconHtml}${name}` + const iconHtml = icon ?? '' + let html = `${iconHtml}${name}` - if (dependsOn) { - html = `${generateNavigationHtml(dependsOn)} -> ${html}` - } + if (dependsOn) + html = `${generateNavigationHtml(dependsOn)} -> ${html}` - return html + return html } const shortcodes = { - nav: { - render({ to }) { - return generateNavigationHtml(to) - }, - }, + nav: { + render({ to }) { + return generateNavigationHtml(to) + }, + }, } export default shortcodes diff --git a/website/src/.vitepress/config/themeConfig.ts b/website/src/.vitepress/config/themeConfig.ts index cb4b8db0..677a8241 100644 --- a/website/src/.vitepress/config/themeConfig.ts +++ b/website/src/.vitepress/config/themeConfig.ts @@ -1,78 +1,78 @@ -import type { DefaultTheme } from "vitepress" +import type { DefaultTheme } from 'vitepress' -import nav from "./navigation/navbar" -import sidebar from "./navigation/sidebar" +import nav from './navigation/navbar' +import sidebar from './navigation/sidebar' const themeConfig: DefaultTheme.Config = { - logo: { - src: "/img/logo-128px.png", - width: 24, - height: 24, - }, + logo: { + src: '/img/logo-128px.png', + width: 24, + height: 24, + }, - nav, - sidebar, + nav, + sidebar, - outline: [2, 3], + outline: [2, 3], - socialLinks: [ - { - icon: "github", - link: "https://github.com/tachiyomiorg/tachiyomi", - ariaLabel: "Project GitHub", - }, - { - icon: "discord", - link: "https://discord.gg/tachiyomi", - ariaLabel: "Discord Server", - }, - { - icon: "x", - link: "https://twitter.com/tachiyomiorg", - ariaLabel: "X Page", - }, - { - icon: "facebook", - link: "https://facebook.com/tachiyomiorg", - ariaLabel: "Facebook Page", - }, - { - icon: { - svg: '', - }, - link: "https://reddit.com/r/Tachiyomi", - ariaLabel: "Support subreddit", - }, - // { icon: "instagram", link: "https://instagram.com/tachiyomiorg", ariaLabel: "Instagram Page" }, - ], + socialLinks: [ + { + icon: 'github', + link: 'https://github.com/tachiyomiorg/tachiyomi', + ariaLabel: 'Project GitHub', + }, + { + icon: 'discord', + link: 'https://discord.gg/tachiyomi', + ariaLabel: 'Discord Server', + }, + { + icon: 'x', + link: 'https://twitter.com/tachiyomiorg', + ariaLabel: 'X Page', + }, + { + icon: 'facebook', + link: 'https://facebook.com/tachiyomiorg', + ariaLabel: 'Facebook Page', + }, + { + icon: { + svg: '', + }, + link: 'https://reddit.com/r/Tachiyomi', + ariaLabel: 'Support subreddit', + }, + // { icon: "instagram", link: "https://instagram.com/tachiyomiorg", ariaLabel: "Instagram Page" }, + ], - footer: { - message: "Open-source Apache Licensed | Privacy policy | Powered by Netlify \"Netlify", - copyright: `Copyright © 2015 - ${new Date().getFullYear()} Javier Tomás`, - }, + footer: { + message: 'Open-source Apache Licensed | Privacy policy | Powered by Netlify Netlify Logo', + copyright: `Copyright © 2015 - ${new Date().getFullYear()} Javier Tomás`, + }, - editLink: { - pattern: "https://github.com/tachiyomiorg/website/edit/main/website/src/:path", - text: "Help us improve this page", - }, + editLink: { + pattern: 'https://github.com/tachiyomiorg/website/edit/main/website/src/:path', + text: 'Help us improve this page', + }, - lastUpdated: { - text: "Last updated", - formatOptions: { - forceLocale: true, - dateStyle: "long", - timeStyle: "short", - }, - }, + lastUpdated: { + text: 'Last updated', + formatOptions: { + forceLocale: true, + dateStyle: 'long', + timeStyle: 'short', + }, + }, - search: { - provider: "algolia", - options: { - appId: "2C8EHFTRW7", - apiKey: "ee38c6e04295e4d206399ab59a58ea9a", - indexName: "tachiyomi", - }, - }, + search: { + provider: 'algolia', + options: { + appId: '2C8EHFTRW7', + apiKey: 'ee38c6e04295e4d206399ab59a58ea9a', + indexName: 'tachiyomi', + }, + }, } export default themeConfig diff --git a/website/src/.vitepress/theme/Layout.vue b/website/src/.vitepress/theme/Layout.vue index 2eadf601..ca3c8f01 100644 --- a/website/src/.vitepress/theme/Layout.vue +++ b/website/src/.vitepress/theme/Layout.vue @@ -1,64 +1,64 @@ diff --git a/website/src/.vitepress/theme/components/Changelog.vue b/website/src/.vitepress/theme/components/Changelog.vue index 1f270305..9ad671d0 100644 --- a/website/src/.vitepress/theme/components/Changelog.vue +++ b/website/src/.vitepress/theme/components/Changelog.vue @@ -1,8 +1,8 @@ diff --git a/website/src/.vitepress/theme/components/ChangelogsList.vue b/website/src/.vitepress/theme/components/ChangelogsList.vue index 2c006617..eef2a0b5 100644 --- a/website/src/.vitepress/theme/components/ChangelogsList.vue +++ b/website/src/.vitepress/theme/components/ChangelogsList.vue @@ -1,69 +1,69 @@ diff --git a/website/src/.vitepress/theme/components/Contributors.vue b/website/src/.vitepress/theme/components/Contributors.vue index c76bad80..65204af5 100644 --- a/website/src/.vitepress/theme/components/Contributors.vue +++ b/website/src/.vitepress/theme/components/Contributors.vue @@ -1,108 +1,106 @@ diff --git a/website/src/.vitepress/theme/components/CustomNavBarMenu.vue b/website/src/.vitepress/theme/components/CustomNavBarMenu.vue index 5ac2fa64..53f74793 100644 --- a/website/src/.vitepress/theme/components/CustomNavBarMenu.vue +++ b/website/src/.vitepress/theme/components/CustomNavBarMenu.vue @@ -1,12 +1,12 @@ diff --git a/website/src/.vitepress/theme/components/CustomNavScreenMenu.vue b/website/src/.vitepress/theme/components/CustomNavScreenMenu.vue index f576dae5..d7fa8406 100644 --- a/website/src/.vitepress/theme/components/CustomNavScreenMenu.vue +++ b/website/src/.vitepress/theme/components/CustomNavScreenMenu.vue @@ -1,11 +1,11 @@ diff --git a/website/src/.vitepress/theme/components/CustomSwitchAppearance.vue b/website/src/.vitepress/theme/components/CustomSwitchAppearance.vue index 02ccc4bd..5836f656 100644 --- a/website/src/.vitepress/theme/components/CustomSwitchAppearance.vue +++ b/website/src/.vitepress/theme/components/CustomSwitchAppearance.vue @@ -15,7 +15,7 @@ const supportsViewTransition = ref(false) onMounted(() => { supportsViewTransition.value = 'startViewTransition' in document - && window.matchMedia('(prefers-reduced-motion: no-preference)').matches + && window.matchMedia('(prefers-reduced-motion: no-preference)').matches }) @@ -40,35 +40,35 @@ onMounted(() => { diff --git a/website/src/.vitepress/theme/components/DownloadButtons.vue b/website/src/.vitepress/theme/components/DownloadButtons.vue index 9a6f9a87..6c3fb39b 100644 --- a/website/src/.vitepress/theme/components/DownloadButtons.vue +++ b/website/src/.vitepress/theme/components/DownloadButtons.vue @@ -1,174 +1,174 @@ diff --git a/website/src/.vitepress/theme/components/Extensions/ExtensionFilters.vue b/website/src/.vitepress/theme/components/Extensions/ExtensionFilters.vue index bad2e079..cc655a6c 100644 --- a/website/src/.vitepress/theme/components/Extensions/ExtensionFilters.vue +++ b/website/src/.vitepress/theme/components/Extensions/ExtensionFilters.vue @@ -1,104 +1,104 @@ diff --git a/website/src/.vitepress/theme/components/Extensions/ExtensionGroup.vue b/website/src/.vitepress/theme/components/Extensions/ExtensionGroup.vue index 9838633f..f7dda537 100644 --- a/website/src/.vitepress/theme/components/Extensions/ExtensionGroup.vue +++ b/website/src/.vitepress/theme/components/Extensions/ExtensionGroup.vue @@ -1,51 +1,51 @@ diff --git a/website/src/.vitepress/theme/components/Extensions/ExtensionItem.vue b/website/src/.vitepress/theme/components/Extensions/ExtensionItem.vue index 4599dcb6..4af8c2a6 100644 --- a/website/src/.vitepress/theme/components/Extensions/ExtensionItem.vue +++ b/website/src/.vitepress/theme/components/Extensions/ExtensionItem.vue @@ -1,179 +1,179 @@ diff --git a/website/src/.vitepress/theme/components/Extensions/ExtensionList.vue b/website/src/.vitepress/theme/components/Extensions/ExtensionList.vue index 4042efb9..76b3785b 100644 --- a/website/src/.vitepress/theme/components/Extensions/ExtensionList.vue +++ b/website/src/.vitepress/theme/components/Extensions/ExtensionList.vue @@ -1,36 +1,36 @@ diff --git a/website/src/.vitepress/theme/components/Extensions/ExtensionsWrapper.vue b/website/src/.vitepress/theme/components/Extensions/ExtensionsWrapper.vue index 3c67cdb9..8ea3508e 100644 --- a/website/src/.vitepress/theme/components/Extensions/ExtensionsWrapper.vue +++ b/website/src/.vitepress/theme/components/Extensions/ExtensionsWrapper.vue @@ -1,127 +1,125 @@ diff --git a/website/src/.vitepress/theme/components/News.vue b/website/src/.vitepress/theme/components/News.vue index fddc8b09..7014cbb3 100644 --- a/website/src/.vitepress/theme/components/News.vue +++ b/website/src/.vitepress/theme/components/News.vue @@ -1,161 +1,161 @@ diff --git a/website/src/.vitepress/theme/components/OgImageTemplate.vue b/website/src/.vitepress/theme/components/OgImageTemplate.vue index e594e55f..caafef82 100644 --- a/website/src/.vitepress/theme/components/OgImageTemplate.vue +++ b/website/src/.vitepress/theme/components/OgImageTemplate.vue @@ -3,30 +3,30 @@ defineProps<{ title: string; description?: string; dir?: string }>() diff --git a/website/src/.vitepress/theme/components/ReleaseDate.vue b/website/src/.vitepress/theme/components/ReleaseDate.vue index c81fbd4f..c2f585f3 100644 --- a/website/src/.vitepress/theme/components/ReleaseDate.vue +++ b/website/src/.vitepress/theme/components/ReleaseDate.vue @@ -1,30 +1,30 @@ diff --git a/website/src/.vitepress/theme/components/RssLink.vue b/website/src/.vitepress/theme/components/RssLink.vue index 1a0248c0..181888f0 100644 --- a/website/src/.vitepress/theme/components/RssLink.vue +++ b/website/src/.vitepress/theme/components/RssLink.vue @@ -11,17 +11,17 @@ import { IconRssBox } from '@iconify-prerendered/vue-mdi' diff --git a/website/src/.vitepress/theme/data/changelogs.data.ts b/website/src/.vitepress/theme/data/changelogs.data.ts index 1fba646a..bdc9e511 100644 --- a/website/src/.vitepress/theme/data/changelogs.data.ts +++ b/website/src/.vitepress/theme/data/changelogs.data.ts @@ -1,6 +1,6 @@ -import { defineLoader } from "vitepress" -import { Octokit } from "@octokit/rest" -import type { GetResponseDataTypeFromEndpointMethod } from "@octokit/types" +import { defineLoader } from 'vitepress' +import { Octokit } from '@octokit/rest' +import type { GetResponseDataTypeFromEndpointMethod } from '@octokit/types' const octokit = new Octokit() @@ -10,13 +10,13 @@ declare const data: GitHubReleaseList export { data } export default defineLoader({ - async load(): Promise { - const releases = await octokit.paginate(octokit.repos.listReleases, { - owner: "tachiyomiorg", - repo: "tachiyomi", - per_page: 100, - }) + async load(): Promise { + const releases = await octokit.paginate(octokit.repos.listReleases, { + owner: 'tachiyomiorg', + repo: 'tachiyomi', + per_page: 100, + }) - return releases - }, + return releases + }, }) diff --git a/website/src/.vitepress/theme/data/news.data.ts b/website/src/.vitepress/theme/data/news.data.ts index 5b6b4ea7..17950416 100644 --- a/website/src/.vitepress/theme/data/news.data.ts +++ b/website/src/.vitepress/theme/data/news.data.ts @@ -1,29 +1,29 @@ -import { createContentLoader } from "vitepress" +import { createContentLoader } from 'vitepress' export interface News { - title: string - description: string - date: string - url: string + title: string + description: string + date: string + url: string } declare const data: News[] export { data } -export default createContentLoader("news/*.md", { - excerpt: true, - transform(articles) { - return articles - .filter(({ url }) => url !== "/news/") - .map( - ({ frontmatter, url }) => - { - title: frontmatter.title, - description: frontmatter.description, - date: frontmatter.date, - url, - }, - ) - .sort((a, b) => b.date.localeCompare(a.date)) - }, +export default createContentLoader('news/*.md', { + excerpt: true, + transform(articles) { + return articles + .filter(({ url }) => url !== '/news/') + .map( + ({ frontmatter, url }) => + { + title: frontmatter.title, + description: frontmatter.description, + date: frontmatter.date, + url, + }, + ) + .sort((a, b) => b.date.localeCompare(a.date)) + }, }) diff --git a/website/src/.vitepress/theme/data/release.data.ts b/website/src/.vitepress/theme/data/release.data.ts index a498f765..c2e5307a 100644 --- a/website/src/.vitepress/theme/data/release.data.ts +++ b/website/src/.vitepress/theme/data/release.data.ts @@ -1,31 +1,31 @@ -import { defineLoader } from "vitepress" -import { Octokit } from "@octokit/rest" -import type { GetResponseDataTypeFromEndpointMethod } from "@octokit/types" +import { defineLoader } from 'vitepress' +import { Octokit } from '@octokit/rest' +import type { GetResponseDataTypeFromEndpointMethod } from '@octokit/types' const octokit = new Octokit() type GitHubRelease = GetResponseDataTypeFromEndpointMethod export interface AppRelease { - stable: GitHubRelease - preview: GitHubRelease + stable: GitHubRelease + preview: GitHubRelease } declare const data: AppRelease export { data } export default defineLoader({ - async load(): Promise { - const { data: stable } = await octokit.repos.getLatestRelease({ - owner: "tachiyomiorg", - repo: "tachiyomi", - }) + async load(): Promise { + const { data: stable } = await octokit.repos.getLatestRelease({ + owner: 'tachiyomiorg', + repo: 'tachiyomi', + }) - const { data: preview } = await octokit.repos.getLatestRelease({ - owner: "tachiyomiorg", - repo: "tachiyomi-preview", - }) + const { data: preview } = await octokit.repos.getLatestRelease({ + owner: 'tachiyomiorg', + repo: 'tachiyomi-preview', + }) - return { stable, preview } - }, + return { stable, preview } + }, }) diff --git a/website/src/.vitepress/theme/index.ts b/website/src/.vitepress/theme/index.ts index 41eaf592..5879bb6a 100644 --- a/website/src/.vitepress/theme/index.ts +++ b/website/src/.vitepress/theme/index.ts @@ -1,31 +1,31 @@ // https://vitepress.dev/guide/custom-theme -import DefaultTheme from "vitepress/theme" +import DefaultTheme from 'vitepress/theme' // Import Stylus files -import "./styles/base.styl" +import './styles/base.styl' // Import Global plugins -import "element-plus/theme-chalk/dark/css-vars.css" +import 'element-plus/theme-chalk/dark/css-vars.css' -import { VueQueryPlugin } from "@tanstack/vue-query" +import { VueQueryPlugin } from '@tanstack/vue-query' -import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client" +import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client' // Import icon components -import { IconBugReport, IconDownload, IconNewspaperVariant } from "@iconify-prerendered/vue-mdi" +import { IconBugReport, IconDownload, IconNewspaperVariant } from '@iconify-prerendered/vue-mdi' -import analytics from "./plugin/analytics" -import Layout from "./Layout.vue" +import analytics from './plugin/analytics' +import Layout from './Layout.vue' export default { - extends: DefaultTheme, - enhanceApp({ app }) { - app.use(VueQueryPlugin) - enhanceAppWithTabs(app) - app.component("IconDownload", IconDownload) - app.component("IconNewspaperVariant", IconNewspaperVariant) - app.component("IconBugReport", IconBugReport) - analytics({ id: "G-2CBXXM1Y86" }) - }, - Layout, + extends: DefaultTheme, + enhanceApp({ app }) { + app.use(VueQueryPlugin) + enhanceAppWithTabs(app) + app.component('IconDownload', IconDownload) + app.component('IconNewspaperVariant', IconNewspaperVariant) + app.component('IconBugReport', IconBugReport) + analytics({ id: 'G-2CBXXM1Y86' }) + }, + Layout, } diff --git a/website/src/.vitepress/theme/plugin/analytics.ts b/website/src/.vitepress/theme/plugin/analytics.ts index 45a6679d..4dda37a8 100644 --- a/website/src/.vitepress/theme/plugin/analytics.ts +++ b/website/src/.vitepress/theme/plugin/analytics.ts @@ -3,35 +3,33 @@ // https://github.com/ZhongxuYang/vitepress-plugin-google-analytics function mountGoogleAnalytics(id: string) { - if (("dataLayer" in window && window.gtag) || window.location.hostname === "localhost") { - return - } + if (('dataLayer' in window && window.gtag) || window.location.hostname === 'localhost') + return - const analyticsScript = document.createElement("script") + const analyticsScript = document.createElement('script') - analyticsScript.addEventListener("load", () => { - // @ts-expect-error Missing types - window.dataLayer = window.dataLayer || [] - function gtag(..._args: any[]) { - // @ts-expect-error Missing types - // eslint-disable-next-line prefer-rest-params - window.dataLayer.push(arguments) - } + analyticsScript.addEventListener('load', () => { + // @ts-expect-error Missing types + window.dataLayer = window.dataLayer || [] + function gtag(..._args: any[]) { + // @ts-expect-error Missing types + // eslint-disable-next-line prefer-rest-params + window.dataLayer.push(arguments) + } - gtag("js", new Date()) - gtag("config", id) + gtag('js', new Date()) + gtag('config', id) - window.gtag = gtag - }) + window.gtag = gtag + }) - analyticsScript.src = `https://www.googletagmanager.com/gtag/js?id=${id}` + analyticsScript.src = `https://www.googletagmanager.com/gtag/js?id=${id}` - document.body.appendChild(analyticsScript) + document.body.appendChild(analyticsScript) } export default function ({ id }: { id: string }) { - // eslint-disable-next-line n/prefer-global/process - if (process.env.NODE_ENV === "production" && id && typeof window !== "undefined") { - mountGoogleAnalytics(id) - } + // eslint-disable-next-line node/prefer-global/process + if (process.env.NODE_ENV === 'production' && id && typeof window !== 'undefined') + mountGoogleAnalytics(id) } diff --git a/website/src/.vitepress/theme/queries/useExtensionsRepositoryQuery.ts b/website/src/.vitepress/theme/queries/useExtensionsRepositoryQuery.ts index 525eba9f..1e6e9028 100644 --- a/website/src/.vitepress/theme/queries/useExtensionsRepositoryQuery.ts +++ b/website/src/.vitepress/theme/queries/useExtensionsRepositoryQuery.ts @@ -1,44 +1,44 @@ -import type { UseQueryOptions } from "@tanstack/vue-query" -import { useQuery } from "@tanstack/vue-query" -import axios from "axios" -import { GITHUB_EXTENSION_JSON } from "../../config/constants" +import type { UseQueryOptions } from '@tanstack/vue-query' +import { useQuery } from '@tanstack/vue-query' +import axios from 'axios' +import { GITHUB_EXTENSION_JSON } from '../../config/constants' -export type ReleaseType = "stable" | "preview" +export type ReleaseType = 'stable' | 'preview' export interface Extension { - name: string - pkg: string - apk: string - lang: string - code: number - version: string - nsfw: number - hasReadme: number - hasChangelog: number - sources: Source[] + name: string + pkg: string + apk: string + lang: string + code: number + version: string + nsfw: number + hasReadme: number + hasChangelog: number + sources: Source[] } export interface Source { - name: string - lang: string - id: string - baseUrl: string - versionId: number + name: string + lang: string + id: string + baseUrl: string + versionId: number } type UseExtensionsRepositoryQueryOptions = - UseQueryOptions + UseQueryOptions export default function useExtensionsRepositoryQuery(options: UseExtensionsRepositoryQueryOptions = {}) { - return useQuery({ - queryKey: ["extensions"], - queryFn: async () => { - const { data } = await axios.get(GITHUB_EXTENSION_JSON) + return useQuery({ + queryKey: ['extensions'], + queryFn: async () => { + const { data } = await axios.get(GITHUB_EXTENSION_JSON) - return data - }, - initialData: () => [], - refetchOnWindowFocus: false, - ...options, - }) + return data + }, + initialData: () => [], + refetchOnWindowFocus: false, + ...options, + }) } diff --git a/website/src/.vitepress/theme/styles/base.styl b/website/src/.vitepress/theme/styles/base.styl index 93ba1489..68a0bbf2 100644 --- a/website/src/.vitepress/theme/styles/base.styl +++ b/website/src/.vitepress/theme/styles/base.styl @@ -10,14 +10,14 @@ $themeColor = #818cf8 :root { - --vp-c-brand: $themeColor - --vp-c-brand-light: tint($themeColor, 20%) - --vp-c-brand-lighter: tint($themeColor, 40%) - --vp-c-brand-lightest: tint($themeColor, 60%) - --vp-c-brand-dark: shade($themeColor, 25%) - --vp-c-brand-darker: shade($themeColor, 50%) - --vp-c-brand-darkest: shade($themeColor, 75%) - --vp-c-brand-dimm: alpha($themeColor, 0.08) + --vp-c-brand: $themeColor + --vp-c-brand-light: tint($themeColor, 20%) + --vp-c-brand-lighter: tint($themeColor, 40%) + --vp-c-brand-lightest: tint($themeColor, 60%) + --vp-c-brand-dark: shade($themeColor, 25%) + --vp-c-brand-darker: shade($themeColor, 50%) + --vp-c-brand-darkest: shade($themeColor, 75%) + --vp-c-brand-dimm: alpha($themeColor, 0.08) } /** @@ -25,23 +25,23 @@ $themeColor = #818cf8 * -------------------------------------------------------------------------- */ html:not(.dark) { - img[data-mode="darkmode-only"] { - display: none !important + img[data-mode="darkmode-only"] { + display: none !important - & + figcaption { - display: none !important - } - } + & + figcaption { + display: none !important + } + } } .dark { - img[data-mode="lightmode-only"] { - display: none !important + img[data-mode="lightmode-only"] { + display: none !important - & + figcaption { - display: none !important - } - } + & + figcaption { + display: none !important + } + } } /** @@ -49,7 +49,7 @@ html:not(.dark) { * -------------------------------------------------------------------------- */ :root { - --vp-button-brand-bg: var(--vp-c-brand-darker) + --vp-button-brand-bg: var(--vp-c-brand-darker) } /** @@ -57,32 +57,32 @@ html:not(.dark) { * -------------------------------------------------------------------------- */ :root { - --vp-home-hero-name-color: transparent - --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) - --vp-home-hero-image-background-image: linear-gradient(-45deg, var(--vp-c-brand-light) 50%, var(--vp-c-brand-lighter) 50%) - --vp-home-hero-image-filter: blur(40px) + --vp-home-hero-name-color: transparent + --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) + --vp-home-hero-image-background-image: linear-gradient(-45deg, var(--vp-c-brand-light) 50%, var(--vp-c-brand-lighter) 50%) + --vp-home-hero-image-filter: blur(40px) } .dark { - --vp-home-hero-image-background-image: linear-gradient(-45deg, var(--vp-c-brand-darker) 25%, var(--vp-c-brand-darkest) 25%) + --vp-home-hero-image-background-image: linear-gradient(-45deg, var(--vp-c-brand-darker) 25%, var(--vp-c-brand-darkest) 25%) } @media (min-width 640px) { - :root { - --vp-home-hero-image-filter: blur(56px) - } + :root { + --vp-home-hero-image-filter: blur(56px) + } } @media (min-width 960px) { - :root { - --vp-home-hero-image-filter: blur(72px) - } + :root { + --vp-home-hero-image-filter: blur(72px) + } } .VPFooter { - .divider { - color: var(--vp-c-divider) - } + .divider { + color: var(--vp-c-divider) + } } /** @@ -90,22 +90,22 @@ html:not(.dark) { * -------------------------------------------------------------------------- */ :root { - --vp-custom-block-tip-border: var(--vp-c-brand) - --vp-custom-block-tip-text: var(--vp-c-brand-darker) - --vp-custom-block-tip-bg: var(--vp-c-brand-dimm) + --vp-custom-block-tip-border: var(--vp-c-brand) + --vp-custom-block-tip-text: var(--vp-c-brand-darker) + --vp-custom-block-tip-bg: var(--vp-c-brand-dimm) } .dark { - --vp-custom-block-tip-border: var(--vp-c-brand) - --vp-custom-block-tip-text: var(--vp-c-brand-lightest) - --vp-custom-block-tip-bg: var(--vp-c-brand-dimm) - --vp-custom-block-info-bg: #212127 + --vp-custom-block-tip-border: var(--vp-c-brand) + --vp-custom-block-tip-text: var(--vp-c-brand-lightest) + --vp-custom-block-tip-bg: var(--vp-c-brand-dimm) + --vp-custom-block-info-bg: #212127 } .plugin-tabs { - &--content { - padding: 2rem !important - } + &--content { + padding: 2rem !important + } } /** @@ -113,11 +113,11 @@ html:not(.dark) { * -------------------------------------------------------------------------- */ .DocSearch { - --docsearch-primary-color: var(--vp-c-brand) !important + --docsearch-primary-color: var(--vp-c-brand) !important } .VPImage.image-src { - border-radius: 8px + border-radius: 8px } /** @@ -125,12 +125,12 @@ html:not(.dark) { */ .VPLocalSearchBox { - --vp-local-search-highlight-bg: var(--vp-c-brand-soft) - --vp-local-search-highlight-text: var(--vp-c-brand-dark) + --vp-local-search-highlight-bg: var(--vp-c-brand-soft) + --vp-local-search-highlight-text: var(--vp-c-brand-dark) } .dark .VPLocalSearchBox { - --vp-local-search-highlight-text: var(--vp-c-brand-lightest) + --vp-local-search-highlight-text: var(--vp-c-brand-lightest) } /** @@ -140,39 +140,39 @@ html:not(.dark) { // Shitty method to give elevation to image - TO BE REPLACED main figure { - margin: 2rem 0 - transition: transform var(--vp-tt) + margin: 2rem 0 + transition: transform var(--vp-tt) - img { - margin: 0 auto - border-radius: 12px - box-shadow: 2px 2px 8px 4px var(--vp-c-bg-alt) - } + img { + margin: 0 auto + border-radius: 12px + box-shadow: 2px 2px 8px 4px var(--vp-c-bg-alt) + } - figcaption { - text-align: center - margin-top: 1.25rem - font-size: 0.875rem - color: var(--vp-c-text-2) - } + figcaption { + text-align: center + margin-top: 1.25rem + font-size: 0.875rem + color: var(--vp-c-text-2) + } - & > a .external-link-icon { - display: none - } + & > a .external-link-icon { + display: none + } } main :where(h1, h2, h3, h4, h5, h6) + figure { - margin-top: 1.5rem + margin-top: 1.5rem } .custom-block { - figure figcaption { - color: inherit - } + figure figcaption { + color: inherit + } - &.tip figure img { - --vp-c-bg-alt: var(--vp-custom-block-tip-bg) - } + &.tip figure img { + --vp-c-bg-alt: var(--vp-custom-block-tip-bg) + } } /** @@ -180,19 +180,19 @@ main :where(h1, h2, h3, h4, h5, h6) + figure { * -------------------------------------------------------------------------- */ @media print { - figure:has(img)>a[href^="http://"]:after, - figure:has(img)>a[href^="https://"]:after { - content: "" - } + figure:has(img)>a[href^="http://"]:after, + figure:has(img)>a[href^="https://"]:after { + content: "" + } } .vp-doc a { - text-decoration: none + text-decoration: none - &:hover { - text-decoration: underline - text-underline-offset: 2px - } + &:hover { + text-decoration: underline + text-underline-offset: 2px + } } /** @@ -200,28 +200,28 @@ main :where(h1, h2, h3, h4, h5, h6) + figure { * -------------------------------------------------------------------------- */ .navigation { - color: var(--vp-c-green-2) - font-weight: 600 + color: var(--vp-c-green-2) + font-weight: 600 - &:hover { - color: var(--vp-c-green-1) - cursor: default - } + &:hover { + color: var(--vp-c-green-1) + cursor: default + } - svg, - span.name { - vertical-align: middle // Align both SVG and vertically - position: relative - bottom: 1px - } + svg, + span.name { + vertical-align: middle // Align both SVG and vertically + position: relative + bottom: 1px + } - svg { - fill: currentColor - height: 1em - width: 1em - display: inline-block - margin-right: 4px - } + svg { + fill: currentColor + height: 1em + width: 1em + display: inline-block + margin-right: 4px + } } /** @@ -229,7 +229,7 @@ main :where(h1, h2, h3, h4, h5, h6) + figure { */ body { - --el-color-primary: var(--vp-c-brand-1) + --el-color-primary: var(--vp-c-brand-1) } /** @@ -237,15 +237,15 @@ body { */ .menu + .appearance::before { - margin-right: 8px !important + margin-right: 8px !important } .appearance + .social-links::before { - margin-left: 8px !important + margin-left: 8px !important } .VPMenu .CustomSwitchAppearance { - margin-right: -8px + margin-right: -8px } /** @@ -253,26 +253,26 @@ body { */ .forks .VPFeatures { - padding: 2rem 0 !important + padding: 2rem 0 !important - .VPLink:hover { - text-decoration: none - } + .VPLink:hover { + text-decoration: none + } - .title { - line-height: 24px - font-size: 16px - font-weight: 600 - margin: 0 - border-top: none - padding-top: 0 - letter-spacing: 0 - color: var(--vp-c-text-1) - } + .title { + line-height: 24px + font-size: 16px + font-weight: 600 + margin: 0 + border-top: none + padding-top: 0 + letter-spacing: 0 + color: var(--vp-c-text-1) + } } @media (min-width 640px) { - .forks .item.grid-4 { - width: 50% !important - } + .forks .item.grid-4 { + width: 50% !important + } } diff --git a/website/src/.vitepress/theme/styles/forks/lint.styl b/website/src/.vitepress/theme/styles/forks/lint.styl index a952baef..75c6be61 100644 --- a/website/src/.vitepress/theme/styles/forks/lint.styl +++ b/website/src/.vitepress/theme/styles/forks/lint.styl @@ -1,9 +1,9 @@ .extension-list { - > div { - &:not(:first-of-type) { - .extensions-total { - display: none - } - } - } + > div { + &:not(:first-of-type) { + .extensions-total { + display: none + } + } + } } diff --git a/website/src/.vitepress/theme/styles/forks/neko.styl b/website/src/.vitepress/theme/styles/forks/neko.styl index c0f8fef1..96a48bff 100644 --- a/website/src/.vitepress/theme/styles/forks/neko.styl +++ b/website/src/.vitepress/theme/styles/forks/neko.styl @@ -2,29 +2,29 @@ $themeColor = #ff6884 .page-neko { - .VPHero { - h1 { - .clip { - --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) - } - } - } + .VPHero { + h1 { + .clip { + --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) + } + } + } - .VPButton { - &.brand { - border-color: var(--vp-button-brand-border) - color: var(--vp-button-brand-text) - background-color: var(--vp-button-brand-bg) - } - } + .VPButton { + &.brand { + border-color: var(--vp-button-brand-border) + color: var(--vp-button-brand-text) + background-color: var(--vp-button-brand-bg) + } + } - .image-bg { - display: none - } + .image-bg { + display: none + } - ::selection { - background: alpha($themeColor, 0.2) - } + ::selection { + background: alpha($themeColor, 0.2) + } } @@ -33,14 +33,14 @@ $themeColor = #ff6884 * -------------------------------------------------------------------------- */ :root .page-neko { - --vp-c-brand: $themeColor - --vp-c-brand-light: tint($themeColor, 20%) - --vp-c-brand-lighter: tint($themeColor, 40%) - --vp-c-brand-lightest: tint($themeColor, 60%) - --vp-c-brand-dark: shade($themeColor, 25%) - --vp-c-brand-darker: shade($themeColor, 50%) - --vp-c-brand-darkest: shade($themeColor, 75%) - --vp-c-brand-dimm: alpha($themeColor, 0.08) + --vp-c-brand: $themeColor + --vp-c-brand-light: tint($themeColor, 20%) + --vp-c-brand-lighter: tint($themeColor, 40%) + --vp-c-brand-lightest: tint($themeColor, 60%) + --vp-c-brand-dark: shade($themeColor, 25%) + --vp-c-brand-darker: shade($themeColor, 50%) + --vp-c-brand-darkest: shade($themeColor, 75%) + --vp-c-brand-dimm: alpha($themeColor, 0.08) } /** @@ -48,13 +48,13 @@ $themeColor = #ff6884 * -------------------------------------------------------------------------- */ :root .page-neko { - --vp-button-brand-border: var(--vp-c-brand-light) - --vp-button-brand-text: var(--vp-c-black) - --vp-button-brand-bg: var(--vp-c-brand) - --vp-button-brand-hover-border: var(--vp-c-brand-light) - --vp-button-brand-hover-text: var(--vp-c-black) - --vp-button-brand-hover-bg: var(--vp-c-brand-light) - --vp-button-brand-active-border: var(--vp-c-brand-light) - --vp-button-brand-active-text: var(--vp-c-black) - --vp-button-brand-active-bg: var(--vp-button-brand-bg) + --vp-button-brand-border: var(--vp-c-brand-light) + --vp-button-brand-text: var(--vp-c-black) + --vp-button-brand-bg: var(--vp-c-brand) + --vp-button-brand-hover-border: var(--vp-c-brand-light) + --vp-button-brand-hover-text: var(--vp-c-black) + --vp-button-brand-hover-bg: var(--vp-c-brand-light) + --vp-button-brand-active-border: var(--vp-c-brand-light) + --vp-button-brand-active-text: var(--vp-c-black) + --vp-button-brand-active-bg: var(--vp-button-brand-bg) } diff --git a/website/src/.vitepress/theme/styles/forks/tachiyomi-az.styl b/website/src/.vitepress/theme/styles/forks/tachiyomi-az.styl index 96d587f7..6b74be52 100644 --- a/website/src/.vitepress/theme/styles/forks/tachiyomi-az.styl +++ b/website/src/.vitepress/theme/styles/forks/tachiyomi-az.styl @@ -2,29 +2,29 @@ $themeColor = #ffcc4d .page-tachiyomi-az { - .VPHero { - h1 { - .clip { - --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) - } - } - } + .VPHero { + h1 { + .clip { + --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) + } + } + } - .VPButton { - &.brand { - border-color: var(--vp-button-brand-border) - color: var(--vp-button-brand-text) - background-color: var(--vp-button-brand-bg) - } - } + .VPButton { + &.brand { + border-color: var(--vp-button-brand-border) + color: var(--vp-button-brand-text) + background-color: var(--vp-button-brand-bg) + } + } - .image-bg { - display: none - } + .image-bg { + display: none + } - ::selection { - background: alpha($themeColor, 0.2) - } + ::selection { + background: alpha($themeColor, 0.2) + } } @@ -33,14 +33,14 @@ $themeColor = #ffcc4d * -------------------------------------------------------------------------- */ :root .page-tachiyomi-az { - --vp-c-brand: $themeColor - --vp-c-brand-light: tint($themeColor, 20%) - --vp-c-brand-lighter: tint($themeColor, 40%) - --vp-c-brand-lightest: tint($themeColor, 60%) - --vp-c-brand-dark: shade($themeColor, 25%) - --vp-c-brand-darker: shade($themeColor, 50%) - --vp-c-brand-darkest: shade($themeColor, 75%) - --vp-c-brand-dimm: alpha($themeColor, 0.08) + --vp-c-brand: $themeColor + --vp-c-brand-light: tint($themeColor, 20%) + --vp-c-brand-lighter: tint($themeColor, 40%) + --vp-c-brand-lightest: tint($themeColor, 60%) + --vp-c-brand-dark: shade($themeColor, 25%) + --vp-c-brand-darker: shade($themeColor, 50%) + --vp-c-brand-darkest: shade($themeColor, 75%) + --vp-c-brand-dimm: alpha($themeColor, 0.08) } /** @@ -48,156 +48,156 @@ $themeColor = #ffcc4d * -------------------------------------------------------------------------- */ :root .page-tachiyomi-az { - --vp-button-brand-border: var(--vp-c-brand-light) - --vp-button-brand-text: var(--vp-c-black) - --vp-button-brand-bg: var(--vp-c-brand) - --vp-button-brand-hover-border: var(--vp-c-brand-light) - --vp-button-brand-hover-text: var(--vp-c-black) - --vp-button-brand-hover-bg: var(--vp-c-brand-light) - --vp-button-brand-active-border: var(--vp-c-brand-light) - --vp-button-brand-active-text: var(--vp-c-black) - --vp-button-brand-active-bg: var(--vp-button-brand-bg) + --vp-button-brand-border: var(--vp-c-brand-light) + --vp-button-brand-text: var(--vp-c-black) + --vp-button-brand-bg: var(--vp-c-brand) + --vp-button-brand-hover-border: var(--vp-c-brand-light) + --vp-button-brand-hover-text: var(--vp-c-black) + --vp-button-brand-hover-bg: var(--vp-c-brand-light) + --vp-button-brand-active-border: var(--vp-c-brand-light) + --vp-button-brand-active-text: var(--vp-c-black) + --vp-button-brand-active-bg: var(--vp-button-brand-bg) } /** * Component: Dumb * -------------------------------------------------------------------------- */ @font-face { - font-family: 'Comic Sans MS' - src: url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.eot') - src: url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.eot?#iefix') format('embedded-opentype'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.woff2') format('woff2'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.woff') format('woff'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.ttf') format('truetype'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.svg#Comic Sans MS') format('svg') + font-family: 'Comic Sans MS' + src: url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.eot') + src: url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.eot?#iefix') format('embedded-opentype'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.woff2') format('woff2'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.woff') format('woff'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.ttf') format('truetype'), url('//db.onlinewebfonts.com/t/7cc6719bd5f0310be3150ba33418e72e.svg#Comic Sans MS') format('svg') } .azContainer { - width: 100% - overflow: hidden + width: 100% + overflow: hidden - .azMarquee { - display: inline-block - overflow: hidden - white-space: nowrap - animation: marquee 10s linear infinite - padding-left: 100% + .azMarquee { + display: inline-block + overflow: hidden + white-space: nowrap + animation: marquee 10s linear infinite + padding-left: 100% - .azWiggleText { - padding: 2em - width: fit-content - animation: wiggleAnimation 1s ease-out infinite + .azWiggleText { + padding: 2em + width: fit-content + animation: wiggleAnimation 1s ease-out infinite - &:hover { - animation: barrelRollAnimation 0.6s - } + &:hover { + animation: barrelRollAnimation 0.6s + } - .azText { - font-family: 'Comic Sans MS', 'Comic Sans', cursive - font-size: 2em - display: inline-block - -webkit-text-stroke: 1px black - text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 - animation: rainbowTextColorAnimation 0.5s linear infinite, scaleXTextAnimation 2s infinite - } - } - } + .azText { + font-family: 'Comic Sans MS', 'Comic Sans', cursive + font-size: 2em + display: inline-block + -webkit-text-stroke: 1px black + text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000 + animation: rainbowTextColorAnimation 0.5s linear infinite, scaleXTextAnimation 2s infinite + } + } + } } @keyframes marquee { - 0% { - transform: translate(0, 0) - } + 0% { + transform: translate(0, 0) + } - 100% { - transform: translate(-100%, 0) - } + 100% { + transform: translate(-100%, 0) + } } @keyframes barrelRollAnimation { - from { - transform: rotate(0) - } + from { + transform: rotate(0) + } - to { - transform: rotate(360deg) - } + to { + transform: rotate(360deg) + } } @keyframes wiggleAnimation { - 0% { - transform: rotate(0) - } + 0% { + transform: rotate(0) + } - 25% { - transform: rotate(-15deg) - } + 25% { + transform: rotate(-15deg) + } - 50% { - transform: rotate(0) - } + 50% { + transform: rotate(0) + } - 75% { - transform: rotate(15deg) - } + 75% { + transform: rotate(15deg) + } - 100% { - transform: rotate(0) - } + 100% { + transform: rotate(0) + } } @keyframes scaleXTextAnimation { - 0% { - transform: scaleX(0.5) scaleY(0.5) - } + 0% { + transform: scaleX(0.5) scaleY(0.5) + } - 50% { - transform: scaleX(1) scaleY(1) - } + 50% { + transform: scaleX(1) scaleY(1) + } - 100% { - transform: scaleX(0.5) scaleY(0.5) - } + 100% { + transform: scaleX(0.5) scaleY(0.5) + } } @keyframes rainbowTextColorAnimation { - 0% { - color: hsl(0, 100%, 50%) - } + 0% { + color: hsl(0, 100%, 50%) + } - 10% { - color: hsl(36, 100%, 50%) - } + 10% { + color: hsl(36, 100%, 50%) + } - 20% { - color: hsl(72, 100%, 50%) - } + 20% { + color: hsl(72, 100%, 50%) + } - 30% { - color: hsl(108, 100%, 50%) - } + 30% { + color: hsl(108, 100%, 50%) + } - 40% { - color: hsl(144, 100%, 50%) - } + 40% { + color: hsl(144, 100%, 50%) + } - 50% { - color: hsl(180, 100%, 50%) - } + 50% { + color: hsl(180, 100%, 50%) + } - 60% { - color: hsl(216, 100%, 50%) - } + 60% { + color: hsl(216, 100%, 50%) + } - 70% { - color: hsl(252, 100%, 50%) - } + 70% { + color: hsl(252, 100%, 50%) + } - 80% { - color: hsl(288, 100%, 50%) - } + 80% { + color: hsl(288, 100%, 50%) + } - 90% { - color: hsl(324, 100%, 50%) - } + 90% { + color: hsl(324, 100%, 50%) + } - 100% { - color: hsl(360, 100%, 50%) - } + 100% { + color: hsl(360, 100%, 50%) + } } diff --git a/website/src/.vitepress/theme/styles/forks/tachiyomi-j2k.styl b/website/src/.vitepress/theme/styles/forks/tachiyomi-j2k.styl index 830d0386..a5759417 100644 --- a/website/src/.vitepress/theme/styles/forks/tachiyomi-j2k.styl +++ b/website/src/.vitepress/theme/styles/forks/tachiyomi-j2k.styl @@ -2,29 +2,29 @@ $themeColor = #0952af .page-tachiyomi-j2k { - .VPHero { - h1 { - .clip { - --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) - } - } - } + .VPHero { + h1 { + .clip { + --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) + } + } + } - .VPButton { - &.brand { - border-color: var(--vp-button-brand-border) - color: var(--vp-button-brand-text) - background-color: var(--vp-button-brand-bg) - } - } + .VPButton { + &.brand { + border-color: var(--vp-button-brand-border) + color: var(--vp-button-brand-text) + background-color: var(--vp-button-brand-bg) + } + } - .image-bg { - display: none - } + .image-bg { + display: none + } - ::selection { - background: alpha($themeColor, 0.2) - } + ::selection { + background: alpha($themeColor, 0.2) + } } @@ -33,14 +33,14 @@ $themeColor = #0952af * -------------------------------------------------------------------------- */ :root .page-tachiyomi-j2k { - --vp-c-brand: $themeColor - --vp-c-brand-light: tint($themeColor, 20%) - --vp-c-brand-lighter: tint($themeColor, 40%) - --vp-c-brand-lightest: tint($themeColor, 60%) - --vp-c-brand-dark: shade($themeColor, 25%) - --vp-c-brand-darker: shade($themeColor, 50%) - --vp-c-brand-darkest: shade($themeColor, 75%) - --vp-c-brand-dimm: alpha($themeColor, 0.08) + --vp-c-brand: $themeColor + --vp-c-brand-light: tint($themeColor, 20%) + --vp-c-brand-lighter: tint($themeColor, 40%) + --vp-c-brand-lightest: tint($themeColor, 60%) + --vp-c-brand-dark: shade($themeColor, 25%) + --vp-c-brand-darker: shade($themeColor, 50%) + --vp-c-brand-darkest: shade($themeColor, 75%) + --vp-c-brand-dimm: alpha($themeColor, 0.08) } /** @@ -48,13 +48,13 @@ $themeColor = #0952af * -------------------------------------------------------------------------- */ :root .page-tachiyomi-j2k { - --vp-button-brand-border: var(--vp-c-brand-light) - --vp-button-brand-text: var(--vp-c-white) - --vp-button-brand-bg: var(--vp-c-brand) - --vp-button-brand-hover-border: var(--vp-c-brand-light) - --vp-button-brand-hover-text: var(--vp-c-white) - --vp-button-brand-hover-bg: var(--vp-c-brand-light) - --vp-button-brand-active-border: var(--vp-c-brand-light) - --vp-button-brand-active-text: var(--vp-c-white) - --vp-button-brand-active-bg: var(--vp-button-brand-bg) + --vp-button-brand-border: var(--vp-c-brand-light) + --vp-button-brand-text: var(--vp-c-white) + --vp-button-brand-bg: var(--vp-c-brand) + --vp-button-brand-hover-border: var(--vp-c-brand-light) + --vp-button-brand-hover-text: var(--vp-c-white) + --vp-button-brand-hover-bg: var(--vp-c-brand-light) + --vp-button-brand-active-border: var(--vp-c-brand-light) + --vp-button-brand-active-text: var(--vp-c-white) + --vp-button-brand-active-bg: var(--vp-button-brand-bg) } diff --git a/website/src/.vitepress/theme/styles/forks/tachiyomi-sy.styl b/website/src/.vitepress/theme/styles/forks/tachiyomi-sy.styl index 80792fcc..db52b156 100644 --- a/website/src/.vitepress/theme/styles/forks/tachiyomi-sy.styl +++ b/website/src/.vitepress/theme/styles/forks/tachiyomi-sy.styl @@ -2,29 +2,29 @@ $themeColor = #ce2828 .page-tachiyomi-sy { - .VPHero { - h1 { - .clip { - --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) - } - } - } + .VPHero { + h1 { + .clip { + --vp-home-hero-name-background: -webkit-linear-gradient(120deg, var(--vp-c-brand) 30%, var(--vp-c-brand-dark)) + } + } + } - .VPButton { - &.brand { - border-color: var(--vp-button-brand-border) - color: var(--vp-button-brand-text) - background-color: var(--vp-button-brand-bg) - } - } + .VPButton { + &.brand { + border-color: var(--vp-button-brand-border) + color: var(--vp-button-brand-text) + background-color: var(--vp-button-brand-bg) + } + } - .image-bg { - display: none - } + .image-bg { + display: none + } - ::selection { - background: alpha($themeColor, 0.2) - } + ::selection { + background: alpha($themeColor, 0.2) + } } @@ -33,14 +33,14 @@ $themeColor = #ce2828 * -------------------------------------------------------------------------- */ :root .page-tachiyomi-sy { - --vp-c-brand: $themeColor - --vp-c-brand-light: tint($themeColor, 20%) - --vp-c-brand-lighter: tint($themeColor, 40%) - --vp-c-brand-lightest: tint($themeColor, 60%) - --vp-c-brand-dark: shade($themeColor, 25%) - --vp-c-brand-darker: shade($themeColor, 50%) - --vp-c-brand-darkest: shade($themeColor, 75%) - --vp-c-brand-dimm: alpha($themeColor, 0.08) + --vp-c-brand: $themeColor + --vp-c-brand-light: tint($themeColor, 20%) + --vp-c-brand-lighter: tint($themeColor, 40%) + --vp-c-brand-lightest: tint($themeColor, 60%) + --vp-c-brand-dark: shade($themeColor, 25%) + --vp-c-brand-darker: shade($themeColor, 50%) + --vp-c-brand-darkest: shade($themeColor, 75%) + --vp-c-brand-dimm: alpha($themeColor, 0.08) } /** @@ -48,13 +48,13 @@ $themeColor = #ce2828 * -------------------------------------------------------------------------- */ :root .page-tachiyomi-sy { - --vp-button-brand-border: var(--vp-c-brand-light) - --vp-button-brand-text: var(--vp-c-white) - --vp-button-brand-bg: var(--vp-c-brand) - --vp-button-brand-hover-border: var(--vp-c-brand-light) - --vp-button-brand-hover-text: var(--vp-c-white) - --vp-button-brand-hover-bg: var(--vp-c-brand-light) - --vp-button-brand-active-border: var(--vp-c-brand-light) - --vp-button-brand-active-text: var(--vp-c-white) - --vp-button-brand-active-bg: var(--vp-button-brand-bg) + --vp-button-brand-border: var(--vp-c-brand-light) + --vp-button-brand-text: var(--vp-c-white) + --vp-button-brand-bg: var(--vp-c-brand) + --vp-button-brand-hover-border: var(--vp-c-brand-light) + --vp-button-brand-hover-text: var(--vp-c-white) + --vp-button-brand-hover-bg: var(--vp-c-brand-light) + --vp-button-brand-active-border: var(--vp-c-brand-light) + --vp-button-brand-active-text: var(--vp-c-white) + --vp-button-brand-active-bg: var(--vp-button-brand-bg) } diff --git a/website/src/.vitepress/theme/styles/tree.styl b/website/src/.vitepress/theme/styles/tree.styl index f2f986f2..61dccdfb 100644 --- a/website/src/.vitepress/theme/styles/tree.styl +++ b/website/src/.vitepress/theme/styles/tree.styl @@ -1,99 +1,99 @@ .tree { - border-radius: 8px - margin: 16px - padding: 16px - color: var(--vp-c-text-1) - // background-color: var(--vp-code-block-bg) - font-family: var(--vp-font-family-mono) - font-size: 0.85rem - line-height: 1.5 + border-radius: 8px + margin: 16px + padding: 16px + color: var(--vp-c-text-1) + // background-color: var(--vp-code-block-bg) + font-family: var(--vp-font-family-mono) + font-size: 0.85rem + line-height: 1.5 - & > ul { - margin: 0 - } + & > ul { + margin: 0 + } - li { - & + li { - margin-top: 0 - } - } + li { + & + li { + margin-top: 0 + } + } - span { - &.folder { - &.root, - &.main { - color: var(--vp-c-brand-darker) - } - } + span { + &.folder { + &.root, + &.main { + color: var(--vp-c-brand-darker) + } + } - &.file.zip { - color: var(--vp-c-brand-darker) !important - } + &.file.zip { + color: var(--vp-c-brand-darker) !important + } - &.file { - .file-extension { - color: var(--vp-c-text-2) - } - } - } + &.file { + .file-extension { + color: var(--vp-c-text-2) + } + } + } - ul { - padding-left: 5px - list-style: none + ul { + padding-left: 5px + list-style: none - li { - position: relative - padding-left: 15px - -webkit-box-sizing: border-box - -moz-box-sizing: border-box - box-sizing: border-box + li { + position: relative + padding-left: 15px + -webkit-box-sizing: border-box + -moz-box-sizing: border-box + box-sizing: border-box - &:before { - top: 15px - left: 0 - width: 10px - height: 1px - margin: auto - } + &:before { + top: 15px + left: 0 + width: 10px + height: 1px + margin: auto + } - &:after { - top: 0 - bottom: 0 - left: 0 - width: 1px - height: 100% - } + &:after { + top: 0 + bottom: 0 + left: 0 + width: 1px + height: 100% + } - &:before, - &:after { - position: absolute - content: '' - background-color: var(--vp-c-text-3) - } + &:before, + &:after { + position: absolute + content: '' + background-color: var(--vp-c-text-3) + } - &:last-child { - &:after { - height: 15px - } - } - } - } + &:last-child { + &:after { + height: 15px + } + } + } + } - &-icon { - height: 12px - width: 12px - margin-right: 6px - display: inline-block - } + &-icon { + height: 12px + width: 12px + margin-right: 6px + display: inline-block + } } .dark { - .tree { - span { - &.folder, - &.file.zip { - color: var(--vp-c-brand-lighter) !important - } - } - } + .tree { + span { + &.folder, + &.file.zip { + color: var(--vp-c-brand-lighter) !important + } + } + } } diff --git a/website/src/.vitepress/vue-shim.d.ts b/website/src/.vitepress/vue-shim.d.ts index 6acf2766..3b42e5b8 100644 --- a/website/src/.vitepress/vue-shim.d.ts +++ b/website/src/.vitepress/vue-shim.d.ts @@ -1,5 +1,5 @@ -declare module "*.vue" { - import type { Component } from "vue" +declare module '*.vue' { + import type { Component } from 'vue' const _default: Component export default _default