diff options
author | frosty <passedgoandgot200@disroot.org> | 2025-06-17 04:38:15 -0400 |
---|---|---|
committer | frosty <passedgoandgot200@disroot.org> | 2025-06-17 04:38:15 -0400 |
commit | 61fbce70abd2cafaef960f5e787a97a3a828d74e (patch) | |
tree | 5d49885a2f1f0254075d3dae96faf00b50ccfd5e /themes | |
parent | 91408bd3d594ca341f8c27b6b4d7403b564f4d38 (diff) |
remove static fonts, update posts, clean up layout
Diffstat (limited to 'themes')
-rw-r--r-- | themes/polaris/assets/css/noto-serif.css | 179 | ||||
-rw-r--r-- | themes/polaris/assets/css/style.css | 80 | ||||
-rw-r--r-- | themes/polaris/layouts/_default/baseof.html | 19 | ||||
-rw-r--r-- | themes/polaris/layouts/_default/single.html | 2 | ||||
-rw-r--r-- | themes/polaris/layouts/partials/header.html | 20 | ||||
-rw-r--r-- | themes/polaris/layouts/partials/nav.html | 29 | ||||
-rw-r--r-- | themes/polaris/layouts/partials/toc.html | 6 |
7 files changed, 85 insertions, 250 deletions
diff --git a/themes/polaris/assets/css/noto-serif.css b/themes/polaris/assets/css/noto-serif.css deleted file mode 100644 index f902c5e..0000000 --- a/themes/polaris/assets/css/noto-serif.css +++ /dev/null @@ -1,179 +0,0 @@ -/* noto-serif-100 - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 100; - src: url('../fonts/noto-serif-v30-latin-100.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-100.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-100italic - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 100; - src: url('../fonts/noto-serif-v30-latin-100italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-100italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-200 - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 200; - src: url('../fonts/noto-serif-v30-latin-200.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-200.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-200italic - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 200; - src: url('../fonts/noto-serif-v30-latin-200italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-200italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-300 - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 300; - src: url('../fonts/noto-serif-v30-latin-300.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-300.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-300italic - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 300; - src: url('../fonts/noto-serif-v30-latin-300italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-300italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-regular - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 400; - src: url('../fonts/noto-serif-v30-latin-regular.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-regular.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-italic - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 400; - src: url('../fonts/noto-serif-v30-latin-italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-500 - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 500; - src: url('../fonts/noto-serif-v30-latin-500.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-500.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-500italic - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 500; - src: url('../fonts/noto-serif-v30-latin-500italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-500italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-600 - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 600; - src: url('../fonts/noto-serif-v30-latin-600.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-600.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-600italic - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 600; - src: url('../fonts/noto-serif-v30-latin-600italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-600italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-700 - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 700; - src: url('../fonts/noto-serif-v30-latin-700.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-700.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-700italic - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 700; - src: url('../fonts/noto-serif-v30-latin-700italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-700italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-800 - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 800; - src: url('../fonts/noto-serif-v30-latin-800.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-800.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-800italic - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 800; - src: url('../fonts/noto-serif-v30-latin-800italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-800italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-900 - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: normal; - font-weight: 900; - src: url('../fonts/noto-serif-v30-latin-900.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-900.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} - -/* noto-serif-900italic - latin */ -@font-face { - font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */ - font-family: 'Noto Serif'; - font-style: italic; - font-weight: 900; - src: url('../fonts/noto-serif-v30-latin-900italic.woff2') format('woff2'), /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ - url('../fonts/noto-serif-v30-latin-900italic.ttf') format('truetype'); /* Chrome 4+, Firefox 3.5+, IE 9+, Safari 3.1+, iOS 4.2+, Android Browser 2.2+ */ -} diff --git a/themes/polaris/assets/css/style.css b/themes/polaris/assets/css/style.css index 230e5b8..2ca94ef 100644 --- a/themes/polaris/assets/css/style.css +++ b/themes/polaris/assets/css/style.css @@ -7,8 +7,8 @@ --nav-active-background: #eeeeee; --nav-active-foreground: #1a1a1a; --hr-background: #8a8a8a; - --sans-serif-font: Noto Serif, -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif; - --serif-font: Noto Serif, Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; + --sans-serif-font: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif; + --serif-font: Iowan Old Style, Apple Garamond, Baskerville, Times New Roman, Droid Serif, Times, Source Serif Pro, serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; --mono-font: monospace; } @@ -19,8 +19,9 @@ body { font-family: var(--sans-serif-font); } -h1, h2, h3, h4, h5, h6 { - font-family: var(--serif-font); +.content h1, .content h2, .content h3 { + padding-bottom: 4px; + border-bottom: 1px #555555 solid; } a { @@ -32,99 +33,99 @@ a:hover { text-decoration: underline; } -.nav-over, main, footer { +.header, .content { max-width: 1000px; margin: 0 auto; } @media only screen and (max-width: 1100px) { - .nav-over, main, footer { + .header, .content { max-width: 800px; } } @media only screen and (max-width: 900px) { - .nav-over, main, footer { + .header, .content { max-width: 700px; } } @media only screen and (max-width: 750px) { - .nav-over, main, footer { + .header, .content { max-width: none; } - .nav-title, main, footer { + .header-top, .content { margin: 0 16px; } - .nav-title h2 { + .header-title { display: block; } } -.nav-under { - background-color: var(--nav-background); - padding: 4px 0; +.header-bottom { + height: 4px; + background: var(--nav-background); } -.nav-title h2 { +.header-title { display: inline-block; margin-top: 0; margin-bottom: 0; } -.nav-title { +.header-top { padding: 16px 0; } -.nav-subtext { +.header-subtext { margin-left: 16px; color: #999999; font-style: italic; } -.nav-over ul { +.header-items { list-style-type: none; margin: 0; padding-left: 0; overflow: hidden; } -.nav-link { +.header-item a { background-color: var(--nav-background); color: var(--nav-foreground); display: block; padding: 8px 12px; } -.link-active { +.header-item-active a { background-color: var(--nav-active-background); color: var(--nav-active-foreground); } -.link-left { +.header-item-left { float: left; } -.link-right { +.header-item-right { float: right; } @media only screen and (max-width: 400px) { - .link-left, .link-right { + .header-item-left, .header-item-right { float: none; } - .nav-under { + .header-bottom { display: none; } - .nav-title h2 { + .header-title { display: block; } - .nav-subtext { + .header-subtext { margin-left: 0; } } @@ -135,27 +136,26 @@ hr { border: none; } -footer { - text-align: center; -} - -.footer-break { - width: 120px; +pre { + padding: 8px; + white-space: pre-wrap; } -.build-date { - font-style: italic; +code { + font-size: 110%; } -.badge { - image-rendering: crisp-edges; +.toc { + background: #101010; + padding: 8px; } -pre { - padding: 8px; - white-space: pre-wrap; +.toc h2 { + margin-top: 0; + margin-bottom: 0; } -code { - font-size: 110%; +.toc > nav > ol { + margin-top: 8px; + margin-bottom: 0; } diff --git a/themes/polaris/layouts/_default/baseof.html b/themes/polaris/layouts/_default/baseof.html index 37a6059..3c052ea 100644 --- a/themes/polaris/layouts/_default/baseof.html +++ b/themes/polaris/layouts/_default/baseof.html @@ -11,30 +11,21 @@ <meta charset="utf-8"> <title>{{ $pageTitle }}</title> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="icon" href="{{ .Site.Params.iconURL }}"> - {{ with resources.Get "css/noto-serif.css" | minify | fingerprint }} - <link rel="stylesheet" href="{{ .Permalink }}"> - {{ end }} {{ with resources.Get "css/style.css" | minify | fingerprint }} - <link rel="stylesheet" href="{{ .Permalink }}"> + <link rel="stylesheet" href="{{ .Permalink }}"> {{ end }} <meta property="og:title" content="{{ $pageTitle }}"> <meta property="og:url" content="{{ .Page.RelPermalink }}"> - <meta property="og:image" content="{{ .Site.Params.iconURL }}"> <meta property="og:site_name" content="{{ .Site.Title }}"> <meta property="og:description" content="{{ .Site.Params.subtext }}"> </head> <body> - <nav> - {{ partial "nav.html" . }} - </nav> - <main> + {{ partial "header.html" . }} + <div class="content"> {{ block "main" . }} - {{ .Content }} + {{ . }} {{ end }} - </main> - <footer> {{ partial "footer.html" . }} - </footer> + </div> </body> </html> diff --git a/themes/polaris/layouts/_default/single.html b/themes/polaris/layouts/_default/single.html index 56b9d9d..f059c55 100644 --- a/themes/polaris/layouts/_default/single.html +++ b/themes/polaris/layouts/_default/single.html @@ -8,7 +8,7 @@ {{ end }} {{ end }} {{ if or (eq .Section "posts") (.Params.toc) }} - {{ with .TableOfContents }}{{ . }}{{ end }} + {{ partial "toc.html" . }} {{ end }} {{ .Content }} {{ end }} diff --git a/themes/polaris/layouts/partials/header.html b/themes/polaris/layouts/partials/header.html new file mode 100644 index 0000000..5e34bda --- /dev/null +++ b/themes/polaris/layouts/partials/header.html @@ -0,0 +1,20 @@ +<div class="header"> + <div class="header-top"> + <h2 class="header-title"><a href="/">{{ site.Title }}</a></h2> + <span class="header-subtext">{{ .Params.subtext | default .Site.Params.subtext }}</span> + </div> + <ul class="header-items"> + {{ $currentPage := . }} + {{ range .Site.Menus.left_nav }} + <li class="header-item header-item-left {{ if $currentPage.IsMenuCurrent "left_nav" . }} header-item-active {{ end }}"> + <a href="{{ .URL }}">{{ .Name }}</a> + </li> + {{ end }} + {{ range .Site.Menus.right_nav }} + <li class="header-item header-item-right {{ if $currentPage.IsMenuCurrent "right_nav" . }} header-item-active {{ end }}"> + <a href="{{ .URL }}">{{ .Name }}</a> + </li> + {{ end }} + </ul> +</div> +<div class="header-bottom"></div> diff --git a/themes/polaris/layouts/partials/nav.html b/themes/polaris/layouts/partials/nav.html index dc1e463..35fb535 100644 --- a/themes/polaris/layouts/partials/nav.html +++ b/themes/polaris/layouts/partials/nav.html @@ -1,17 +1,14 @@ -<div class="nav-over"> - <div class="nav-title"> - <h2><a href="/">{{ site.Title }}</a></h2> - {{ $subtext := .Params.subtext | default .Site.Params.subtext }} - {{ with $subtext }}<span class="nav-subtext">{{ . }}</span>{{ end }} - </div> - <ul> - {{ $currentPage := . }} - {{ range site.Menus.left_nav }} - <li><a class="nav-link link-left {{ if $currentPage.IsMenuCurrent "left_nav" . }} link-active {{ end }}" href="{{ .URL }}">{{ .Name }}</a></li> - {{ end }} - {{ range site.Menus.right_nav }} - <li><a class="nav-link link-right {{ if $currentPage.IsMenuCurrent "right_nav" . }} link-active {{ end }}" href="{{ .URL }}">{{ .Name }}</a></li> - {{ end }} - </ul> +<div class="nav-title"> + <h2><a href="/">{{ site.Title }}</a></h2> + {{ $subtext := .Params.subtext | default .Site.Params.subtext }} + {{ with $subtext }}<span class="nav-subtext">{{ . }}</span>{{ end }} </div> -<div class="nav-under"></div> +<ul> + {{ $currentPage := . }} + {{ range site.Menus.left_nav }} + <li><a class="nav-link link-left {{ if $currentPage.IsMenuCurrent "left_nav" . }} link-active {{ end }}" href="{{ .URL }}">{{ .Name }}</a></li> + {{ end }} + {{ range site.Menus.right_nav }} + <li><a class="nav-link link-right {{ if $currentPage.IsMenuCurrent "right_nav" . }} link-active {{ end }}" href="{{ .URL }}">{{ .Name }}</a></li> + {{ end }} +</ul> diff --git a/themes/polaris/layouts/partials/toc.html b/themes/polaris/layouts/partials/toc.html new file mode 100644 index 0000000..5f286b5 --- /dev/null +++ b/themes/polaris/layouts/partials/toc.html @@ -0,0 +1,6 @@ +{{ with .TableOfContents }} + <div class="toc"> + <h2>Table of Contents</h2> + {{ . }} + </div> +{{ end }} |