Skip to content

Commit

Permalink
chore: make compatible with dart-sass
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubbu0129 authored and RalXYZ committed Nov 2, 2024
1 parent 6c02fbf commit 338abb2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ define build
mkdir -p $(target_dir)/$(1)-$(2)
mkdir -p $(target_dir)/$(1)-$(2)/target
if [ "$(3)" = "light" ]; then \
scss --sourcemap=none --style expanded $(working_dir)/headers/$(1)/$(3).scss $(target_dir)/$(1)-$(2)/target/latex.css; \
sass --no-source-map --style expanded $(working_dir)/headers/$(1)/$(3).scss $(target_dir)/$(1)-$(2)/target/latex.css; \
else \
scss --sourcemap=none --style expanded $(working_dir)/headers/$(1)/$(3).scss $(target_dir)/$(1)-$(2)/target/latex-$(3).css; \
sass --no-source-map --style expanded $(working_dir)/headers/$(1)/$(3).scss $(target_dir)/$(1)-$(2)/target/latex-$(3).css; \
fi
endef

Expand Down
35 changes: 20 additions & 15 deletions src/scss/settings.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
:root {
$ui-font: null;
$heading-Chinese-font: null;
$chapter-Chinese-font: null;
$sub-chapter-Chinese-font: null;
$sub-sub-chapter-Chinese-font: null;
@if $os == "windows" {
$ui-font: "\"阿里巴巴普惠体 2.0\"", "\"微软雅黑\"" !global;
$heading-Chinese-font: "华文黑体" !global;
$chapter-Chinese-font: "华文黑体" !global;
$sub-chapter-Chinese-font: "华文楷体" !global;
$sub-sub-chapter-Chinese-font: "华文仿宋" !global;
$ui-font: "\"阿里巴巴普惠体 2.0\"", "\"微软雅黑\"";
$heading-Chinese-font: "华文黑体";
$chapter-Chinese-font: "华文黑体";
$sub-chapter-Chinese-font: "华文楷体";
$sub-sub-chapter-Chinese-font: "华文仿宋";
} @else if $os == "macos" {
$ui-font: "\"苹方-简\"" !global;
$heading-Chinese-font: "华文黑体Bold" !global;
$chapter-Chinese-font: "方正公文黑体" !global;
$sub-chapter-Chinese-font: "方正公文楷体" !global;
$sub-sub-chapter-Chinese-font: "方正公文仿宋" !global;
$ui-font: "\"苹方-简\"";
$heading-Chinese-font: "华文黑体Bold";
$chapter-Chinese-font: "方正公文黑体";
$sub-chapter-Chinese-font: "方正公文楷体";
$sub-sub-chapter-Chinese-font: "方正公文仿宋";
} @else if $os == "linux" {
$ui-font: "\"Noto Sans CJK SC\"" !global;
$heading-Chinese-font: "Noto Sans CJK SC" !global;
$chapter-Chinese-font: "Noto Sans CJK SC" !global;
$sub-chapter-Chinese-font: "Noto Serif CJK SC" !global;
$sub-sub-chapter-Chinese-font: "Noto Serif CJK SC" !global;
$ui-font: "\"Noto Sans CJK SC\"";
$heading-Chinese-font: "Noto Sans CJK SC";
$chapter-Chinese-font: "Noto Sans CJK SC";
$sub-chapter-Chinese-font: "Noto Serif CJK SC";
$sub-sub-chapter-Chinese-font: "Noto Serif CJK SC";
}

/* == 字体设置 == */
Expand Down

0 comments on commit 338abb2

Please sign in to comment.