diff options
author | Gökmen Görgen <gkmngrgn@gmail.com> | 2021-06-13 02:48:41 +0300 |
---|---|---|
committer | Gökmen Görgen <gkmngrgn@gmail.com> | 2021-06-13 02:48:41 +0300 |
commit | e7e9c2859a1b6a1db6f0d41be1097269c7e602ac (patch) | |
tree | c85f369ec7219fdcd0d884e79dbf0d266c8e4a19 | |
parent | fa59522f29b905c6655a2810494490ff58988fa4 (diff) |
fix bootstrap v5 problems.
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 10 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 | ||||
-rw-r--r-- | layouts/partials/header_extra.html | 9 | ||||
-rw-r--r-- | static/css/highlight.css | 2 | ||||
-rw-r--r-- | static/css/main.css | 4 |
6 files changed, 17 insertions, 13 deletions
@@ -62,6 +62,9 @@ or keep your theme in the old version. ## Typography +You can customize the fonts copying and editing `header_extra.html` +file. The defaults are: + * Title: Merriweather Sans * Content: Merriweather * Code: Fira Code diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index cfeac80..5746e70 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -40,13 +40,7 @@ <link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css" /> {{ if .Site.Params.highlightjs }} - <style> - @import url(https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/styles/github.min.css); - - @media (prefers-color-scheme: dark) { - @import url(https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/styles/tomorrow-night-bright.min.css); - } - </style> + <link rel="stylesheet" href="{{ .Site.BaseURL }}css/highlight.css" /> {{ end }} {{ if .Site.Params.progressively }} @@ -60,7 +54,7 @@ href="{{ if .Site.Params.faviconfile }}{{ .Site.Params.faviconfile | absURL }}{{ else }}{{ .Site.BaseURL }}img/favicon.ico{{ end }}"> <link href='{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}' rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> - <link href="//fonts.googleapis.com/css?family=Fira+Code|Merriweather+Sans:400,700|Merriweather:400,700&display=swap" rel="stylesheet"> + {{ partial "header_extra" . }} </head> <body> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 4c1cd5c..d2a4684 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -11,7 +11,7 @@ {{ end }} </div> <div class="col-auto align-self-center mr-auto"> - <a href="{{ .Site.Home.Permalink }}"> + <a class="text-decoration-none" href="{{ .Site.Home.Permalink }}"> <h1 class="font-weight-bold name"> {{ .Site.Title }} </h1> diff --git a/layouts/partials/header_extra.html b/layouts/partials/header_extra.html new file mode 100644 index 0000000..5dfd14d --- /dev/null +++ b/layouts/partials/header_extra.html @@ -0,0 +1,9 @@ +<link href="//fonts.googleapis.com/css?family=Fira+Code|Merriweather+Sans:400,700|Merriweather:400,700&display=swap" rel="stylesheet"> + +<style> + :root { + --font-code: "Fira Code", monospace; + --font-content: "Merriweather", serif; + --font-title: "Merriweather Sans", sans-serif; + } +</style> diff --git a/static/css/highlight.css b/static/css/highlight.css new file mode 100644 index 0000000..893ec6c --- /dev/null +++ b/static/css/highlight.css @@ -0,0 +1,2 @@ +@import "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/styles/github.min.css"; +@import "https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.0.1/build/styles/tomorrow-night-bright.min.css" screen and (prefers-color-scheme: dark); diff --git a/static/css/main.css b/static/css/main.css index 23a9466..c6eb4cf 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -10,10 +10,6 @@ --color-patreon: #dc3545; --color-ko-fi: #dc3545; --color-bmc: #dc3545; - - --font-code: "Fira Code", monospace; - --font-content: "Merriweather", serif; - --font-title: "Merriweather Sans", sans-serif; } .badge-info { |