mirror of
https://github.com/halo-dev/theme-earth.git
synced 2026-06-05 01:13:07 +08:00
202285f055
* Vite Plus Signed-off-by: Ryan Wang <i@ryanc.cc> * Vite Plus Signed-off-by: Ryan Wang <i@ryanc.cc> * Vite Plus Signed-off-by: Ryan Wang <i@ryanc.cc> * Restructure assets and update dependencies Move frontend assets into src/assets, add many template/partial HTML modules and public default assets (images, styles, qrious, qrcode page). Rename env.d.ts to project root and remove src/main.ts. Update package.json scripts and tooling: replace packaging command with theme-package, remove tsc from build-only, bump alpinejs and @iconify/json, add @halo-dev/theme-package-cli and @halo-dev/vite-plugin-halo-theme, and bump packageManager to pnpm@10.33.0. Regenerate pnpm-lock.yaml to reflect new/updated packages and transitive dependencies. Misc: adjust .gitignore to ignore templates and update tailwind/vite/tsconfig changes. * Remove templates and theme assets Delete numerous theme templates and associated static assets. This removes multiple files under templates/ (pages, modules, and partials) and related assets such as images (default avatars/backgrounds/gongan_beian), qrious JS, qrcode-share, and github-markdown.css — cleaning up or replacing the theme's template layer and static resources. * Modularize assets & add build code-splitting Introduce modular asset entrypoints and split styles into per-feature SCSS files for better bundling. Added new TS entry files (src/assets/doc.ts, moment.ts, page.ts, post.ts) and new SCSS modules (doc.scss, markdown-body.scss, moment.scss, prose.scss), and relocated github-markdown.css into src/assets/styles. Refactored src/assets/styles/main.scss to remove markdown/moment/docsme-specific rules now moved to dedicated files. Updated templates (doc*, docs, doc-catalog, moments, page, post) to load the new module entry scripts instead of inlining stylesheet links. Added build code-splitting configuration in vite.config.ts to group vendor modules for optimized bundles. * Bump Node to 24; update iconify and @types/node Use Node 24 in the GitHub Actions CD workflow. Remove author metadata from package.json, replace @iconify/json with scoped @iconify-json packages, and bump @types/node to 24.12.0. pnpm lockfile regenerated to reflect these dependency updates. * Add OverlayScrollbars and initialize on body Integrate OverlayScrollbars: add dependency and lockfile entry, import and initialize the library (with plugins) in a new src/assets/utils/overlayscrollbars.ts, and register it from main.ts. Mark body as hidden by default in layout and doc templates to avoid FOUC until the scrollbar instance is ready, and add a <noscript> fallback to ensure visibility when JS is disabled. Also set body overflow to auto in styles to accommodate the custom scrollbars. * Update generateToc to accept container selector Change generateToc signature to take a separate tocContainerSelector and use it when removing the container if no headings are found. Also update the post.html call site to pass the new third argument. This ensures the correct DOM element is targeted for removal when the content has no h1–h4 headings. * Bump dependency versions in pnpm-lock.yaml Update lockfile with multiple dependency/version bumps and new platform bindings. Key changes: vite-plus and related voidzero packages bumped to 0.1.14, added @oxc-project/runtime@0.121.0 and bumped @oxc-project/types to 0.122.0, oxfmt platform bindings updated to 0.42.0, oxlint and tsgolint bindings bumped to 1.57.0/0.17.3, cac -> 7.0.0 (node engine requirement updated), lightningcss platform packages updated to 1.32.0 (including new android-arm64 entry), and small peerDependency/peerDependenciesMeta adjustments (e.g. @vitest/ui -> 4.1.1). Integrity hashes and engine/cpu/os metadata were updated accordingly. --------- Signed-off-by: Ryan Wang <i@ryanc.cc>