mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-03 16:46:39 -04:00
switch to Roboto web font (#22)
for now, at least. tired of waiting on Chromium to fix system fonts on Catalina.... https://bugs.chromium.org/p/chromium/issues/detail?id=1005969 Roboto seems closest to San Francisco.
This commit is contained in:
@ -11,3 +11,21 @@
|
|||||||
// Return non-gradient linear-gradient():
|
// Return non-gradient linear-gradient():
|
||||||
@return linear-gradient($color-opaque, $color-opaque);
|
@return linear-gradient($color-opaque, $color-opaque);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Web fonts (see components/_webfonts.scss)
|
||||||
|
@mixin font-face($family, $src-local, $src-local-alt, $src,
|
||||||
|
$style: normal, $weight: normal,
|
||||||
|
$range: U+000-5FF, $display: swap) {
|
||||||
|
@font-face {
|
||||||
|
font-family: $family;
|
||||||
|
font-style: $style;
|
||||||
|
font-weight: $weight;
|
||||||
|
font-display: $display;
|
||||||
|
src: local('#{$src-local}'), local('#{$src-local-alt}'),
|
||||||
|
url('#{$src}.woff2') format('woff2'),
|
||||||
|
url('#{$src}.woff') format('woff');
|
||||||
|
// url('#{$src}.ttf') format('truetype'),
|
||||||
|
// url('#{$src}.eot') format('embedded-opentype');
|
||||||
|
unicode-range: $range;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
|
|
||||||
// System Fonts
|
// System fonts and web fonts
|
||||||
// https://markdotto.com/2018/02/07/github-system-fonts/
|
// https://markdotto.com/2018/02/07/github-system-fonts/
|
||||||
$system-fonts: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
$system-fonts: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
|
||||||
"Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
|
"Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
|
||||||
"Droid Sans", "Helvetica Neue", sans-serif,
|
"Droid Sans", "Helvetica Neue", sans-serif,
|
||||||
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
|
$system-fonts-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||||
$system-fonts-monospace: "SFMono-Regular", "Consolas", "Liberation Mono",
|
$system-fonts-monospace: "SFMono-Regular", "Consolas", "Liberation Mono",
|
||||||
"Menlo", "Courier", monospace;
|
"Menlo", "Courier", monospace;
|
||||||
|
$webfont-roboto: "Roboto", sans-serif;
|
||||||
|
|
||||||
// Misc Settings
|
// Misc Settings
|
||||||
$responsive-width: 890px;
|
$responsive-width: 890px;
|
||||||
|
@ -72,7 +72,7 @@ footer {
|
|||||||
|
|
||||||
&#copyright,
|
&#copyright,
|
||||||
&#poweredby {
|
&#poweredby {
|
||||||
line-height: 1.8;
|
line-height: 1.9;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ body {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background-color: $color-gray-background; // really just the color of header & footer
|
background-color: $color-gray-background; // really just the color of header & footer
|
||||||
color: $color-text;
|
color: $color-text;
|
||||||
font-family: $system-fonts;
|
font-family: $webfont-roboto, $system-fonts-emoji;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
5
assets/sass/components/_webfonts.scss
Normal file
5
assets/sass/components/_webfonts.scss
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
@charset "UTF-8";
|
||||||
|
|
||||||
|
@include font-face('Roboto', 'Roboto', 'Roboto-Regular', './fonts/roboto-latin-regular', normal, 400);
|
||||||
|
@include font-face('Roboto', 'Roboto Medium', 'Roboto-Medium', './fonts/roboto-latin-medium', normal, 500);
|
||||||
|
@include font-face('Roboto', 'Roboto Bold', 'Roboto-Bold', './fonts/roboto-latin-bold', normal, 700);
|
@ -7,6 +7,7 @@
|
|||||||
@import 'abstracts/functions';
|
@import 'abstracts/functions';
|
||||||
|
|
||||||
// Global Styles
|
// Global Styles
|
||||||
|
@import 'components/webfonts';
|
||||||
@import 'components/global';
|
@import 'components/global';
|
||||||
@import 'components/header';
|
@import 'components/header';
|
||||||
@import 'components/footer';
|
@import 'components/footer';
|
||||||
|
@ -2,15 +2,14 @@
|
|||||||
|
|
||||||
// Home Styles
|
// Home Styles
|
||||||
main#home {
|
main#home {
|
||||||
font-size: 1.4em;
|
font-size: 1.3em;
|
||||||
font-weight: 300;
|
|
||||||
max-width: 980px;
|
max-width: 980px;
|
||||||
padding: 1.5em 1.75em 0.5em 1.75em;
|
padding: 1.5em 1.75em 0.5em 1.75em;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
margin: 0 0 0.6em 0;
|
margin: 0 0 0.6em 0;
|
||||||
font-size: 1.4em;
|
font-size: 1.6em;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
|
|
||||||
@ -25,7 +24,7 @@ main#home {
|
|||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
margin: 0.6em 0;
|
margin: 0.6em 0;
|
||||||
font-size: 1.2em;
|
font-size: 1.3em;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
@ -98,6 +97,16 @@ main#home {
|
|||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
padding: 1.2em 1.2em 0.2em 1.2em;
|
padding: 1.2em 1.2em 0.2em 1.2em;
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.3em;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1.1em;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
img#me {
|
img#me {
|
||||||
width: 85px;
|
width: 85px;
|
||||||
height: 85px;
|
height: 85px;
|
||||||
|
@ -152,12 +152,17 @@ main#single {
|
|||||||
color: $color-medium;
|
color: $color-medium;
|
||||||
font-size: 0.85em;
|
font-size: 0.85em;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
letter-spacing: 0.08em;
|
letter-spacing: 0.075em;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span.dot {
|
||||||
|
margin: 0 0.1em;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
ul#tags {
|
ul#tags {
|
||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -165,7 +170,7 @@ main#single {
|
|||||||
|
|
||||||
li {
|
li {
|
||||||
display: inline;
|
display: inline;
|
||||||
margin: 0 0.7em;
|
margin: 0 0.8em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.15em;
|
letter-spacing: 0.15em;
|
||||||
}
|
}
|
||||||
@ -182,8 +187,22 @@ main#single {
|
|||||||
padding: 0.8em 1.5em;
|
padding: 0.8em 1.5em;
|
||||||
|
|
||||||
article {
|
article {
|
||||||
div#meta h1 {
|
div#meta{
|
||||||
font-size: 1.7em;
|
h1 {
|
||||||
|
font-size: 1.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div#byline {
|
||||||
|
// hide "Improve Post" link on mobile
|
||||||
|
span#edit {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
// less space between tags
|
||||||
|
ul#tags li {
|
||||||
|
margin: 0 0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,15 +4,13 @@
|
|||||||
<div id="meta">
|
<div id="meta">
|
||||||
<h1><a href="{{ .Permalink }}" class="no-underline">{{ .Title }}</a></h1>
|
<h1><a href="{{ .Permalink }}" class="no-underline">{{ .Title }}</a></h1>
|
||||||
<div id="byline">
|
<div id="byline">
|
||||||
by <a class="no-underline" href="{{ .Site.BaseURL }}" rel="me author">{{ .Site.Author.name }}</a>
|
<span id="author">by <a class="no-underline" href="{{ .Site.BaseURL }}" rel="me author">{{ .Site.Author.name }}</a></span>
|
||||||
· <a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}">{{ .Date.Format "January 2, 2006" }}</a>
|
<span id="date"><span class="dot">·</span> <a class="no-underline" href="{{ .Permalink }}" title="{{ .Date.Format "Mon, Jan 2 2006 3:04:05 PM MST" }}">{{ .Date.Format "January 2, 2006" }}</a></span>
|
||||||
{{ with .Site.Params.gitRepo }}· <a class="no-underline" href="{{ . }}/blob/master/content/{{ $.File.Path }}" title="Edit this page on GitHub" target="_blank" rel="noopener">Improve Post</a>{{ end }}
|
{{ with .Site.Params.gitRepo }}<span id="edit"><span class="dot">·</span> <a class="no-underline" href="{{ . }}/blob/master/content/{{ $.File.Path }}" title="Edit this page on GitHub" target="_blank" rel="noopener">Improve Post</a></span>{{ end }}
|
||||||
<ul id="tags">
|
<ul id="tags">
|
||||||
{{- with .Params.tags }}
|
{{- with .Params.tags }}{{ range . }}
|
||||||
{{- range . }}
|
|
||||||
<li>{{ . }}</li>
|
<li>{{ . }}</li>
|
||||||
{{- end }}
|
{{- end }}{{ end }}
|
||||||
{{- end }}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
# Sensible default security headers
|
# Sensible default security headers
|
||||||
# - More info: https://scotthelme.co.uk/hardening-your-http-response-headers/
|
# - More info: https://scotthelme.co.uk/hardening-your-http-response-headers/
|
||||||
# - Test website: https://securityheaders.com/
|
# - Test website: https://securityheaders.com/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Referrer-Policy: strict-origin-when-cross-origin
|
Referrer-Policy: strict-origin-when-cross-origin
|
||||||
X-Content-Type-Options: nosniff
|
X-Content-Type-Options: nosniff
|
||||||
X-Frame-Options: sameorigin
|
X-Frame-Options: sameorigin
|
||||||
X-XSS-Protection: 1; mode=block
|
X-XSS-Protection: 1; mode=block
|
||||||
|
|
||||||
|
# Super long cache for web fonts (one year)
|
||||||
|
/fonts/*
|
||||||
|
Cache-Control: max-age=31536000, public, immutable, no-transform
|
||||||
|
|
||||||
# Recommended MIME type for PWA manifests
|
# Recommended MIME type for PWA manifests
|
||||||
# https://github.com/w3c/manifest/issues/689
|
# https://github.com/w3c/manifest/issues/689
|
||||||
|
|
||||||
/manifest.json
|
/manifest.json
|
||||||
Content-Type: application/manifest+json; charset=UTF-8
|
Content-Type: application/manifest+json; charset=UTF-8
|
||||||
/*.webmanifest
|
/*.webmanifest
|
||||||
|
@ -9,6 +9,9 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
<meta name="apple-mobile-web-app-status-bar-style" content="default">
|
||||||
<meta name="apple-mobile-web-app-title" content="{{ .Site.Title }}">
|
<meta name="apple-mobile-web-app-title" content="{{ .Site.Title }}">
|
||||||
<meta name="theme-color" content="#0e6dc2">
|
<meta name="theme-color" content="#0e6dc2">
|
||||||
|
<link rel="preload" href="{{ "fonts/roboto-latin-regular.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
|
||||||
|
<link rel="preload" href="{{ "fonts/roboto-latin-medium.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
|
||||||
|
<link rel="preload" href="{{ "fonts/roboto-latin-bold.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
|
||||||
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS (dict "targetPath" "style.css") }}
|
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS (dict "targetPath" "style.css") }}
|
||||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||||
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
|
||||||
|
@ -25,6 +25,9 @@
|
|||||||
[context.deploy-preview]
|
[context.deploy-preview]
|
||||||
command = "yarn build:preview"
|
command = "yarn build:preview"
|
||||||
|
|
||||||
|
[context.branch-deploy]
|
||||||
|
command = "yarn build:preview"
|
||||||
|
|
||||||
|
|
||||||
# The most important headers and redirects are specified in the _headers and
|
# The most important headers and redirects are specified in the _headers and
|
||||||
# _redirects files generated by Hugo. These are additional custom rules.
|
# _redirects files generated by Hugo. These are additional custom rules.
|
||||||
|
BIN
static/fonts/roboto-latin-bold.eot
Normal file
BIN
static/fonts/roboto-latin-bold.eot
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-bold.ttf
Normal file
BIN
static/fonts/roboto-latin-bold.ttf
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-bold.woff
Normal file
BIN
static/fonts/roboto-latin-bold.woff
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-bold.woff2
Normal file
BIN
static/fonts/roboto-latin-bold.woff2
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-medium.eot
Normal file
BIN
static/fonts/roboto-latin-medium.eot
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-medium.ttf
Normal file
BIN
static/fonts/roboto-latin-medium.ttf
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-medium.woff
Normal file
BIN
static/fonts/roboto-latin-medium.woff
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-medium.woff2
Normal file
BIN
static/fonts/roboto-latin-medium.woff2
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-regular.eot
Normal file
BIN
static/fonts/roboto-latin-regular.eot
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-regular.ttf
Normal file
BIN
static/fonts/roboto-latin-regular.ttf
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-regular.woff
Normal file
BIN
static/fonts/roboto-latin-regular.woff
Normal file
Binary file not shown.
BIN
static/fonts/roboto-latin-regular.woff2
Normal file
BIN
static/fonts/roboto-latin-regular.woff2
Normal file
Binary file not shown.
Reference in New Issue
Block a user