Skip to content

Commit 8fe36f7

Browse files
committed
feat: Use "Roboto Slab" & "Fira Sans" fonts
Fixes: * Include correct font style sheet link i.e. a single link containing all fonts selected in google fonts website. Refactor: * Remove unused/extra fonts declarations. * Update font styles to use weights available with the included fonts. * Reduce font size larger by 0.1 to keep it at 18px.
1 parent c865377 commit 8fe36f7

File tree

7 files changed

+24
-15
lines changed

7 files changed

+24
-15
lines changed

assets/styles/_buttons.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ button,
66
border: $spacer-1 solid;
77
cursor: pointer;
88
display: flex;
9-
font-weight: bold;
9+
font-weight: $font-bold;
1010
padding: $spacer-small $spacer-normal;
1111
text-align: center;
1212

@@ -32,7 +32,7 @@ button,
3232
/* button variants */
3333
&.outline,
3434
&.transparent {
35-
font-weight: normal;
35+
font-weight: $font-normal;
3636
background: none;
3737

3838
@include themed {

assets/styles/_gen_syntax.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
}
2020

2121
.chroma .gs {
22-
font-weight: bold;
22+
font-weight: $font-bold;
2323
}
2424

2525
/* Syntax highlighting colors */

assets/styles/_header.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
justify-content: space-between;
5555

5656
&__first {
57-
font-weight: 700;
57+
font-weight: $font-bold;
5858
display: block;
5959
}
6060

assets/styles/_main.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ html {
1111
body {
1212
margin: 0;
1313
padding: 0;
14-
font-family: $font-family;
14+
font-family: $font-family-normal;
15+
font-weight: $font-normal;
1516
font-size: $font-size;
1617
line-height: 1.54;
1718
letter-spacing: -0.02em;
@@ -95,7 +96,7 @@ h4,
9596
h5,
9697
h6 {
9798
font-family: $font-family-title;
98-
font-weight: bold;
99+
font-weight: $font-bold;
99100
margin: $spacer-large2 0 $spacer-normal 0;
100101
width: fit-content;
101102

@@ -283,7 +284,7 @@ td {
283284
}
284285

285286
th {
286-
font-weight: bold;
287+
font-weight: $font-bold;
287288

288289
@include themed {
289290
color: t($text-brighter);

assets/styles/_post.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090

9191
&-description {
9292
font-size: $font-size-larger;
93+
font-weight: $font-light;
9394

9495
@include themed {
9596
color: t($text-brighter);

assets/styles/_variables.scss

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
/* Fonts */
2-
$font-family: arial, helvetica, verdana, roboto, sans-serif;
3-
$font-family-mono: ubuntu mono, monaco, consolas, monospace;
4-
$font-family-title: "Times New Roman", garamond, georgia, "Roboto Serif",
5-
serif;
2+
$font-family-title: "Roboto Slab", "Times New Roman", garamond, serif;
3+
$font-family-normal: "Fira Sans", arial, helvetica, sans-serif;
4+
$font-family-mono: "Ubuntu Mono", monaco, consolas, monospace;
5+
6+
/* Font weights */
7+
$font-light: 300;
8+
$font-normal: 400;
9+
$font-bold: 500;
10+
11+
/* Font sizes */
612
$font-size: 1rem;
713
$font-size-smaller: $font-size - 0.125;
8-
$font-size-larger: $font-size + 0.225;
14+
$font-size-larger: $font-size + 0.125;
915

1016
/* Layouts */
1117
$container-max-width: 864px;

layouts/partials/head/base.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,10 @@
7979
{{- /* Fonts */}}
8080
<link rel="preconnect" href="https://fonts.googleapis.com" />
8181
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
82-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400&display=swap" />
83-
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto+Serif:wght@500&family=Roboto:wght@300&display=swap" />
84-
<link href="https://fonts.googleapis.com/css2?family=Ubuntu+Mono&display=swap" rel="stylesheet" />
82+
<link
83+
href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=Roboto+Slab:wght@300;400;500&family=Ubuntu+Mono:ital@0;1&display=swap"
84+
rel="stylesheet"
85+
/>
8586

8687
{{- /* RSS Feed */}}
8788
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ site.Title }}" />

0 commit comments

Comments
 (0)