Implemented fixed site header.
h3rald h3rald@h3rald.com
Mon, 19 Feb 2024 13:52:14 +0100
6 files changed,
62 insertions(+),
27 deletions(-)
M
assets/styles/style.css
→
assets/styles/style.css
@@ -349,6 +349,33 @@ font-style: italic;
cursor: pointer; } +/** Fixed header **/ + +#theme-switcher~label, +#theme-switcher { + position: fixed; + right: 0; + top: 0; + left: 0; + background-color: var(--primary-background); +} + +.main-header { + position: fixed; + top: 28px; + right: 0; + left: 0; + padding: 0 8px; + background-color: var(--primary-background); + box-shadow: 0 16px 16px -16px #000; +} + +.main-content { + margin-top: 20px; +} + +/* End fixed header */ + .main-header { display: flex; flex-direction: row;
M
rules.min
→
rules.min
@@ -240,31 +240,39 @@ ) ^process-css-asset
;;;;; MAIN ;;;;; -;#| -; Process all contents -contents ( - :content - (((content 'draft dhas? not) (content 'content-type dhas?)) &&) - ( - content /id :id - (content /content-type "project" ==) (content PROJECTS append @PROJECTS) when - content - ;"." print! - process-timestamp - process-content - @content - (id "index" !=) (content output-fwrite) when - ) when -) foreach -"" puts! +true :enable-content-processing -; Create aggregator pages -create-projects-page -create-articles-page +(opts 'no-contents dhas?) + (false @enable-content-processing) +when -; Generate home page -generate-home -;|# +(enable-content-processing) +( + ; Process all contents + contents ( + :content + (((content 'draft dhas? not) (content 'content-type dhas?)) &&) + ( + content /id :id + (content /content-type "project" ==) (content PROJECTS append @PROJECTS) when + content + ;"." print! + process-timestamp + process-content + @content + (id "index" !=) (content output-fwrite) when + ) when + ) foreach + "" puts! + + ; Create aggregator pages + create-projects-page + create-articles-page + + ; Generate home page + generate-home +) +when ; Process all assets. assets (
M
templates/home.mustache
→
templates/home.mustache
@@ -5,7 +5,7 @@ <body>
{{> _theme_switcher}} <div class="main container-fluid themed-content"> {{> _header}} - <div> + <div class="main-content"> <div class="row"> <div class="box content home-content"> <article class="page">
M
templates/page.mustache
→
templates/page.mustache
@@ -9,7 +9,7 @@ <div class="col-xs-12 sidebar">
{{> _header}} </div> </div> - <div class="row"> + <div class="row main-content"> <div class="col-xs-12"> <article class="{{content-type}} box content"> {{> _page_header}}
M
templates/project.mustache
→
templates/project.mustache
@@ -9,7 +9,7 @@ <div class="col-xs-12 sidebar">
{{> _header}} </div> </div> - <div class="row"> + <div class="row main-content"> <div class="col-xs-12"> <article class="{{content-type}} box content"> {{> _page_header}}
M
templates/projects.mustache
→
templates/projects.mustache
@@ -9,7 +9,7 @@ <div class="col-xs-12 sidebar">
{{> _header}} </div> </div> - <div class="row"> + <div class="row main-content"> <div class="col-xs-12"> <article class="{{content-type}} box content"> {{> _page_header}}