Commit 384d5a58d7

384d5a58d71ba4abaf955efbbac3f27b1e165acf

parent: 0a7f3f99e3

Unsigned

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

commit

Layout: unified · split

docs/.vitepress/configs/constants.ts +347
@@ -7,6 +7,353 @@
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
10export const hostname: string = 'https://wotaku.wiki' 357export const hostname: string = 'https://wotaku.wiki'
11export const excludedFiles = ['t.md', 'sandbox.md'] 358export const excludedFiles = ['t.md', 'sandbox.md']
12 359
docs/.vitepress/theme/components/HomeFeatures.vue added +954
@@ -0,0 +1,954 @@
1<script setup lang="ts">
2import { computed, ref, 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
21function loadState(): CardState {
22 if (typeof window === 'undefined') return defaultState()
23 try {
24 const raw = localStorage.getItem(STORAGE_KEY)
25 if (!raw) return defaultState()
26 const parsed: CardState = JSON.parse(raw)
27 const allIds = new Set(props.cards.map((c) => c.id))
28 return { homepage: (parsed.homepage ?? []).filter((id) => allIds.has(id)) }
29 } catch { return defaultState() }
30}
31
32const state = ref<CardState>(loadState())
33
34function save() {
35 localStorage.setItem(STORAGE_KEY, JSON.stringify(state.value))
36}
37
38const cardMap = computed(() => new Map(props.cards.map((c) => [c.id, c])))
39
40const homepageSet = computed(() => new Set(state.value.homepage))
41
42const visibleCards = computed(() =>
43 state.value.homepage.map((id) => cardMap.value.get(id)!).filter(Boolean)
44)
45
46const grid = computed(() => {
47 const n = visibleCards.value.length
48 if (n === 0) return undefined
49 if (columnMode.value === 'max') return 'grid-max'
50 if (n === 2) return 'grid-2'
51 if (n === 3) return 'grid-3'
52 if (n % 3 === 0) return 'grid-6'
53 if (n > 3) return 'grid-4'
54 return undefined
55})
56
57function cardIcon(card: HomeCard) {
58 return renderEmojiShortcodes(card.icon)
59}
60
61/* ── Manager panel ── */
62const panelOpen = ref(false)
63const dropdownOpen = ref(false)
64
65function loadPrefs() {
66 if (typeof window === 'undefined') return { columnMode: 'default' as const, viewMode: 'default' as const }
67 try {
68 const p = JSON.parse(localStorage.getItem(PREFS_KEY) ?? '{}')
69 return {
70 columnMode: p.columnMode === 'max' ? 'max' as const : 'default' as const,
71 viewMode: p.viewMode === 'mini' ? 'mini' as const : 'default' as const
72 }
73 } catch { return { columnMode: 'default' as const, viewMode: 'default' as const } }
74}
75
76const { columnMode: _cm, viewMode: _vm } = loadPrefs()
77const columnMode = ref<'default' | 'max'>(_cm)
78const viewMode = ref<'default' | 'mini'>(_vm)
79
80watch([columnMode, viewMode], () => {
81 localStorage.setItem(PREFS_KEY, JSON.stringify({
82 columnMode: columnMode.value,
83 viewMode: viewMode.value
84 }))
85})
86
87const homepageSectionCards = computed(() =>
88 state.value.homepage.map((id) => cardMap.value.get(id)!).filter(Boolean)
89)
90
91const otherSections = computed(() => {
92 const sectionMap = new Map<string, HomeCard[]>()
93 for (const card of props.cards) {
94 const s = card.section ?? 'Pages'
95 if (!sectionMap.has(s)) sectionMap.set(s, [])
96 if (!homepageSet.value.has(card.id)) sectionMap.get(s)!.push(card)
97 }
98 return Array.from(sectionMap.entries()).map(([label, cards]) => ({ label, cards }))
99})
100
101function toggleCard(id: string) {
102 if (homepageSet.value.has(id)) {
103 state.value.homepage = state.value.homepage.filter((hid) => hid !== id)
104 } else {
105 state.value.homepage.push(id)
106 }
107 save()
108}
109
110function showAll() {
111 const current = new Set(state.value.homepage)
112 const toAdd = props.cards.filter((c) => !current.has(c.id)).map((c) => c.id)
113 state.value.homepage = [...state.value.homepage, ...toAdd]
114 save()
115}
116
117function hideAll() {
118 state.value.homepage = []
119 save()
120}
121
122function resetDefaults() {
123 state.value = defaultState()
124 columnMode.value = 'default'
125 viewMode.value = 'default'
126 save()
127}
128
129const cardTooltip = ref<{ text: string; x: number; y: number } | null>(null)
130
131function showCardTooltip(e: MouseEvent, title: string) {
132 const rect = (e.currentTarget as HTMLElement).getBoundingClientRect()
133 cardTooltip.value = { text: title, x: rect.left + rect.width / 2, y: rect.top }
134}
135
136function hideCardTooltip() {
137 cardTooltip.value = null
138}
139
140/* ── Drag-to-reorder (homepage only, pointer events) ── */
141const dragging = ref<string | null>(null)
142const dragTarget = ref<string | null>(null)
143const cardListEl = ref<HTMLElement | null>(null)
144const ghostPos = ref<{ x: number; y: number } | null>(null)
145
146function onHandlePointerDown(e: PointerEvent, id: string) {
147 e.preventDefault()
148 dragging.value = id
149 dragTarget.value = null
150 ghostPos.value = { x: e.clientX, y: e.clientY }
151 ;(e.currentTarget as HTMLElement).setPointerCapture(e.pointerId)
152}
153
154function onHandlePointerMove(e: PointerEvent) {
155 if (!dragging.value) return
156 ghostPos.value = { x: e.clientX, y: e.clientY }
157 const items = cardListEl.value?.querySelectorAll<HTMLElement>('[data-card-id]')
158 if (!items) return
159 for (const item of items) {
160 const rect = item.getBoundingClientRect()
161 if (
162 e.clientX >= rect.left && e.clientX <= rect.right &&
163 e.clientY >= rect.top && e.clientY <= rect.bottom
164 ) {
165 const id = item.dataset.cardId!
166 if (id !== dragging.value) dragTarget.value = id
167 break
168 }
169 }
170}
171
172function onHandlePointerUp() {
173 if (dragging.value && dragTarget.value) {
174 const order = [...state.value.homepage]
175 const from = order.indexOf(dragging.value)
176 const to = order.indexOf(dragTarget.value)
177 if (from !== -1 && to !== -1) {
178 order.splice(from, 1)
179 order.splice(to, 0, dragging.value)
180 state.value.homepage = order
181 save()
182 }
183 }
184 dragging.value = null
185 dragTarget.value = null
186 ghostPos.value = null
187}
188</script>
189
190<template>
191 <!-- ── Feature Grid ── -->
192 <div class="home-features">
193 <div class="container">
194 <div class="items" :class="{ 'view-mini': viewMode === 'mini' }">
195 <div
196 v-for="card in visibleCards"
197 :key="card.id"
198 class="item"
199 :class="grid"
200 >
201 <a class="card" :href="card.link">
202 <article class="box">
203 <div class="icon" v-html="cardIcon(card)" />
204 <h2 class="title">{{ card.title }}</h2>
205 <p class="details">{{ card.details }}</p>
206 </article>
207 </a>
208 </div>
209 </div>
210 <button class="gear-btn" aria-label="Customize cards" @click="panelOpen = true">
211 <span class="i-lucide-ellipsis-vertical" />
212 </button>
213 </div>
214 </div>
215
216 <!-- ── Manager Panel ── -->
217 <Teleport to="body">
218 <Transition name="fade">
219 <div v-if="panelOpen" class="backdrop" @click.self="panelOpen = false">
220 <Transition name="slide-up" appear>
221 <div v-if="panelOpen" class="panel" role="dialog" aria-modal="true" aria-label="Customize cards">
222 <div class="panel-head">
223 <span class="panel-title">Customize Cards</span>
224 <button class="close-btn" aria-label="Close" @click="panelOpen = false">
225 <span class="i-lucide-x" />
226 </button>
227 </div>
228
229 <div class="card-sections">
230 <!-- Homepage section (draggable) -->
231 <div class="section-label">Homepage</div>
232 <ul ref="cardListEl" class="card-list" :class="grid">
233 <li v-if="homepageSectionCards.length === 0" class="empty-box">
234 <span class="empty-hint">No cards selected — add some from below</span>
235 </li>
236 <li
237 v-for="card in homepageSectionCards"
238 :key="card.id"
239 :data-card-id="card.id"
240 class="card-row"
241 @mouseenter="showCardTooltip($event, card.title)"
242 @mouseleave="hideCardTooltip"
243 :class="{
244 'is-dragging': dragging === card.id,
245 'is-over': dragTarget === card.id && dragging !== card.id
246 }"
247 >
248 <span
249 class="row-handle"
250 aria-hidden="true"
251 @pointerdown="onHandlePointerDown($event, card.id)"
252 @pointermove="onHandlePointerMove"
253 @pointerup="onHandlePointerUp"
254 >
255 <span class="i-lucide-grip-vertical" />
256 </span>
257 <span class="row-icon" v-html="cardIcon(card)" />
258 <span class="row-name">{{ card.title }}</span>
259 <button
260 class="row-toggle active"
261 aria-label="Remove from homepage"
262 @click="toggleCard(card.id)"
263 >
264 <span class="i-lucide-eye" />
265 </button>
266 </li>
267 </ul>
268
269 <!-- Other sections (Pages, Extensions, Other…) -->
270 <template v-for="section in otherSections" :key="section.label">
271 <div class="section-label">{{ section.label }}</div>
272 <ul class="card-list" :class="grid">
273 <li v-if="section.cards.length === 0" class="empty-box">
274 <span class="empty-hint">All cards from this section have been selected</span>
275 </li>
276 <li
277 v-for="card in section.cards"
278 :key="card.id"
279 class="card-row card-row-unselected"
280 @mouseenter="showCardTooltip($event, card.title)"
281 @mouseleave="hideCardTooltip"
282 >
283 <span class="row-handle-spacer" aria-hidden="true" />
284 <span class="row-icon" v-html="cardIcon(card)" />
285 <span class="row-name">{{ card.title }}</span>
286 <button
287 class="row-toggle"
288 aria-label="Add to homepage"
289 @click="toggleCard(card.id)"
290 >
291 <span class="i-lucide-eye-off" />
292 </button>
293 </li>
294 </ul>
295 </template>
296 </div>
297
298 <div class="panel-foot">
299 <div class="foot-group">
300 <button class="tool-btn" aria-label="Show all" @click="showAll">
301 <span class="i-lucide-eye" />
302 </button>
303 <button class="tool-btn" aria-label="Hide all" @click="hideAll">
304 <span class="i-lucide-eye-off" />
305 </button>
306 </div>
307 <div class="foot-group">
308 <div class="settings-wrap">
309 <div v-if="dropdownOpen" class="dropdown-overlay" @click="dropdownOpen = false" />
310 <div v-if="dropdownOpen" class="settings-dropdown">
311 <div class="dropdown-section">
312 <span class="dropdown-label">View</span>
313 <div class="dropdown-group">
314 <button class="tool-btn" :class="{ 'is-active': viewMode === 'default' }" @click="viewMode = 'default'">Default</button>
315 <button class="tool-btn" :class="{ 'is-active': viewMode === 'mini' }" @click="viewMode = 'mini'">Mini</button>
316 </div>
317 </div>
318 <div class="dropdown-section">
319 <span class="dropdown-label">Columns</span>
320 <div class="dropdown-group">
321 <button class="tool-btn" :class="{ 'is-active': columnMode === 'default' }" @click="columnMode = 'default'">Default</button>
322 <button class="tool-btn" :class="{ 'is-active': columnMode === 'max' }" @click="columnMode = 'max'">Max</button>
323 </div>
324 </div>
325 </div>
326 <button
327 class="tool-btn"
328 :class="{ 'is-active': dropdownOpen }"
329 aria-label="Display settings"
330 @click.stop="dropdownOpen = !dropdownOpen"
331 >
332 <span class="i-lucide-settings-2" />
333 </button>
334 </div>
335 <button class="tool-btn" aria-label="Reset to default" @click="resetDefaults">
336 <span class="i-lucide-refresh-ccw" />
337 </button>
338 </div>
339 </div>
340 </div>
341 </Transition>
342 </div>
343 </Transition>
344
345 <div
346 v-if="cardTooltip"
347 class="card-tooltip"
348 :style="{ left: cardTooltip.x + 'px', top: cardTooltip.y + 'px' }"
349 >{{ cardTooltip.text }}</div>
350
351 <Transition name="ghost-fade">
352 <div
353 v-if="dragging && ghostPos"
354 class="drag-ghost"
355 :style="{ left: ghostPos.x + 'px', top: ghostPos.y + 'px' }"
356 >
357 <span class="row-icon" v-html="cardIcon(cardMap.get(dragging)!)" />
358 <span class="drag-ghost-name">{{ cardMap.get(dragging)?.title }}</span>
359 </div>
360 </Transition>
361 </Teleport>
362</template>
363
364<style scoped>
365/* ── Grid ── */
366.home-features {
367 position: relative;
368 padding: 0 24px;
369}
370
371@media (min-width: 640px) {
372 .home-features { padding: 0 48px; }
373}
374
375@media (min-width: 960px) {
376 .home-features { padding: 0 64px; }
377}
378
379.container {
380 position: relative;
381 margin: 0 auto;
382 max-width: 1152px;
383}
384
385.items {
386 display: flex;
387 flex-wrap: wrap;
388 margin: -8px;
389}
390
391.item {
392 padding: 8px;
393 width: 100%;
394}
395
396@media (min-width: 640px) {
397 .item.grid-2,
398 .item.grid-4,
399 .item.grid-6 { width: calc(100% / 2); }
400}
401
402@media (min-width: 768px) {
403 .item.grid-2,
404 .item.grid-4 { width: calc(100% / 2); }
405 .item.grid-3,
406 .item.grid-6 { width: calc(100% / 3); }
407}
408
409@media (min-width: 960px) {
410 .item.grid-4 { width: calc(100% / 4); }
411}
412
413@media (min-width: 640px) {
414 .item.grid-max { width: calc(100% / 2); }
415}
416
417@media (min-width: 768px) {
418 .item.grid-max { width: calc(100% / 3); }
419}
420
421@media (min-width: 960px) {
422 .item.grid-max { width: calc(100% / 4); }
423}
424
425/* ── Card ── */
426.card {
427 display: block;
428 border: 2px solid #3d3d3d;
429 border-radius: 12px;
430 height: 100%;
431 background-color: var(--vp-c-bg-soft);
432 transition: border-color 0.25s, background-color 0.25s;
433 text-decoration: none;
434 color: inherit;
435}
436
437.card:hover {
438 border-color: var(--vp-c-brand-1);
439}
440
441.card:active {
442 transform: none;
443}
444
445.box {
446 display: flex;
447 flex-direction: column;
448 padding: 24px;
449 height: 100%;
450}
451
452.icon {
453 display: flex;
454 justify-content: center;
455 align-items: center;
456 margin-bottom: 20px;
457 border-radius: 6px;
458 background-color: var(--vp-c-default-soft);
459 width: 48px;
460 height: 48px;
461 font-size: 27px;
462 transition: background-color 0.25s;
463}
464
465.title {
466 line-height: 24px;
467 font-size: 16px;
468 font-weight: 600;
469}
470
471.details {
472 flex-grow: 1;
473 padding-top: 8px;
474 line-height: 24px;
475 font-size: 14px;
476 font-weight: 500;
477 color: var(--vp-c-text-2);
478}
479
480/* ── Mini View ── */
481.view-mini .box {
482 flex-direction: row;
483 align-items: center;
484 padding: 12px 16px;
485 gap: 12px;
486}
487
488.view-mini .icon {
489 width: 32px;
490 height: 32px;
491 font-size: 18px;
492 margin-bottom: 0;
493 flex-shrink: 0;
494}
495
496.view-mini .title {
497 font-size: 14px;
498 line-height: 1.3;
499}
500
501.view-mini .details {
502 display: none;
503}
504
505/* ── Gear Button ── */
506.gear-btn {
507 position: absolute;
508 top: 8px;
509 right: 0;
510 transform: translateX(100%);
511 background: none;
512 border: none;
513 padding: 4px;
514 color: var(--vp-c-text-3, var(--vp-c-text-2));
515 font-size: 18px;
516 cursor: pointer;
517 transition: color 0.2s;
518 display: flex;
519 align-items: center;
520}
521
522.gear-btn:hover {
523 color: var(--vp-c-brand-1);
524}
525
526/* ── Backdrop ── */
527.backdrop {
528 position: fixed;
529 inset: 0;
530 z-index: 100;
531 display: flex;
532 align-items: center;
533 justify-content: center;
534 background: rgba(0, 0, 0, 0.5);
535 backdrop-filter: blur(4px);
536}
537
538/* ── Panel ── */
539.panel {
540 width: min(520px, calc(100vw - 32px));
541 max-height: 85vh;
542 display: flex;
543 flex-direction: column;
544 border-radius: 16px;
545 border: 2px solid #3d3d3d;
546 background: var(--vp-c-bg);
547}
548
549@media (min-width: 768px) {
550 .panel { width: min(720px, calc(100vw - 32px)); }
551}
552
553@media (min-width: 960px) {
554 .panel { width: min(940px, calc(100vw - 32px)); }
555}
556
557.panel-head {
558 display: flex;
559 align-items: center;
560 justify-content: space-between;
561 padding: 10px 16px;
562 border-bottom: 1px solid var(--vp-c-divider);
563 flex-shrink: 0;
564}
565
566.panel-title {
567 font-size: 15px;
568 font-weight: 600;
569 color: var(--vp-c-text-1);
570}
571
572.close-btn {
573 position: relative;
574 display: flex;
575 align-items: center;
576 justify-content: center;
577 width: 28px;
578 height: 28px;
579 border-radius: 6px;
580 border: none;
581 background: transparent;
582 color: var(--vp-c-text-2);
583 font-size: 16px;
584 cursor: pointer;
585 transition: background 0.15s, color 0.15s;
586}
587
588.close-btn:hover {
589 background: var(--vp-c-bg-soft);
590 color: var(--vp-c-text-1);
591}
592
593.close-btn::after {
594 content: attr(aria-label);
595 position: absolute;
596 top: calc(100% + 6px);
597 right: 0;
598 background: var(--vp-c-bg-soft);
599 color: var(--vp-c-text-1);
600 border: 1px solid var(--vp-c-divider);
601 border-radius: 5px;
602 padding: 3px 8px;
603 font-size: 11px;
604 white-space: nowrap;
605 pointer-events: none;
606 opacity: 0;
607 transition: opacity 0.15s;
608 z-index: 10;
609}
610
611.close-btn:hover::after {
612 opacity: 1;
613}
614
615/* ── Card List ── */
616.card-sections {
617 overflow-y: auto;
618 min-height: 0;
619 padding: 8px;
620 display: flex;
621 flex-direction: column;
622 gap: 2px;
623}
624
625.section-label {
626 font-size: 11px;
627 font-weight: 600;
628 text-transform: uppercase;
629 letter-spacing: 0.06em;
630 color: var(--vp-c-text-3, var(--vp-c-text-2));
631 padding: 8px 10px 2px;
632}
633
634.section-label:first-child {
635 padding-top: 2px;
636}
637
638.card-list {
639 list-style: none;
640 margin: 0;
641 padding: 0;
642 display: grid;
643 grid-template-columns: 1fr;
644 gap: 2px;
645}
646
647@media (min-width: 640px) {
648 .card-list.grid-2,
649 .card-list.grid-4,
650 .card-list.grid-6,
651 .card-list.grid-max { grid-template-columns: 1fr 1fr; }
652}
653
654@media (min-width: 768px) {
655 .card-list.grid-3,
656 .card-list.grid-6,
657 .card-list.grid-max { grid-template-columns: 1fr 1fr 1fr; }
658}
659
660@media (min-width: 960px) {
661 .card-list.grid-4,
662 .card-list.grid-max { grid-template-columns: 1fr 1fr 1fr 1fr; }
663}
664
665.card-row {
666 display: flex;
667 align-items: center;
668 gap: 8px;
669 padding: 7px 10px;
670 border-radius: 8px;
671 transition: background 0.15s, opacity 0.15s;
672 user-select: none;
673 min-width: 0;
674}
675
676.card-row:hover {
677 background: var(--vp-c-bg-soft);
678}
679
680.card-row-unselected {
681 opacity: 0.45;
682}
683
684.card-row-unselected:hover {
685 opacity: 1;
686}
687
688.empty-box {
689 grid-column: 1 / -1;
690 list-style: none;
691 border-radius: 8px;
692 padding: 14px 16px;
693 display: flex;
694 align-items: center;
695 justify-content: center;
696 background-image:
697 linear-gradient(90deg, var(--vp-c-divider) 6px, transparent 6px),
698 linear-gradient(90deg, var(--vp-c-divider) 6px, transparent 6px),
699 linear-gradient(0deg, var(--vp-c-divider) 6px, transparent 6px),
700 linear-gradient(0deg, var(--vp-c-divider) 6px, transparent 6px);
701 background-size: 10px 1px, 10px 1px, 1px 10px, 1px 10px;
702 background-position: top left, bottom left, top left, top right;
703 background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
704}
705
706.empty-hint {
707 font-size: 13px;
708 color: var(--vp-c-text-3, var(--vp-c-text-2));
709 font-style: italic;
710}
711
712.card-tooltip {
713 position: fixed;
714 z-index: 9999;
715 transform: translate(-50%, calc(-100% - 6px));
716 background: var(--vp-c-bg-soft);
717 color: var(--vp-c-text-1);
718 border: 1px solid var(--vp-c-divider);
719 border-radius: 5px;
720 padding: 3px 8px;
721 font-size: 11px;
722 white-space: nowrap;
723 pointer-events: none;
724}
725
726.card-row.is-dragging {
727 opacity: 0.25;
728 cursor: grabbing;
729}
730
731.card-row.is-over {
732 background: var(--vp-c-brand-soft);
733 outline: 2px solid var(--vp-c-brand-1);
734 outline-offset: -2px;
735}
736
737.row-handle {
738 color: var(--vp-c-text-3, var(--vp-c-text-2));
739 font-size: 16px;
740 flex-shrink: 0;
741 display: flex;
742 align-items: center;
743 cursor: grab;
744 touch-action: none;
745}
746
747.row-handle:active {
748 cursor: grabbing;
749}
750
751.row-handle-spacer {
752 width: 16px;
753 flex-shrink: 0;
754}
755
756.row-icon {
757 font-size: 18px;
758 flex-shrink: 0;
759 display: flex;
760 align-items: center;
761 width: 20px;
762}
763
764.row-name {
765 flex: 1;
766 font-size: 14px;
767 font-weight: 500;
768 color: var(--vp-c-text-1);
769 overflow: hidden;
770 white-space: nowrap;
771 text-overflow: ellipsis;
772 min-width: 0;
773}
774
775.row-toggle {
776 display: flex;
777 align-items: center;
778 justify-content: center;
779 width: 30px;
780 height: 30px;
781 border-radius: 6px;
782 border: none;
783 background: transparent;
784 color: var(--vp-c-text-2);
785 font-size: 16px;
786 cursor: pointer;
787 flex-shrink: 0;
788 transition: background 0.15s, color 0.15s;
789}
790
791.row-toggle:hover {
792 background: var(--vp-c-bg-alt);
793 color: var(--vp-c-text-1);
794}
795
796.row-toggle.active {
797 color: var(--vp-c-brand-1);
798}
799
800/* ── Panel Footer ── */
801.panel-foot {
802 display: flex;
803 align-items: center;
804 justify-content: space-between;
805 padding: 5px 8px;
806 border-top: 1px solid var(--vp-c-divider);
807 flex-shrink: 0;
808 gap: 8px;
809}
810
811.foot-group {
812 display: flex;
813 align-items: center;
814 gap: 4px;
815}
816
817.tool-btn {
818 position: relative;
819 display: flex;
820 align-items: center;
821 gap: 5px;
822 font-size: 14px;
823 font-weight: 500;
824 color: var(--vp-c-text-2);
825 background: transparent;
826 border: none;
827 border-radius: 5px;
828 padding: 5px 6px;
829 cursor: pointer;
830 transition: color 0.15s, background 0.15s;
831}
832
833.tool-btn[aria-label]::after {
834 content: attr(aria-label);
835 position: absolute;
836 bottom: calc(100% + 6px);
837 left: 50%;
838 transform: translateX(-50%);
839 background: var(--vp-c-bg-soft);
840 color: var(--vp-c-text-1);
841 border: 1px solid var(--vp-c-divider);
842 border-radius: 5px;
843 padding: 3px 8px;
844 font-size: 11px;
845 white-space: nowrap;
846 pointer-events: none;
847 opacity: 0;
848 transition: opacity 0.15s;
849 z-index: 10;
850}
851
852.tool-btn[aria-label]:hover::after {
853 opacity: 1;
854}
855
856.tool-btn:hover {
857 color: var(--vp-c-text-1);
858 background: var(--vp-c-bg-soft);
859}
860
861.tool-btn.is-active {
862 color: var(--vp-c-brand-1);
863 background: var(--vp-c-brand-soft);
864}
865
866/* ── Settings Dropdown ── */
867.settings-wrap {
868 position: relative;
869}
870
871.dropdown-overlay {
872 position: fixed;
873 inset: 0;
874 z-index: 1;
875}
876
877.settings-dropdown {
878 position: absolute;
879 bottom: calc(100% + 8px);
880 right: 0;
881 z-index: 2;
882 min-width: 196px;
883 background: var(--vp-c-bg);
884 border: 1px solid var(--vp-c-divider);
885 border-radius: 10px;
886 padding: 10px;
887 box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
888}
889
890.dropdown-section + .dropdown-section {
891 border-top: 1px solid var(--vp-c-divider);
892 margin-top: 8px;
893 padding-top: 8px;
894}
895
896.dropdown-label {
897 display: block;
898 font-size: 11px;
899 font-weight: 600;
900 text-transform: uppercase;
901 letter-spacing: 0.06em;
902 color: var(--vp-c-text-3, var(--vp-c-text-2));
903 margin-bottom: 6px;
904}
905
906.dropdown-group {
907 display: flex;
908 gap: 4px;
909}
910
911/* ── Drag Ghost ── */
912.drag-ghost {
913 position: fixed;
914 pointer-events: none;
915 z-index: 9999;
916 display: flex;
917 align-items: center;
918 gap: 8px;
919 padding: 6px 12px 6px 10px;
920 background: var(--vp-c-bg);
921 border: 1px solid var(--vp-c-brand-1);
922 border-radius: 8px;
923 box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
924 opacity: 0.88;
925 font-size: 14px;
926 font-weight: 500;
927 color: var(--vp-c-text-1);
928 white-space: nowrap;
929 user-select: none;
930 transform: translate(12px, -50%);
931}
932
933.drag-ghost-name {
934 font-size: 14px;
935 font-weight: 500;
936 color: var(--vp-c-text-1);
937}
938
939.ghost-fade-enter-active,
940.ghost-fade-leave-active { transition: opacity 0.1s ease; }
941.ghost-fade-enter-from,
942.ghost-fade-leave-to { opacity: 0; }
943
944/* ── Transitions ── */
945.fade-enter-active,
946.fade-leave-active { transition: opacity 0.2s ease; }
947.fade-enter-from,
948.fade-leave-to { opacity: 0; }
949
950.slide-up-enter-active { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease; }
951.slide-up-leave-active { transition: transform 0.2s ease, opacity 0.15s ease; }
952.slide-up-enter-from { transform: translateY(20px); opacity: 0; }
953.slide-up-leave-to { transform: translateY(10px); opacity: 0; }
954</style>
docs/index.md +3 −39
@@ -5,48 +5,12 @@ 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
42--- 8---
43 9
44<script setup> 10<script setup>
45import { useData } from 'vitepress' 11import HomeFeatures from './.vitepress/theme/components/HomeFeatures.vue'
46import { VPFeatures } from 'vitepress/theme'
47import DevOnly from './.vitepress/theme/components/DevOnly.vue' 12import DevOnly from './.vitepress/theme/components/DevOnly.vue'
48 13import { homeCards } from './.vitepress/configs/constants'
49const { frontmatter } = useData()
50</script> 14</script>
51 15
52<main class="wotaku-home"> 16<main class="wotaku-home">
@@ -54,7 +18,7 @@ const { frontmatter } = useData()
54 <img class="wotaku-hero-logo" src="/asset/hero.svg" alt="Wotaku" /> 18 <img class="wotaku-hero-logo" src="/asset/hero.svg" alt="Wotaku" />
55 </section> 19 </section>
56 20
57 <VPFeatures :features="frontmatter.features" /> 21 <HomeFeatures :cards="homeCards" />
58</main> 22</main>
59 23
60<DevOnly> 24<DevOnly>
unocss.config.ts +37 −1
@@ -17,6 +17,41 @@ 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}
20 55
21// Custom icons collection 56// Custom icons collection
22const customIcons = { 57const customIcons = {
@@ -44,8 +79,9 @@ const safelist = [
44 79
45export default defineConfig({ 80export default defineConfig({
46 content: { 81 content: {
47 filesystem: ['.vitepress/configs/constants.ts'] 82 filesystem: ['.vitepress/configs/constants.ts', 'docs/index.md']
48 }, 83 },
84 extractors: [emojiShortcodeExtractor],
49 safelist, 85 safelist,
50 theme: { 86 theme: {
51 easing: { 87 easing: {