Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
feat(style): add header title style config (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq authored Mar 16, 2020
1 parent 6e091b6 commit ee1c5c2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
4 changes: 3 additions & 1 deletion assets/css/_partial/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ header {
}

.header-title {
font-size: 1.5rem;
font-family: $header-title-font-family;
font-weight: bold;
overflow: hidden;
white-space: nowrap;
Expand Down Expand Up @@ -55,6 +55,7 @@ header {
justify-content: space-between;

.header-title {
font-size: $header-title-font-size-desktop;
max-width: 30%;
}

Expand Down Expand Up @@ -105,6 +106,7 @@ header {

.header-title {
max-width: 80%;
font-size: $header-title-font-size-mobile;
}

.menu-toggle {
Expand Down
6 changes: 6 additions & 0 deletions assets/css/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ $header-height-mobile: 3.5rem !default;
$header-background-color: #f8f8f8 !default;
$header-background-color-dark: #252627 !default;

// Font style of the header title
$header-title-font-family: $global-font-family !default;

$header-title-font-size-desktop: 1.5rem !default;
$header-title-font-size-mobile: 1.5rem !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;
Expand Down
10 changes: 4 additions & 6 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ theme = "LoveIt"
# 主题目录
themesDir = "../.."

# website title
# 网站标题
title = "LoveIt"

# whether to use robots.txt
# 是否使用 robots.txt
enableRobotsTXT = true
Expand All @@ -24,8 +28,6 @@ enableEmoji = true
weight = 1
# language code
languageCode = "en"
# website title
title = "LoveIt"
# language name
languageName = "English"
# whether to include Chinese/Japanese/Korean
Expand Down Expand Up @@ -248,8 +250,6 @@ enableEmoji = true
weight = 2
# 网站语言, 仅在这里 CN 大写
languageCode = "zh-CN"
# 网站标题
title = "LoveIt"
# 语言名称
languageName = "简体中文"
# 是否包括中日韩文字
Expand Down Expand Up @@ -470,8 +470,6 @@ enableEmoji = true
weight = 3
# language code
languageCode = "fr"
# website title
title = "LoveIt"
# language name
languageName = "Français"
# whether to include Chinese/Japanese/Korean
Expand Down
4 changes: 4 additions & 0 deletions exampleSite/config/css/_override.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
// Override Variables
// 覆盖变量
// ==============================

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500&display=swap');

$header-title-font-family: 'Baloo 2', $global-font-family;

Large diffs are not rendered by default.

0 comments on commit ee1c5c2

Please sign in to comment.