From 3be1680484e6687afd0bffd41f2dd810babfe3ad Mon Sep 17 00:00:00 2001 From: Phil Bajsicki Date: Fri, 27 Sep 2024 15:36:01 +0200 Subject: [PATCH] Personal changes, dark theme, less whitespace --- assets/scss/components/brand.scss | 6 +-- assets/scss/components/code-highlight.scss | 6 +-- assets/scss/general.scss | 33 +++++++++++--- assets/scss/pages/footer.scss | 2 +- assets/scss/tufte.scss | 51 ++++++++++++++-------- layouts/_default/single.html | 3 +- layouts/index.html | 15 ++++--- layouts/partials/content.header.html | 4 ++ 8 files changed, 80 insertions(+), 40 deletions(-) diff --git a/assets/scss/components/brand.scss b/assets/scss/components/brand.scss index 7fdb514..0fb36fa 100644 --- a/assets/scss/components/brand.scss +++ b/assets/scss/components/brand.scss @@ -1,4 +1,4 @@ -.brand { - padding-top: 1rem; - padding-bottom: 1rem; +n.brand { + padding-top: 0rem; + padding-bottom: 0rem; } diff --git a/assets/scss/components/code-highlight.scss b/assets/scss/components/code-highlight.scss index 305457f..495bedb 100644 --- a/assets/scss/components/code-highlight.scss +++ b/assets/scss/components/code-highlight.scss @@ -3,8 +3,8 @@ $ht-code-border-radius: .4em; width: 50%; overflow-x: scroll; // border-radius: $ht-code-border-radius; - margin-top: 1.4em; - margin-bottom: 1.4em; + margin-top: 0em; + margin-bottom: 0em; margin-right: 2.5%; margin-left: 2.5%; -ms-overflow-style: none; @@ -33,7 +33,7 @@ $ht-code-border-radius: .4em; font-family: inherit; position: absolute; left: 0; - color: #111; + color: #ddd; } } diff --git a/assets/scss/general.scss b/assets/scss/general.scss index c8c3d11..172869e 100644 --- a/assets/scss/general.scss +++ b/assets/scss/general.scss @@ -19,8 +19,8 @@ } ::selection { - color: #fffff8; - background-color: #404040; + color: #151515; + background-color: #ddd; } a.heading-anchor { @@ -29,7 +29,7 @@ a.heading-anchor { } h2 { - margin-top: 5.5rem; + margin-top: 1.5rem; } h2:hover > a.heading-anchor, @@ -46,18 +46,18 @@ hr { width: 75%; max-width: 45rem; border-style: solid none none none; - border-color: #111; + border-color: #ddd; } kbd { - border: 1px #111 solid; + border: 1px #ddd solid; border-radius: 5px; padding-right: 2px; padding-left: 2px; } mark { - background: #f0d9bb; + background: #ddd; } /* ------------------------------------------------------------------------ */ @@ -91,7 +91,7 @@ table:not(.lntable) { } table:not(.lntable) tr th { - border-bottom: 1px solid #111; + border-bottom: 1px solid #ddd; text-transform: uppercase; } @@ -168,8 +168,27 @@ mjx-container[jax="CHTML"][display="true"], .sidenote code, .marginnote code { font-size: 0.9rem; + padding-left: 10px; + padding-right: 10px; + margin-top: -0.5em; + margin-bottom: -0.5em; } +code { + background-color:#282a36; + border-radius: 5px; + display: inline-block; + padding-left: 4px; + padding-right: 4px; +} + +pre code { + position: absolute; + background-color: #282a36; + padding: 16px; +} + + /* ------------------------------------------------------------------------ */ /* Styling & fixes for cols. */ /* ------------------------------------------------------------------------ */ diff --git a/assets/scss/pages/footer.scss b/assets/scss/pages/footer.scss index 927c9ab..8e02ffc 100644 --- a/assets/scss/pages/footer.scss +++ b/assets/scss/pages/footer.scss @@ -12,7 +12,7 @@ footer.page-footer p { /*font-weight: lighter;*/ } footer.page-footer a { - color: rgba(65, 70, 75, 1); + color: #ddd ; text-decoration: none; background: transparent; } diff --git a/assets/scss/tufte.scss b/assets/scss/tufte.scss index a701941..4fcc04e 100644 --- a/assets/scss/tufte.scss +++ b/assets/scss/tufte.scss @@ -66,10 +66,10 @@ html { body { margin-left: auto; margin-right: auto; - padding-left: 12.5%; + padding-left: 5%; font-family: $serif-fonts; - background-color: #fffff8; - color: #111; + background-color: #151515; + color: #ddd; max-width: 1400px; } @@ -79,8 +79,8 @@ h1, h2, h3 { } h1 { - margin-top: 4rem; - margin-bottom: 1.5rem; + margin-top: 1rem; + margin-bottom: 1rem; font-size: 3.2rem; } @@ -90,7 +90,7 @@ h2, h3 { } h2 { - margin-top: 2.1rem; + margin-top: 1.2rem; font-size: 2.2rem; } @@ -125,12 +125,12 @@ h3 { article { position: relative; - padding: 5rem 0rem; + padding: 0rem 0rem; } section { - padding-top: 1rem; - padding-bottom: 1rem; + padding-top: 0rem; + padding-bottom: 0rem; } .page-list .content-title { @@ -150,9 +150,9 @@ dl { } p { - line-height: 2rem; - margin-top: 1.4rem; - margin-bottom: 1.4rem; + line-height: 1.75rem; + margin-top: 0.75rem; + margin-bottom: 0.75rem; padding-right: 0; vertical-align: baseline; hyphens: auto; @@ -265,14 +265,15 @@ img { .marginnote { float: right; clear: right; - margin-right: -60%; - width: 50%; + margin-left: 60%; + margin-right: -25%; + max-width: 100%; margin-top: 0; margin-bottom: 0; font-size: 1.1rem; line-height: 1.3; vertical-align: baseline; - position: relative; + position: absolute; } .table-caption { @@ -295,13 +296,27 @@ img { } // note indicator -label.marginnote-ind, label.sidenote-number { font-size: 1rem; top: -0.5rem; left: 0.1rem; } +label.marginnote-ind { + font-size: 5em; + line-height: 1.125; + float: right; + text-align: center; + width: 1.1em; + height: 1.1em; + margin-left: 10px; + margin-right: 20px; + border-color: #ddd; + border-style: solid; + border-width: 3px; + border-radius: 5px; +} + // inside sidenote span.marginnote-ind, span.sidenote-number { @@ -405,8 +420,8 @@ input.margin-toggle { opacity: 0; width: 1px; height: 1px; - margin-left: 5px; - margin-top: 5px; + // margin-left: 5px; + // margin-top: 5px; z-index: -100; } diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 8179450..f0eff85 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,11 +1,12 @@ {{/* - This template render single pages +This template render single pages */}} {{ define "main" }}
+ {{ partial "brand.html" . }} {{ partial "content.header.html" . }} {{ partial "toc.html" . }}
{{ .Content }}
diff --git a/layouts/index.html b/layouts/index.html index ba63012..43c816c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -3,14 +3,15 @@ {{ partial "brand.html" . }} {{ with .Content }}
- {{ . }} + {{ . }}
-{{ end }} -
-{{ $pgFilter1 := where .Site.RegularPages "Draft" false }} -{{ $pgFilter2 := where .Site.RegularPages "Params.date" "!=" nil }} -{{ $pgFilter := $pgFilter1 | intersect $pgFilter2 }} -{{ range (.Paginate $pgFilter).Pages }} + {{ end }} +
+ {{ $pgFilter1 := where .Site.RegularPages "Draft" false }} + {{ $pgFilter2 := where .Site.RegularPages "Params.date" "!=" nil }} + {{ $pgFilter3 := where .Site.RegularPages "Params.hidefromhome" "!=" true }} + {{ $pgFilter := $pgFilter1 | intersect $pgFilter2 | intersect $pgFilter3}} + {{ range (.Paginate $pgFilter).Pages }}

{{ if .IsNode }} {{ .Title}} diff --git a/layouts/partials/content.header.html b/layouts/partials/content.header.html index d31ebe7..6807268 100644 --- a/layouts/partials/content.header.html +++ b/layouts/partials/content.header.html @@ -23,6 +23,10 @@ {{- range .Params.tags -}} {{ . }}  {{- end -}} + + {{- range .Params.categories -}} + @{{ . }}  + {{- end -}} {{- end -}}