Skip to content

Commit

Permalink
Switch to inter font, preload font
Browse files Browse the repository at this point in the history
  • Loading branch information
gamingrobot committed Sep 25, 2024
1 parent 77d8ad2 commit 8ec499e
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 146 deletions.
2 changes: 1 addition & 1 deletion themes/doingstuff-zola/sass/doingstuff/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ html {
line-height: $root-line-height;
font-weight: $root-font-weight;
@media (min-width: $large-breakpoint) {
font-size: $large-font-size;
font-size: $large-device-font-size;
}
}

Expand Down
8 changes: 0 additions & 8 deletions themes/doingstuff-zola/sass/doingstuff/_responsive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
// 320px ~ 16rem/16px ~ 18.8235/17px ~ 17.7778/18px
// 480px ~ 30rem/16px ~ 28.2353rem/17px ~ 26.6667rem/18px
@media (max-width: 768px) {
html,
body {
font-size: $small-device-font-size;
}
.hidden-tablet {
display: none;
}
Expand All @@ -20,10 +16,6 @@
// tablet/medium device ~768px+
// 768px ~ 48em/16px ~ 45.1765em/17px ~ 42.6667/18px
@media (min-width: 768px) {
html,
body {
font-size: $large-device-font-size;
}
.topbar-title {
flex: 1 1 60%;
}
Expand Down
8 changes: 4 additions & 4 deletions themes/doingstuff-zola/sass/doingstuff/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ $cyan: #75b5aa;
$blue: #167bc2;
$brown: #8f5536;

$root-font-family: "Source Sans Pro","Arial",sans-serif;
$root-font-family: "InterVariable", system-ui, sans-serif;

// poole's variables
$root-font-size: 1rem;
$root-font-weight: 400;
$root-line-height: 1.6em;

$body-color: #0d3a58;
$body-color: #000000;
$body-bg: #fff;

$border-color: #e5e5e5;
Expand All @@ -40,8 +40,8 @@ $font-scale-dot8: .8rem;
$small-device-font-size: $root-font-size;
$large-device-font-size: $large-font-size;

// https://www.client9.com/css-system-font-stack-monospace-v2
$code-font-family: "SFMono-Regular", "SF-Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Roboto Mono", "Ubuntu Mono", "Courier New", Courier, monospace;
// https://github.com/system-fonts/modern-font-stacks
$code-font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
$code-font-size: .9rem;
$code-fence-font-size: .8rem;
//$code-color: #bf616a;
Expand Down
48 changes: 12 additions & 36 deletions themes/doingstuff-zola/sass/fonts.scss
Original file line number Diff line number Diff line change
@@ -1,41 +1,17 @@
/*! Source Sans Pro */
/*! InterVariable */
@font-face {
font-family: 'Source Sans Pro';
font-family: InterVariable;
font-style: normal;
font-weight: 400;
font-weight: 100 900;
font-display: swap;
src: url(fonts/Source_Sans_Pro/SourceSansPro-Regular.ttf) format('truetype')
src: url('fonts/inter/InterVariable.woff2') format('woff2');
}

@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url(fonts/Source_Sans_Pro/SourceSansPro-SemiBold.ttf) format('truetype')
}

@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(fonts/Source_Sans_Pro/SourceSansPro-Bold.ttf) format('truetype')
}

@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 900;
font-display: swap;
src: url(fonts/Source_Sans_Pro/SourceSansPro-Black.ttf) format('truetype')
}

/*! Lato */
@font-face {
font-family: Lato;
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(fonts/Lato/Lato-Regular.ttf) format('truetype')
}
/* Not Required */
// @font-face {
// font-family: InterVariable;
// font-style: italic;
// font-weight: 100 900;
// font-display: swap;
// src: url('fonts/inter/InterVariable-Italic.woff2') format('woff2');
// }
Binary file not shown.
93 changes: 0 additions & 93 deletions themes/doingstuff-zola/static/fonts/Source_Sans_Pro/OFL.txt

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Copyright (c) 2010-2014 by tyPoland Lukasz Dziedzic (team@latofonts.com) with Reserved Font Name "Lato"
Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
Expand All @@ -18,7 +17,7 @@ with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
Expand All @@ -44,7 +43,7 @@ new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
PERMISSION AND CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Expand Down
1 change: 1 addition & 0 deletions themes/doingstuff-zola/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</title>
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ get_url(path="apple-touch-icon-144-precomposed.png") }}">
<link href="{{ get_url(path="favicon.png") }}" rel="icon" type="image/x-icon"/>
<link rel="preload" href="{{ get_url(path="fonts/inter/InterVariable.woff2") }}" as="font" type="font/woff2">
{%- if config.generate_feeds %}
{% for feed in config.feed_filenames %}
<link rel="alternate" type={% if feed == "atom.xml" %} "application/atom+xml" {% else %} "application/rss+xml" {% endif %} title="RSS" href="{{ get_url(path=feed) | safe }}"/>
Expand Down

0 comments on commit 8ec499e

Please sign in to comment.