From 575df284ce56783dc4866b1329528bfba2139b38 Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Sat, 24 Feb 2024 14:20:10 +0000 Subject: [PATCH] feat(theme): use twemoji for sidebar icons --- .vitepress/config.mts | 3 +- .vitepress/constants.ts | 137 +++++++++++++++++++++++++++++++--------- unocss.config.ts | 3 + 3 files changed, 113 insertions(+), 30 deletions(-) diff --git a/.vitepress/config.mts b/.vitepress/config.mts index 0f39ce7f9..7a82fe913 100644 --- a/.vitepress/config.mts +++ b/.vitepress/config.mts @@ -11,9 +11,10 @@ import { } from './constants' import { generateImages, generateMeta, generateFeed } from './hooks' import { toggleStarredPlugin } from './markdown/toggleStarred' -import { base64DecodePlugin } from './markdown/base64' import { movePlugin, emojiRender, defs } from './markdown/emoji' +// @unocss-include + const baseUrl = process.env.GITHUB_ACTIONS ? '/FMHYedit' : '/' export default defineConfig({ title: 'FMHY', diff --git a/.vitepress/constants.ts b/.vitepress/constants.ts index 960c38dac..76d9ccf54 100644 --- a/.vitepress/constants.ts +++ b/.vitepress/constants.ts @@ -1,4 +1,5 @@ import type { DefaultTheme } from 'vitepress' +// @unocss-include export const meta = { name: 'freemediaheckyeah', @@ -56,46 +57,124 @@ export const socialLinks: DefaultTheme.SocialLink[] = [ ] export const sidebar: DefaultTheme.Sidebar | DefaultTheme.NavItemWithLink[] = [ - { text: '📛 Adblocking / Privacy', link: '/adblockvpnguide' }, - { text: '🤖 Artificial Intelligence', link: '/ai' }, - { text: '📺 Movies / TV / Anime', link: '/videopiracyguide' }, - { text: '🎵 Music / Podcasts / Radio', link: '/audiopiracyguide' }, - { text: '🎮 Gaming / Emulation', link: '/gamingpiracyguide' }, - { text: '📗 Books / Comics / Manga', link: '/readingpiracyguide' }, - { text: '💾 Downloading', link: '/downloadpiracyguide' }, - { text: '🌀 Torrenting', link: '/torrentpiracyguide' }, - { text: '🧠 Educational', link: '/edupiracyguide' }, - { text: '📱 Android / iOS', link: '/android-iosguide' }, - { text: '🐧 Linux / MacOS', link: '/linuxguide' }, - { text: '🌍 Non-English', link: '/non-english' }, - { text: '📂 Miscellaneous', link: '/miscguide' }, { - text: '🔧 Tools', + text: ' Adblocking / Privacy', + link: '/adblockvpnguide' + }, + { + text: ' Artificial Intelligence', + link: '/ai' + }, + { + text: ' Movies / TV / Anime', + link: '/videopiracyguide' + }, + { + text: ' Music / Podcasts / Radio', + link: '/audiopiracyguide' + }, + { + text: ' Gaming / Emulation', + link: '/gamingpiracyguide' + }, + { + text: ' Books / Comics / Manga', + link: '/readingpiracyguide' + }, + { + text: ' Downloading', + link: '/downloadpiracyguide' + }, + { + text: ' Torrenting', + link: '/torrentpiracyguide' + }, + { + text: ' Educational', + link: '/edupiracyguide' + }, + { + text: ' Android / iOS', + link: '/android-iosguide' + }, + { + text: ' Linux / MacOS', + link: '/linuxguide' + }, + { + text: ' Non-English', + link: '/non-english' + }, + { + text: ' Miscellaneous', + link: '/miscguide' + }, + { + text: ' Tools', collapsed: false, items: [ - { text: '💻 System Tools', link: '/system-tools' }, - { text: '🗃️ File Tools', link: '/file-tools' }, - { text: '🔗 Internet Tools', link: '/internet-tools' }, - { text: '💬 Social Media Tools', link: '/social-media-tools' }, - { text: '📝 Text Tools', link: '/text-tools' }, - { text: '👾 Gaming Tools', link: '/gamingpiracyguide#gaming-tools' }, - { text: '📷 Image Tools', link: '/img-tools' }, - { text: '📼 Video Tools', link: '/video-tools' }, - { text: '🔊 Audio Tools', link: '/audiopiracyguide#audio-tools' }, { - text: '🍎 Educational Tools', + text: ' System Tools', + link: '/system-tools' + }, + { + text: ' File Tools', + link: '/file-tools' + }, + { + text: ' Internet Tools', + link: '/internet-tools' + }, + { + text: ' Social Media Tools', + link: '/social-media-tools' + }, + { + text: ' Text Tools', + link: '/text-tools' + }, + { + text: ' Gaming Tools', + link: '/gamingpiracyguide#gaming-tools' + }, + { + text: ' Image Tools', + link: '/img-tools' + }, + { + text: ' Video Tools', + link: '/video-tools' + }, + { + text: ' Audio Tools', + link: '/audiopiracyguide#audio-tools' + }, + { + text: ' Educational Tools', link: '/edupiracyguide#educational-tools' }, - { text: '👨‍💻 Developer Tools', link: '/devtools' } + { + text: ' Developer Tools', + link: '/devtools' + } ] }, { - text: '➕️ More', + text: ' More', collapsed: true, items: [ - { text: '🔞 NSFW', link: '/nsfwpiracy' }, - { text: '⚠️ Unsafe Sites', link: '/unsafesites' }, - { text: '📦 Storage', link: '/storage' } + { + text: ' NSFW', + link: '/nsfwpiracy' + }, + { + text: ' Unsafe Sites', + link: '/unsafesites' + }, + { + text: ' Storage', + link: '/storage' + } ] } ] diff --git a/unocss.config.ts b/unocss.config.ts index 417a7766d..c41b2bca6 100644 --- a/unocss.config.ts +++ b/unocss.config.ts @@ -1,6 +1,9 @@ import { defineConfig, presetUno, presetAttributify, presetIcons } from 'unocss' export default defineConfig({ + content: { + filesystem: ['.vitepress/config.mts', '.vitepress/constants.ts'] + }, theme: { colors: { primary: 'var(--vp-c-brand-1)',