mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-11-24 00:16:57 +01:00
add option for sans-serif (can be seen in VDQI)
This commit is contained in:
parent
aa481a6eb1
commit
2e7f19d9a3
4 changed files with 37 additions and 14 deletions
10
assets/scss/hugo-tufte-options.scss
Normal file
10
assets/scss/hugo-tufte-options.scss
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{ if and (isset .Site.Params "sanssubtitle") .Site.Params.sansSubtitle }}
|
||||
h2, h3 {
|
||||
font-style: normal;
|
||||
font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif, "Noto Emoji";
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
{{ if and (isset .Site.Params "centerarticle") .Site.Params.centerArticle }}
|
||||
// tba
|
||||
{{ end }}
|
|
@ -54,6 +54,10 @@
|
|||
font-style: normal;
|
||||
}
|
||||
|
||||
$serif-fonts: et-book, "Noto Serif SC", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif, "Noto Emoji";
|
||||
$sans-fonts: "Gill Sans", "Gill Sans MT", Calibri, sans-serif, "Noto Emoji";
|
||||
$mono-fonts: Consolas, "Liberation Mono", Menlo, Courier, monospace, "Noto Emoji";
|
||||
|
||||
/* Tufte CSS styles */
|
||||
html {
|
||||
font-size: 15px;
|
||||
|
@ -63,36 +67,36 @@ body {
|
|||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-left: 12.5%;
|
||||
font-family: et-book, "Noto Serif SC", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif, "Noto Emoji";
|
||||
font-family: $serif-fonts;
|
||||
background-color: #fffff8;
|
||||
color: #111;
|
||||
max-width: 1400px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
h1, h2, h3 {
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 4rem;
|
||||
margin-bottom: 1.5rem;
|
||||
font-size: 3.2rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
h2, h3 {
|
||||
font-style: italic;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
margin-top: 2.1rem;
|
||||
margin-bottom: 0;
|
||||
font-size: 2.2rem;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-size: 1.7rem;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.author, .date {
|
||||
|
@ -350,14 +354,14 @@ div.table-wrapper {
|
|||
}
|
||||
|
||||
.sans {
|
||||
font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif, "Noto Emoji";
|
||||
font-family: $sans-fonts;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
|
||||
code,
|
||||
.code,
|
||||
kbd {
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace, "Noto Emoji";
|
||||
font-family: $mono-fonts;
|
||||
font-size: 1.125rem;
|
||||
line-height: 1.42;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,12 @@ params:
|
|||
math: true
|
||||
KaTeXVersion: 0.16.4
|
||||
KaTeXCDN: "//cdn.jsdelivr.net/npm"
|
||||
# Common social website links, please comment the unused ones.
|
||||
# #### Control style flavours of the website
|
||||
# Use upright & sans-serif font for subtitles
|
||||
sansSubtitle: false
|
||||
# Make the page centred in screen
|
||||
centerArticle: false
|
||||
# ######## Common social website links, please comment the unused ones.
|
||||
# (if your favorite one is not in the list, please head to the footer menu below and add an entry)
|
||||
# Please note that some of the value below are only provided as an exemple, perhaps the computed isn't valid
|
||||
# github: slashformotion
|
||||
|
|
|
@ -27,4 +27,8 @@
|
|||
{{ $htstyle := resources.Get "scss/hugo-tufte.scss"| resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS $htoptions }}
|
||||
<link rel="stylesheet" href="{{ $htstyle.Permalink | relURL }}">
|
||||
|
||||
{{ $ht_o_options := (dict "targetPath" "/css/hugo-tufte-options.min.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $ht_o_style := resources.Get "scss/hugo-tufte-options.scss"| resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS $ht_o_options }}
|
||||
<link rel="stylesheet" href="{{ $ht_o_style.Permalink | relURL }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ "/css/hugo-tufte-override.css" | relURL }}">
|
||||
|
|
Loading…
Reference in a new issue