From 8af8e806d71531c85a81b3156853735ac4b9fea6 Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Sat, 27 Jun 2026 06:27:12 +0800 Subject: [PATCH] feat(assets): integrate UnoCSS for utility classes and presetIcons (#795) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor(assets): integrate UnoCSS for utility classes - Add UnoCSS with presetWind3 as pre-built CSS (assets/css/unocss.css) - Add uno.config.ts with theme breakpoints, colors, safelist, and blocklist - Replace SCSS utility classes with UnoCSS atomic classes: - d-none → hidden - d-none-desktop → sm:hidden - d-none-mobile → max-sm:hidden - order-* (safelist) - variant-numeric → tabular-nums lining-nums - Rename .blur to .is-blur to avoid UnoCSS conflict - Add @unocss-skip comments for SVG path elements to prevent false positives - Remove redundant _utilities.scss ($orders map) and simplify _common.scss - Update documentation (CLAUDE.md, CONTRIBUTING.md, copilot-instructions.md) * refactor(assets): replace 404/offline SCSS with UnoCSS atomic classes - Replace _404.scss styles with atomic classes on template elements - Replace _offline.scss styles with atomic classes on template elements - Keep selectors (id/class) as user customization hooks - Delete assets/scss/pages/_404.scss and _offline.scss * refactor(assets): simplify SCSS with UnoCSS atomic classes - Replace _bilibili.scss with atomic classes (relative, aspect-video, inset-0) - Replace _version.scss with atomic classes (whitespace-nowrap, align-text-bottom) - Replace _noscript-warning.scss with atomic classes (bg-danger, fixed, z-200) - Add semantic z-index shortcuts (z-hide, z-auto, z-base, z-loading, z-sticky, z-fixed) - Add h1-h6 to UnoCSS blocklist to prevent false positives - Use Source path for UnoCSS CSS loading to enable Hugo minify * chore(assets): minor SCSS and template cleanup * fix(assets): add secondary color to UnoCSS theme config text-secondary was broken because the secondary color mapping was missing. * feat(assets): add UnoCSS presetIcons support and z-index shortcuts - Add presetIcons preset with empty collections (ready for custom icon sets) - Add @iconify/json and @iconify/utils devDependencies - Add semantic z-index shortcuts (z-hide, z-auto, z-base, z-loading, z-sticky, z-fixed) - Add secondary color to UnoCSS theme config * refactor(assets): replace SVG icons with UnoCSS presetIcons - Add Lucide and Octicons icon collections to presetIcons config - Replace arrow-up/down and enter-key SVGs with Lucide icons - Replace alert icons (info, light-bulb, report, alert, stop) with Octicons - Delete replaced SVG files from assets/images/icons/ - Keep custom SVGs (csdn, plume, rootme) * refactor(layouts): redesign 404 and offline pages with UnoCSS - Replace translate-y-[30vh] with self-stretch flex centering below header - Remove arbitrary values (text-[3.6rem], text-[1.8rem], etc.) - Restore @page print styles in _common.scss - Simplify offline page layout (icon + title + text) - Fix hardcoded #57606a → text-secondary --- .devcontainer/devcontainer.json | 4 +- .github/copilot-instructions.md | 9 + .vscode/extensions.json | 4 +- CLAUDE.md | 13 +- CONTRIBUTING.md | 7 + apps/demo/hugo.toml | 5 - apps/test/hugo.toml | 5 - assets/css/unocss.css | 90 ++ assets/images/icons/alerts/alert.svg | 1 - assets/images/icons/alerts/info.svg | 1 - assets/images/icons/alerts/light-bulb.svg | 1 - assets/images/icons/alerts/report.svg | 1 - assets/images/icons/alerts/stop.svg | 1 - assets/images/icons/arrow-down.svg | 1 - assets/images/icons/arrow-up.svg | 1 - assets/images/icons/enter-key.svg | 1 - assets/js/lib/mermaid.ts | 2 +- assets/js/modules/code.ts | 2 +- assets/js/modules/core.ts | 2 +- assets/js/modules/events.ts | 6 +- assets/js/modules/misc.ts | 4 +- assets/js/modules/toc.ts | 6 +- assets/scss/core/_common.scss | 83 +- assets/scss/core/layouts/_header.scss | 2 +- assets/scss/core/maps/_index.scss | 1 - assets/scss/core/maps/_utilities.scss | 13 - assets/scss/core/mixins/_media.scss | 8 +- assets/scss/pages/_404.scss | 6 - assets/scss/pages/_index.scss | 2 - assets/scss/pages/_offline.scss | 22 - assets/scss/pages/shared/_alert.scss | 6 - .../pages/shared/shortcodes/_bilibili.scss | 16 - .../pages/shared/shortcodes/_file-tree.scss | 2 +- .../scss/pages/shared/shortcodes/_index.scss | 2 - .../pages/shared/shortcodes/_version.scss | 8 - assets/scss/widgets/_index.scss | 1 - assets/scss/widgets/_mask.scss | 2 +- assets/scss/widgets/_noscript-warning.scss | 15 - eslint.config.ts | 1 + hugo.toml | 2 +- layouts/404.html | 11 +- layouts/_markup/render-heading.html | 2 + layouts/_partials/base/footer.html | 8 +- layouts/_partials/base/head/css.html | 5 +- layouts/_partials/base/header.html | 4 +- layouts/_partials/base/widgets.html | 16 +- layouts/_partials/home/profile.html | 2 +- layouts/_partials/plugin/alert.html | 12 +- .../_partials/plugin/code-block-wrapper.html | 2 +- layouts/_partials/plugin/link.html | 2 + layouts/_partials/plugin/style.html | 12 +- layouts/_partials/single/fixit-decryptor.html | 18 - layouts/_shortcodes/bilibili.html | 4 +- layouts/_shortcodes/version.html | 4 +- layouts/home.offline.html | 21 +- package.json | 8 +- packages/versioning/src/update-version.ts | 1 - pnpm-lock.yaml | 1163 +++++++++++++++++ pnpm-workspace.yaml | 1 + uno.config.ts | 79 ++ 60 files changed, 1446 insertions(+), 288 deletions(-) create mode 100644 assets/css/unocss.css delete mode 100644 assets/images/icons/alerts/alert.svg delete mode 100644 assets/images/icons/alerts/info.svg delete mode 100644 assets/images/icons/alerts/light-bulb.svg delete mode 100644 assets/images/icons/alerts/report.svg delete mode 100644 assets/images/icons/alerts/stop.svg delete mode 100644 assets/images/icons/arrow-down.svg delete mode 100644 assets/images/icons/arrow-up.svg delete mode 100644 assets/images/icons/enter-key.svg delete mode 100644 assets/scss/core/maps/_utilities.scss delete mode 100644 assets/scss/pages/_404.scss delete mode 100644 assets/scss/pages/_offline.scss delete mode 100644 assets/scss/pages/shared/shortcodes/_bilibili.scss delete mode 100644 assets/scss/pages/shared/shortcodes/_version.scss delete mode 100644 assets/scss/widgets/_noscript-warning.scss delete mode 100644 layouts/_partials/single/fixit-decryptor.html create mode 100644 uno.config.ts diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 43143ca6..dd513502 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,7 +18,9 @@ "tamasfe.even-better-toml", "casualjim.gotemplate", "SomewhatStationery.some-sass", - "gruntfuggly.todo-tree" + "gruntfuggly.todo-tree", + "antfu.unocss", + "antfu.iconify" ] } } diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 733dec42..8039518f 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -18,6 +18,15 @@ This document defines the detailed coding standards for the FixIt theme project. - Use SCSS variables for colors — no hardcoded values - Keep selector nesting shallow +## UnoCSS Guidelines + +- Use UnoCSS atomic classes for common utilities (`hidden`, `me-1`, `text-center`, etc.) +- Theme colors: `bg-primary`, `text-success`, `text-danger`, etc. (mapped via `@theme` in `uno.config.ts`) +- Responsive: `sm:` (>=681px), `md:` (>=961px), `lg:` (>=1201px), `xl:` (>=1441px). Use `max-sm:` for xs (<681px) +- Wrap SVG elements with `` / `` to avoid false positives from `d` attribute values +- Dynamically generated classes (e.g., `order-*`) must be added to `safelist` in `uno.config.ts` +- Run `pnpm css:build` after modifying `uno.config.ts` or templates that use UnoCSS classes + ## TypeScript Coding Standards ### Architecture diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 50fddad2..cd85fe2f 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -6,6 +6,8 @@ "tamasfe.even-better-toml", "casualjim.gotemplate", "SomewhatStationery.some-sass", - "gruntfuggly.todo-tree" + "gruntfuggly.todo-tree", + "antfu.unocss", + "antfu.iconify" ] } diff --git a/CLAUDE.md b/CLAUDE.md index e9b18717..273c401a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Project Overview -FixIt is a modern, responsive theme for the Hugo static site generator. Built with Hugo templates, SCSS, and TypeScript. +FixIt is a modern, responsive theme for the Hugo static site generator. Built with Hugo templates, SCSS, UnoCSS, and TypeScript. ## Development Commands @@ -90,7 +90,7 @@ Cross-module communication uses the shared `eventBus` singleton, not direct modu Hugo Pipes processes all assets. The key orchestration is in `_partials/base/assets.html`: -- **CSS**: `scss/main.scss` is the entry point importing `core/`, `pages/`, `widgets/`, `custom`. SCSS variables are configured via `hugo:vars` (user-configurable from `[params.appearance]`) and `hugo:vars/internal` (theme system config). +- **CSS**: `scss/main.scss` is the entry point importing `core/`, `pages/`, `widgets/`, `custom`. SCSS variables are configured via `hugo:vars` (user-configurable from `[params.appearance]`) and `hugo:vars/internal` (theme system config). UnoCSS utility classes are pre-built to `assets/css/unocss.css` (via `pnpm css:build`), loaded before the main SCSS bundle. - **JS**: `_partials/function/js-build.html` wraps `js.Build` with minify-in-production defaults. Hugo's `@params` injection passes config values into TypeScript at build time. - **Third-party libraries**: Stored in `assets/lib/` (vendored, not npm-managed). Tracked by `librarybot.yml` and updated weekly by the `hugo-fixit/librarybot` GitHub Action. Can be overridden via CDN config in `assets/data/cdn/jsdelivr.yml` or `unpkg.yml`. @@ -110,6 +110,15 @@ Hugo Pipes processes all assets. The key orchestration is in `_partials/base/ass - Prefer relative units (rem, em, %) over absolute units - Keep selector nesting shallow +### UnoCSS (`assets/css/unocss.css`) + +- Pre-built utility classes generated by `pnpm css:build` (config: `uno.config.ts`) +- Use atomic classes for common utilities (`hidden`, `me-1`, `text-center`, etc.) +- Theme colors mapped via `@theme`: `bg-primary`, `text-success`, `text-danger`, etc. +- Responsive breakpoints: `sm:` (>=681px), `md:` (>=961px), `lg:` (>=1201px), `xl:` (>=1441px). Use `max-sm:` for xs (<681px) +- Wrap SVG elements with `` / `` to avoid false positives from `d` attribute values +- `safelist` in `uno.config.ts` for dynamically generated classes (e.g., `order-*`, `sm:hidden`) + ### TypeScript - Use ES6 `#` private fields — not TypeScript `private` with `_` prefix diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9ad7f91..76f7e4b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -80,6 +80,11 @@ pnpm gen:lexers # Preview the built site locally (requires build first) pnpm preview + +# Build UnoCSS utility classes (pre-built, committed to repo) +pnpm css:build +# Watch mode for UnoCSS (for theme developers) +pnpm css:dev ``` > [!TIP] @@ -111,6 +116,7 @@ FixIt/ │ └── test/ # Test site ├── archetypes/ # Content templates ├── assets/ # Theme assets +│ ├── css/ # UnoCSS pre-built output (unocss.css) │ ├── images/ # Image assets │ ├── js/ # JavaScript files │ ├── lib/ # Third-party libraries @@ -127,6 +133,7 @@ FixIt/ │ └── versioning/ # Version management (pre-commit) ├── static/ # Static files ├── hugo.toml # Default theme configuration +├── uno.config.ts # UnoCSS configuration └── package.json # npm scripts and dependencies ``` diff --git a/apps/demo/hugo.toml b/apps/demo/hugo.toml index 46401779..69fee7ee 100644 --- a/apps/demo/hugo.toml +++ b/apps/demo/hugo.toml @@ -17,11 +17,6 @@ _merge = "shallow" [outputs] _merge = "shallow" -# ------------------------------------------------------------------------------------- -# Taxonomies Configuration -# See: https://gohugo.io/content-management/taxonomies/#configure-taxonomies -# ------------------------------------------------------------------------------------- - [taxonomies] _merge = "shallow" diff --git a/apps/test/hugo.toml b/apps/test/hugo.toml index 0745f7ac..abbc3448 100644 --- a/apps/test/hugo.toml +++ b/apps/test/hugo.toml @@ -33,11 +33,6 @@ _merge = "shallow" [outputs] _merge = "shallow" -# ------------------------------------------------------------------------------------- -# Taxonomies Configuration -# See: https://gohugo.io/content-management/taxonomies/#configure-taxonomies -# ------------------------------------------------------------------------------------- - [taxonomies] _merge = "shallow" diff --git a/assets/css/unocss.css b/assets/css/unocss.css new file mode 100644 index 00000000..6f56fc6c --- /dev/null +++ b/assets/css/unocss.css @@ -0,0 +1,90 @@ +/* layer: preflights */ +*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;}::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / 0.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: ;} +/* layer: icons */ +.lucide-arrow-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='text-bottom' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 5v14m7-7l-7 7l-7-7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:text-bottom;width:1em;height:1em;} +.lucide-arrow-up{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='text-bottom' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m5 12l7-7l7 7m-7 7V5'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:text-bottom;width:1em;height:1em;} +.lucide-corner-down-left{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' display='inline-block' vertical-align='text-bottom' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3Cpath d='m9 10l-5 5l5 5'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:text-bottom;width:1em;height:1em;} +.octicon-alert-16{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 16 16' display='inline-block' vertical-align='text-bottom' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0M9 11a1 1 0 1 1-2 0a1 1 0 0 1 2 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:text-bottom;width:1em;height:1em;} +.octicon-info-16{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 16 16' display='inline-block' vertical-align='text-bottom' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8m8-6.5a6.5 6.5 0 1 0 0 13a6.5 6.5 0 0 0 0-13M6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75M8 6a1 1 0 1 1 0-2a1 1 0 0 1 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:text-bottom;width:1em;height:1em;} +.octicon-light-bulb-16{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 16 16' display='inline-block' vertical-align='text-bottom' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8 1.5c-2.363 0-4 1.69-4 3.75c0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848c.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a9 9 0 0 0-.542-.68l-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25C2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259q-.142.172-.268.319c-.207.245-.383.453-.541.681c-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489c.203-.292.45-.584.673-.848l.213-.253c.561-.679.985-1.32.985-2.304c0-2.06-1.637-3.75-4-3.75M5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5M6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:text-bottom;width:1em;height:1em;} +.octicon-report-16{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 16 16' display='inline-block' vertical-align='text-bottom' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.75.75 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0M9 9a1 1 0 1 1-2 0a1 1 0 0 1 2 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:text-bottom;width:1em;height:1em;} +.octicon-stop-16{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 16 16' display='inline-block' vertical-align='text-bottom' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4.47.22A.75.75 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.75.75 0 0 1-.22.53l-4.25 4.25A.75.75 0 0 1 11 16H5a.75.75 0 0 1-.53-.22L.22 11.53A.75.75 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4m0 8a1 1 0 1 1 0-2a1 1 0 0 1 0 2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit;display:inline-block;vertical-align:text-bottom;width:1em;height:1em;} +/* layer: shortcuts */ +.z-fixed{z-index:200;} +/* layer: default */ +.visible{visibility:visible;} +.absolute{position:absolute;} +.fixed{position:fixed;} +.relative{position:relative;} +.sticky{position:sticky;} +.static{position:static;} +.inset-0{inset:0;} +.inset-x-0{left:0;right:0;} +.bottom-0{bottom:0;} +.order-0{order:0;} +.order-1{order:1;} +.order-2{order:2;} +.order-3{order:3;} +.order-4{order:4;} +.order-5{order:5;} +.order-first{order:-9999;} +.order-last{order:9999;} +.mx-auto{margin-left:auto;margin-right:auto;} +.my-4{margin-top:1rem;margin-bottom:1rem;} +.me{margin-inline-end:1rem;} +.me-1{margin-inline-end:0.25rem;} +.me-2{margin-inline-end:0.5rem;} +.ms-1{margin-inline-start:0.25rem;} +.inline{display:inline;} +.block{display:block;} +.contents{display:contents;} +.hidden{display:none;} +.aspect-video{aspect-ratio:16/9;} +.h-\[1\.25em\]{height:1.25em;} +.h-full{height:100%;} +.w-full{width:100%;} +.flex{display:flex;} +.flex-col{flex-direction:column;} +.table{display:table;} +.transform{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z));} +.resize{resize:both;} +.break-before-page{break-before:page;} +.break-after-page{break-after:page;} +.items-center{align-items:center;} +.self-stretch{align-self:stretch;} +.justify-center{justify-content:center;} +.whitespace-nowrap{white-space:nowrap;} +.b, +.border{border-width:1px;} +.bg-danger{background-color:var(--fi-danger) /* var(--fi-danger) */;} +.px{padding-left:1rem;padding-right:1rem;} +.pl{padding-left:1rem;} +.pt{padding-top:1rem;} +.text-center{text-align:center;} +.indent{text-indent:1.5rem;} +.align-text-bottom{vertical-align:text-bottom;} +.text-3xl{font-size:1.875rem;line-height:2.25rem;} +.text-5xl{font-size:3rem;line-height:1;} +.text-base{font-size:1rem;line-height:1.5rem;} +.text-lg{font-size:1.125rem;line-height:1.75rem;} +.text-danger{color:var(--fi-danger) /* var(--fi-danger) */;} +.text-secondary{color:var(--fi-secondary) /* var(--fi-secondary) */;} +.text-success{color:var(--fi-success) /* var(--fi-success) */;} +.text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity)) /* #fff */;} +.font-bold{font-weight:700;} +.capitalize{text-transform:capitalize;} +.lining-nums{--un-numeric-figure:lining-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction);} +.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction);} +.underline{text-decoration-line:underline;} +.tab{-moz-tab-size:4;-o-tab-size:4;tab-size:4;} +.text-shadow{--un-text-shadow:0 0 1px var(--un-text-shadow-color, rgb(0 0 0 / 0.2)),0 0 1px var(--un-text-shadow-color, rgb(1 0 5 / 0.1));text-shadow:var(--un-text-shadow);} +.text-shadow-md{--un-text-shadow:0 1px 2px var(--un-text-shadow-color, rgb(30 29 39 / 0.19)),1px 2px 4px var(--un-text-shadow-color, rgb(54 64 147 / 0.18));text-shadow:var(--un-text-shadow);} +.opacity-50{opacity:0.5;} +.shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / 0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / 0.1));box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);} +.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);} +@media (max-width: 680.9px){ +.max-sm\:hidden{display:none;} +} +@media (min-width: 681px){ +.sm\:hidden{display:none;} +} \ No newline at end of file diff --git a/assets/images/icons/alerts/alert.svg b/assets/images/icons/alerts/alert.svg deleted file mode 100644 index 320217da..00000000 --- a/assets/images/icons/alerts/alert.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/icons/alerts/info.svg b/assets/images/icons/alerts/info.svg deleted file mode 100644 index ba409a68..00000000 --- a/assets/images/icons/alerts/info.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/icons/alerts/light-bulb.svg b/assets/images/icons/alerts/light-bulb.svg deleted file mode 100644 index 61ce7906..00000000 --- a/assets/images/icons/alerts/light-bulb.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/icons/alerts/report.svg b/assets/images/icons/alerts/report.svg deleted file mode 100644 index 66a48dd5..00000000 --- a/assets/images/icons/alerts/report.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/icons/alerts/stop.svg b/assets/images/icons/alerts/stop.svg deleted file mode 100644 index 670147ea..00000000 --- a/assets/images/icons/alerts/stop.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/icons/arrow-down.svg b/assets/images/icons/arrow-down.svg deleted file mode 100644 index cf1f4888..00000000 --- a/assets/images/icons/arrow-down.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/images/icons/arrow-up.svg b/assets/images/icons/arrow-up.svg deleted file mode 100644 index 1ed3806a..00000000 --- a/assets/images/icons/arrow-up.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/images/icons/enter-key.svg b/assets/images/icons/enter-key.svg deleted file mode 100644 index 49a075f8..00000000 --- a/assets/images/icons/enter-key.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/assets/js/lib/mermaid.ts b/assets/js/lib/mermaid.ts index c438f7a3..fa897d60 100644 --- a/assets/js/lib/mermaid.ts +++ b/assets/js/lib/mermaid.ts @@ -171,7 +171,7 @@ function isNodeVisuallyActive(node: Element): boolean { function isRenderContextActive(el: Element): boolean { if (!el.isConnected) return false - if (el.closest('[hidden], .d-none, [aria-hidden="true"]')) + if (el.closest('[hidden], .hidden, [aria-hidden="true"]')) return false const diagramView = el.closest('.diagram-view') diff --git a/assets/js/modules/code.ts b/assets/js/modules/code.ts index ed587ea9..e33f46c5 100644 --- a/assets/js/modules/code.ts +++ b/assets/js/modules/code.ts @@ -377,7 +377,7 @@ export class CodeModule implements CodeService { // move block to content $tab.classList.toggle('active', resolvedIndex === index || defaultActiveTab) $tab.classList.remove('is-collapsed') - $tab.classList.remove('d-none') + $tab.classList.remove('hidden') $tab.dataset.tabInit = 'true' $content.appendChild($tab) }) diff --git a/assets/js/modules/core.ts b/assets/js/modules/core.ts index a811ac68..7b159361 100644 --- a/assets/js/modules/core.ts +++ b/assets/js/modules/core.ts @@ -35,7 +35,7 @@ export class CoreModule implements CoreService { /** Toggle the mask element's blur class based on active overlay state. */ syncMaskState() { - document.getElementById('mask')?.classList.toggle('blur', Boolean(this.activeMaskOverlay)) + document.getElementById('mask')?.classList.toggle('is-blur', Boolean(this.activeMaskOverlay)) } /** Open a named mask overlay, closing any previously active one. */ diff --git a/assets/js/modules/events.ts b/assets/js/modules/events.ts index 984edb92..6867fb47 100644 --- a/assets/js/modules/events.ts +++ b/assets/js/modules/events.ts @@ -67,13 +67,13 @@ export class EventsModule implements EventsService { } if ($backToTop) { if (scrollPercent > 1) { - $backToTop.classList.remove('d-none', 'animate__fadeOut') + $backToTop.classList.remove('hidden', 'animate__fadeOut') animateCSS($backToTop, ['animate__fadeIn'], true) } else { $backToTop.classList.remove('animate__fadeIn') animateCSS($backToTop, ['animate__fadeOut'], true, () => { - $backToTop.classList.contains('animate__fadeOut') && $backToTop.classList.add('d-none') + $backToTop.classList.contains('animate__fadeOut') && $backToTop.classList.add('hidden') }) } $backToTop.style.setProperty('--fi-b2t-progress', scrollPercent.toFixed(2)) @@ -114,7 +114,7 @@ export class EventsModule implements EventsService { /** Bind mask click to close the active overlay. */ onClickMask() { document.getElementById('mask')!.addEventListener('click', (e) => { - if (!(e.target as HTMLElement).classList.contains('blur')) + if (!(e.target as HTMLElement).classList.contains('is-blur')) return this.core.closeActiveMaskOverlay() }, false) diff --git a/assets/js/modules/misc.ts b/assets/js/modules/misc.ts index 13a8a182..72ddae8b 100644 --- a/assets/js/modules/misc.ts +++ b/assets/js/modules/misc.ts @@ -33,7 +33,7 @@ export class MiscModule implements MiscService { const minutes = Math.floor((totalSeconds % 3600) / 60) const seconds = totalSeconds % 60 $runTimes.innerHTML = `${days}, ${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}` - document.querySelector('.site-time .d-none')?.classList.remove('d-none') + document.querySelector('.site-time .hidden')?.classList.remove('hidden') } /** Start the site-time counter with visibility-change pausing. */ @@ -94,7 +94,7 @@ export class MiscModule implements MiscService { if (document.querySelector('#comments')) { const $viewCommentsBtn = document.querySelector('.view-comments')! - $viewCommentsBtn.classList.remove('d-none') + $viewCommentsBtn.classList.remove('hidden') $viewCommentsBtn.addEventListener('click', () => { scrollIntoView('#comments') }, false) diff --git a/assets/js/modules/toc.ts b/assets/js/modules/toc.ts index c6dfbbda..1ea6dcb8 100644 --- a/assets/js/modules/toc.ts +++ b/assets/js/modules/toc.ts @@ -181,7 +181,7 @@ export class TocModule implements TocService { // TOC Drawer Button Visibility const openButton = document.querySelector('#toc-drawer-button') if (openButton) { - openButton.classList.toggle('d-none', !isTocStatic()) + openButton.classList.toggle('hidden', !isTocStatic()) } this.activeTocId = null // TOC Static and TOC Dialog @@ -218,13 +218,13 @@ export class TocModule implements TocService { const tocHidden = $toc.classList.contains('toc-hidden') animation.push(tocHidden ? 'animate__fadeIn' : 'animate__fadeOut') if (tocHidden) { - $tocContentAuto.classList.remove('d-none', 'animate__fadeOut') + $tocContentAuto.classList.remove('hidden', 'animate__fadeOut') } else { $tocContentAuto.classList.remove('animate__fadeIn') } animateCSS($tocContentAuto, animation, true, () => { - $tocContentAuto.classList.contains('animate__fadeOut') && $tocContentAuto.classList.add('d-none') + $tocContentAuto.classList.contains('animate__fadeOut') && $tocContentAuto.classList.add('hidden') }) $toc.classList.toggle('toc-hidden') }, false) diff --git a/assets/scss/core/_common.scss b/assets/scss/core/_common.scss index 64a39f72..2b591d9e 100644 --- a/assets/scss/core/_common.scss +++ b/assets/scss/core/_common.scss @@ -3,63 +3,6 @@ /// ========================================================================== @use "functions" as *; @use "mixins" as *; -@use "maps" as maps; - -.text-truncate { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -.text-start { - text-align: left !important; -} -.text-end { - text-align: right !important; -} -.text-center { - text-align: center !important; -} - -.d-none { - display: none !important; -} - -.ms-1, -.mx-1 { - margin-left: 0.25em !important; -} -.me-1, -.mx-1 { - margin-right: 0.25em !important; -} -.ps-1, -.px-1 { - padding-left: 0.25em !important; -} -.pe-1, -.px-1 { - padding-right: 0.25em !important; -} - -@each $color, $value in maps.$theme-colors { - .text-#{$color} { - color: fi-var(#{$color}) !important; - } -} - -@each $key, $value in maps.$orders { - .order-#{$key} { - order: #{$value} !important; - } -} - -.variant-numeric { - font-variant-numeric: tabular-nums lining-nums; -} - -.rounded-full { - @include border-radius(full); -} .is-fullscreen { .fa-expand { @@ -76,34 +19,10 @@ } } -// print view helper -.page-break-before { - break-before: page; -} - -.page-break-after { - break-after: page; -} - -@include media('sm', 'up') { - .d-none-desktop { - display: none; - } -} - -@include media('xs') { - .d-none-mobile { - display: none !important; - } -} - +// print styles @include media('print') { @page { size: A4 portrait; margin: 1.27cm; } - - .d-none-print { - display: none !important; - } } diff --git a/assets/scss/core/layouts/_header.scss b/assets/scss/core/layouts/_header.scss index 038b5490..2f17f8fd 100644 --- a/assets/scss/core/layouts/_header.scss +++ b/assets/scss/core/layouts/_header.scss @@ -18,7 +18,7 @@ header { box-shadow: $header-box-shadow; } - &.blur { + &.is-blur { @include scroll-state-query('scroller', 'scroll-state(scrollable: top)', '&') { background-color: transparent; backdrop-filter: saturate(1.2) blur(10px); diff --git a/assets/scss/core/maps/_index.scss b/assets/scss/core/maps/_index.scss index e328a966..5b795474 100644 --- a/assets/scss/core/maps/_index.scss +++ b/assets/scss/core/maps/_index.scss @@ -2,4 +2,3 @@ @forward 'alert'; @forward 'chroma-lexers'; @forward 'colors'; -@forward 'utilities'; diff --git a/assets/scss/core/maps/_utilities.scss b/assets/scss/core/maps/_utilities.scss deleted file mode 100644 index 57704e0c..00000000 --- a/assets/scss/core/maps/_utilities.scss +++ /dev/null @@ -1,13 +0,0 @@ -// Utilities - -// property order -$orders: ( - first: -1, - 0: 0, - 1: 1, - 2: 2, - 3: 3, - 4: 4, - 5: 5, - last: 6, -) !default; \ No newline at end of file diff --git a/assets/scss/core/mixins/_media.scss b/assets/scss/core/mixins/_media.scss index 481d691a..7d2922c7 100644 --- a/assets/scss/core/mixins/_media.scss +++ b/assets/scss/core/mixins/_media.scss @@ -8,19 +8,19 @@ $breakpoints: ( 'xs': ( 'min': null, - 'max': 680px, + 'max': 680.9px, ), 'sm': ( 'min': 681px, - 'max': 960px, + 'max': 960.9px, ), 'md': ( 'min': 961px, - 'max': 1200px, + 'max': 1200.9px, ), 'lg': ( 'min': 1201px, - 'max': 1440px, + 'max': 1440.9px, ), 'xl': ( 'min': 1441px, diff --git a/assets/scss/pages/_404.scss b/assets/scss/pages/_404.scss deleted file mode 100644 index a94092f9..00000000 --- a/assets/scss/pages/_404.scss +++ /dev/null @@ -1,6 +0,0 @@ -#content-404 { - font-size: 1.8rem; - line-height: 3rem; - text-align: center; - translate: 0 30vh; -} diff --git a/assets/scss/pages/_index.scss b/assets/scss/pages/_index.scss index 9079bc04..8594dc21 100644 --- a/assets/scss/pages/_index.scss +++ b/assets/scss/pages/_index.scss @@ -1,3 +1 @@ @use "shared"; -@use "404" as page404; -@use "offline"; diff --git a/assets/scss/pages/_offline.scss b/assets/scss/pages/_offline.scss deleted file mode 100644 index a4fb0da5..00000000 --- a/assets/scss/pages/_offline.scss +++ /dev/null @@ -1,22 +0,0 @@ -// Offline page styles -#content-offline { - text-align: center; - translate: 0 30vh; - - .offline-title { - font-size: 3.6rem; - } - - .offline-subtitle { - margin: 0.4rem 0; - font-size: 1rem; - font-weight: normal; - font-style: italic; - line-height: 100%; - color: #57606a; - } - - .error-text { - font-size: 1.2rem; - } -} diff --git a/assets/scss/pages/shared/_alert.scss b/assets/scss/pages/shared/_alert.scss index ec8c2e59..f2712510 100644 --- a/assets/scss/pages/shared/_alert.scss +++ b/assets/scss/pages/shared/_alert.scss @@ -23,12 +23,6 @@ line-height: 1; margin-bottom: 1rem; color: fi-var(alert-color); - - > svg.icon { - width: initial; - height: initial; - margin-right: 0.5rem; - } } @each $type, $item in maps.$alert-color-map { diff --git a/assets/scss/pages/shared/shortcodes/_bilibili.scss b/assets/scss/pages/shared/shortcodes/_bilibili.scss deleted file mode 100644 index a0202b54..00000000 --- a/assets/scss/pages/shared/shortcodes/_bilibili.scss +++ /dev/null @@ -1,16 +0,0 @@ -.single .bilibili { - position: relative; - width: 100%; - height: auto; - aspect-ratio: 16 / 9; - margin: 1rem auto; - text-align: center; - - iframe { - position: absolute; - width: 100%; - height: 100%; - left: 0; - top: 0; - } -} diff --git a/assets/scss/pages/shared/shortcodes/_file-tree.scss b/assets/scss/pages/shared/shortcodes/_file-tree.scss index 9681fd49..fc8cd32b 100644 --- a/assets/scss/pages/shared/shortcodes/_file-tree.scss +++ b/assets/scss/pages/shared/shortcodes/_file-tree.scss @@ -7,8 +7,8 @@ font-size: 0.8rem; line-height: 1; margin-block: 0.5rem; - @include border-radius; transition: box-shadow 0.2s ease; + @include border-radius; &:hover { box-shadow: 0 2px 8px light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1)); diff --git a/assets/scss/pages/shared/shortcodes/_index.scss b/assets/scss/pages/shared/shortcodes/_index.scss index 90699f22..0f22a77a 100644 --- a/assets/scss/pages/shared/shortcodes/_index.scss +++ b/assets/scss/pages/shared/shortcodes/_index.scss @@ -1,5 +1,4 @@ @use "admonition"; -@use "bilibili"; @use "bluesky"; @use "douyin"; @use "cardlink"; @@ -11,4 +10,3 @@ @use "mermaid"; @use "tabs"; @use "timeline"; -@use "version"; diff --git a/assets/scss/pages/shared/shortcodes/_version.scss b/assets/scss/pages/shared/shortcodes/_version.scss deleted file mode 100644 index 5730f7a4..00000000 --- a/assets/scss/pages/shared/shortcodes/_version.scss +++ /dev/null @@ -1,8 +0,0 @@ -.single .version-link { - white-space: nowrap; - - img.version { - height: 1.25em; - vertical-align: text-bottom; - } -} diff --git a/assets/scss/widgets/_index.scss b/assets/scss/widgets/_index.scss index 3b5a9381..c2d428c8 100644 --- a/assets/scss/widgets/_index.scss +++ b/assets/scss/widgets/_index.scss @@ -5,7 +5,6 @@ @use "link-guard"; @use "mask"; @use "search-modal"; -@use "noscript-warning"; @use "reading-progress"; @use "scrollbar"; @use "sw-toast"; diff --git a/assets/scss/widgets/_mask.scss b/assets/scss/widgets/_mask.scss index b6c8e511..b164ba1a 100644 --- a/assets/scss/widgets/_mask.scss +++ b/assets/scss/widgets/_mask.scss @@ -10,7 +10,7 @@ height: 100%; @include z-index(hide); - &.blur { + &.is-blur { background-color: rgba(0, 0, 0, 0.25); backdrop-filter: blur(2px); @include z-index(fixed, -1); diff --git a/assets/scss/widgets/_noscript-warning.scss b/assets/scss/widgets/_noscript-warning.scss deleted file mode 100644 index b5d026b5..00000000 --- a/assets/scss/widgets/_noscript-warning.scss +++ /dev/null @@ -1,15 +0,0 @@ -@use "core/functions" as *; -@use "core/mixins" as *; - -.noscript-warning { - background-color: fi-var(danger); - color: white; - font-size: 1rem; - font-weight: bold; - position: fixed; - text-align: center; - left: 0; - bottom: 0; - width: 100%; - @include z-index(fixed); -} diff --git a/eslint.config.ts b/eslint.config.ts index 1ea744bb..6c5666e3 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -4,6 +4,7 @@ export default antfu({ typescript: true, ignores: [ 'node_modules/**', + 'assets/css/unocss.css', 'assets/lib/**', 'public/**', 'layouts/**/*.json', diff --git a/hugo.toml b/hugo.toml index 8665c530..965c7975 100644 --- a/hugo.toml +++ b/hugo.toml @@ -676,7 +676,7 @@ pre = "" # e.g. "2021-12-18T16:15:22+08:00" value = "" -# FixIt 0.2.17 | NEW footer lines order, optional values: ["first", 0, 1, 2, 3, 4, 5, "last"] +# FixIt 0.2.17 | NEW footer lines order, optional values: ["first", 0-5, "last"] [params.footer.order] powered = 0 copyright = 0 diff --git a/layouts/404.html b/layouts/404.html index 4d96cc9a..a9cbfd57 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -4,19 +4,14 @@ {{- end -}} {{- define "content" -}} -
+ - + {{- end -}} diff --git a/layouts/_markup/render-heading.html b/layouts/_markup/render-heading.html index a955eabb..5f65ca69 100644 --- a/layouts/_markup/render-heading.html +++ b/layouts/_markup/render-heading.html @@ -92,7 +92,9 @@ {{- end -}} {{ $title | safeHTML }} + {{- /* @unocss-skip-start */ -}} + {{- /* @unocss-skip-end */ -}} {{- /* EOF */ -}} diff --git a/layouts/_partials/base/footer.html b/layouts/_partials/base/footer.html index 326806fa..fb8896aa 100644 --- a/layouts/_partials/base/footer.html +++ b/layouts/_partials/base/footer.html @@ -61,8 +61,8 @@ {{- $siteTimeIcon := printf (cond .Animate "%v animate-icon" "%v") .Icon -}} {{- dict "Class" $siteTimeIcon | partial "plugin/icon.html" -}} - {{- with .Pre -}}{{ . }}{{- end -}} - {{- printf `%v` (T "footer.siteRunning") | safeHTML -}} + {{- with .Pre -}}{{- end -}} + {{- printf `%v` (T "footer.siteRunning") | safeHTML -}} {{- end -}} {{- end -}} @@ -75,7 +75,7 @@ {{- $loading := dict "Class" "fa-solid fa-spinner fa-spin" | partial "plugin/icon.html" -}} {{- $iconUV := dict "Class" "fa-regular fa-user me-1" | partial "plugin/icon.html" -}} {{- $iconPV := dict "Class" "fa-regular fa-eye me-1" | partial "plugin/icon.html" -}} -