diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index 2cb63383..cb4a36cb 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -41,15 +41,9 @@ FixIt/
### 文件组织结构
-1. **主入口文件**: `assets/css/style.scss`
-2. **变量文件**: `assets/css/_variables.scss` - 全局变量定义
-3. **覆写文件**: `assets/css/_override.scss` - 用户自定义覆写
-4. **组织结构**:
- - `_core/`: 核心样式(基础、布局、媒体查询等)
- - `_mixin/`: SCSS mixins 和函数
- - `_page/`: 页面特定样式
- - `_partials/`: 组件样式
- - `_shortcodes/`: 短代码样式
+1. **主入口文件**: `assets/scss/main.scss`
+2. **变量文件**: `assets/scss/_variables.scss` - 全局变量定义
+3. **覆写文件**: `assets/scss/_override.scss` - 用户自定义覆写
### 命名约定
@@ -111,7 +105,7 @@ FixIt/
### 文件组织
1. **主题核心**: `assets/js/theme.js` - 主题核心逻辑
-2. **工具函数**: `assets/js/util.js` - 通用工具函数
+2. **工具函数**: `assets/js/utils/` - 通用工具函数
3. **特定功能**: 按功能划分独立模块
### 编码实例
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index da7bed2f..c6ae4af6 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -84,7 +84,7 @@ FixIt/
│ └── test/ # Test site
├── archetypes/ # Content templates
├── assets/ # Theme assets
-│ ├── css/ # SCSS stylesheets
+│ ├── scss/ # SCSS stylesheets
│ ├── js/ # JavaScript files
│ ├── images/ # Image assets
│ └── lib/ # Third-party libraries
diff --git a/assets/css/_core/_base.scss b/assets/css/_core/_base.scss
deleted file mode 100644
index 798ff50f..00000000
--- a/assets/css/_core/_base.scss
+++ /dev/null
@@ -1,98 +0,0 @@
-@import "../../lib/normalize/normalize";
-
-html {
- font-family: fi-var(global-font-family);
- font-weight: fi-var(global-font-weight);
- font-display: swap;
- font-size: fi-var(global-font-size);
- line-height: fi-var(global-line-height);
- width: 100%;
- scroll-behavior: smooth;
- overflow: auto;
- container-type: scroll-state;
- container-name: scroller;
-
- &:has(dialog[open]) {
- overflow: hidden;
- }
-
- @include media('reduce-motion') {
- scroll-behavior: auto;
- }
-}
-
-::selection {
- background-color: fi-var(selection-color);
-}
-
-body {
- background-color: fi-var(global-background-color);
- color: fi-var(global-font-color);
- @include overflow-wrap(break-word);
-}
-
-iframe {
- border: 0;
- @include border-radius;
-}
-
-button {
- padding: 0;
- border: 0;
- background: transparent;
- color: inherit;
- appearance: none;
- cursor: pointer;
-}
-
-button:disabled {
- opacity: 0.65;
- cursor: not-allowed;
-}
-
-summary {
- cursor: pointer;
-}
-
-abbr[title] {
- cursor: help;
- text-decoration-skip-ink: none;
-}
-
-img {
- object-fit: cover;
-}
-
-img,
-video {
- max-width: 100%;
- height: auto;
- @include border-radius;
-}
-
-dialog {
- padding: 0;
-}
-
-details {
- &.center {
- summary {
- text-align: center;
- }
- }
-}
-
-%code {
- padding: 0.2em 0.4em;
- margin: 0;
- font-size: fi-var(code-font-size);
- line-height: fi-var(code-font-size);
- font-family: fi-var(code-font-family);
- color: fi-var(code-color);
- background-color: fi-var(code-inline-background-color);
- text-decoration: inherit;
- @include border-radius;
- @include overflow-wrap(break-word);
-}
-
-@include link(true, true);
diff --git a/assets/css/_core/_index.scss b/assets/css/_core/_index.scss
deleted file mode 100644
index feb8facc..00000000
--- a/assets/css/_core/_index.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-@import "_function";
-@import "_mixin";
-@import "_base";
-@import "_common";
-@import "_root";
-@import "_layout";
-@import '_widgets';
diff --git a/assets/css/style.scss b/assets/css/style.scss
deleted file mode 100644
index 158f948c..00000000
--- a/assets/css/style.scss
+++ /dev/null
@@ -1,7 +0,0 @@
-@charset "utf-8";
-
-@import "_variables";
-@import "_override";
-@import "_core";
-@import "_page";
-@import "_custom";
diff --git a/assets/js/page/link.js b/assets/js/pages/link.js
similarity index 100%
rename from assets/js/page/link.js
rename to assets/js/pages/link.js
diff --git a/assets/lib/normalize/normalize.css b/assets/lib/normalize/normalize.css
deleted file mode 100644
index 192eb9ce..00000000
--- a/assets/lib/normalize/normalize.css
+++ /dev/null
@@ -1,349 +0,0 @@
-/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
-
-/* Document
- ========================================================================== */
-
-/**
- * 1. Correct the line height in all browsers.
- * 2. Prevent adjustments of font size after orientation changes in iOS.
- */
-
-html {
- line-height: 1.15; /* 1 */
- -webkit-text-size-adjust: 100%; /* 2 */
-}
-
-/* Sections
- ========================================================================== */
-
-/**
- * Remove the margin in all browsers.
- */
-
-body {
- margin: 0;
-}
-
-/**
- * Render the `main` element consistently in IE.
- */
-
-main {
- display: block;
-}
-
-/**
- * Correct the font size and margin on `h1` elements within `section` and
- * `article` contexts in Chrome, Firefox, and Safari.
- */
-
-h1 {
- font-size: 2em;
- margin: 0.67em 0;
-}
-
-/* Grouping content
- ========================================================================== */
-
-/**
- * 1. Add the correct box sizing in Firefox.
- * 2. Show the overflow in Edge and IE.
- */
-
-hr {
- box-sizing: content-box; /* 1 */
- height: 0; /* 1 */
- overflow: visible; /* 2 */
-}
-
-/**
- * 1. Correct the inheritance and scaling of font size in all browsers.
- * 2. Correct the odd `em` font sizing in all browsers.
- */
-
-pre {
- font-family: monospace, monospace; /* 1 */
- font-size: 1em; /* 2 */
-}
-
-/* Text-level semantics
- ========================================================================== */
-
-/**
- * Remove the gray background on active links in IE 10.
- */
-
-a {
- background-color: transparent;
-}
-
-/**
- * 1. Remove the bottom border in Chrome 57-
- * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
- */
-
-abbr[title] {
- border-bottom: none; /* 1 */
- text-decoration: underline; /* 2 */
- text-decoration: underline dotted; /* 2 */
-}
-
-/**
- * Add the correct font weight in Chrome, Edge, and Safari.
- */
-
-b,
-strong {
- font-weight: bolder;
-}
-
-/**
- * 1. Correct the inheritance and scaling of font size in all browsers.
- * 2. Correct the odd `em` font sizing in all browsers.
- */
-
-code,
-kbd,
-samp {
- font-family: monospace, monospace; /* 1 */
- font-size: 1em; /* 2 */
-}
-
-/**
- * Add the correct font size in all browsers.
- */
-
-small {
- font-size: 80%;
-}
-
-/**
- * Prevent `sub` and `sup` elements from affecting the line height in
- * all browsers.
- */
-
-sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
-}
-
-sub {
- bottom: -0.25em;
-}
-
-sup {
- top: -0.5em;
-}
-
-/* Embedded content
- ========================================================================== */
-
-/**
- * Remove the border on images inside links in IE 10.
- */
-
-img {
- border-style: none;
-}
-
-/* Forms
- ========================================================================== */
-
-/**
- * 1. Change the font styles in all browsers.
- * 2. Remove the margin in Firefox and Safari.
- */
-
-button,
-input,
-optgroup,
-select,
-textarea {
- font-family: inherit; /* 1 */
- font-size: 100%; /* 1 */
- line-height: 1.15; /* 1 */
- margin: 0; /* 2 */
-}
-
-/**
- * Show the overflow in IE.
- * 1. Show the overflow in Edge.
- */
-
-button,
-input { /* 1 */
- overflow: visible;
-}
-
-/**
- * Remove the inheritance of text transform in Edge, Firefox, and IE.
- * 1. Remove the inheritance of text transform in Firefox.
- */
-
-button,
-select { /* 1 */
- text-transform: none;
-}
-
-/**
- * Correct the inability to style clickable types in iOS and Safari.
- */
-
-button,
-[type="button"],
-[type="reset"],
-[type="submit"] {
- -webkit-appearance: button;
-}
-
-/**
- * Remove the inner border and padding in Firefox.
- */
-
-button::-moz-focus-inner,
-[type="button"]::-moz-focus-inner,
-[type="reset"]::-moz-focus-inner,
-[type="submit"]::-moz-focus-inner {
- border-style: none;
- padding: 0;
-}
-
-/**
- * Restore the focus styles unset by the previous rule.
- */
-
-button:-moz-focusring,
-[type="button"]:-moz-focusring,
-[type="reset"]:-moz-focusring,
-[type="submit"]:-moz-focusring {
- outline: 1px dotted ButtonText;
-}
-
-/**
- * Correct the padding in Firefox.
- */
-
-fieldset {
- padding: 0.35em 0.75em 0.625em;
-}
-
-/**
- * 1. Correct the text wrapping in Edge and IE.
- * 2. Correct the color inheritance from `fieldset` elements in IE.
- * 3. Remove the padding so developers are not caught out when they zero out
- * `fieldset` elements in all browsers.
- */
-
-legend {
- box-sizing: border-box; /* 1 */
- color: inherit; /* 2 */
- display: table; /* 1 */
- max-width: 100%; /* 1 */
- padding: 0; /* 3 */
- white-space: normal; /* 1 */
-}
-
-/**
- * Add the correct vertical alignment in Chrome, Firefox, and Opera.
- */
-
-progress {
- vertical-align: baseline;
-}
-
-/**
- * Remove the default vertical scrollbar in IE 10+.
- */
-
-textarea {
- overflow: auto;
-}
-
-/**
- * 1. Add the correct box sizing in IE 10.
- * 2. Remove the padding in IE 10.
- */
-
-[type="checkbox"],
-[type="radio"] {
- box-sizing: border-box; /* 1 */
- padding: 0; /* 2 */
-}
-
-/**
- * Correct the cursor style of increment and decrement buttons in Chrome.
- */
-
-[type="number"]::-webkit-inner-spin-button,
-[type="number"]::-webkit-outer-spin-button {
- height: auto;
-}
-
-/**
- * 1. Correct the odd appearance in Chrome and Safari.
- * 2. Correct the outline style in Safari.
- */
-
-[type="search"] {
- -webkit-appearance: textfield; /* 1 */
- outline-offset: -2px; /* 2 */
-}
-
-/**
- * Remove the inner padding in Chrome and Safari on macOS.
- */
-
-[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
-}
-
-/**
- * 1. Correct the inability to style clickable types in iOS and Safari.
- * 2. Change font properties to `inherit` in Safari.
- */
-
-::-webkit-file-upload-button {
- -webkit-appearance: button; /* 1 */
- font: inherit; /* 2 */
-}
-
-/* Interactive
- ========================================================================== */
-
-/*
- * Add the correct display in Edge, IE 10+, and Firefox.
- */
-
-details {
- display: block;
-}
-
-/*
- * Add the correct display in all browsers.
- */
-
-summary {
- display: list-item;
-}
-
-/* Misc
- ========================================================================== */
-
-/**
- * Add the correct display in IE 10+.
- */
-
-template {
- display: none;
-}
-
-/**
- * Add the correct display in IE 10.
- */
-
-[hidden] {
- display: none;
-}
diff --git a/assets/css/_variables.scss b/assets/scss/_variables.scss
similarity index 99%
rename from assets/css/_variables.scss
rename to assets/scss/_variables.scss
index 0169e98d..b400b7e5 100644
--- a/assets/css/_variables.scss
+++ b/assets/scss/_variables.scss
@@ -193,4 +193,4 @@ $github-corner-fill: $header-background-color-dark !default;
$github-corner-fill-dark: $header-background-color !default;
// ========== GitHub Corners ========== //
-@import '_maps';
+@import 'core/maps';
diff --git a/assets/css/config.template.scss b/assets/scss/config.template.scss
similarity index 100%
rename from assets/css/config.template.scss
rename to assets/scss/config.template.scss
diff --git a/assets/css/_core/_common.scss b/assets/scss/core/_common.scss
similarity index 100%
rename from assets/css/_core/_common.scss
rename to assets/scss/core/_common.scss
diff --git a/assets/scss/core/_index.scss b/assets/scss/core/_index.scss
new file mode 100644
index 00000000..d7b070c0
--- /dev/null
+++ b/assets/scss/core/_index.scss
@@ -0,0 +1,6 @@
+@import "functions";
+@import "mixins";
+@import "common";
+@import "reboot";
+@import "root";
+@import "layouts";
diff --git a/assets/scss/core/_reboot.scss b/assets/scss/core/_reboot.scss
new file mode 100644
index 00000000..6fdc2567
--- /dev/null
+++ b/assets/scss/core/_reboot.scss
@@ -0,0 +1,357 @@
+/// Reboot
+///
+/// Normalization of HTML elements, manually forked from Normalize.css to remove
+/// styles targeting irrelevant browsers while applying new styles.
+///
+/// Normalize is licensed MIT. https://github.com/necolas/normalize.css
+
+
+// 1. Correct the line height in all browsers.
+
+:root {
+ font-family: fi-var(global-font-family);
+ font-weight: fi-var(global-font-weight);
+ font-display: swap;
+ font-size: fi-var(global-font-size);
+ line-height: fi-var(global-line-height); // 1
+ width: 100%;
+ scroll-behavior: smooth;
+ overflow: auto;
+ container-type: scroll-state;
+ container-name: scroller;
+
+ &:has(dialog[open]) {
+ overflow: hidden;
+ }
+
+ @include media('reduce-motion') {
+ scroll-behavior: auto;
+ }
+}
+
+// 1. Remove the margin in all browsers.
+// 2. As a best practice, apply a default `background-color`.
+// 3. Prevent adjustments of font size after orientation changes in iOS.
+// 4. Change the default tap highlight to be completely transparent in iOS.
+
+body {
+ margin: 0; // 1
+ background-color: fi-var(global-background-color); // 2
+ color: fi-var(global-font-color);
+ -webkit-text-size-adjust: 100%; // 3
+ -webkit-tap-highlight-color: rgba(#000, 0); // 4
+ @include overflow-wrap(break-word);
+}
+
+// Correct the font size and margin on `h1` elements within `section` and
+// `article` contexts in Chrome, Firefox, and Safari.
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+// 1. Add the correct box sizing in Firefox.
+
+hr {
+ box-sizing: content-box; // 1
+ height: 0; // 1
+}
+
+// 1. Correct the inheritance and scaling of font size in all browsers.
+// 2. Correct the odd `em` font sizing in all browsers.
+
+pre {
+ font-family: monospace, monospace; // 1
+ font-size: 1em; // 2
+}
+
+// 1. Add the correct text decoration in Chrome, Edge, Opera, and Safari.
+// 2. Add explicit cursor to indicate changed behavior.
+// 3. Prevent the text-decoration to be skipped.
+
+abbr[title] {
+ text-decoration: underline dotted; // 1
+ cursor: help; // 2
+ text-decoration-skip-ink: none; // 3
+}
+
+// Add the correct font weight in Chrome, Edge, and Safari.
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+// 1. Correct the inheritance and scaling of font size in all browsers.
+// 2. Correct the odd `em` font sizing in all browsers.
+
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; // 1
+ font-size: 1em; // 2
+}
+
+// Add the correct font size in all browsers.
+
+small {
+ font-size: 80%;
+}
+
+// Prevent `sub` and `sup` elements from affecting the line height in
+// all browsers.
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+img {
+ object-fit: cover;
+}
+
+img,
+video {
+ max-width: 100%;
+ height: auto;
+ @include border-radius;
+}
+
+// 1. Remove the default `border-radius` that macOS Chrome adds.
+
+button {
+ border-radius: 0; // 1
+ padding: 0;
+ border: 0;
+ background: transparent;
+ color: inherit;
+}
+
+// Explicitly remove focus outline in Chromium when it shouldn't be
+// visible (e.g. as result of mouse click or touch tap). It already
+// should be doing this automatically, but seems to currently be
+// confused and applies its very visible two-tone outline anyway.
+
+button:focus:not(:focus-visible) {
+ outline: 0;
+}
+
+// 1. Change the font styles in all browsers.
+// 2. Remove the margin in Firefox and Safari.
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit; // 1
+ font-size: inherit; // 1
+ line-height: 1.15; // 1
+ margin: 0; // 2
+}
+
+// Remove the inheritance of text transform in Firefox
+
+button,
+select {
+ text-transform: none;
+}
+
+// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
+// controls in Android 4.
+// 2. Correct the inability to style clickable types in iOS and Safari.
+// 3. Opinionated: add "hand" cursor to non-disabled button elements.
+
+button,
+[type="button"], // 1
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button; // 2
+
+ &:disabled {
+ opacity: 0.65;
+ cursor: not-allowed;
+ }
+
+ &:not(:disabled) {
+ cursor: pointer; // 3
+ }
+}
+
+// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
+
+::-moz-focus-inner {
+ padding: 0;
+ border-style: none;
+}
+
+// 1. Browsers set a default `min-width: min-content;` on fieldsets,
+// unlike e.g. `
`s, which have `min-width: 0;` by default.
+// So we reset that to ensure fieldsets behave more like a standard block element.
+// See https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
+// 2. Reset the default outline behavior of fieldsets so they don't affect page layout.
+
+fieldset {
+ min-width: 0; // 1
+ padding: 0; // 2
+ margin: 0; // 2
+ border: 0; // 2
+}
+
+
+// 1. By using `float: left`, the legend will behave like a block element.
+// This way the border of a fieldset wraps around the legend if present.
+// 2. Fix wrapping bug.
+
+legend {
+ float: left; // 1
+ width: 100%;
+ padding: 0;
+ margin-bottom: 0.5rem;
+ font-weight: null;
+ line-height: inherit;
+ font-size: 1.5rem;
+
+ + * {
+ clear: left; // 2
+ }
+}
+
+// Add the correct vertical alignment in Chrome, Firefox, and Opera.
+
+progress {
+ vertical-align: baseline;
+}
+
+// 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
+
+textarea {
+ overflow: vertical; // 1
+}
+
+// Fix height of inputs with a type of datetime-local, date, month, week, or time
+
+::-webkit-datetime-edit-fields-wrapper,
+::-webkit-datetime-edit-text,
+::-webkit-datetime-edit-minute,
+::-webkit-datetime-edit-hour-field,
+::-webkit-datetime-edit-day-field,
+::-webkit-datetime-edit-month-field,
+::-webkit-datetime-edit-year-field {
+ padding: 0;
+}
+
+::-webkit-inner-spin-button {
+ height: auto;
+}
+
+// 1. This overrides the extra rounded corners on search inputs in iOS so that our
+// `.form-control` class can properly style them. Note that this cannot simply
+// be added to `.form-control` as it's not specific enough.
+// 2. Correct the outline style in Safari.
+
+[type='search'] {
+ -webkit-appearance: textfield; // 1
+ outline-offset: -2px; // 2
+
+ // 3. Better affordance and consistent appearance for search cancel button
+ &::-webkit-search-cancel-button {
+ cursor: pointer;
+ filter: grayscale(1);
+ }
+}
+
+// 1. A few input types should stay LTR
+// See https://rtlstyling.com/posts/rtl-styling#form-inputs
+// 2. RTL only output
+// See https://rtlcss.com/learn/usage-guide/control-directives/#raw
+
+/* rtl:raw:
+[type="tel"],
+[type="url"],
+[type="email"],
+[type="number"] {
+ direction: ltr;
+}
+*/
+
+// Remove the inner padding in Chrome and Safari on macOS.
+
+::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+// Remove padding around color pickers in webkit browsers
+
+::-webkit-color-swatch-wrapper {
+ padding: 0;
+}
+
+// Correct element displays
+
+output {
+ display: inline-block;
+}
+
+// 1. Remove border from iframe
+
+iframe {
+ border: 0; // 1
+ @include border-radius;
+}
+
+details {
+ &.center {
+ summary {
+ text-align: center;
+ }
+ }
+}
+
+// 1. Add the correct display in all browsers.
+
+summary {
+ display: list-item; // 1
+ cursor: pointer;
+}
+
+dialog {
+ padding: 0;
+}
+
+// Always hide an element with the `hidden` HTML attribute.
+
+[hidden] {
+ display: none;
+}
+
+::selection {
+ background-color: fi-var(selection-color);
+}
+
+%code {
+ padding: 0.2em 0.4em;
+ margin: 0;
+ font-size: fi-var(code-font-size);
+ line-height: fi-var(code-font-size);
+ font-family: fi-var(code-font-family);
+ color: fi-var(code-color);
+ background-color: fi-var(code-inline-background-color);
+ text-decoration: inherit;
+ @include border-radius;
+ @include overflow-wrap(break-word);
+}
+
+@include link(true, true);
diff --git a/assets/css/_core/_root.scss b/assets/scss/core/_root.scss
similarity index 100%
rename from assets/css/_core/_root.scss
rename to assets/scss/core/_root.scss
diff --git a/assets/css/_core/_function/_index.scss b/assets/scss/core/functions/_index.scss
similarity index 100%
rename from assets/css/_core/_function/_index.scss
rename to assets/scss/core/functions/_index.scss
diff --git a/assets/css/_core/_function/_rgba.scss b/assets/scss/core/functions/_rgba.scss
similarity index 100%
rename from assets/css/_core/_function/_rgba.scss
rename to assets/scss/core/functions/_rgba.scss
diff --git a/assets/css/_core/_function/_var.scss b/assets/scss/core/functions/_var.scss
similarity index 100%
rename from assets/css/_core/_function/_var.scss
rename to assets/scss/core/functions/_var.scss
diff --git a/assets/css/_core/_layout/_breadcrumb.scss b/assets/scss/core/layouts/_breadcrumb.scss
similarity index 98%
rename from assets/css/_core/_layout/_breadcrumb.scss
rename to assets/scss/core/layouts/_breadcrumb.scss
index 243ce4bd..fc7eca91 100644
--- a/assets/css/_core/_layout/_breadcrumb.scss
+++ b/assets/scss/core/layouts/_breadcrumb.scss
@@ -53,7 +53,7 @@
.breadcrumb {
display: flex;
flex-wrap: nowrap;
- padding: 0.5rem;
+ padding: 0.5rem 2px;
margin: 0 auto;
list-style: none;
box-shadow: inset 0 -1px 0 fi-var(global-border-color);
diff --git a/assets/css/_core/_layout/_comment.scss b/assets/scss/core/layouts/_comment.scss
similarity index 92%
rename from assets/css/_core/_layout/_comment.scss
rename to assets/scss/core/layouts/_comment.scss
index 10687438..3215ce41 100644
--- a/assets/css/_core/_layout/_comment.scss
+++ b/assets/scss/core/layouts/_comment.scss
@@ -14,7 +14,6 @@
}
.comment {
- padding-inline: 0.5rem;
@extend %page-style;
iframe {
diff --git a/assets/css/_core/_layout/_footer.scss b/assets/scss/core/layouts/_footer.scss
similarity index 100%
rename from assets/css/_core/_layout/_footer.scss
rename to assets/scss/core/layouts/_footer.scss
diff --git a/assets/css/_core/_layout/_header.scss b/assets/scss/core/layouts/_header.scss
similarity index 99%
rename from assets/css/_core/_layout/_header.scss
rename to assets/scss/core/layouts/_header.scss
index 529ececf..bc4b37ec 100644
--- a/assets/css/_core/_layout/_header.scss
+++ b/assets/scss/core/layouts/_header.scss
@@ -62,6 +62,7 @@ header {
display: flex;
justify-content: space-between;
align-items: center;
+ gap: 0.75rem;
box-sizing: border-box;
width: 100%;
}
diff --git a/assets/css/_core/_layout/_index.scss b/assets/scss/core/layouts/_index.scss
similarity index 100%
rename from assets/css/_core/_layout/_index.scss
rename to assets/scss/core/layouts/_index.scss
diff --git a/assets/css/_core/_layout/_page-style.scss b/assets/scss/core/layouts/_page-style.scss
similarity index 100%
rename from assets/css/_core/_layout/_page-style.scss
rename to assets/scss/core/layouts/_page-style.scss
diff --git a/assets/css/_core/_layout/_pagination.scss b/assets/scss/core/layouts/_pagination.scss
similarity index 100%
rename from assets/css/_core/_layout/_pagination.scss
rename to assets/scss/core/layouts/_pagination.scss
diff --git a/assets/css/_maps/_admonition.scss b/assets/scss/core/maps/_admonition.scss
similarity index 100%
rename from assets/css/_maps/_admonition.scss
rename to assets/scss/core/maps/_admonition.scss
diff --git a/assets/css/_maps/_alert.scss b/assets/scss/core/maps/_alert.scss
similarity index 100%
rename from assets/css/_maps/_alert.scss
rename to assets/scss/core/maps/_alert.scss
diff --git a/assets/css/_maps/_code-type.scss b/assets/scss/core/maps/_code-type.scss
similarity index 100%
rename from assets/css/_maps/_code-type.scss
rename to assets/scss/core/maps/_code-type.scss
diff --git a/assets/css/_maps/_colors.scss b/assets/scss/core/maps/_colors.scss
similarity index 100%
rename from assets/css/_maps/_colors.scss
rename to assets/scss/core/maps/_colors.scss
diff --git a/assets/css/_maps/_index.scss b/assets/scss/core/maps/_index.scss
similarity index 100%
rename from assets/css/_maps/_index.scss
rename to assets/scss/core/maps/_index.scss
diff --git a/assets/css/_maps/_utilities.scss b/assets/scss/core/maps/_utilities.scss
similarity index 100%
rename from assets/css/_maps/_utilities.scss
rename to assets/scss/core/maps/_utilities.scss
diff --git a/assets/css/_core/_mixin/_bold-dark.scss b/assets/scss/core/mixins/_bold-dark.scss
similarity index 100%
rename from assets/css/_core/_mixin/_bold-dark.scss
rename to assets/scss/core/mixins/_bold-dark.scss
diff --git a/assets/css/_core/_mixin/_border-radius.scss b/assets/scss/core/mixins/_border-radius.scss
similarity index 100%
rename from assets/css/_core/_mixin/_border-radius.scss
rename to assets/scss/core/mixins/_border-radius.scss
diff --git a/assets/css/_core/_mixin/_box-shadow.scss b/assets/scss/core/mixins/_box-shadow.scss
similarity index 100%
rename from assets/css/_core/_mixin/_box-shadow.scss
rename to assets/scss/core/mixins/_box-shadow.scss
diff --git a/assets/css/_core/_mixin/_compatibility.scss b/assets/scss/core/mixins/_compatibility.scss
similarity index 100%
rename from assets/css/_core/_mixin/_compatibility.scss
rename to assets/scss/core/mixins/_compatibility.scss
diff --git a/assets/css/_core/_mixin/_index.scss b/assets/scss/core/mixins/_index.scss
similarity index 100%
rename from assets/css/_core/_mixin/_index.scss
rename to assets/scss/core/mixins/_index.scss
diff --git a/assets/css/_core/_mixin/_link-guard.scss b/assets/scss/core/mixins/_link-guard.scss
similarity index 100%
rename from assets/css/_core/_mixin/_link-guard.scss
rename to assets/scss/core/mixins/_link-guard.scss
diff --git a/assets/css/_core/_mixin/_link.scss b/assets/scss/core/mixins/_link.scss
similarity index 100%
rename from assets/css/_core/_mixin/_link.scss
rename to assets/scss/core/mixins/_link.scss
diff --git a/assets/css/_core/_mixin/_loading.scss b/assets/scss/core/mixins/_loading.scss
similarity index 100%
rename from assets/css/_core/_mixin/_loading.scss
rename to assets/scss/core/mixins/_loading.scss
diff --git a/assets/css/_core/_mixin/_media.scss b/assets/scss/core/mixins/_media.scss
similarity index 100%
rename from assets/css/_core/_mixin/_media.scss
rename to assets/scss/core/mixins/_media.scss
diff --git a/assets/css/_core/_mixin/_scrollbar-width.scss b/assets/scss/core/mixins/_scrollbar-width.scss
similarity index 100%
rename from assets/css/_core/_mixin/_scrollbar-width.scss
rename to assets/scss/core/mixins/_scrollbar-width.scss
diff --git a/assets/css/_core/_mixin/_sticky-top.scss b/assets/scss/core/mixins/_sticky-top.scss
similarity index 100%
rename from assets/css/_core/_mixin/_sticky-top.scss
rename to assets/scss/core/mixins/_sticky-top.scss
diff --git a/assets/css/_core/_mixin/_task-list.scss b/assets/scss/core/mixins/_task-list.scss
similarity index 100%
rename from assets/css/_core/_mixin/_task-list.scss
rename to assets/scss/core/mixins/_task-list.scss
diff --git a/assets/css/_core/_mixin/_theme-switch.scss b/assets/scss/core/mixins/_theme-switch.scss
similarity index 100%
rename from assets/css/_core/_mixin/_theme-switch.scss
rename to assets/scss/core/mixins/_theme-switch.scss
diff --git a/assets/css/_core/_mixin/_theme-vars.scss b/assets/scss/core/mixins/_theme-vars.scss
similarity index 100%
rename from assets/css/_core/_mixin/_theme-vars.scss
rename to assets/scss/core/mixins/_theme-vars.scss
diff --git a/assets/css/_core/_mixin/_z-index.scss b/assets/scss/core/mixins/_z-index.scss
similarity index 100%
rename from assets/css/_core/_mixin/_z-index.scss
rename to assets/scss/core/mixins/_z-index.scss
diff --git a/assets/css/_custom.scss b/assets/scss/custom.scss
similarity index 100%
rename from assets/css/_custom.scss
rename to assets/scss/custom.scss
diff --git a/assets/scss/main.scss b/assets/scss/main.scss
new file mode 100644
index 00000000..46be1c16
--- /dev/null
+++ b/assets/scss/main.scss
@@ -0,0 +1,8 @@
+@charset "utf-8";
+
+@import "variables";
+@import "override";
+@import "core";
+@import "pages";
+@import 'widgets';
+@import "custom";
diff --git a/assets/css/_override.scss b/assets/scss/override.scss
similarity index 100%
rename from assets/css/_override.scss
rename to assets/scss/override.scss
diff --git a/assets/css/_page/_404.scss b/assets/scss/pages/_404.scss
similarity index 100%
rename from assets/css/_page/_404.scss
rename to assets/scss/pages/_404.scss
diff --git a/assets/css/_page/_home.scss b/assets/scss/pages/_home.scss
similarity index 100%
rename from assets/css/_page/_home.scss
rename to assets/scss/pages/_home.scss
diff --git a/assets/css/_page/_index.scss b/assets/scss/pages/_index.scss
similarity index 94%
rename from assets/css/_page/_index.scss
rename to assets/scss/pages/_index.scss
index df19794d..85d27f5b 100644
--- a/assets/css/_page/_index.scss
+++ b/assets/scss/pages/_index.scss
@@ -1,5 +1,6 @@
.page {
padding-inline: 0.5rem;
+ box-sizing: border-box;
@extend %page-style;
.content {
@@ -38,9 +39,9 @@
}
}
-@import '_single';
-@import '_special';
-@import '_archive';
+@import 'single';
+@import 'specials';
+@import 'archives';
@import '404';
@import 'home';
@import 'link';
diff --git a/assets/css/_page/_link.scss b/assets/scss/pages/_link.scss
similarity index 100%
rename from assets/css/_page/_link.scss
rename to assets/scss/pages/_link.scss
diff --git a/assets/css/_page/_offline.scss b/assets/scss/pages/_offline.scss
similarity index 100%
rename from assets/css/_page/_offline.scss
rename to assets/scss/pages/_offline.scss
diff --git a/assets/css/_page/_patch.scss b/assets/scss/pages/_patch.scss
similarity index 100%
rename from assets/css/_page/_patch.scss
rename to assets/scss/pages/_patch.scss
diff --git a/assets/css/_page/_archive/_index.scss b/assets/scss/pages/archives/_index.scss
similarity index 100%
rename from assets/css/_page/_archive/_index.scss
rename to assets/scss/pages/archives/_index.scss
diff --git a/assets/css/_page/_archive/_tags.scss b/assets/scss/pages/archives/_tags.scss
similarity index 100%
rename from assets/css/_page/_archive/_tags.scss
rename to assets/scss/pages/archives/_tags.scss
diff --git a/assets/css/_page/_archive/_terms.scss b/assets/scss/pages/archives/_terms.scss
similarity index 100%
rename from assets/css/_page/_archive/_terms.scss
rename to assets/scss/pages/archives/_terms.scss
diff --git a/assets/css/_page/_single/_alert.scss b/assets/scss/pages/single/_alert.scss
similarity index 100%
rename from assets/css/_page/_single/_alert.scss
rename to assets/scss/pages/single/_alert.scss
diff --git a/assets/css/_page/_single/_code.scss b/assets/scss/pages/single/_code.scss
similarity index 99%
rename from assets/css/_page/_single/_code.scss
rename to assets/scss/pages/single/_code.scss
index c346b92f..fe0f4616 100644
--- a/assets/css/_page/_single/_code.scss
+++ b/assets/scss/pages/single/_code.scss
@@ -520,7 +520,7 @@ pre {
}
}
-@import './_code-syntax';
+@import './code-syntax';
// gist shortcode
.gist {
@@ -565,7 +565,7 @@ pre {
}
@include dark-mode {
- @import './_code-syntax/github-dark-dimmed';
+ @import './code-syntax/github-dark-dimmed';
}
}
diff --git a/assets/css/_page/_single/_collections.scss b/assets/scss/pages/single/_collections.scss
similarity index 100%
rename from assets/css/_page/_single/_collections.scss
rename to assets/scss/pages/single/_collections.scss
diff --git a/assets/css/_page/_single/_color-preview.scss b/assets/scss/pages/single/_color-preview.scss
similarity index 100%
rename from assets/css/_page/_single/_color-preview.scss
rename to assets/scss/pages/single/_color-preview.scss
diff --git a/assets/css/_page/_single/_diagram-copy-btn.scss b/assets/scss/pages/single/_diagram-copy-btn.scss
similarity index 100%
rename from assets/css/_page/_single/_diagram-copy-btn.scss
rename to assets/scss/pages/single/_diagram-copy-btn.scss
diff --git a/assets/css/_page/_single/_fixit-decryptor.scss b/assets/scss/pages/single/_fixit-decryptor.scss
similarity index 100%
rename from assets/css/_page/_single/_fixit-decryptor.scss
rename to assets/scss/pages/single/_fixit-decryptor.scss
diff --git a/assets/css/_page/_single/_footer.scss b/assets/scss/pages/single/_footer.scss
similarity index 100%
rename from assets/css/_page/_single/_footer.scss
rename to assets/scss/pages/single/_footer.scss
diff --git a/assets/css/_page/_single/_index.scss b/assets/scss/pages/single/_index.scss
similarity index 99%
rename from assets/css/_page/_single/_index.scss
rename to assets/scss/pages/single/_index.scss
index 79b2d258..939fbb4d 100644
--- a/assets/css/_page/_single/_index.scss
+++ b/assets/scss/pages/single/_index.scss
@@ -535,7 +535,7 @@
}
}
- @import '_shortcodes';
+ @import 'shortcodes';
@import 'alert';
@import 'code';
@import 'diagram-copy-btn';
diff --git a/assets/css/_page/_single/_related.scss b/assets/scss/pages/single/_related.scss
similarity index 100%
rename from assets/css/_page/_single/_related.scss
rename to assets/scss/pages/single/_related.scss
diff --git a/assets/css/_page/_single/_reward.scss b/assets/scss/pages/single/_reward.scss
similarity index 100%
rename from assets/css/_page/_single/_reward.scss
rename to assets/scss/pages/single/_reward.scss
diff --git a/assets/css/_page/_single/_toc.scss b/assets/scss/pages/single/_toc.scss
similarity index 100%
rename from assets/css/_page/_single/_toc.scss
rename to assets/scss/pages/single/_toc.scss
diff --git a/assets/css/_page/_single/_code-syntax/_dark.scss b/assets/scss/pages/single/code-syntax/_dark.scss
similarity index 100%
rename from assets/css/_page/_single/_code-syntax/_dark.scss
rename to assets/scss/pages/single/code-syntax/_dark.scss
diff --git a/assets/css/_page/_single/_code-syntax/_github-dark-dimmed.scss b/assets/scss/pages/single/code-syntax/_github-dark-dimmed.scss
similarity index 100%
rename from assets/css/_page/_single/_code-syntax/_github-dark-dimmed.scss
rename to assets/scss/pages/single/code-syntax/_github-dark-dimmed.scss
diff --git a/assets/css/_page/_single/_code-syntax/_index.scss b/assets/scss/pages/single/code-syntax/_index.scss
similarity index 76%
rename from assets/css/_page/_single/_code-syntax/_index.scss
rename to assets/scss/pages/single/code-syntax/_index.scss
index f67f86a9..78ab2dd7 100644
--- a/assets/css/_page/_single/_code-syntax/_index.scss
+++ b/assets/scss/pages/single/code-syntax/_index.scss
@@ -4,8 +4,8 @@
* To generate syntax highlighting styles from the command line,
* See https://gohugo.io/quick-reference/syntax-highlighting-styles/#styles
* For example:
- * hugo gen chromastyles --style=github > assets/css/_partials/_code-syntax/light.scss
- * hugo gen chromastyles --style=github-dark > assets/css/_partials/_code-syntax/dark.scss
+ * hugo gen chromastyles --style=github > assets/css/pages/single/code-syntax/light.scss
+ * hugo gen chromastyles --style=github-dark > assets/css/pages/single/code-syntax/dark.scss
*/
.highlight {
/* LineLink */
diff --git a/assets/css/_page/_single/_code-syntax/_light.scss b/assets/scss/pages/single/code-syntax/_light.scss
similarity index 100%
rename from assets/css/_page/_single/_code-syntax/_light.scss
rename to assets/scss/pages/single/code-syntax/_light.scss
diff --git a/assets/css/_page/_single/_shortcodes/_admonition.scss b/assets/scss/pages/single/shortcodes/_admonition.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_admonition.scss
rename to assets/scss/pages/single/shortcodes/_admonition.scss
diff --git a/assets/css/_page/_single/_shortcodes/_bilibili.scss b/assets/scss/pages/single/shortcodes/_bilibili.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_bilibili.scss
rename to assets/scss/pages/single/shortcodes/_bilibili.scss
diff --git a/assets/css/_page/_single/_shortcodes/_bluesky.scss b/assets/scss/pages/single/shortcodes/_bluesky.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_bluesky.scss
rename to assets/scss/pages/single/shortcodes/_bluesky.scss
diff --git a/assets/css/_page/_single/_shortcodes/_cardlink.scss b/assets/scss/pages/single/shortcodes/_cardlink.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_cardlink.scss
rename to assets/scss/pages/single/shortcodes/_cardlink.scss
diff --git a/assets/css/_page/_single/_shortcodes/_center-quote.scss b/assets/scss/pages/single/shortcodes/_center-quote.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_center-quote.scss
rename to assets/scss/pages/single/shortcodes/_center-quote.scss
diff --git a/assets/css/_page/_single/_shortcodes/_douyin.scss b/assets/scss/pages/single/shortcodes/_douyin.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_douyin.scss
rename to assets/scss/pages/single/shortcodes/_douyin.scss
diff --git a/assets/css/_page/_single/_shortcodes/_echarts.scss b/assets/scss/pages/single/shortcodes/_echarts.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_echarts.scss
rename to assets/scss/pages/single/shortcodes/_echarts.scss
diff --git a/assets/css/_page/_single/_shortcodes/_file-tree.scss b/assets/scss/pages/single/shortcodes/_file-tree.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_file-tree.scss
rename to assets/scss/pages/single/shortcodes/_file-tree.scss
diff --git a/assets/css/_page/_single/_shortcodes/_index.scss b/assets/scss/pages/single/shortcodes/_index.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_index.scss
rename to assets/scss/pages/single/shortcodes/_index.scss
diff --git a/assets/css/_page/_single/_shortcodes/_instagram.scss b/assets/scss/pages/single/shortcodes/_instagram.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_instagram.scss
rename to assets/scss/pages/single/shortcodes/_instagram.scss
diff --git a/assets/css/_page/_single/_shortcodes/_mapbox.scss b/assets/scss/pages/single/shortcodes/_mapbox.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_mapbox.scss
rename to assets/scss/pages/single/shortcodes/_mapbox.scss
diff --git a/assets/css/_page/_single/_shortcodes/_mermaid.scss b/assets/scss/pages/single/shortcodes/_mermaid.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_mermaid.scss
rename to assets/scss/pages/single/shortcodes/_mermaid.scss
diff --git a/assets/css/_page/_single/_shortcodes/_tabs.scss b/assets/scss/pages/single/shortcodes/_tabs.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_tabs.scss
rename to assets/scss/pages/single/shortcodes/_tabs.scss
diff --git a/assets/css/_page/_single/_shortcodes/_timeline.scss b/assets/scss/pages/single/shortcodes/_timeline.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_timeline.scss
rename to assets/scss/pages/single/shortcodes/_timeline.scss
diff --git a/assets/css/_page/_single/_shortcodes/_version.scss b/assets/scss/pages/single/shortcodes/_version.scss
similarity index 100%
rename from assets/css/_page/_single/_shortcodes/_version.scss
rename to assets/scss/pages/single/shortcodes/_version.scss
diff --git a/assets/css/_page/_special/_friends.scss b/assets/scss/pages/specials/_friends.scss
similarity index 100%
rename from assets/css/_page/_special/_friends.scss
rename to assets/scss/pages/specials/_friends.scss
diff --git a/assets/css/_page/_special/_index.scss b/assets/scss/pages/specials/_index.scss
similarity index 100%
rename from assets/css/_page/_special/_index.scss
rename to assets/scss/pages/specials/_index.scss
diff --git a/assets/css/_page/_special/_search.scss b/assets/scss/pages/specials/_search.scss
similarity index 100%
rename from assets/css/_page/_special/_search.scss
rename to assets/scss/pages/specials/_search.scss
diff --git a/assets/css/_core/_widgets/_cell-tooltip.scss b/assets/scss/widgets/_cell-tooltip.scss
similarity index 100%
rename from assets/css/_core/_widgets/_cell-tooltip.scss
rename to assets/scss/widgets/_cell-tooltip.scss
diff --git a/assets/css/_core/_widgets/_cookieconsent.scss b/assets/scss/widgets/_cookieconsent.scss
similarity index 100%
rename from assets/css/_core/_widgets/_cookieconsent.scss
rename to assets/scss/widgets/_cookieconsent.scss
diff --git a/assets/css/_core/_widgets/_details.scss b/assets/scss/widgets/_details.scss
similarity index 100%
rename from assets/css/_core/_widgets/_details.scss
rename to assets/scss/widgets/_details.scss
diff --git a/assets/css/_core/_widgets/_fixed-button.scss b/assets/scss/widgets/_fixed-button.scss
similarity index 100%
rename from assets/css/_core/_widgets/_fixed-button.scss
rename to assets/scss/widgets/_fixed-button.scss
diff --git a/assets/css/_core/_widgets/_github-corner.scss b/assets/scss/widgets/_github-corner.scss
similarity index 100%
rename from assets/css/_core/_widgets/_github-corner.scss
rename to assets/scss/widgets/_github-corner.scss
diff --git a/assets/css/_core/_widgets/_icon.scss b/assets/scss/widgets/_icon.scss
similarity index 100%
rename from assets/css/_core/_widgets/_icon.scss
rename to assets/scss/widgets/_icon.scss
diff --git a/assets/css/_core/_widgets/_index.scss b/assets/scss/widgets/_index.scss
similarity index 100%
rename from assets/css/_core/_widgets/_index.scss
rename to assets/scss/widgets/_index.scss
diff --git a/assets/css/_core/_widgets/_link-guard.scss b/assets/scss/widgets/_link-guard.scss
similarity index 100%
rename from assets/css/_core/_widgets/_link-guard.scss
rename to assets/scss/widgets/_link-guard.scss
diff --git a/assets/css/_core/_widgets/_mask.scss b/assets/scss/widgets/_mask.scss
similarity index 100%
rename from assets/css/_core/_widgets/_mask.scss
rename to assets/scss/widgets/_mask.scss
diff --git a/assets/css/_core/_widgets/_noscript-warning.scss b/assets/scss/widgets/_noscript-warning.scss
similarity index 100%
rename from assets/css/_core/_widgets/_noscript-warning.scss
rename to assets/scss/widgets/_noscript-warning.scss
diff --git a/assets/css/_core/_widgets/_post-chat.scss b/assets/scss/widgets/_post-chat.scss
similarity index 100%
rename from assets/css/_core/_widgets/_post-chat.scss
rename to assets/scss/widgets/_post-chat.scss
diff --git a/assets/css/_core/_widgets/_reading-progress.scss b/assets/scss/widgets/_reading-progress.scss
similarity index 100%
rename from assets/css/_core/_widgets/_reading-progress.scss
rename to assets/scss/widgets/_reading-progress.scss
diff --git a/assets/css/_core/_widgets/_scrollbar.scss b/assets/scss/widgets/_scrollbar.scss
similarity index 100%
rename from assets/css/_core/_widgets/_scrollbar.scss
rename to assets/scss/widgets/_scrollbar.scss
diff --git a/assets/css/_core/_widgets/_typeit.scss b/assets/scss/widgets/_typeit.scss
similarity index 100%
rename from assets/css/_core/_widgets/_typeit.scss
rename to assets/scss/widgets/_typeit.scss
diff --git a/layouts/_partials/init/detection-deprecated.html b/layouts/_partials/init/detection-deprecated.html
index 19b60424..3b5d5b14 100644
--- a/layouts/_partials/init/detection-deprecated.html
+++ b/layouts/_partials/init/detection-deprecated.html
@@ -6,6 +6,22 @@
{{- $warns = $warns | append "The parameter `params.externalIcon` is deprecated since v1.0.0, use `params.link.external_icon` instead." -}}
{{- end -}}
+{{- with resources.Get "css/_custom.scss" -}}
+ {{- $warns = $warns | append "The file `assets/css/_custom.scss` is deprecated. Please move your custom styles to `assets/scss/custom.scss`." -}}
+{{- end -}}
+
+{{- with resources.Get "css/_override.scss" -}}
+ {{- $warns = $warns | append "The file `assets/css/_override.scss` is deprecated. Please move your custom styles to `assets/scss/override.scss`." -}}
+{{- end -}}
+
+{{- with resources.Get "css/_variables.scss" -}}
+ {{- $warns = $warns | append "The file `assets/css/_variables.scss` is deprecated. Please move your variables to `assets/scss/_variables.scss`." -}}
+{{- end -}}
+
+{{- with resources.Get "js/_custom.js" -}}
+ {{- $warns = $warns | append "The file `assets/js/_custom.js` is deprecated. Please move your custom scripts to `assets/js/custom.js`." -}}
+{{- end -}}
+
{{- if len $warns -}}
{{- warnf "FixIt deprecation warnings (%v):\n • %v\n\n" (hugo.Store.Get "version") (delimit $warns "\n • ") -}}
{{- end -}}
diff --git a/layouts/_partials/layout/assets.html b/layouts/_partials/layouts/assets.html
similarity index 98%
rename from layouts/_partials/layout/assets.html
rename to layouts/_partials/layouts/assets.html
index a18927da..d7f4245f 100644
--- a/layouts/_partials/layout/assets.html
+++ b/layouts/_partials/layouts/assets.html
@@ -364,7 +364,7 @@ FixIt theme assets partial
{{- block "custom-assets" . }}{{ end -}}
{{- /* Custom script */ -}}
-{{- with ((resources.Get "js/custom.js") | default (resources.Get "js/_custom.js")) -}}
+{{- with resources.Get "js/custom.js" -}}
{{- $options := dict "targetPath" "js/custom.min.js" "minify" hugo.IsProduction -}}
{{- if not hugo.IsProduction -}}
{{- $options = dict "sourceMap" "external" | merge $options -}}
@@ -374,14 +374,14 @@ FixIt theme assets partial
{{- with .Store.Get "styleArr" -}}
{{- $content := delimit . " " -}}
- {{- $path := printf "%s/css/page/%s.scss" $languagePrefix $uniqueFileId -}}
- {{- $options := printf "css/page/%s.min.css" $uniqueFileId | dict "targetPath" -}}
+ {{- $path := printf "%s/scss/pages/%s.scss" $languagePrefix $uniqueFileId -}}
+ {{- $options := printf "css/pages/%s.min.css" $uniqueFileId | dict "targetPath" -}}
{{- dict "Content" $content "Path" $path "ToCSS" $options | dict "Page" $ "Data" | partial "store/style.html" -}}
{{- end -}}
{{- with .Store.Get "scriptArr" -}}
{{- $content := delimit . "\n" -}}
- {{- $targetPath := printf "%s/js/page/%s.js" $languagePrefix $uniqueFileId -}}
+ {{- $targetPath := printf "%s/js/pages/%s.js" $languagePrefix $uniqueFileId -}}
{{- dict "Content" $content "Path" $targetPath "Defer" true | dict "Page" $ "Data" | partial "store/script.html" -}}
{{- end -}}
diff --git a/layouts/_partials/layout/breadcrumb.html b/layouts/_partials/layouts/breadcrumb.html
similarity index 100%
rename from layouts/_partials/layout/breadcrumb.html
rename to layouts/_partials/layouts/breadcrumb.html
diff --git a/layouts/_partials/layout/comment.html b/layouts/_partials/layouts/comment.html
similarity index 100%
rename from layouts/_partials/layout/comment.html
rename to layouts/_partials/layouts/comment.html
diff --git a/layouts/_partials/layout/footer.html b/layouts/_partials/layouts/footer.html
similarity index 100%
rename from layouts/_partials/layout/footer.html
rename to layouts/_partials/layouts/footer.html
diff --git a/layouts/_partials/layout/head.html b/layouts/_partials/layouts/head.html
similarity index 97%
rename from layouts/_partials/layout/head.html
rename to layouts/_partials/layouts/head.html
index 4175bb25..da983ff1 100644
--- a/layouts/_partials/layout/head.html
+++ b/layouts/_partials/layouts/head.html
@@ -116,14 +116,14 @@
{{- /* Core stylesheets */ -}}
{{- /* Config CSS */ -}}
-{{- $options := dict "Source" "css/config.template.scss" "Template" "css/config.scss" "Fingerprint" $fingerprint -}}
+{{- $options := dict "Source" "scss/config.template.scss" "Template" "scss/config.scss" "Fingerprint" $fingerprint -}}
{{- $toCSS := dict "targetPath" "css/config.min.css" "enableSourceMap" true -}}
{{- $options = dict "Context" . "ToCSS" $toCSS | merge $options -}}
{{- partial "plugin/style.html" $options -}}
{{- /* Theme CSS */ -}}
-{{- $options := dict "Source" "css/style.scss" "Fingerprint" $fingerprint -}}
-{{- $toCSS := dict "targetPath" "css/style.min.css" "enableSourceMap" true -}}
+{{- $options := dict "Source" "scss/main.scss" "Fingerprint" $fingerprint -}}
+{{- $toCSS := dict "targetPath" "css/main.min.css" "enableSourceMap" true -}}
{{- $options = dict "Context" . "ToCSS" $toCSS | merge $options -}}
{{- partial "plugin/style.html" $options -}}
diff --git a/layouts/_partials/layout/header.html b/layouts/_partials/layouts/header.html
similarity index 100%
rename from layouts/_partials/layout/header.html
rename to layouts/_partials/layouts/header.html
diff --git a/layouts/_partials/layout/paginator.html b/layouts/_partials/layouts/paginator.html
similarity index 100%
rename from layouts/_partials/layout/paginator.html
rename to layouts/_partials/layouts/paginator.html
diff --git a/layouts/_partials/layout/widgets.html b/layouts/_partials/layouts/widgets.html
similarity index 100%
rename from layouts/_partials/layout/widgets.html
rename to layouts/_partials/layouts/widgets.html
diff --git a/layouts/baseof.html b/layouts/baseof.html
index 6f1777c0..7f6a2bdf 100644
--- a/layouts/baseof.html
+++ b/layouts/baseof.html
@@ -11,7 +11,7 @@
{{ block "title" . }}{{ .Site.Title }}{{ end }}
- {{- partial "layout/head.html" . -}}
+ {{- partial "layouts/head.html" . -}}
{{- /* TODO preload script https://developer.mozilla.org/zh-CN/docs/Web/HTML/Attributes/rel/preload */ -}}
{{- /* Custom head */ -}}
{{- block "custom-head" . }}{{ end -}}
@@ -19,8 +19,8 @@
{{- /* Body wrapper */ -}}
- {{- partial "layout/header.html" . -}}
- {{- partial "layout/breadcrumb.html" . -}}
+ {{- partial "layouts/header.html" . -}}
+ {{- partial "layouts/breadcrumb.html" . -}}
{{- $toc := .Store.Get "toc" -}}
{{- block "content" . }}{{ end -}}
@@ -28,13 +28,13 @@
{{- /* Comment */ -}}
{{- block "comments" . }}{{ end -}}
{{- /* Footer */ -}}
- {{- partialCached "layout/footer.html" . -}}
+ {{- partialCached "layouts/footer.html" . -}}
{{- /* Theme widgets */ -}}
- {{- partial "layout/widgets.html" . -}}
+ {{- partial "layouts/widgets.html" . -}}
{{- /* Load JavaScript scripts and CSS */ -}}
- {{- partial "layout/assets.html" . -}}
+ {{- partial "layouts/assets.html" . -}}