all repos — h3rald @ 72b94bd3d5124201e687ccaf716e3d2da514e657

The sources of https://h3rald.com

Updated font, implemented correct theme switching and helper classes.
h3rald h3rald@h3rald.com
Sun, 11 Feb 2024 10:37:19 +0100
commit

72b94bd3d5124201e687ccaf716e3d2da514e657

parent

7c3f3904302477abacbd4ad8e92d601efc414cfb

M assets/styles/fonts.cssassets/styles/fonts.css

@@ -1,30 +1,31 @@

@font-face { - font-family: 'Calendas Plus'; - src: url('../fonts/calendas_plus.woff2') format('woff2'); + font-family: 'Noway'; + src: url('../fonts/noway_light-webfont.woff2') format('woff2'); font-weight: normal; font-style: normal; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - font-variant-ligatures: normal; +} + +@font-face { + font-family: 'Noway'; + src: url('../fonts/noway_light_italic-webfont.woff2') format('woff2'); + font-weight: normal; + font-style: italic; } + @font-face { - font-family: 'Calendas Plus'; - src: url('../fonts/calendas_plus_bold.woff2') format('woff2'); + font-family: 'Noway'; + src: url('../fonts/noway_regular-webfont.woff2') format('woff2'); font-weight: bold; font-style: normal; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - font-variant-ligatures: normal; } + @font-face { - font-family: 'Calendas Plus'; - src: url('../fonts/calendas_plus_italic.woff2') format('woff2'); - font-weight: normal; + font-family: 'Noway'; + src: url('../fonts/noway_regular_italic-webfont.woff2') format('woff2'); + font-weight: bold; font-style: italic; - -webkit-font-smoothing: antialiased; - text-rendering: optimizeLegibility; - font-variant-ligatures: normal; } + @font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-Medium.woff2") format("woff2");
M assets/styles/style.cssassets/styles/style.css

@@ -10,6 +10,23 @@ --scale-factor: 1.3333;

--leading: 1.5rem; --letter-spacing: 0.05em; + --link-color: #e96363; + --link-hover-color: #ff6e6e; + + --heading-text-color: #dddada; + --primary-text-color: #c7c7c7; + --secondary-text-color: #e0e0e0; + + --primary-background: #1e1e1e; + --secondary-background: #262626; + + --success-color: #28b869; + --warning-color: #C97D05; + --error-color: #da3c3c; +} + + +#color-mode:checked~.themed-content { --link-color: #b73333; --link-hover-color: #653131;

@@ -25,37 +42,45 @@ --warning-color: #FFAF00;

--error-color: #DB141A; } - -#color-mode:checked~* { - --link-color: #e96363; - --link-hover-color: #ff6e6e; - - --heading-text-color: #dddada; - --primary-text-color: #c7c7c7; - --secondary-text-color: #e0e0e0; +/*.themed-content { + min-height: 100vh; +} +*/ - --primary-background: #1e1e1e; - --secondary-background: #262626; - - --success-color: #28b869; - --warning-color: #C97D05; - --error-color: #da3c3c; +.themed-content .light-mode-hide { + display: initial; } -.color-scheme-wrapper { - min-height: 100vh; +.themed-content .dark-mode-hide { + display: none; } -.light-mode-hide { +#color-mode:checked~.themed-content .light-mode-hide { display: none; } -.dark-mode-hide { +#color-mode:checked~.themed-content .dark-mode-hide { display: initial; } -@media (prefers-color-scheme: dark) { +@media (prefers-color-scheme: light) { :root { + --link-color: #b73333; + --link-hover-color: #653131; + + --heading-text-color: #222; + --primary-text-color: #444; + --secondary-text-color: #666; + + --primary-background: #fefefe; + --secondary-background: #f5f5f5; + + --success-color: #00B918; + --warning-color: #FFAF00; + --error-color: #DB141A; + } + + #color-mode:checked~.themed-content { --link-color: #e96363; --link-hover-color: #ff6e6e;

@@ -71,27 +96,19 @@ --warning-color: #C97D05;

--error-color: #da3c3c; } - #color-mode:checked~* { - --link-color: #b73333; - --link-hover-color: #653131; + .themed-content .dark-mode-hide { + display: initial; + } - --heading-text-color: #222; - --primary-text-color: #444; - --secondary-text-color: #666; - - --primary-background: #fefefe; - --secondary-background: #f5f5f5; - - --success-color: #00B918; - --warning-color: #FFAF00; - --error-color: #DB141A; + .themed-content .light-mode-hide { + display: none; } - .dark-mode-hide { + #color-mode:checked~.themed-content .dark-mode-hide { display: none; } - .light-mode-hide { + #color-mode:checked~.themed-content .light-mode-hide { display: initial; } }

@@ -103,7 +120,7 @@ line-height: var(--line-height);

} body { - font-family: 'Calendas Plus', serif; + font-family: 'Noway', sans-serif; font-feature-settings: "liga", "clig", "onum", "frac", "kern"; hyphens: auto; font-weight: 300;

@@ -253,7 +270,7 @@ em,

.primary-subtitle, .secondary-subtitle, .panel-header { - font-family: 'Calendas Plus', serif; + font-family: 'Noway', sans-serif; font-style: italic; font-feature-settings: "liga", "clig", "dlig", "onum", "frac", "kern"; }

@@ -263,7 +280,7 @@ h2,

h3, h4, h5 { - font-family: 'Calendas Plus', serif; + font-family: 'Noway', sans-serif; font-style: normal; font-feature-settings: "liga", "clig", "dlig", "onum", "frac", "kern"; }
M rules.minrules.min

@@ -220,6 +220,7 @@

;;;;; MAIN ;;;;; +#| ; Process all contents contents ( :content

@@ -245,6 +246,7 @@ create-articles-page

; Generate home page generate-home +|# ; Process all assets. assets (
M templates/_theme_switcher.mustachetemplates/_theme_switcher.mustache

@@ -1,5 +1,5 @@

<input id="color-mode" type="checkbox" name="color-mode"> - <label for="color-mode"> + <label for="color-mode" class="themed-content"> <span class="dark-mode-hide">Dark Mode</span> <span class="light-mode-hide">Light Mode</span> </label>
M templates/article.mustachetemplates/article.mustache

@@ -3,7 +3,7 @@ <html lang="en">

{{> _head}} <body> {{> _theme_switcher}} - <div class="main container-fluid color-scheme-wrapper"> + <div class="main container-fluid themed-content"> <div class="row"> <div class="col-xs-12 sidebar"> {{> _header}}
M templates/home.mustachetemplates/home.mustache

@@ -3,7 +3,7 @@ <html lang="en">

{{> _head}} <body> {{> _theme_switcher}} - <div class="main container-fluid color-scheme-wrapper"> + <div class="main container-fluid themed-content"> {{> _header}} <div> <div class="row">
M templates/page.mustachetemplates/page.mustache

@@ -3,7 +3,7 @@ <html lang="en">

{{> _head}} <body> {{> _theme_switcher}} - <div class="main container-fluid color-scheme-wrapper"> + <div class="main container-fluid themed-content"> <div class="row"> <div class="col-xs-12 sidebar"> {{> _header}}
M templates/project.mustachetemplates/project.mustache

@@ -3,7 +3,7 @@ <html lang="en">

{{> _head}} <body> {{> _theme_switcher}} - <div class="main container-fluid color-scheme-wrapper"> + <div class="main container-fluid themed-content"> <div class="row"> <div class="col-xs-12 sidebar"> {{> _header}}
M templates/projects.mustachetemplates/projects.mustache

@@ -3,7 +3,7 @@ <html lang="en">

{{> _head}} <body> {{> _theme_switcher}} - <div class="main container-fluid color-scheme-wrapper"> + <div class="main container-fluid themed-content"> <div class="row"> <div class="col-xs-12 sidebar"> {{> _header}}