From faa591e120d4e6f22c6772f3b1c7ec3c2d0ebe0b Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Tue, 18 Apr 2017 22:19:32 +0200 Subject: [PATCH] Add fonts asynchronousy and add all css inline --- layouts/partials/{ => css}/colors.css | 0 layouts/partials/{ => css}/highlight.min.css | 0 .../partials/css/main.css | 48 ++++++++++++++----- .../partials/css/min600px.css | 0 .../partials/css/min769px.css | 0 .../partials/{ => css}/progressively.min.css | 0 layouts/partials/footer_scripts.html | 9 ++++ layouts/partials/head_includes.html | 26 ++++++---- 8 files changed, 62 insertions(+), 21 deletions(-) rename layouts/partials/{ => css}/colors.css (100%) rename layouts/partials/{ => css}/highlight.min.css (100%) rename static/css/main.v1.0.0.css => layouts/partials/css/main.css (92%) rename static/css/min600px.v1.0.0.css => layouts/partials/css/min600px.css (100%) rename static/css/min769px.v1.0.0.css => layouts/partials/css/min769px.css (100%) rename layouts/partials/{ => css}/progressively.min.css (100%) diff --git a/layouts/partials/colors.css b/layouts/partials/css/colors.css similarity index 100% rename from layouts/partials/colors.css rename to layouts/partials/css/colors.css diff --git a/layouts/partials/highlight.min.css b/layouts/partials/css/highlight.min.css similarity index 100% rename from layouts/partials/highlight.min.css rename to layouts/partials/css/highlight.min.css diff --git a/static/css/main.v1.0.0.css b/layouts/partials/css/main.css similarity index 92% rename from static/css/main.v1.0.0.css rename to layouts/partials/css/main.css index 12d1d6b..cc177f6 100644 --- a/static/css/main.v1.0.0.css +++ b/layouts/partials/css/main.css @@ -1,6 +1,6 @@ @font-face { font-family: 'Nexa Bold'; - src: url('../fonts/Nexa Bold.otf'); + src: url('/fonts/Nexa Bold.otf'); } html, body, div, span, applet, object, iframe, @@ -82,8 +82,8 @@ body { justify-content: flex-start; width: 100%; min-height: 100%; - font-weight: 500; - font-family: 'Raleway', 'Helvetica Neue', 'Arial', sans-serif; + font-weight: 400; + font-family: 'Helvetica Neue', 'Arial', sans-serif; color: #111111; line-height: 1.6; text-rendering: optimizeLegibility !important; @@ -180,10 +180,10 @@ section.header nav ul a:last-child { } section.header nav ul li { color: #555555; - font-weight: 500; + font-weight: 400; font-size: 14px; text-transform: uppercase; - font-family: 'Raleway', 'Helvetica Neue', 'Arial', sans-serif; + font-family: 'Helvetica Neue', 'Arial', sans-serif; -webkit-transition: color 0.1s cubic-bezier(0.47, 0, 0.75, 0.72); -moz-transition: color 0.1s cubic-bezier(0.47, 0, 0.75, 0.72); -ms-transition: color 0.1s cubic-bezier(0.47, 0, 0.75, 0.72); @@ -266,10 +266,10 @@ section.main .content .posts { } section.main .content .page-heading { font-size: 20px; - font-family: 'Raleway', 'Helvetica Neue', 'Arial', sans-serif; + font-weight: 700; + font-family: 'Helvetica Neue', 'Arial', sans-serif; letter-spacing: -0.005rem; text-transform: uppercase; - font-weight: 700; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; font-smoothing: antialiased; @@ -355,8 +355,8 @@ section.main .container.f04 .content { } section.main .container.f04 .content .num { margin: 30px 0px 30px 0; - font-weight: 200; - font-family: 'Raleway', 'Helvetica Neue', 'Arial', sans-serif; + font-weight: 400; + font-family: 'Helvetica Neue', 'Arial', sans-serif; font-size: 50px; } section.main .container.f04 .content .detail { @@ -434,7 +434,7 @@ section.main .content .markdown { font-size: 1.1em; line-height: 1.75em; color: #313537; - font-family: 'Merriweather', sans-serif; + font-family: serif; font-weight: 300; } section.main .content .markdown h1, @@ -444,7 +444,7 @@ section.main .content .markdown h4, section.main .content .markdown h5, section.main .content .markdown h6 { font-size: 22px; - font-family: 'Raleway', 'Helvetica Neue', 'Arial', sans-serif; + font-family: 'Helvetica Neue', 'Arial', sans-serif; letter-spacing: -0.005rem; font-weight: 700; -moz-osx-font-smoothing: grayscale; @@ -475,7 +475,7 @@ section.main .content .markdown h6 { } section.main .content .markdown code, section.main .content .markdown pre { - font-family: 'Ubuntu Mono', 'Menlo', monospace; + font-family: 'Menlo', monospace; font-size: 0.98rem; background-color: #f7f7f7; } @@ -652,4 +652,28 @@ section.main .content .navigation a { text-align: center; font-style: italic; color: #313537; +} + +/* Fonts */ + +.wf-raleway-n4-active body, +.wf-raleway-n4-active section.header nav ul li, +.wf-raleway-n7-active section.main .content .page-heading, +.wf-raleway-n2-active section.main .container.f04 .content .num, +.wf-raleway-n7-active section.main .content .markdown h1, +.wf-raleway-n7-active section.main .content .markdown h2, +.wf-raleway-n7-active section.main .content .markdown h3, +.wf-raleway-n7-active section.main .content .markdown h4, +.wf-raleway-n7-active section.main .content .markdown h5, +.wf-raleway-n7-active section.main .content .markdown h6 { + font-family: 'Raleway'; +} + +.wf-merriweather-n3-active section.main .content .markdown { + font-family: 'Merriweather'; +} + +.wf-ubuntu-mono-n4-active section.main .content .markdown code, +.wf-ubuntu-mono-n4-active section.main .content .markdown pre { + font-family: 'Ubuntu Mono'; } \ No newline at end of file diff --git a/static/css/min600px.v1.0.0.css b/layouts/partials/css/min600px.css similarity index 100% rename from static/css/min600px.v1.0.0.css rename to layouts/partials/css/min600px.css diff --git a/static/css/min769px.v1.0.0.css b/layouts/partials/css/min769px.css similarity index 100% rename from static/css/min769px.v1.0.0.css rename to layouts/partials/css/min769px.css diff --git a/layouts/partials/progressively.min.css b/layouts/partials/css/progressively.min.css similarity index 100% rename from layouts/partials/progressively.min.css rename to layouts/partials/css/progressively.min.css diff --git a/layouts/partials/footer_scripts.html b/layouts/partials/footer_scripts.html index a868a01..506cd6d 100644 --- a/layouts/partials/footer_scripts.html +++ b/layouts/partials/footer_scripts.html @@ -1,3 +1,12 @@ + + + {{ if .Site.Params.highlightjs }} {{ range .Site.Params.highlightjslanguages }} diff --git a/layouts/partials/head_includes.html b/layouts/partials/head_includes.html index e661791..7b53092 100644 --- a/layouts/partials/head_includes.html +++ b/layouts/partials/head_includes.html @@ -1,28 +1,36 @@ - - - + + + - - - + {{ if .Site.Params.highlightjs }} {{ end }} {{ if .Site.Params.progressively }} {{ end }} {{ if .Site.Params.colors }} {{ end }}