Skip to content

Commit

Permalink
fix: title font family
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Aug 17, 2019
1 parent 6c1f263 commit 3ce0486
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions assets/scss/_common/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@
}
}

@if variable-exists("fontFamilyPostTitle") {
.post {
.post-title, .post-subtitle {
font-family: $fontFamilyPostTitle;
}
@if variable-exists("fontFamilyTitle") {
.list-title, .term-title, .list-year, .list-month, .post-title, .post-subtitle, .related-title, .post-nav {
font-family: $fontFamilyPostTitle;
}
}

@if variable-exists("fontFamilyHeadings") {
.post {
.post-body {
h1, h2, h3, h4, h5, h6 {
font-family: $fontFamilyHeadings;
}
}
.contents-title {
font-family: $fontFamilyHeadings;
}
}

@if variable-exists("fontFamilyCode") {
Expand Down
4 changes: 2 additions & 2 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
{{ with .Site.Params.fontFamilySiteBrand }}
$fontFamilySiteBrand: {{ $glyph }}{{ . }};
{{ end }}
{{ with .Site.Params.fontFamilyPostTitle }}
$fontFamilyPostTitle: {{ $glyph }}{{ . }};
{{ with .Site.Params.fontFamilyTitle }}
$fontFamilyTitle: {{ $glyph }}{{ . }};
{{ end }}
{{ with .Site.Params.fontFamilyHeadings }}
$fontFamilyHeadings: {{ $glyph }}{{ . }};
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/style.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{{- end -}}

{{- if .Params.smallCap | default .Site.Params.enableSmallCap -}}
{{- .Scratch.Add "style" ".post h1,.post h2,.post h3,.post h4,.post h5,.post h6,.post-subtitle {font-variant:small-caps}" -}}
{{- .Scratch.Add "style" ".post-body h1,.post-body h2,.post-body h3,.post-body h4,.post-body h5,.post-body h6,.contents-title {font-variant:small-caps}" -}}
{{- end -}}

{{- with .Params.align | default "default" -}}
Expand Down

0 comments on commit 3ce0486

Please sign in to comment.