提交 41a14bc2 编写于 作者: D Dillon

chore(style): update css code style

上级 315eb094
......@@ -54,6 +54,17 @@ $header-height-mobile: 4rem !default;
$header-background-color: #f8f8f8 !default;
$header-background-color-dark: #252627 !default;
// Position of the header
$header-position-desktop: if($header-normal-mode-desktop, static, fixed) !default;
$header-position-mobile: if($header-normal-mode-mobile, static, fixed) !default;
// Top of the page padding
$page-padding-top-desktop: if($header-normal-mode-desktop, 1rem, 6rem) !default;
$page-padding-top-mobile: if($header-normal-mode-mobile, 1rem, 6rem) !default;
// Top of the post toc
$post-toc-top: if($header-normal-mode-desktop, 7rem, 12rem) !default;
// Color of the hover header item
$header-hover-color: #161209 !default;
$header-hover-color-dark: #fff !default;
......
@charset 'utf-8';
$home-profile: {{- if .Site.Params.home.profile.enable -}}true{{ else }}false{{ end }};
$home-posts: {{- if .Site.Params.home.posts.enable -}}true{{ else }}false{{ end }};
{{- if eq .Site.Params.header.desktopMode "normal" -}}
$header-position-desktop: static;
$page-padding-top-desktop: 1rem;
$post-toc-top: 7rem;
{{- else -}}
$header-position-desktop: fixed;
$page-padding-top-desktop: 6rem;
$post-toc-top: 12rem;
{{- end -}}
{{- if eq .Site.Params.header.mobileMode "normal" -}}
$header-position-mobile: static;
$page-padding-top-mobile: 1rem;
{{- else -}}
$header-position-mobile: fixed;
$page-padding-top-mobile: 6rem;
{{- end -}}
$home-profile: {{ if .Site.Params.home.profile.enable }}true{{ else }}false{{ end }};
$home-posts: {{ if .Site.Params.home.posts.enable }}true{{ else }}false{{ end }};
$header-normal-mode-desktop: {{ if eq .Site.Params.header.desktopMode "normal" }}true{{ else }}false{{ end }};
$header-normal-mode-mobile: {{ if eq .Site.Params.header.mobileMode "normal" }}true{{ else }}false{{ end }};
@import "_variables";
{{- if fileExists "config/css/_custom.scss" -}}
@import "_custom";
{{- if fileExists "config/css/_override.scss" -}}
@import "_override";
{{- end -}}
@import "_core/normalize";
......
......@@ -2,14 +2,3 @@
// Custom style
// 自定义样式
// ==============================
// You can override the variables in assets/css/_variables.scss to customize the style
// 您可以覆盖 assets/css/_variables.scss 中的变量以自定义样式
@import url(https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900);
$global-font-family: Lato, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft Yahei, Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji;
@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,700&display=swap&subset=latin-ext');
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
// ==============================
// Override Variables
// 覆盖变量
// ==============================
// You can override the variables in assets/css/_variables.scss to customize the style
// 您可以覆盖 assets/css/_variables.scss 中的变量
@import url(https://fonts.googleapis.com/css?family=Lato:100,300,400,700,900);
$global-font-family: Lato, -apple-system, BlinkMacSystemFont, PingFang SC, Microsoft Yahei, Segoe UI, Helvetica, Arial, sans-serif, Segoe UI Emoji;
@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,700&display=swap&subset=latin-ext');
$code-font-family: Fira Mono, Source Code Pro, Menlo, Consolas, Monaco, monospace;
......@@ -22,10 +22,10 @@
{{- /* style.min.css */ -}}
{{- $res := resources.Get "css/style.template.scss" -}}
{{- $options := dict "targetPath" "css/style.min.css" "outputStyle" "compressed" "enableSourceMap" true -}}
{{- if fileExists "config/css/_custom.scss" -}}
{{- $options = dict "includePaths" (slice "config/css") | merge $options -}}
{{- end -}}
{{- $options := dict "targetPath" "css/style.min.css" -}}
{{- $options = dict "includePaths" (slice "config/css") | merge $options -}}
{{- $options = dict "outputStyle" "compressed" | merge $options -}}
{{- $options = dict "enableSourceMap" true | merge $options -}}
{{- $res = resources.ExecuteAsTemplate "style.scss" . $res | toCSS $options -}}
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册