From 08f406c44c861a914c8b63fab454250f8a4c4b36 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Wed, 20 Sep 2023 00:25:21 -0700 Subject: refactor nav, blocks, macros, templates. fix image shortcodes --- COPY-TO-ROOT-SASS/_extra.scss | 3 + COPY-TO-ROOT-SASS/abridge.scss | 8 +- config.toml | 24 +- content/_index.fr.md | 1 + content/_index.md | 1 + content/archive/_index.fr.md | 3 + content/archive/_index.md | 3 + content/blog/_index.fr.md | 5 + content/blog/_index.md | 5 + content/images/_index.md | 3 + content/images/ferris-gesture.svg | 1 + content/images/ferris.svg | 1 + content/overview-abridge/index.fr.md | 2 - content/overview-images/index.fr.md | 12 +- content/overview-images/index.md | 12 +- content/overview-math.fr.md | 2 +- content/overview-math.md | 2 +- content/overview-rich-content/ferris-gesture.svg | 1 - content/overview-rich-content/ferris.svg | 1 - content/pages/contact.fr.md | 22 +- content/pages/contact.md | 24 +- content/pages/privacy.md | 2 +- sass/abridge.scss | 335 ++++++++----------- templates/404.html | 2 +- templates/archive.html | 8 +- templates/base.html | 122 ++++--- templates/categories/list.html | 2 +- templates/categories/single.html | 2 +- templates/contact.fr.html | 49 --- templates/contact.html | 49 --- templates/index.html | 14 +- templates/macros/head.html | 406 ----------------------- templates/macros/macros.html | 33 +- templates/macros/page.html | 7 - templates/macros/seo.html | 140 ++++++++ templates/macros/social.html | 58 ---- templates/page.html | 62 ++-- templates/pages.html | 19 +- templates/partials/head.html | 131 ++++++++ templates/partials/head_js.html | 165 +++++++++ templates/partials/social.html | 63 ++++ templates/shortcodes/img.html | 9 +- templates/shortcodes/imgswap.html | 17 +- templates/shortcodes/showdata.html | 10 + templates/tags/list.html | 2 +- templates/tags/single.html | 2 +- 46 files changed, 919 insertions(+), 926 deletions(-) create mode 100644 COPY-TO-ROOT-SASS/_extra.scss create mode 100644 content/blog/_index.fr.md create mode 100644 content/blog/_index.md create mode 100644 content/images/_index.md create mode 100644 content/images/ferris-gesture.svg create mode 100644 content/images/ferris.svg delete mode 100644 content/overview-rich-content/ferris-gesture.svg delete mode 100644 content/overview-rich-content/ferris.svg delete mode 100644 templates/contact.fr.html delete mode 100644 templates/contact.html delete mode 100644 templates/macros/head.html delete mode 100644 templates/macros/page.html create mode 100644 templates/macros/seo.html delete mode 100644 templates/macros/social.html create mode 100644 templates/partials/head.html create mode 100644 templates/partials/head_js.html create mode 100644 templates/partials/social.html diff --git a/COPY-TO-ROOT-SASS/_extra.scss b/COPY-TO-ROOT-SASS/_extra.scss new file mode 100644 index 0000000..42d9392 --- /dev/null +++ b/COPY-TO-ROOT-SASS/_extra.scss @@ -0,0 +1,3 @@ +/****************************************************************************** + * Extra - Put your extra SASS/CSS here, it will get bundled with abridge.css + *****************************************************************************/ diff --git a/COPY-TO-ROOT-SASS/abridge.scss b/COPY-TO-ROOT-SASS/abridge.scss index b494965..5b64dd1 100644 --- a/COPY-TO-ROOT-SASS/abridge.scss +++ b/COPY-TO-ROOT-SASS/abridge.scss @@ -182,13 +182,13 @@ //$form: true,//Form elements (non-button) //$top: true,//back to top button using CSS //$search: true,//search feature - //$toc: true,//Table of Contents, page index / recent posts block - //$series: true,//Allows for posts to display in a series - //$modifiers: true,//tiny modifier classes for sizing and spacing + //$blocks: true,//css classes for block formatting, eg: recent posts, table of contents, series navigation + //$modifiers: true,//tiny modifier classes for sizing, spacing, etc. //$misc: false, - //$grid: false,//Infinity Grid, column based layouts. + //$grid: true,//Infinity Grid, column based layouts. //$syntax: true,//syntax highlighting for code blocks ); +@use "extra"; /****************************************************************************** * FONTS - Abridge by default uses the System Font Stack * https://css-tricks.com/snippets/css/system-font-stack/ diff --git a/config.toml b/config.toml index aeed1f6..8ff9621 100644 --- a/config.toml +++ b/config.toml @@ -61,6 +61,7 @@ Index = "Indice" Powered_by = "Propulsé" and = "et" About = "Sur" +Blog = "Blog" Posts = "Articles" Categories = "Catégories" Tags = "Mots-clés" @@ -96,15 +97,16 @@ flag.fr = "🇫🇷" ############################################################################### ### Layout & Format ### position: top, bottom, both, false(hidden) -### size: s95, s90, s85, s80, s75, s70, false(full size) +### size: s150, s140, s130, s120, s110, s95, s90, s85, s80, s75, s70, false(full size) ### divider: " " "·" "•" ############################################################################### menu = [ - {url = "about", name = "About", slash = true, blank = false}, - {url = "archive", name = "Posts", slash = true, blank = false}, -# {url = "categories", name = "Categories", slash = true, blank = false}, - {url = "tags", name = "Tags", slash = true, blank = false}, +# {url = "blog", name = "Blog", slash = true, blank = false, size="s110"}, + {url = "about", name = "About", slash = true, blank = false, size="s110"}, + {url = "archive", name = "Posts", slash = true, blank = false, size="s110"}, +# {url = "categories", name = "Categories", slash = true, blank = false, size="s110"}, + {url = "tags", name = "Tags", slash = true, blank = false, size="s110"}, ] menu_footer = [ {url = "about", name = "About", slash = true, blank = false}, @@ -113,16 +115,20 @@ menu_footer = [ {url = "sitemap.xml", name = "Sitemap", slash = false, blank = true}, ] +toc = true recent = true # TOC / index recent_items = 15 +series = true +#Series_parts = "$NUMBER_OF_PARTS part Series" + -meta_index = { position="bottom", size="s90", author=false, readtime=false, readstring="min", date=true, updated=false, categories_tags=true, divider=" " } -meta_post = { position="top", size="s95", author=true, readtime=false, readstring="min read", date=true, updated=true, categories_tags=true, divider=" " } +meta_index = { position="bottom", size="s90", author=false, readtime=false, readstring="min", date=true, updated=false, categories_tags=true, divider=""} +meta_post = { position="top", size="s95", author=true, readtime=false, readstring="min read", date=true, updated=true, categories_tags=true, divider=""} hide_section_dates = false # hides the date for sections that use posts.html as their template. hide_page_nextprev_titles = false # hides the next/previous titles for pages that use page.html as their template. -title_size_index = "s85" # size: s95, s90, s85, s80, s75, s70, false(full size) -footer_size = "s90" # size: s95, s90, s85, s80, s75, s70, false(full size) +title_size_index = "s85" +footer_size = "s90" footer_credit = true #footer_credit_override = '
' #archive_reverse = true # Set to True to sort posts chronologically per year instead of newest first on the archive page: example.com/archive/ diff --git a/content/_index.fr.md b/content/_index.fr.md index 3511f76..a31a970 100644 --- a/content/_index.fr.md +++ b/content/_index.fr.md @@ -1,4 +1,5 @@ +++ paginate_by = 3 sort_by = "date" +template = "index.html" +++ diff --git a/content/_index.md b/content/_index.md index 3511f76..a31a970 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,4 +1,5 @@ +++ paginate_by = 3 sort_by = "date" +template = "index.html" +++ diff --git a/content/archive/_index.fr.md b/content/archive/_index.fr.md index b1a35cf..6234b9b 100644 --- a/content/archive/_index.fr.md +++ b/content/archive/_index.fr.md @@ -1,3 +1,6 @@ +++ template = "archive.html" + +[extra] +sec = "blog" +++ diff --git a/content/archive/_index.md b/content/archive/_index.md index b1a35cf..6234b9b 100644 --- a/content/archive/_index.md +++ b/content/archive/_index.md @@ -1,3 +1,6 @@ +++ template = "archive.html" + +[extra] +sec = "blog" +++ diff --git a/content/blog/_index.fr.md b/content/blog/_index.fr.md new file mode 100644 index 0000000..a31a970 --- /dev/null +++ b/content/blog/_index.fr.md @@ -0,0 +1,5 @@ ++++ +paginate_by = 3 +sort_by = "date" +template = "index.html" ++++ diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..a31a970 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,5 @@ ++++ +paginate_by = 3 +sort_by = "date" +template = "index.html" ++++ diff --git a/content/images/_index.md b/content/images/_index.md new file mode 100644 index 0000000..800a244 --- /dev/null +++ b/content/images/_index.md @@ -0,0 +1,3 @@ ++++ +render = false ++++ diff --git a/content/images/ferris-gesture.svg b/content/images/ferris-gesture.svg new file mode 100644 index 0000000..d819588 --- /dev/null +++ b/content/images/ferris-gesture.svg @@ -0,0 +1 @@ + diff --git a/content/images/ferris.svg b/content/images/ferris.svg new file mode 100644 index 0000000..1409b10 --- /dev/null +++ b/content/images/ferris.svg @@ -0,0 +1 @@ + diff --git a/content/overview-abridge/index.fr.md b/content/overview-abridge/index.fr.md index b4f84e6..3f307bc 100644 --- a/content/overview-abridge/index.fr.md +++ b/content/overview-abridge/index.fr.md @@ -11,8 +11,6 @@ tags = ["Features","Config"] toc = true +++ -A fast, lightweight, and modern [Zola](https://getzola.org) theme utilizing [abridge.css](https://github.com/Jieiku/abridge.css) (a class-light semantic HTML CSS Framework). Perfect [Lighthouse](https://pagespeed.web.dev/report?url=abridge.netlify.app), [YellowLabTools](https://yellowlab.tools/), and [Observatory](https://observatory.mozilla.org/analyze/abridge.netlify.app) scores. Here is a [Zola Themes Benchmarks](https://github.com/Jieiku/zola-themes-benchmarks/blob/main/README.md) Page. - Un thème [Zola](https://getzola.org) rapide, léger et moderne utilisant [abridge.css](https://github.com/Jieiku/abridge.css) (un framework HTML CSS sémantique léger en classe ). Scores parfait [Lighthouse](https://pagespeed.web.dev/report?url=abridge.netlify.app), [YellowLabTools](https://yellowlab.tools/) et [Observatory](https://observatory.mozilla.org/analyze/abridge.netlify.app). Voici une page [Zola Themes Benchmarks](https://github.com/Jieiku/zola-themes-benchmarks/blob/main/README.md). diff --git a/content/overview-images/index.fr.md b/content/overview-images/index.fr.md index 8504e8a..96c899c 100644 --- a/content/overview-images/index.fr.md +++ b/content/overview-images/index.fr.md @@ -47,13 +47,13 @@ Cet article couvre les **shortcodes imgswap et img**. Les images peuvent égalem ## Utilisation (chemin racine /) ```rs -{{/* img(src="/overview-rich-content/ferris.svg" alt="Ferris le Rustacé") */}} +{{/* img(src="/images/ferris.svg" alt="Ferris le Rustacé") */}} ``` **Sortir** ```html -{{ img(src="/overview-rich-content/ferris.svg" alt="Ferris le Rustacé") }} +{{ img(src="/images/ferris.svg" alt="Ferris le Rustacé") }} ``` -{{ img(src="/overview-rich-content/ferris.svg" alt="Ferris le Rustacé") }} +{{ img(src="/images/ferris.svg" alt="Ferris le Rustacé") }} # Image SVG directement dans le code ```html @@ -99,10 +99,10 @@ Lorsque vous passez votre souris sur l'image, l'image à comparer s'affiche. ## Utilisation (chemin racine /) ```rs -{{/* imgswap(main_src="/overview-rich-content/ferris.svg" swap_src="/overview-rich-content/ferris-gesture.svg") */}} +{{/* imgswap(main_src="/images/ferris.svg" swap_src="/images/ferris-gesture.svg") */}} ``` **Sortir** ```html -{{ imgswap(main_src="/overview-rich-content/ferris.svg" swap_src="/overview-rich-content/ferris-gesture.svg") }} +{{ imgswap(main_src="/images/ferris.svg" swap_src="/images/ferris-gesture.svg") }} ``` -{{ imgswap(main_src="/overview-rich-content/ferris.svg" swap_src="/overview-rich-content/ferris-gesture.svg") }} +{{ imgswap(main_src="/images/ferris.svg" swap_src="/images/ferris-gesture.svg") }} diff --git a/content/overview-images/index.md b/content/overview-images/index.md index ed430db..6c515cd 100644 --- a/content/overview-images/index.md +++ b/content/overview-images/index.md @@ -47,13 +47,13 @@ This post covers the **imgswap and img shortcodes**. Images can also be embedded ## Usage (root path /) ```rs -{{/* img(src="/overview-rich-content/ferris.svg" alt="Ferris the Rustacean") */}} +{{/* img(src="/images/ferris.svg" alt="Ferris the Rustacean") */}} ``` **Output** ```html -{{ img(src="/overview-rich-content/ferris.svg" alt="Ferris the Rustacean") }} +{{ img(src="/images/ferris.svg" alt="Ferris the Rustacean") }} ``` -{{ img(src="/overview-rich-content/ferris.svg" alt="Ferris the Rustacean") }} +{{ img(src="/images/ferris.svg" alt="Ferris the Rustacean") }} # SVG image directly in code ```html @@ -99,10 +99,10 @@ When you hover your mouse over the image it will display the image to compare. ## Usage (root path /) ```rs -{{/* imgswap(main_src="/overview-rich-content/ferris.svg" swap_src="/overview-rich-content/ferris-gesture.svg") */}} +{{/* imgswap(main_src="/images/ferris.svg" swap_src="/images/ferris-gesture.svg") */}} ``` **Output** ```html -{{ imgswap(main_src="/overview-rich-content/ferris.svg" swap_src="/overview-rich-content/ferris-gesture.svg") }} +{{ imgswap(main_src="/images/ferris.svg" swap_src="/images/ferris-gesture.svg") }} ``` -{{ imgswap(main_src="/overview-rich-content/ferris.svg" swap_src="/overview-rich-content/ferris-gesture.svg") }} +{{ imgswap(main_src="/images/ferris.svg" swap_src="/images/ferris-gesture.svg") }} diff --git a/content/overview-math.fr.md b/content/overview-math.fr.md index e24b4e6..7097702 100644 --- a/content/overview-math.fr.md +++ b/content/overview-math.fr.md @@ -1,5 +1,5 @@ +++ -title = "Notations mathématiques" +title = "Notation mathématiques" description = "Exemple d'article présentant l'affichage des notations mathématiques, rendu possible par la bibliothèque KaTeX." date = 2021-05-05 updated = 2022-01-01 diff --git a/content/overview-math.md b/content/overview-math.md index c34d2f2..446f537 100644 --- a/content/overview-math.md +++ b/content/overview-math.md @@ -1,5 +1,5 @@ +++ -title = "Mathematical Notations" +title = "Mathematical Notation" description = "Sample article showcasing the display of Mathematical Notations, made possible by the KaTeX library." date = 2021-05-05 updated = 2022-01-01 diff --git a/content/overview-rich-content/ferris-gesture.svg b/content/overview-rich-content/ferris-gesture.svg deleted file mode 100644 index d819588..0000000 --- a/content/overview-rich-content/ferris-gesture.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/content/overview-rich-content/ferris.svg b/content/overview-rich-content/ferris.svg deleted file mode 100644 index 1409b10..0000000 --- a/content/overview-rich-content/ferris.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/content/pages/contact.fr.md b/content/pages/contact.fr.md index cae2626..27ad163 100644 --- a/content/pages/contact.fr.md +++ b/content/pages/contact.fr.md @@ -2,6 +2,26 @@ title = "Contact" description = "Pour nous joindre, veuillez utiliser le formulaire de contact sur cette page." path = "fr/contact" -template = "contact.fr.html" +template = "pages.html" draft = false +++ + +Vous voulez entrer en contact ? Remplissez le formulaire ci-dessous pour m'envoyer un message et je vous répondrai dans les plus brefs délais !
+ diff --git a/content/pages/contact.md b/content/pages/contact.md index 306b360..a16ed7e 100644 --- a/content/pages/contact.md +++ b/content/pages/contact.md @@ -2,6 +2,26 @@ title = "Contact" description = "To reach us please use the contact form on this page." path = "contact" -template = "contact.html" +template = "pages.html" draft = false -+++ \ No newline at end of file ++++ + +Want to get in touch? Fill out the form below to send me a message and I will get back to you as soon as possible!
+ diff --git a/content/pages/privacy.md b/content/pages/privacy.md index 52bfc01..1b7eec5 100644 --- a/content/pages/privacy.md +++ b/content/pages/privacy.md @@ -12,4 +12,4 @@ draft = false - This site does not store data in the browser to be shared, sent, or sold to third-parties. - No personal information is shared, sent, or sold to third-parties. -**Effective Date:** _1st Jan 2022_ \ No newline at end of file +**Effective Date:** _1st Jan 2022_ diff --git a/sass/abridge.scss b/sass/abridge.scss index 14a691b..d844403 100644 --- a/sass/abridge.scss +++ b/sass/abridge.scss @@ -211,13 +211,13 @@ $button: true !default;//Form elements (button) $form: true !default;//Form elements (non-button) $top: true !default;//back to top button using CSS $search: true !default;//search feature -$toc: true !default;//Table of Contents, page index / recent posts block +$blocks: true !default;//css classes for block formatting, eg: recent posts, table of contents, series navigation $modifiers: true !default;//tiny modifier classes for sizing and spacing $imgswap: true !default;//Image Swap on hover/click $misc: false !default; -$grid: false !default;//Infinity Grid, column based layouts. +$grid: true !default;//Infinity Grid, column based layouts. $syntax: true !default;//syntax highlighting for code blocks -$series: true !default;//series of posts + /****************************************************************************** * Root element @@ -440,8 +440,7 @@ $series: true !default;//series of posts h6 { padding-left: 0; color: var(--f2); - margin-bottom: var(--s1); - margin-top: var(--s2); + margin: var(--s2) 0 var(--s1); font-weight: var(--fh); font-size: var(--fs); line-height: var(--lhh); @@ -473,7 +472,7 @@ $series: true !default;//series of posts color: var(--a2); text-decoration: underline; } - h1 a, h2 a, a.si, main nav a, nav > div > a { + h1 a, h2 a, main nav a, header span > a { color: var(--f2); text-decoration: none; font-weight: var(--fh); @@ -545,7 +544,7 @@ $series: true !default;//series of posts color: var(--f1); font-style: normal; font-weight: var(--fw); - font-size: var(--fs); + //font-size: var(--fs);//TODO: This caused the lists to be a different size than the rest of the page, it was quite jarring } // Lists @@ -657,29 +656,71 @@ $series: true !default;//series of posts } } @if $nav { - //https://github.com/raj457036/attriCSS - .on, - .on:visited {//pagination link styling - font-weight: var(--fh); - border: .1rem solid var(--c4); - border-radius: var(--br); - padding: .1rem var(--s1); + header > nav > div {//padding above nav divs in header + padding-top: var(--s2); } - .on:hover {//makes border of pagination links hover color - border-color: var(--a3); - .svgh { - background: var(--a3); - opacity: 1; + footer > div {//padding above social icons + padding-top: var(--s1); + } + header > nav, header > nav > div:nth-child(2) { + display: flex; + flex-direction: column; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + //margin: 0 auto; + h1 { + margin: 0;//right margin + } + span { + display: flex; + flex-wrap: wrap; + justify-content: center; + align-items: center; } } - nav > div > a, header i, header .dropdown { - margin-right: .2rem; - vertical-align: middle; + + header > nav > div:nth-child(2) {//puts logo on left and menu/search on right + margin-left: auto; + justify-content: center; + a, i, .dropdown { + margin: 0 var(--s2) 0 0;//right margin + } + } + // mobile first layout. + header nav { + margin: var(--s1) auto 0; // keeps top menu/search centered in mobile view + flex-direction: column;// column layout for mobile view + div:nth-child(2) { + margin: auto; // keeps top menu/search centered in mobile view + } + } + nav { + align-items: center; + justify-content: center;//center pagination horizontally + display: flex; + } + + //dropdown menu used for lang, etc. + .dropdown { + display: inline-block; + position: relative; + z-index: 99; font-weight: var(--fh); + font-size: 1.4rem; } - main nav {//pagination - a,span { - margin: .2rem; + .dropdown-content { + display: none; + position: absolute; + z-index: 99; + font-weight: var(--fh); + font-size: 1.4rem; + } + .dropdown:hover .dropdown-content { + display: block; + z-index: 99; + a { + text-decoration: none; } } article nav {//prev/next page title @@ -687,7 +728,6 @@ $series: true !default;//series of posts text-align: right; } } - //footer nav > footer nav { a { margin: .2rem; @@ -696,46 +736,28 @@ $series: true !default;//series of posts margin-bottom: .2rem; } } - header > nav > div:first-of-type {//Keep the logo from wrapping - display: inline; - min-width: fit-content; - padding-right: var(--s1);//add some spacing between nav divs - } - header > nav > div:nth-child(2) {//puts logo on left and menu/search on right - margin-left: auto; - padding-right: var(--s1);//add some spacing between nav divs - } - // mobile first layout. - header nav { - flex-direction: column;// column layout for mobile view - h1 { - margin: var(--s2) 0 var(--s1);//adds more padding above for mobile view - } - div { - margin: auto; // keeps top menu/search centered in mobile view + + //pagination + main nav { + margin-top: var(--s2);//pagination margin + a,span { + margin: .2rem; } } - nav > div { - margin: var(--s1) 0; + .on, + .on:visited {//pagination link styling + font-weight: var(--fh); + border: .1rem solid var(--c4); + border-radius: var(--br); + padding: .1rem var(--s1); } - nav { - align-items: center; - justify-content: center;//center pagination horizontally - display: flex; - div h2 { - font-size: 1rem; - &:hover { - color: var(--a3); - } - } - h1 { - margin-bottom: 0; - margin-top: 0.2rem; + .on:hover {//makes border of pagination links hover color + border-color: var(--a3); + .svgh { + background: var(--a3); + opacity: 1; } } - main nav { - margin-top: var(--s2);//pagination margin - } .outp { padding: 0 .26rem .2rem; } @@ -757,40 +779,17 @@ $series: true !default;//series of posts .mode:hover, .cnav { color: var(--a1);//pagination color current page } - //dropdown menu used for lang, etc. - .dropdown { - display: inline-block; - position: relative; - z-index: 99; - font-weight: var(--fh); - font-size: 1.4rem; - } - .dropdown-content { - display: none; - position: absolute; - z-index: 99; - font-weight: var(--fh); - font-size: 1.4rem; - } - .dropdown:hover .dropdown-content { - display: block; - z-index: 99; - a { - text-decoration: none; - } - } + // breakpoint makes header responsive for desktop layouts // mobile first is min-width for desktop instead of max-width for mobile @if map-get($breakpoints, "md") { @media (min-width: map-get($breakpoints, "md")) { - header > nav > div { - margin: var(--s1) 0;// desktop layout - } - header nav { + header nav, header > nav > div:nth-child(2) { flex-direction: row;// row layout for desktop view - h1 { - margin: var(--s1) 0;// desktop layout - } + margin: 0 0 0 auto;// desktop layout + } + header > nav > div { + padding-top: var(--s1); } } } @@ -1153,7 +1152,7 @@ $series: true !default;//series of posts @if map-get($breakpoints, "md") { @media (min-width: map-get($breakpoints, "md")) { .searchd > input { - max-width: 15.3rem; + max-width: 15rem; flex-grow: 0; } #suggestions { @@ -1165,52 +1164,49 @@ $series: true !default;//series of posts } } } -@if $toc { - main { - .toc { - max-width: 15rem; - min-width: 14rem; - margin-left: var(--s1); - } - .toc-item { - padding: .4rem 0 0; - color: var(--f1); - } - .toc-item a, .toc-item-child a { - color: var(--f1); - &:hover { - cursor: pointer; - color: var(--a2); - text-decoration: underline; - } - } - .toc-item a.active, .toc-item-child a.active { - color: var(--a2); - } - .toc-item-child { - padding: 0 var(--s1); - color: var(--f1); - } +@if $blocks { + .block { + max-width: 30rem; + margin: var(--s2) auto; } - .toc { - display: none; + .sblock { + max-width: 15rem; + min-width: 14rem; + margin-left: var(--s1); } - .toc-sticky { + .blockdiv { border-radius: var(--br); border-top: 5px solid var(--a1); background-color: var(--c2); - position: sticky; - top: var(--s2); margin-top: var(--s2); padding: 0 var(--s2) var(--s2); max-height: 100vh; overflow: auto; + a { + color: var(--f1); + &:hover { + color: var(--a2); + } + } + ol { + margin: 0; + } + } + .sticky { + position: sticky; + top: var(--s2); + } + .sblock { + display: none;//hide in mobile view } @if map-get($breakpoints, "md") { // mobile first is min-width for desktop instead of max-width for mobile @media (min-width: map-get($breakpoints, "md")) { - .toc { - display: unset; + .sblock { + display: unset;//show in desktop view + } + .block { + display: none;//hide in desktop view, TODO: depending on what blocks get used for, this could be a problem in the future, should be fine for now. } } } @@ -1247,18 +1243,25 @@ $series: true !default;//series of posts @if $grid { // https://github.com/vladocar/Basic.css [style*="--c:"], section>section { + flex: var(--c,1); + margin: var(--s1); color: var(--f2); padding: var(--s1); - margin: var(--s1); text-align: center; } section { display: flex; flex-flow: row wrap; - } - [style*="--c:"], section>section { - flex:var(--c,1); - margin:var(--s1); + article { + div { + text-align: center; + } + h1, h2, h3 { + text-align: center; + } + padding: 20px 30px; + min-width: 340px;// limits to 3 columns wide, TODO: solution to limit number of columns + } } } @if $enable-icons { @@ -1345,15 +1348,21 @@ $series: true !default;//series of posts } @if $modifiers { .sum, .sum p {margin: .2rem 0} + .s150 {font-size: 1.5em} + .s140 {font-size: 1.4em} + .s130 {font-size: 1.3em} + .s120 {font-size: 1.2em} + .s110 {font-size: 1.1em} .s95 {font-size: .95em} .s90 {font-size: .90em} .s85 {font-size: .85em} .s80 {font-size: .80em} .s75 {font-size: .75em} .s70 {font-size: .70em} - .hpad {padding: 0 .2rem} - .rpad {padding-right: .2rem} - .si {font-size: 1.5em} + .hpad {padding: 0 var(--s1)} + .rpad {padding-right: var(--s1)} + .tpad {padding-top: var(--s1)} + .b {font-weight: var(--fh)} } @if $syntax { // Unstyled Text Color, and background color @@ -1555,65 +1564,3 @@ $series: true !default;//series of posts // color: var(--h1); //} } - -@if $series { - .series-mobile { - max-width: 30rem; - margin: var(--s2) auto; - border-radius: var(--br); - background-color: var(--c2); - } - - .series { - background-color: var(--c2); - max-height: 100vh; - padding: 0 var(--s2) var(--s2); - border-radius: var(--br); - border-top: 5px solid var(--a1); - overflow: auto; - } - - .series h4 a { - color: var(--f1); - font-weight: 700; - &:hover { - color: var(--a3); - } - } - - .series ol { - margin: 0; - } - - .series ol a { - color: var(--f1); - &:hover { - color: var(--a2); - text-decoration: underline; - } - } - - .series li { - font-size: .875rem; - } -} - -@if $series and $toc { - .series-toc { - margin-top: var(--s2); - max-height: 100vh; - } - - @if map-get($breakpoints, "md") { - // mobile first is min-width for desktop instead of max-width for mobile - @media (min-width: map-get($breakpoints, "md")) { - .series-mobile { - display: none; - } - } - } -} - -.toc h1 { - margin: 0; -} \ No newline at end of file diff --git a/templates/404.html b/templates/404.html index 7b7c325..07f32b3 100644 --- a/templates/404.html +++ b/templates/404.html @@ -14,7 +14,7 @@ {%- set description = config.description %} - {{- macros_head::seo(config=config, title=title, title_addition=title_addition, description=description, is_404=true) }} + {{- macros_seo::seo(config=config, title=title, title_addition=title_addition, description=description, is_404=true) }} {%- endblock seo %} {%- block content %} diff --git a/templates/archive.html b/templates/archive.html index 8ac3cfc..e4f7e06 100644 --- a/templates/archive.html +++ b/templates/archive.html @@ -19,13 +19,17 @@ This Template can also be used as the rendering template for Sections, eg: examp {%- set description = config.description %} - {{- macros_head::seo(config=config, title=title, title_addition=title_addition, description=description, is_home=true) }} + {{- macros_seo::seo(config=config, title=title, title_addition=title_addition, description=description, is_home=true) }} {%- endblock seo %} {%- block content %} {#- The following line is checking if the template is being used for the archive page or a section #} {%- if current_path is matching("^(/[[:alpha:]][[:alpha:]])?/archive/$") %} - {%- set sec = "" %} + {%- if section.extra.sec %} + {%- set sec = section.extra.sec ~ "/" %} + {%- else %} + {%- set sec = "" %} + {%- endif %} {%- else %} {%- set langpath = "/" %} {%- if lang != config.default_language %} diff --git a/templates/base.html b/templates/base.html index 8d85516..b3dfec8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,21 +1,13 @@ -{%- import 'macros/head.html' as macros_head %} -{%- import "macros/social.html" as social_macros %} -{%- import "macros/page.html" as page_macros %} +{%- import 'macros/seo.html' as macros_seo %} {%- import "macros/macros.html" as macros %} {%- set uglyurls = config.extra.uglyurls | default(value=false) -%} {%- if config.extra.offline %}{% set uglyurls = true %}{% endif %} - {{- macros_head::theme(config=config) }} - {{- macros_head::stylesheets(config=config) }} - - - - {{- macros_head::stylesheets_preload(config=config) }} - {{- macros_head::js(config=config) }} - - {{- macros_head::feed(config=config) }} + {%- include "partials/head.html" %} + + {#- SEO: title, description, etc #} {%- block seo %} {%- if config.extra.title_separator %} {%- set title_separator = " " ~ config.extra.title_separator ~ " " -%} @@ -23,15 +15,11 @@ {%- set title_separator = " | " -%} {%- endif %} {%- endblock seo %} - - - - - {{- macros_head::security(config=config) }} - {{- macros_head::favicons(config=config) }} + {%- block comments_init %} {%- endblock comments_init %} - + + {%- include "partials/head_js.html" %} {%- block header %} @@ -39,7 +27,7 @@