Skip to content

Commit

Permalink
💄 Feat: update all fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
bambooom committed Feb 6, 2024
1 parent 512ec1c commit b10bcd6
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 12 deletions.
1 change: 1 addition & 0 deletions hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ params:
ShowReadingTime: true
ShowShareButtons: false
ShowPostNavLinks: true
ShowPageNums: true
ShowBreadCrumbs: true
ShowCodeCopyButtons: false
ShowWordCount: false
Expand Down
14 changes: 14 additions & 0 deletions themes/PaperMod/assets/css/common/archive.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,17 @@
color: var(--secondary);
font-size: 14px;
}


.archive-year-header,
.archive-month-header {
font-family: 'Roboto Slab', 'Open Sans', serif;
}

.archive-entry-title {
font-family: 'Roboto Slab', 'Open Sans', 'Noto Serif SC', 'PaperMod SC', 'Noto Serif JP', 'Noto Serif TC', 'PaperMod TC', serif;
}

.archive-meta {
font-family: 'Fira Sans', 'Open Sans', serif;;
}
1 change: 1 addition & 0 deletions themes/PaperMod/assets/css/common/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
display: flex;
flex-direction: column;
align-items: center;
font-family: 'Roboto Slab', 'Open Sans', serif;
}

.footer-inner {
Expand Down
1 change: 1 addition & 0 deletions themes/PaperMod/assets/css/common/header.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
margin-inline-start: auto;
margin-inline-end: auto;
line-height: var(--header-height);
font-family: 'Roboto Slab', 'Open Sans', serif;
}

.nav a {
Expand Down
6 changes: 4 additions & 2 deletions themes/PaperMod/assets/css/common/post-entry.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@

.entry-header {
max-width: 60%;
font-family: 'Roboto Slab', 'Open Sans', 'Noto Serif SC', 'PaperMod SC', 'Noto Serif JP', 'Noto Serif TC', 'PaperMod TC', serif;
}

.entry-header h2 {
Expand Down Expand Up @@ -91,13 +92,14 @@
align-items: center;
gap: 4px;
transition: all 0.3s cubic-bezier(.4,0,.2,1);
font-family: 'Fira Sans', 'Open Sans', serif;
}

.entry-footer svg {
.entry-footer > svg {
transition: all 0.3s cubic-bezier(.4,0,.2,1);
}

.post-entry:hover .entry-footer svg {
.post-entry:hover .entry-footer > svg {
transform: translate(5px, 0);
}

Expand Down
33 changes: 28 additions & 5 deletions themes/PaperMod/assets/css/common/post-single.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
margin: 24px auto var(--content-gap) auto;
}

.page-header,
.post-header,
.post-title {
font-family: 'Roboto Slab', 'Open Sans', 'Noto Serif SC', 'PaperMod SC', 'Noto Serif JP', 'Noto Serif TC', 'PaperMod TC', serif;
}

.post-title {
margin-bottom: 2px;
margin-bottom: 10px;
font-size: 40px;
}

Expand All @@ -19,6 +25,7 @@
font-size: 14px;
display: flex;
flex-wrap: wrap;
font-family: 'Fira Sans', 'Open Sans', serif;;
}

.post-meta .i18n_list li {
Expand All @@ -35,7 +42,7 @@
.post-content {
color: var(--content);
line-height: 1.75rem;
font-family: ui-serif,Georgia,Cambria,Times New Roman,Times,serif;
font-family: 'Fira Sans', 'Open Sans', 'Noto Serif SC', 'PaperMod SC', 'Noto Serif JP', 'Noto Serif TC', 'PaperMod TC', serif;
}

.post-content h1,
Expand All @@ -45,11 +52,12 @@
.post-content h5,
.post-content h6 {
position: relative;
font-family: 'Roboto Slab', 'Open Sans', 'Noto Serif SC', 'PaperMod SC', 'Noto Serif JP', 'Noto Serif TC', 'PaperMod TC', serif;
}

.post-content .anchor {
position: absolute;
left: -30px;
left: 0;
}

.post-content h3,
Expand Down Expand Up @@ -85,6 +93,16 @@
font-size: 12px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
margin-left: -20px;
padding-left: 20px;
}


.post-content a:not(.anchor) {
border-bottom: solid 2px var(--pink);
Expand All @@ -110,7 +128,10 @@
.post-content a code {
margin: auto 0;
border-radius: 0;
box-shadow: 0 -1px 0 var(--primary) inset;
}

.post-content a:hover code {
color: initial;
}

.post-content del {
Expand Down Expand Up @@ -201,6 +222,7 @@

.post-content .highlight pre {
margin: 0;
border-radius: var(--radius);
}

.post-content .highlighttable {
Expand All @@ -223,10 +245,11 @@
.post-content code {
margin: auto 4px;
padding: 4px 6px;
font-size: 0.78em;
font-size: 0.93em;
line-height: 1.5;
background: var(--code-bg);
border-radius: 2px;
font-family: 'Space Mono', Courier, Monaco, monospace;
}

.post-content pre code {
Expand Down
1 change: 1 addition & 0 deletions themes/PaperMod/assets/css/common/terms.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
background: var(--tertiary);
border-radius: 6px;
transition: transform 0.1s;
font-family: 'Fira Sans', 'Open Sans', serif;
}

.terms-tags a:active {
Expand Down
38 changes: 38 additions & 0 deletions themes/PaperMod/assets/css/core/fontface.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Noto+Serif+JP&family=Noto+Serif+SC&family=Noto+Serif+TC&family=Roboto+Slab:[email protected]&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

@font-face {
font-family: "PaperMod SC";
src: local("Songti SC Regular"), local(STSongti-SC-Regular);
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: "PaperMod SC";
src: local("Songti SC Bold"), local(STSongti-SC-Bold);
font-weight: bold;
font-style: normal;
}

@font-face {
font-family: "PaperMod TC";
src: local("Songti TC Regular"), local(STSongti-TC-Regular);
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: "PaperMod TC";
src: local("Songti TC Bold"), local(STSongti-TC-Bold);
font-weight: bold;
font-style: normal;
}

@font-face {
font-family: "PaperMod Emoji";
src: local("Apple Color Emoji"),
local("Segoe UI Emoji"),
local("Segoe UI Symbol"),
local("Noto Color Emoji"),
local("Android Emoji");
}
4 changes: 3 additions & 1 deletion themes/PaperMod/assets/css/core/reset.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ h6 {
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
font-family: -apple-system, BlinkMacSystemFont, 'Fira Sans', 'Open Sans',
'Noto Serif SC', 'PaperMod SC', 'Noto Serif JP', 'Noto Serif TC', 'PaperMod TC',
'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
font-size: 16px;
line-height: 1.6;
word-break: break-word;
Expand Down
4 changes: 2 additions & 2 deletions themes/PaperMod/assets/css/core/theme-vars.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
--main-width: 750px;
--header-height: 60px;
--footer-height: 108px;
--radius: 8px;
--radius: 4px;
--theme: rgb(255, 255, 255);
--entry: rgb(255, 255, 255);
--primary: rgb(30, 30, 30);
--secondary: rgb(108, 108, 108);
--tertiary: rgb(214, 214, 214);
--hilite: rgb(21 21 21);
--content: rgb(31, 31, 31);
--code-block-bg: rgb(28, 29, 33);
--code-block-bg: rgb(56, 56, 56);
--code-bg: rgb(245, 245, 245);
--border: rgb(221, 221, 221);
--border-2: rgb(186, 186, 186);
Expand Down
2 changes: 1 addition & 1 deletion themes/PaperMod/layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h2 class="entry-hint-parent">
{{- end }}
<a class="entry-link" aria-label="post link to {{ .Title | plainify }}" href="{{ .Permalink }}"></a>
</article>
{{- end }}
{{- end }} {{/* end range $paginator */}}

{{- if gt $paginator.TotalPages 1 }}
<footer class="page-footer">
Expand Down
3 changes: 2 additions & 1 deletion themes/PaperMod/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

{{- $includes_all := $includes | resources.Concat "assets/css/includes.css" }}

{{- $fontface := (resources.Get "css/core/fontface.css") }}
{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }}
{{- $reset := (resources.Get "css/core/reset.css") }}
{{- $media := (resources.Get "css/core/zmedia.css") }}
Expand All @@ -60,7 +61,7 @@
{{- $chroma_mod := (resources.Get "css/includes/chroma-mod.css") }}

{{- /* order is important */}}
{{- $core := (slice $theme_vars $reset $common $chroma_styles $chroma_mod $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }}
{{- $core := (slice $fontface $theme_vars $reset $common $chroma_styles $chroma_mod $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }}
{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }}

{{- /* bundle all required css */}}
Expand Down

0 comments on commit b10bcd6

Please sign in to comment.