Commit 615228358a
Unsigned
Layout: unified · split
docs/.vitepress/configs/constants.ts +193
| @@ -14,6 +14,7 @@ export interface HomeCard { | ||
| 14 | 14 | details: string |
| 15 | 15 | link: string |
| 16 | 16 | featured?: boolean |
| 17 | section?: string | |
| 17 | 18 | } |
| 18 | 19 | |
| 19 | 20 | // @unocss-include |
| @@ -158,6 +159,198 @@ export const homeCards: HomeCard[] = [ | ||
| 158 | 159 | title: 'Credits', |
| 159 | 160 | details: 'All the contributors of Wotaku', |
| 160 | 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' | |
| 161 | 354 | } |
| 162 | 355 | ] |
| 163 | 356 | |
docs/.vitepress/theme/components/HomeFeatures.vue +109 −36
| @@ -131,6 +131,27 @@ function resetDefaults() { | ||
| 131 | 131 | save() |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | const cardTooltip = ref<{ text: string; x: number; y: number } | null>(null) | |
| 135 | ||
| 136 | function showCardTooltip(e: MouseEvent, title: string) { | |
| 137 | const rect = (e.currentTarget as HTMLElement).getBoundingClientRect() | |
| 138 | cardTooltip.value = { text: title, x: rect.left + rect.width / 2, y: rect.top } | |
| 139 | } | |
| 140 | ||
| 141 | function hideCardTooltip() { | |
| 142 | cardTooltip.value = null | |
| 143 | } | |
| 144 | ||
| 145 | const panelSections = computed(() => { | |
| 146 | const map = new Map<string, typeof panelCards.value>() | |
| 147 | for (const card of panelCards.value) { | |
| 148 | const s = card.section ?? 'Pages' | |
| 149 | if (!map.has(s)) map.set(s, []) | |
| 150 | map.get(s)!.push(card) | |
| 151 | } | |
| 152 | return Array.from(map.entries()).map(([label, cards]) => ({ label, cards })) | |
| 153 | }) | |
| 154 | ||
| 134 | 155 | /* ── Drag-to-reorder (pointer events — works on mouse & touch) ── */ |
| 135 | 156 | const dragging = ref<string | null>(null) |
| 136 | 157 | const dragTarget = ref<string | null>(null) |
| @@ -221,39 +242,46 @@ function onHandlePointerUp() { | ||
| 221 | 242 | </button> |
| 222 | 243 | </div> |
| 223 | 244 | |
| 224 | <ul ref="cardListEl" class="card-list" :class="grid"> | |
| 225 | <li | |
| 226 | v-for="card in panelCards" | |
| 227 | :key="card.id" | |
| 228 | :data-card-id="card.id" | |
| 229 | class="card-row" | |
| 230 | :class="{ | |
| 231 | 'is-dragging': dragging === card.id, | |
| 232 | 'is-over': dragTarget === card.id && dragging !== card.id, | |
| 233 | 'is-hidden': hiddenSet.has(card.id) | |
| 234 | }" | |
| 235 | > | |
| 236 | <span | |
| 237 | class="row-handle" | |
| 238 | aria-hidden="true" | |
| 239 | @pointerdown="onHandlePointerDown($event, card.id)" | |
| 240 | @pointermove="onHandlePointerMove" | |
| 241 | @pointerup="onHandlePointerUp" | |
| 242 | > | |
| 243 | <span class="i-lucide-grip-vertical" /> | |
| 244 | </span> | |
| 245 | <span class="row-icon" v-html="cardIcon(card)" /> | |
| 246 | <span class="row-name">{{ card.title }}</span> | |
| 247 | <button | |
| 248 | class="row-toggle" | |
| 249 | :class="{ active: !hiddenSet.has(card.id) }" | |
| 250 | :aria-label="hiddenSet.has(card.id) ? 'Show' : 'Hide'" | |
| 251 | @click="toggleCard(card.id)" | |
| 252 | > | |
| 253 | <span :class="hiddenSet.has(card.id) ? 'i-lucide-eye-off' : 'i-lucide-eye'" /> | |
| 254 | </button> | |
| 255 | </li> | |
| 256 | </ul> | |
| 245 | <div ref="cardListEl" class="card-sections"> | |
| 246 | <template v-for="section in panelSections" :key="section.label"> | |
| 247 | <div v-if="panelSections.length > 1" class="section-label">{{ section.label }}</div> | |
| 248 | <ul class="card-list" :class="grid"> | |
| 249 | <li | |
| 250 | v-for="card in section.cards" | |
| 251 | :key="card.id" | |
| 252 | :data-card-id="card.id" | |
| 253 | class="card-row" | |
| 254 | @mouseenter="showCardTooltip($event, card.title)" | |
| 255 | @mouseleave="hideCardTooltip" | |
| 256 | :class="{ | |
| 257 | 'is-dragging': dragging === card.id, | |
| 258 | 'is-over': dragTarget === card.id && dragging !== card.id, | |
| 259 | 'is-hidden': hiddenSet.has(card.id) | |
| 260 | }" | |
| 261 | > | |
| 262 | <span | |
| 263 | class="row-handle" | |
| 264 | aria-hidden="true" | |
| 265 | @pointerdown="onHandlePointerDown($event, card.id)" | |
| 266 | @pointermove="onHandlePointerMove" | |
| 267 | @pointerup="onHandlePointerUp" | |
| 268 | > | |
| 269 | <span class="i-lucide-grip-vertical" /> | |
| 270 | </span> | |
| 271 | <span class="row-icon" v-html="cardIcon(card)" /> | |
| 272 | <span class="row-name">{{ card.title }}</span> | |
| 273 | <button | |
| 274 | class="row-toggle" | |
| 275 | :class="{ active: !hiddenSet.has(card.id) }" | |
| 276 | :aria-label="hiddenSet.has(card.id) ? 'Show' : 'Hide'" | |
| 277 | @click="toggleCard(card.id)" | |
| 278 | > | |
| 279 | <span :class="hiddenSet.has(card.id) ? 'i-lucide-eye-off' : 'i-lucide-eye'" /> | |
| 280 | </button> | |
| 281 | </li> | |
| 282 | </ul> | |
| 283 | </template> | |
| 284 | </div> | |
| 257 | 285 | |
| 258 | 286 | <div class="panel-foot"> |
| 259 | 287 | <div class="foot-group"> |
| @@ -310,6 +338,12 @@ function onHandlePointerUp() { | ||
| 310 | 338 | </div> |
| 311 | 339 | </Transition> |
| 312 | 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 | ||
| 313 | 347 | <Transition name="ghost-fade"> |
| 314 | 348 | <div |
| 315 | 349 | v-if="dragging && ghostPos" |
| @@ -571,15 +605,35 @@ function onHandlePointerUp() { | ||
| 571 | 605 | } |
| 572 | 606 | |
| 573 | 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 | ||
| 574 | 630 | .card-list { |
| 575 | 631 | list-style: none; |
| 576 | 632 | margin: 0; |
| 577 | padding: 8px; | |
| 633 | padding: 0; | |
| 578 | 634 | display: grid; |
| 579 | 635 | grid-template-columns: 1fr; |
| 580 | 636 | gap: 2px; |
| 581 | overflow-y: auto; | |
| 582 | min-height: 0; | |
| 583 | 637 | } |
| 584 | 638 | |
| 585 | 639 | @media (min-width: 640px) { |
| @@ -605,12 +659,27 @@ function onHandlePointerUp() { | ||
| 605 | 659 | border-radius: 8px; |
| 606 | 660 | transition: background 0.15s, opacity 0.15s; |
| 607 | 661 | user-select: none; |
| 662 | min-width: 0; | |
| 608 | 663 | } |
| 609 | 664 | |
| 610 | 665 | .card-row:hover { |
| 611 | 666 | background: var(--vp-c-bg-soft); |
| 612 | 667 | } |
| 613 | 668 | |
| 669 | .card-tooltip { | |
| 670 | position: fixed; | |
| 671 | z-index: 9999; | |
| 672 | transform: translate(-50%, calc(-100% - 6px)); | |
| 673 | background: var(--vp-c-bg-soft); | |
| 674 | color: var(--vp-c-text-1); | |
| 675 | border: 1px solid var(--vp-c-divider); | |
| 676 | border-radius: 5px; | |
| 677 | padding: 3px 8px; | |
| 678 | font-size: 11px; | |
| 679 | white-space: nowrap; | |
| 680 | pointer-events: none; | |
| 681 | } | |
| 682 | ||
| 614 | 683 | .card-row.is-dragging { |
| 615 | 684 | opacity: 0.25; |
| 616 | 685 | cursor: grabbing; |
| @@ -653,6 +722,10 @@ function onHandlePointerUp() { | ||
| 653 | 722 | font-size: 14px; |
| 654 | 723 | font-weight: 500; |
| 655 | 724 | color: var(--vp-c-text-1); |
| 725 | overflow: hidden; | |
| 726 | white-space: nowrap; | |
| 727 | text-overflow: ellipsis; | |
| 728 | min-width: 0; | |
| 656 | 729 | } |
| 657 | 730 | |
| 658 | 731 | .row-toggle { |