1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 05:18:28 -04:00

fix lighthouse suggestions: syntax color contrast & crossorigin preloads

This commit is contained in:
Jake Jarvis 2020-03-30 16:46:59 -04:00
parent fa018564e5
commit 0ee3efdbbe
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
6 changed files with 23 additions and 22 deletions

View File

@ -23,7 +23,6 @@ $link-underline-size: 2px;
// Global Colors
$color-background: #ffffff;
$color-gray-background: #fbfbfb;
$color-text: #202020;
$color-medium-dark: #494949;
$color-medium: #5e5e5e;
@ -31,6 +30,7 @@ $color-medium-light: #757575;
$color-light: #d2d2d2;
$color-kinda-light: #e3e3e3;
$color-super-light: #f4f4f4;
$color-super-duper-light: #fbfbfb;
$color-links: #0e6dc2;
// For nifty color swapping on svg logo hover in components/_header.scss

View File

@ -5,7 +5,7 @@ body {
width: 100%;
height: 100%;
margin: 0 auto;
background-color: $color-gray-background; // really just the color of header & footer
background-color: $color-super-duper-light; // really just the color of header & footer
color: $color-text;
font-family: $webfont-sans;
font-kerning: normal;
@ -54,7 +54,7 @@ hr {
// all code
code {
font-family: $webfont-mono;
background: $color-super-light;
background: $color-super-duper-light;
font-size: 0.95em;
letter-spacing: 0;
page-break-inside: avoid;
@ -66,7 +66,7 @@ code {
// code fences
div.highlight {
background: $color-super-light;
background: $color-super-duper-light;
border: 1px solid $color-light;
border-left: 3px solid $color-links;
line-height: 1.6;

View File

@ -9,7 +9,7 @@ div.highlight span {
color: #111111;
}
&.na, &.nc, &.nd, &.ne, &.nf, &.nx {
color: #489c44;
color: #068200;
}
&.err, &.nt, &.o, &.ow, &.kn {
color: #e8003d;
@ -18,7 +18,7 @@ div.highlight span {
color: #8145ec;
}
&.ld, &.s, &.sa, &.sb, &.sc, &.dl, &.sd, &.s2, &.sh, &.si, &.sx, &.sr, &.s1, &.ss {
color: #c17005;
color: #b35c00;
}
&.c, &.ch, &.cm, &.c1, &.cs, &.cp, &.cpf {
color: #6b6859;

View File

@ -1,10 +1,12 @@
{{ if eq hugo.Environment "production" }}
<link rel="preconnect" href="https://s.jarv.is">
{{ if and .IsPage (eq .Type "notes") }}
<link rel="preconnect" href="https://utteranc.es">
{{ end }}
<link rel="preconnect" href="https://s.jarv.is" crossorigin="anonymous">
{{ if and .IsPage (eq .Type "notes") }}
<link rel="preconnect" href="https://utteranc.es" crossorigin="anonymous">
<link rel="preconnect" href="https://api.utteranc.es" crossorigin="anonymous">
<link rel="preconnect" href="https://api.github.com" crossorigin="anonymous">
{{ end }}
{{ end }}
<link rel="preload" href="{{ "fonts/inter-regular-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/inter-medium-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/inter-bold-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/inter-regular-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="{{ "fonts/inter-medium-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin="anonymous">
<link rel="preload" href="{{ "fonts/inter-bold-subset.woff2" | absURL }}" as="font" type="font/woff2" crossorigin="anonymous">

View File

@ -1,2 +1,2 @@
<script data-skip-dnt="true" async defer src="https://s.jarv.is/app.js"></script>
<script async defer src="https://s.jarv.is/app.js" data-skip-dnt="true"></script>
<noscript><img src="https://s.jarv.is/image.gif" alt=""></noscript>

View File

@ -1,8 +1,7 @@
<script src="https://utteranc.es/client.js"
repo="{{ .Site.Params.utterancesRepo }}"
issue-term="og:title"
label="comments"
theme="github-light"
crossorigin="anonymous"
async defer>
</script>
<script async defer
src="https://utteranc.es/client.js"
data-repo="{{ .Site.Params.utterancesRepo }}"
data-issue-term="og:title"
data-label="comments"
data-theme="github-light"
crossorigin="anonymous"></script>