Commit 0a7f3f99e3

0a7f3f99e3e5426282c606a0020e220da8c3f9b9

parent: caa6b58017

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-06-24 04:19 UTC

revert

Layout: unified · split

docs/.vitepress/configs/constants.ts −347
@@ -7,353 +7,6 @@
7 */ 7 */
8import type { DefaultTheme } from 'vitepress' 8import type { DefaultTheme } from 'vitepress'
9 9
10export interface HomeCard {
11 id: string
12 icon: string
13 title: string
14 details: string
15 link: string
16 featured?: boolean
17 section?: string
18}
19
20// @unocss-include
21export const homeCards: HomeCard[] = [
22 {
23 id: 'websites',
24 icon: ':lucide-earth:',
25 title: 'Websites',
26 details: 'Websites for anime, manga, novels & tokusatsu',
27 link: '/websites',
28 featured: true
29 },
30 {
31 id: 'software',
32 icon: ':lucide-box:',
33 title: 'Software',
34 details: 'Software for every Operating System',
35 link: '/software',
36 featured: true
37 },
38 {
39 id: 'misc',
40 icon: ':lucide-folder-open:',
41 title: 'Misc-sites',
42 details: 'Various sites for database, info, tracking news & tools',
43 link: '/misc',
44 featured: true
45 },
46 {
47 id: 'tools',
48 icon: ':lucide-wrench:',
49 title: 'Tools',
50 details: 'Software to make life easier',
51 link: '/tools'
52 },
53 {
54 id: 'art',
55 icon: ':lucide-brush:',
56 title: 'Art',
57 details: 'Everything Art',
58 link: '/art'
59 },
60 {
61 id: 'music',
62 icon: ':lucide-music:',
63 title: 'Music',
64 details: 'Wotaku Music Megathread!',
65 link: '/music'
66 },
67 {
68 id: 'games',
69 icon: ':lucide-gamepad-2:',
70 title: 'Games',
71 details: 'Wotaku Games Megathread!',
72 link: '/games'
73 },
74 {
75 id: 'nonen',
76 icon: ':lucide-map:',
77 title: 'Non-English',
78 details: 'Otaku resources for other regions',
79 link: '/nonen'
80 },
81 {
82 id: 'nsfw',
83 icon: ':lucide-ban:',
84 title: 'NSFW',
85 details: 'hen...',
86 link: '/nsfw',
87 featured: true
88 },
89 {
90 id: 'merch',
91 icon: ':lucide-package-2:',
92 title: 'Merch',
93 details: 'Everything merch related!',
94 link: '/merch'
95 },
96 {
97 id: 'vtuber',
98 icon: ':comet:',
99 title: 'VTuber',
100 details: 'Sui-chan wa~',
101 link: '/vtuber'
102 },
103 {
104 id: 'ext',
105 icon: ':lucide-puzzle:',
106 title: 'Extensions',
107 details: 'Extensions for everything',
108 link: '/ext',
109 featured: true
110 },
111 {
112 id: 'guides',
113 icon: ':lucide-book-key:',
114 title: 'Guides',
115 details: 'Various technical guides and tutorials',
116 link: '/guides',
117 featured: true
118 },
119 {
120 id: 'glossary',
121 icon: ':lucide-book-open:',
122 title: 'Glossary',
123 details: 'Learn the most frequently used otaku terms',
124 link: '/glossary',
125 featured: true
126 },
127 {
128 id: 'torrenting',
129 icon: ':lucide-magnet:',
130 title: 'Torrenting',
131 details: 'All the basic how-tos about torrenting',
132 link: '/torrenting',
133 featured: true
134 },
135 {
136 id: 'japan',
137 icon: ':uil-letter-japanese-a:',
138 title: 'Japan',
139 details: 'Everything Japan on one page!',
140 link: '/japan'
141 },
142 {
143 id: 'faq',
144 icon: ':lucide-message-circle-question-mark:',
145 title: 'FAQs',
146 details: 'Frequently asked questions about manga and anime',
147 link: '/faq'
148 },
149 {
150 id: 'comms',
151 icon: ':lucide-messages-square:',
152 title: 'Communities',
153 details: 'More great otaku communities!',
154 link: '/comms'
155 },
156 {
157 id: 'credits',
158 icon: ':lucide-heart-handshake:',
159 title: 'Credits',
160 details: 'All the contributors of Wotaku',
161 link: '/credits'
162 },
163 {
164 id: 'ext-mihon',
165 icon: ':lucide-puzzle:',
166 title: 'Mihon & Aniyomi',
167 details: 'Mihon & Aniyomi-based extension repos',
168 link: '/ext/mihon',
169 section: 'Extensions'
170 },
171 {
172 id: 'ext-mangayomi',
173 icon: ':lucide-puzzle:',
174 title: 'Mangayomi',
175 details: 'Mangayomi-based extension repos',
176 link: '/ext/mangayomi',
177 section: 'Extensions'
178 },
179 {
180 id: 'ext-ios',
181 icon: ':lucide-puzzle:',
182 title: 'iOS Extensions',
183 details: 'iOS anime and manga repos',
184 link: '/ext/ios',
185 section: 'Extensions'
186 },
187 {
188 id: 'ext-misc',
189 icon: ':lucide-puzzle:',
190 title: 'Misc Extensions',
191 details: 'Extension repos for other apps',
192 link: '/ext/misc',
193 section: 'Extensions'
194 },
195 {
196 id: 'glossary-general',
197 icon: ':lucide-book-open:',
198 title: 'General Glossary',
199 details: 'Basic otaku-related terms',
200 link: '/glossary/general',
201 section: 'Glossary'
202 },
203 {
204 id: 'glossary-anime',
205 icon: ':lucide-book-open:',
206 title: 'Anime Glossary',
207 details: 'Season, release and production terms',
208 link: '/glossary/anime',
209 section: 'Glossary'
210 },
211 {
212 id: 'glossary-manga',
213 icon: ':lucide-book-open:',
214 title: 'Manga Glossary',
215 details: 'Panel, release and scanlation terms',
216 link: '/glossary/manga',
217 section: 'Glossary'
218 },
219 {
220 id: 'glossary-audio',
221 icon: ':lucide-book-open:',
222 title: 'Audio Glossary',
223 details: 'Audio files, software and hardware terms',
224 link: '/glossary/audio',
225 section: 'Glossary'
226 },
227 {
228 id: 'glossary-nsfw',
229 icon: ':lucide-book-open:',
230 title: 'NSFW Glossary',
231 details: 'Things Jesus wouldn\'t want you to know',
232 link: '/glossary/nsfw',
233 section: 'Glossary'
234 },
235 {
236 id: 'guides-discrip',
237 icon: ':lucide-book-key:',
238 title: 'Disc Ripping',
239 details: 'Guide on how to rip Discs and conversions to MKV and ISO formats',
240 link: '/guides/anime/discrip',
241 section: 'Guides'
242 },
243 {
244 id: 'guides-cubari',
245 icon: ':lucide-book-key:',
246 title: 'Cubari Guide',
247 details: 'How to proxy comics through Cubari.moe',
248 link: '/guides/manga/cubari',
249 section: 'Guides'
250 },
251 {
252 id: 'guides-comicinfo',
253 icon: ':lucide-book-key:',
254 title: 'Digital Comic Info',
255 details: 'Information about digital comic publishers & resolutions',
256 link: '/guides/manga/comicinfo',
257 section: 'Guides'
258 },
259 {
260 id: 'guides-mdl',
261 icon: ':lucide-book-key:',
262 title: 'Downloading Manga',
263 details: 'How to download manga on PC',
264 link: '/guides/manga/mdl',
265 section: 'Guides'
266 },
267 {
268 id: 'guides-jxl',
269 icon: ':lucide-book-key:',
270 title: 'JXL Manga Readers',
271 details: 'Manga readers with JPEG XL / JXL support for Android, iOS & PC',
272 link: '/guides/manga/jxl',
273 section: 'Guides'
274 },
275 {
276 id: 'guides-madokami',
277 icon: ':lucide-book-key:',
278 title: 'Madokami Guide',
279 details: 'The joining and downloading guide for Madokami',
280 link: '/guides/manga/madokami',
281 section: 'Guides'
282 },
283 {
284 id: 'guides-imagedit',
285 icon: ':lucide-book-key:',
286 title: 'Manga Image Editing',
287 details: 'ImageMagick guide for grayscaling, leveling, and optimizing',
288 link: '/guides/manga/imagedit',
289 section: 'Guides'
290 },
291 {
292 id: 'guides-opds',
293 icon: ':lucide-book-key:',
294 title: 'OPDS E-reader',
295 details: 'How to self-host your library to your Kindle',
296 link: '/guides/manga/opds',
297 section: 'Guides'
298 },
299 {
300 id: 'guides-transcoding',
301 icon: ':lucide-book-key:',
302 title: 'Transcoding Audio',
303 details: 'Basic guide for transcoding audio files',
304 link: '/guides/music/transcoding',
305 section: 'Guides'
306 },
307 {
308 id: 'guides-adblock',
309 icon: ':lucide-book-key:',
310 title: 'Adblocking & Privacy',
311 details: 'Adblocking solutions for every device & VPN listing',
312 link: '/guides/tech/adblock',
313 section: 'Guides'
314 },
315 {
316 id: 'guides-jdl',
317 icon: ':lucide-book-key:',
318 title: 'JDL2 Ad-Removal',
319 details: 'Remove banner & pop-up ads from JDownloader2',
320 link: '/guides/tech/jdl',
321 section: 'Guides'
322 },
323 {
324 id: 'japan-language',
325 icon: ':uil-letter-japanese-a:',
326 title: 'Learning Japanese',
327 details: 'Japanese language learning resources',
328 link: '/japan/language',
329 section: 'Japan'
330 },
331 {
332 id: 'japan-immersion',
333 icon: ':uil-letter-japanese-a:',
334 title: 'Immersion',
335 details: 'Media to help you learn Japanese',
336 link: '/japan/immersion',
337 section: 'Japan'
338 },
339 {
340 id: 'japan-software',
341 icon: ':uil-letter-japanese-a:',
342 title: 'Japan Software',
343 details: 'Software to help you learn Japanese',
344 link: '/japan/software',
345 section: 'Japan'
346 },
347 {
348 id: 'japan-culture',
349 icon: ':uil-letter-japanese-a:',
350 title: 'Culture',
351 details: 'Learn all about Japanese culture, history & customs',
352 link: '/japan/culture',
353 section: 'Japan'
354 }
355]
356
357export const hostname: string = 'https://wotaku.wiki' 10export const hostname: string = 'https://wotaku.wiki'
358export const excludedFiles = ['t.md', 'sandbox.md'] 11export const excludedFiles = ['t.md', 'sandbox.md']
359 12
docs/.vitepress/theme/components/HomeFeatures.vue deleted −946
@@ -1,946 +0,0 @@
1<script setup lang="ts">
2import { computed, ref, onMounted, watch } from 'vue'
3import { renderEmojiShortcodes } from '../../configs/markdown/emoji'
4import type { HomeCard } from '../../configs/constants'
5
6const props = defineProps<{ cards: HomeCard[] }>()
7
8const STORAGE_KEY = 'wotaku-home-cards-v2'
9const PREFS_KEY = 'wotaku-home-prefs-v1'
10
11interface CardState {
12 homepage: string[]
13}
14
15function defaultState(): CardState {
16 return {
17 homepage: props.cards.filter((c) => c.featured).map((c) => c.id)
18 }
19}
20
21const state = ref<CardState>(defaultState())
22
23onMounted(() => {
24 const raw = localStorage.getItem(STORAGE_KEY)
25 if (!raw) return
26 try {
27 const parsed: CardState = JSON.parse(raw)
28 const allIds = new Set(props.cards.map((c) => c.id))
29 state.value = {
30 homepage: (parsed.homepage ?? []).filter((id) => allIds.has(id))
31 }
32 } catch {}
33})
34
35function save() {
36 localStorage.setItem(STORAGE_KEY, JSON.stringify(state.value))
37}
38
39const cardMap = computed(() => new Map(props.cards.map((c) => [c.id, c])))
40
41const homepageSet = computed(() => new Set(state.value.homepage))
42
43const visibleCards = computed(() =>
44 state.value.homepage.map((id) => cardMap.value.get(id)!).filter(Boolean)
45)
46
47const grid = computed(() => {
48 const n = visibleCards.value.length
49 if (n === 0) return undefined
50 if (columnMode.value === 'max') return 'grid-max'
51 if (n === 2) return 'grid-2'
52 if (n === 3) return 'grid-3'
53 if (n % 3 === 0) return 'grid-6'
54 if (n > 3) return 'grid-4'
55 return undefined
56})
57
58function cardIcon(card: HomeCard) {
59 return renderEmojiShortcodes(card.icon)
60}
61
62/* ── Manager panel ── */
63const panelOpen = ref(false)
64const dropdownOpen = ref(false)
65const columnMode = ref<'default' | 'max'>('default')
66const viewMode = ref<'default' | 'mini'>('default')
67
68onMounted(() => {
69 try {
70 const prefs = JSON.parse(localStorage.getItem(PREFS_KEY) ?? '{}')
71 if (prefs.columnMode === 'max') columnMode.value = 'max'
72 if (prefs.viewMode === 'mini') viewMode.value = 'mini'
73 } catch {}
74})
75
76watch([columnMode, viewMode], () => {
77 localStorage.setItem(PREFS_KEY, JSON.stringify({
78 columnMode: columnMode.value,
79 viewMode: viewMode.value
80 }))
81})
82
83const homepageSectionCards = computed(() =>
84 state.value.homepage.map((id) => cardMap.value.get(id)!).filter(Boolean)
85)
86
87const otherSections = computed(() => {
88 const sectionMap = new Map<string, HomeCard[]>()
89 for (const card of props.cards) {
90 const s = card.section ?? 'Pages'
91 if (!sectionMap.has(s)) sectionMap.set(s, [])
92 if (!homepageSet.value.has(card.id)) sectionMap.get(s)!.push(card)
93 }
94 return Array.from(sectionMap.entries()).map(([label, cards]) => ({ label, cards }))
95})
96
97function toggleCard(id: string) {
98 if (homepageSet.value.has(id)) {
99 state.value.homepage = state.value.homepage.filter((hid) => hid !== id)
100 } else {
101 state.value.homepage.push(id)
102 }
103 save()
104}
105
106function showAll() {
107 const current = new Set(state.value.homepage)
108 const toAdd = props.cards.filter((c) => !current.has(c.id)).map((c) => c.id)
109 state.value.homepage = [...state.value.homepage, ...toAdd]
110 save()
111}
112
113function hideAll() {
114 state.value.homepage = []
115 save()
116}
117
118function resetDefaults() {
119 state.value = defaultState()
120 columnMode.value = 'default'
121 viewMode.value = 'default'
122 save()
123}
124
125const cardTooltip = ref<{ text: string; x: number; y: number } | null>(null)
126
127function showCardTooltip(e: MouseEvent, title: string) {
128 const rect = (e.currentTarget as HTMLElement).getBoundingClientRect()
129 cardTooltip.value = { text: title, x: rect.left + rect.width / 2, y: rect.top }
130}
131
132function hideCardTooltip() {
133 cardTooltip.value = null
134}
135
136/* ── Drag-to-reorder (homepage only, pointer events) ── */
137const dragging = ref<string | null>(null)
138const dragTarget = ref<string | null>(null)
139const cardListEl = ref<HTMLElement | null>(null)
140const ghostPos = ref<{ x: number; y: number } | null>(null)
141
142function onHandlePointerDown(e: PointerEvent, id: string) {
143 e.preventDefault()
144 dragging.value = id
145 dragTarget.value = null
146 ghostPos.value = { x: e.clientX, y: e.clientY }
147 ;(e.currentTarget as HTMLElement).setPointerCapture(e.pointerId)
148}
149
150function onHandlePointerMove(e: PointerEvent) {
151 if (!dragging.value) return
152 ghostPos.value = { x: e.clientX, y: e.clientY }
153 const items = cardListEl.value?.querySelectorAll<HTMLElement>('[data-card-id]')
154 if (!items) return
155 for (const item of items) {
156 const rect = item.getBoundingClientRect()
157 if (
158 e.clientX >= rect.left && e.clientX <= rect.right &&
159 e.clientY >= rect.top && e.clientY <= rect.bottom
160 ) {
161 const id = item.dataset.cardId!
162 if (id !== dragging.value) dragTarget.value = id
163 break
164 }
165 }
166}
167
168function onHandlePointerUp() {
169 if (dragging.value && dragTarget.value) {
170 const order = [...state.value.homepage]
171 const from = order.indexOf(dragging.value)
172 const to = order.indexOf(dragTarget.value)
173 if (from !== -1 && to !== -1) {
174 order.splice(from, 1)
175 order.splice(to, 0, dragging.value)
176 state.value.homepage = order
177 save()
178 }
179 }
180 dragging.value = null
181 dragTarget.value = null
182 ghostPos.value = null
183}
184</script>
185
186<template>
187 <!-- ── Feature Grid ── -->
188 <div class="home-features">
189 <div class="container">
190 <div class="items" :class="{ 'view-mini': viewMode === 'mini' }">
191 <div
192 v-for="card in visibleCards"
193 :key="card.id"
194 class="item"
195 :class="grid"
196 >
197 <a class="card" :href="card.link">
198 <article class="box">
199 <div class="icon" v-html="cardIcon(card)" />
200 <h2 class="title">{{ card.title }}</h2>
201 <p class="details">{{ card.details }}</p>
202 </article>
203 </a>
204 </div>
205 </div>
206 <button class="gear-btn" aria-label="Customize cards" @click="panelOpen = true">
207 <span class="i-lucide-ellipsis-vertical" />
208 </button>
209 </div>
210 </div>
211
212 <!-- ── Manager Panel ── -->
213 <Teleport to="body">
214 <Transition name="fade">
215 <div v-if="panelOpen" class="backdrop" @click.self="panelOpen = false">
216 <Transition name="slide-up" appear>
217 <div v-if="panelOpen" class="panel" role="dialog" aria-modal="true" aria-label="Customize cards">
218 <div class="panel-head">
219 <span class="panel-title">Customize Cards</span>
220 <button class="close-btn" aria-label="Close" @click="panelOpen = false">
221 <span class="i-lucide-x" />
222 </button>
223 </div>
224
225 <div class="card-sections">
226 <!-- Homepage section (draggable) -->
227 <div class="section-label">Homepage</div>
228 <ul ref="cardListEl" class="card-list" :class="grid">
229 <li v-if="homepageSectionCards.length === 0" class="empty-box">
230 <span class="empty-hint">No cards selected — add some from below</span>
231 </li>
232 <li
233 v-for="card in homepageSectionCards"
234 :key="card.id"
235 :data-card-id="card.id"
236 class="card-row"
237 @mouseenter="showCardTooltip($event, card.title)"
238 @mouseleave="hideCardTooltip"
239 :class="{
240 'is-dragging': dragging === card.id,
241 'is-over': dragTarget === card.id && dragging !== card.id
242 }"
243 >
244 <span
245 class="row-handle"
246 aria-hidden="true"
247 @pointerdown="onHandlePointerDown($event, card.id)"
248 @pointermove="onHandlePointerMove"
249 @pointerup="onHandlePointerUp"
250 >
251 <span class="i-lucide-grip-vertical" />
252 </span>
253 <span class="row-icon" v-html="cardIcon(card)" />
254 <span class="row-name">{{ card.title }}</span>
255 <button
256 class="row-toggle active"
257 aria-label="Remove from homepage"
258 @click="toggleCard(card.id)"
259 >
260 <span class="i-lucide-eye" />
261 </button>
262 </li>
263 </ul>
264
265 <!-- Other sections (Pages, Extensions, Other…) -->
266 <template v-for="section in otherSections" :key="section.label">
267 <div class="section-label">{{ section.label }}</div>
268 <ul class="card-list" :class="grid">
269 <li v-if="section.cards.length === 0" class="empty-box">
270 <span class="empty-hint">All cards from this section have been selected</span>
271 </li>
272 <li
273 v-for="card in section.cards"
274 :key="card.id"
275 class="card-row card-row-unselected"
276 @mouseenter="showCardTooltip($event, card.title)"
277 @mouseleave="hideCardTooltip"
278 >
279 <span class="row-handle-spacer" aria-hidden="true" />
280 <span class="row-icon" v-html="cardIcon(card)" />
281 <span class="row-name">{{ card.title }}</span>
282 <button
283 class="row-toggle"
284 aria-label="Add to homepage"
285 @click="toggleCard(card.id)"
286 >
287 <span class="i-lucide-eye-off" />
288 </button>
289 </li>
290 </ul>
291 </template>
292 </div>
293
294 <div class="panel-foot">
295 <div class="foot-group">
296 <button class="tool-btn" aria-label="Show all" @click="showAll">
297 <span class="i-lucide-eye" />
298 </button>
299 <button class="tool-btn" aria-label="Hide all" @click="hideAll">
300 <span class="i-lucide-eye-off" />
301 </button>
302 </div>
303 <div class="foot-group">
304 <div class="settings-wrap">
305 <div v-if="dropdownOpen" class="dropdown-overlay" @click="dropdownOpen = false" />
306 <div v-if="dropdownOpen" class="settings-dropdown">
307 <div class="dropdown-section">
308 <span class="dropdown-label">View</span>
309 <div class="dropdown-group">
310 <button class="tool-btn" :class="{ 'is-active': viewMode === 'default' }" @click="viewMode = 'default'">Default</button>
311 <button class="tool-btn" :class="{ 'is-active': viewMode === 'mini' }" @click="viewMode = 'mini'">Mini</button>
312 </div>
313 </div>
314 <div class="dropdown-section">
315 <span class="dropdown-label">Columns</span>
316 <div class="dropdown-group">
317 <button class="tool-btn" :class="{ 'is-active': columnMode === 'default' }" @click="columnMode = 'default'">Default</button>
318 <button class="tool-btn" :class="{ 'is-active': columnMode === 'max' }" @click="columnMode = 'max'">Max</button>
319 </div>
320 </div>
321 </div>
322 <button
323 class="tool-btn"
324 :class="{ 'is-active': dropdownOpen }"
325 aria-label="Display settings"
326 @click.stop="dropdownOpen = !dropdownOpen"
327 >
328 <span class="i-lucide-settings-2" />
329 </button>
330 </div>
331 <button class="tool-btn" aria-label="Reset to default" @click="resetDefaults">
332 <span class="i-lucide-refresh-ccw" />
333 </button>
334 </div>
335 </div>
336 </div>
337 </Transition>
338 </div>
339 </Transition>
340
341 <div
342 v-if="cardTooltip"
343 class="card-tooltip"
344 :style="{ left: cardTooltip.x + 'px', top: cardTooltip.y + 'px' }"
345 >{{ cardTooltip.text }}</div>
346
347 <Transition name="ghost-fade">
348 <div
349 v-if="dragging && ghostPos"
350 class="drag-ghost"
351 :style="{ left: ghostPos.x + 'px', top: ghostPos.y + 'px' }"
352 >
353 <span class="row-icon" v-html="cardIcon(cardMap.get(dragging)!)" />
354 <span class="drag-ghost-name">{{ cardMap.get(dragging)?.title }}</span>
355 </div>
356 </Transition>
357 </Teleport>
358</template>
359
360<style scoped>
361/* ── Grid ── */
362.home-features {
363 position: relative;
364 padding: 0 24px;
365}
366
367@media (min-width: 640px) {
368 .home-features { padding: 0 48px; }
369}
370
371@media (min-width: 960px) {
372 .home-features { padding: 0 64px; }
373}
374
375.container {
376 position: relative;
377 margin: 0 auto;
378 max-width: 1152px;
379}
380
381.items {
382 display: flex;
383 flex-wrap: wrap;
384 margin: -8px;
385}
386
387.item {
388 padding: 8px;
389 width: 100%;
390}
391
392@media (min-width: 640px) {
393 .item.grid-2,
394 .item.grid-4,
395 .item.grid-6 { width: calc(100% / 2); }
396}
397
398@media (min-width: 768px) {
399 .item.grid-2,
400 .item.grid-4 { width: calc(100% / 2); }
401 .item.grid-3,
402 .item.grid-6 { width: calc(100% / 3); }
403}
404
405@media (min-width: 960px) {
406 .item.grid-4 { width: calc(100% / 4); }
407}
408
409@media (min-width: 640px) {
410 .item.grid-max { width: calc(100% / 2); }
411}
412
413@media (min-width: 768px) {
414 .item.grid-max { width: calc(100% / 3); }
415}
416
417@media (min-width: 960px) {
418 .item.grid-max { width: calc(100% / 4); }
419}
420
421/* ── Card ── */
422.card {
423 display: block;
424 border: 2px solid #3d3d3d;
425 border-radius: 12px;
426 height: 100%;
427 background-color: var(--vp-c-bg-soft);
428 transition: border-color 0.25s, background-color 0.25s;
429 text-decoration: none;
430 color: inherit;
431}
432
433.card:hover {
434 border-color: var(--vp-c-brand-1);
435}
436
437.box {
438 display: flex;
439 flex-direction: column;
440 padding: 24px;
441 height: 100%;
442}
443
444.icon {
445 display: flex;
446 justify-content: center;
447 align-items: center;
448 margin-bottom: 20px;
449 border-radius: 6px;
450 background-color: var(--vp-c-default-soft);
451 width: 48px;
452 height: 48px;
453 font-size: 27px;
454 transition: background-color 0.25s;
455}
456
457.title {
458 line-height: 24px;
459 font-size: 16px;
460 font-weight: 600;
461}
462
463.details {
464 flex-grow: 1;
465 padding-top: 8px;
466 line-height: 24px;
467 font-size: 14px;
468 font-weight: 500;
469 color: var(--vp-c-text-2);
470}
471
472/* ── Mini View ── */
473.view-mini .box {
474 flex-direction: row;
475 align-items: center;
476 padding: 12px 16px;
477 gap: 12px;
478}
479
480.view-mini .icon {
481 width: 32px;
482 height: 32px;
483 font-size: 18px;
484 margin-bottom: 0;
485 flex-shrink: 0;
486}
487
488.view-mini .title {
489 font-size: 14px;
490 line-height: 1.3;
491}
492
493.view-mini .details {
494 display: none;
495}
496
497/* ── Gear Button ── */
498.gear-btn {
499 position: absolute;
500 top: 8px;
501 right: 0;
502 transform: translateX(100%);
503 background: none;
504 border: none;
505 padding: 4px;
506 color: var(--vp-c-text-3, var(--vp-c-text-2));
507 font-size: 18px;
508 cursor: pointer;
509 transition: color 0.2s;
510 display: flex;
511 align-items: center;
512}
513
514.gear-btn:hover {
515 color: var(--vp-c-brand-1);
516}
517
518/* ── Backdrop ── */
519.backdrop {
520 position: fixed;
521 inset: 0;
522 z-index: 100;
523 display: flex;
524 align-items: center;
525 justify-content: center;
526 background: rgba(0, 0, 0, 0.5);
527 backdrop-filter: blur(4px);
528}
529
530/* ── Panel ── */
531.panel {
532 width: min(520px, calc(100vw - 32px));
533 max-height: 85vh;
534 display: flex;
535 flex-direction: column;
536 border-radius: 16px;
537 border: 2px solid #3d3d3d;
538 background: var(--vp-c-bg);
539}
540
541@media (min-width: 768px) {
542 .panel { width: min(720px, calc(100vw - 32px)); }
543}
544
545@media (min-width: 960px) {
546 .panel { width: min(940px, calc(100vw - 32px)); }
547}
548
549.panel-head {
550 display: flex;
551 align-items: center;
552 justify-content: space-between;
553 padding: 10px 16px;
554 border-bottom: 1px solid var(--vp-c-divider);
555 flex-shrink: 0;
556}
557
558.panel-title {
559 font-size: 15px;
560 font-weight: 600;
561 color: var(--vp-c-text-1);
562}
563
564.close-btn {
565 position: relative;
566 display: flex;
567 align-items: center;
568 justify-content: center;
569 width: 28px;
570 height: 28px;
571 border-radius: 6px;
572 border: none;
573 background: transparent;
574 color: var(--vp-c-text-2);
575 font-size: 16px;
576 cursor: pointer;
577 transition: background 0.15s, color 0.15s;
578}
579
580.close-btn:hover {
581 background: var(--vp-c-bg-soft);
582 color: var(--vp-c-text-1);
583}
584
585.close-btn::after {
586 content: attr(aria-label);
587 position: absolute;
588 top: calc(100% + 6px);
589 right: 0;
590 background: var(--vp-c-bg-soft);
591 color: var(--vp-c-text-1);
592 border: 1px solid var(--vp-c-divider);
593 border-radius: 5px;
594 padding: 3px 8px;
595 font-size: 11px;
596 white-space: nowrap;
597 pointer-events: none;
598 opacity: 0;
599 transition: opacity 0.15s;
600 z-index: 10;
601}
602
603.close-btn:hover::after {
604 opacity: 1;
605}
606
607/* ── Card List ── */
608.card-sections {
609 overflow-y: auto;
610 min-height: 0;
611 padding: 8px;
612 display: flex;
613 flex-direction: column;
614 gap: 2px;
615}
616
617.section-label {
618 font-size: 11px;
619 font-weight: 600;
620 text-transform: uppercase;
621 letter-spacing: 0.06em;
622 color: var(--vp-c-text-3, var(--vp-c-text-2));
623 padding: 8px 10px 2px;
624}
625
626.section-label:first-child {
627 padding-top: 2px;
628}
629
630.card-list {
631 list-style: none;
632 margin: 0;
633 padding: 0;
634 display: grid;
635 grid-template-columns: 1fr;
636 gap: 2px;
637}
638
639@media (min-width: 640px) {
640 .card-list.grid-2,
641 .card-list.grid-4,
642 .card-list.grid-6,
643 .card-list.grid-max { grid-template-columns: 1fr 1fr; }
644}
645
646@media (min-width: 768px) {
647 .card-list.grid-3,
648 .card-list.grid-6,
649 .card-list.grid-max { grid-template-columns: 1fr 1fr 1fr; }
650}
651
652@media (min-width: 960px) {
653 .card-list.grid-4,
654 .card-list.grid-max { grid-template-columns: 1fr 1fr 1fr 1fr; }
655}
656
657.card-row {
658 display: flex;
659 align-items: center;
660 gap: 8px;
661 padding: 7px 10px;
662 border-radius: 8px;
663 transition: background 0.15s, opacity 0.15s;
664 user-select: none;
665 min-width: 0;
666}
667
668.card-row:hover {
669 background: var(--vp-c-bg-soft);
670}
671
672.card-row-unselected {
673 opacity: 0.45;
674}
675
676.card-row-unselected:hover {
677 opacity: 1;
678}
679
680.empty-box {
681 grid-column: 1 / -1;
682 list-style: none;
683 border-radius: 8px;
684 padding: 14px 16px;
685 display: flex;
686 align-items: center;
687 justify-content: center;
688 background-image:
689 linear-gradient(90deg, var(--vp-c-divider) 6px, transparent 6px),
690 linear-gradient(90deg, var(--vp-c-divider) 6px, transparent 6px),
691 linear-gradient(0deg, var(--vp-c-divider) 6px, transparent 6px),
692 linear-gradient(0deg, var(--vp-c-divider) 6px, transparent 6px);
693 background-size: 10px 1px, 10px 1px, 1px 10px, 1px 10px;
694 background-position: top left, bottom left, top left, top right;
695 background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
696}
697
698.empty-hint {
699 font-size: 13px;
700 color: var(--vp-c-text-3, var(--vp-c-text-2));
701 font-style: italic;
702}
703
704.card-tooltip {
705 position: fixed;
706 z-index: 9999;
707 transform: translate(-50%, calc(-100% - 6px));
708 background: var(--vp-c-bg-soft);
709 color: var(--vp-c-text-1);
710 border: 1px solid var(--vp-c-divider);
711 border-radius: 5px;
712 padding: 3px 8px;
713 font-size: 11px;
714 white-space: nowrap;
715 pointer-events: none;
716}
717
718.card-row.is-dragging {
719 opacity: 0.25;
720 cursor: grabbing;
721}
722
723.card-row.is-over {
724 background: var(--vp-c-brand-soft);
725 outline: 2px solid var(--vp-c-brand-1);
726 outline-offset: -2px;
727}
728
729.row-handle {
730 color: var(--vp-c-text-3, var(--vp-c-text-2));
731 font-size: 16px;
732 flex-shrink: 0;
733 display: flex;
734 align-items: center;
735 cursor: grab;
736 touch-action: none;
737}
738
739.row-handle:active {
740 cursor: grabbing;
741}
742
743.row-handle-spacer {
744 width: 16px;
745 flex-shrink: 0;
746}
747
748.row-icon {
749 font-size: 18px;
750 flex-shrink: 0;
751 display: flex;
752 align-items: center;
753 width: 20px;
754}
755
756.row-name {
757 flex: 1;
758 font-size: 14px;
759 font-weight: 500;
760 color: var(--vp-c-text-1);
761 overflow: hidden;
762 white-space: nowrap;
763 text-overflow: ellipsis;
764 min-width: 0;
765}
766
767.row-toggle {
768 display: flex;
769 align-items: center;
770 justify-content: center;
771 width: 30px;
772 height: 30px;
773 border-radius: 6px;
774 border: none;
775 background: transparent;
776 color: var(--vp-c-text-2);
777 font-size: 16px;
778 cursor: pointer;
779 flex-shrink: 0;
780 transition: background 0.15s, color 0.15s;
781}
782
783.row-toggle:hover {
784 background: var(--vp-c-bg-alt);
785 color: var(--vp-c-text-1);
786}
787
788.row-toggle.active {
789 color: var(--vp-c-brand-1);
790}
791
792/* ── Panel Footer ── */
793.panel-foot {
794 display: flex;
795 align-items: center;
796 justify-content: space-between;
797 padding: 5px 8px;
798 border-top: 1px solid var(--vp-c-divider);
799 flex-shrink: 0;
800 gap: 8px;
801}
802
803.foot-group {
804 display: flex;
805 align-items: center;
806 gap: 4px;
807}
808
809.tool-btn {
810 position: relative;
811 display: flex;
812 align-items: center;
813 gap: 5px;
814 font-size: 14px;
815 font-weight: 500;
816 color: var(--vp-c-text-2);
817 background: transparent;
818 border: none;
819 border-radius: 5px;
820 padding: 5px 6px;
821 cursor: pointer;
822 transition: color 0.15s, background 0.15s;
823}
824
825.tool-btn[aria-label]::after {
826 content: attr(aria-label);
827 position: absolute;
828 bottom: calc(100% + 6px);
829 left: 50%;
830 transform: translateX(-50%);
831 background: var(--vp-c-bg-soft);
832 color: var(--vp-c-text-1);
833 border: 1px solid var(--vp-c-divider);
834 border-radius: 5px;
835 padding: 3px 8px;
836 font-size: 11px;
837 white-space: nowrap;
838 pointer-events: none;
839 opacity: 0;
840 transition: opacity 0.15s;
841 z-index: 10;
842}
843
844.tool-btn[aria-label]:hover::after {
845 opacity: 1;
846}
847
848.tool-btn:hover {
849 color: var(--vp-c-text-1);
850 background: var(--vp-c-bg-soft);
851}
852
853.tool-btn.is-active {
854 color: var(--vp-c-brand-1);
855 background: var(--vp-c-brand-soft);
856}
857
858/* ── Settings Dropdown ── */
859.settings-wrap {
860 position: relative;
861}
862
863.dropdown-overlay {
864 position: fixed;
865 inset: 0;
866 z-index: 1;
867}
868
869.settings-dropdown {
870 position: absolute;
871 bottom: calc(100% + 8px);
872 right: 0;
873 z-index: 2;
874 min-width: 196px;
875 background: var(--vp-c-bg);
876 border: 1px solid var(--vp-c-divider);
877 border-radius: 10px;
878 padding: 10px;
879 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
880}
881
882.dropdown-section + .dropdown-section {
883 border-top: 1px solid var(--vp-c-divider);
884 margin-top: 8px;
885 padding-top: 8px;
886}
887
888.dropdown-label {
889 display: block;
890 font-size: 11px;
891 font-weight: 600;
892 text-transform: uppercase;
893 letter-spacing: 0.06em;
894 color: var(--vp-c-text-3, var(--vp-c-text-2));
895 margin-bottom: 6px;
896}
897
898.dropdown-group {
899 display: flex;
900 gap: 4px;
901}
902
903/* ── Drag Ghost ── */
904.drag-ghost {
905 position: fixed;
906 pointer-events: none;
907 z-index: 9999;
908 display: flex;
909 align-items: center;
910 gap: 8px;
911 padding: 6px 12px 6px 10px;
912 background: var(--vp-c-bg);
913 border: 1px solid var(--vp-c-brand-1);
914 border-radius: 8px;
915 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
916 opacity: 0.88;
917 font-size: 14px;
918 font-weight: 500;
919 color: var(--vp-c-text-1);
920 white-space: nowrap;
921 user-select: none;
922 transform: translate(12px, -50%);
923}
924
925.drag-ghost-name {
926 font-size: 14px;
927 font-weight: 500;
928 color: var(--vp-c-text-1);
929}
930
931.ghost-fade-enter-active,
932.ghost-fade-leave-active { transition: opacity 0.1s ease; }
933.ghost-fade-enter-from,
934.ghost-fade-leave-to { opacity: 0; }
935
936/* ── Transitions ── */
937.fade-enter-active,
938.fade-leave-active { transition: opacity 0.2s ease; }
939.fade-enter-from,
940.fade-leave-to { opacity: 0; }
941
942.slide-up-enter-active { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease; }
943.slide-up-leave-active { transition: transform 0.2s ease, opacity 0.15s ease; }
944.slide-up-enter-from { transform: translateY(20px); opacity: 0; }
945.slide-up-leave-to { transform: translateY(10px); opacity: 0; }
946</style>
docs/index.md +39 −3
@@ -5,12 +5,48 @@ sidebar: false
5aside: false 5aside: false
6 6
7customDescription: A wiki that covers everything weeb-related! 7customDescription: A wiki that covers everything weeb-related!
8
9features:
10 - title: Websites
11 details: Websites for anime, manga, novels & tokusatsu
12 icon: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M21.54 15H17a2 2 0 0 0-2 2v4.54M7 3.34V5a3 3 0 0 0 3 3v0a2 2 0 0 1 2 2v0c0 1.1.9 2 2 2v0a2 2 0 0 0 2-2v0c0-1.1.9-2 2-2h3.17M11 21.95V18a2 2 0 0 0-2-2v0a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05"/><circle cx="12" cy="12" r="10"/></g></svg>
13 link: /websites.md
14 - title: Software
15 details: Software for every Operating System
16 icon: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"/><path d="m3.3 7l8.7 5l8.7-5M12 22V12"/></g></svg>
17 link: /software.md
18 - title: Misc-sites
19 details: Various sites for database, info, tracking news & tools
20 icon: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 14l1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"/></svg>
21 link: /misc.md
22 - title: NSFW
23 details: hen...
24 icon: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><circle cx="12" cy="12" r="10"/><path d="m4.9 4.9l14.2 14.2"/></g></svg>
25 link: /nsfw.md
26 - title: Extension Repos
27 details: Extensions for everything
28 icon: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.39 4.39a1 1 0 0 0 1.68-.474a2.5 2.5 0 1 1 3.014 3.015a1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474a2.5 2.5 0 1 0-3.014 3.015a1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474a2.5 2.5 0 1 1-3.014-3.015a1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474a2.5 2.5 0 1 0 3.014-3.015a1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"/></svg>
29 link: /ext
30 - title: Guides
31 details: Various technical guides and tutorials
32 icon: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m19 3l1 1m0-2l-4.5 4.5M20 7.898V21a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2h7.844"/><circle cx="14" cy="8" r="2"/></g></svg>
33 link: /guides
34 - title: Glossary
35 details: Learn the most frequently used otaku terms
36 icon: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 7v14m-9-3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4a4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3a3 3 0 0 0-3-3z"/></svg>
37 link: /glossary
38 - title: Torrenting
39 details: All the basic how-tos about torrenting
40 icon: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE --><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m12 15l4 4M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282zM5 8l4 4"/></svg>
41 link: /torrenting
8--- 42---
9 43
10<script setup> 44<script setup>
11import HomeFeatures from './.vitepress/theme/components/HomeFeatures.vue' 45import { useData } from 'vitepress'
46import { VPFeatures } from 'vitepress/theme'
12import DevOnly from './.vitepress/theme/components/DevOnly.vue' 47import DevOnly from './.vitepress/theme/components/DevOnly.vue'
13import { homeCards } from './.vitepress/configs/constants' 48
49const { frontmatter } = useData()
14</script> 50</script>
15 51
16<main class="wotaku-home"> 52<main class="wotaku-home">
@@ -18,7 +54,7 @@ import { homeCards } from './.vitepress/configs/constants'
18 <img class="wotaku-hero-logo" src="/asset/hero.svg" alt="Wotaku" /> 54 <img class="wotaku-hero-logo" src="/asset/hero.svg" alt="Wotaku" />
19 </section> 55 </section>
20 56
21 <HomeFeatures :cards="homeCards" /> 57 <VPFeatures :features="frontmatter.features" />
22</main> 58</main>
23 59
24<DevOnly> 60<DevOnly>
unocss.config.ts +1 −37
@@ -17,41 +17,6 @@ import {
17 presetWind4, 17 presetWind4,
18 transformerDirectives 18 transformerDirectives
19} from 'unocss' 19} from 'unocss'
20import { aliases } from './docs/.vitepress/configs/markdown/emoji'
21
22const iconPrefixes = [
23 'octicon-',
24 'logos-',
25 'ic-',
26 'mingcute-',
27 'mdi-',
28 'material-symbols-',
29 'simple-icons-',
30 'lucide-',
31 'uil-',
32 'akar-icons-',
33 'map-',
34 'bi-',
35 'streamline-logos-',
36 'streamline-ultimate-',
37 'streamline-sharp-',
38 'iconoir-'
39]
40
41const emojiShortcodeExtractor = {
42 name: 'emoji-shortcode',
43 extract({ code }: { code: string }) {
44 const tokens = new Set<string>()
45 for (const [, markup] of code.matchAll(/:([A-Za-z0-9_+-]+):/g)) {
46 if (aliases[markup]) {
47 tokens.add(`i-${aliases[markup]}`)
48 } else if (iconPrefixes.some((p) => markup.startsWith(p))) {
49 tokens.add(`i-${markup}`)
50 }
51 }
52 return tokens
53 }
54}
55 20
56// Custom icons collection 21// Custom icons collection
57const customIcons = { 22const customIcons = {
@@ -79,9 +44,8 @@ const safelist = [
79 44
80export default defineConfig({ 45export default defineConfig({
81 content: { 46 content: {
82 filesystem: ['.vitepress/configs/constants.ts', 'docs/index.md'] 47 filesystem: ['.vitepress/configs/constants.ts']
83 }, 48 },
84 extractors: [emojiShortcodeExtractor],
85 safelist, 49 safelist,
86 theme: { 50 theme: {
87 easing: { 51 easing: {