From d86932ad935e5e50de05c4c7125a5930b1862c1d Mon Sep 17 00:00:00 2001 From: Jieiku Date: Mon, 22 May 2023 23:35:14 -0700 Subject: Update Readme, Examples, Screenshot --- README.md | 574 ++++++++++--------------------------- content/overview-abridge.fr.md | 46 ++- content/overview-abridge.md | 46 ++- content/overview-code-blocks.fr.md | 66 +++-- content/overview-code-blocks.md | 66 +++-- screenshot.png | Bin 109213 -> 122329 bytes templates/posts.html | 3 + 7 files changed, 304 insertions(+), 497 deletions(-) diff --git a/README.md b/README.md index 6c52a69..af5b2c3 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Maintenance of this project is made possible by all the 2.22 KB Leanified: 11 B (0.48%) -Processing: android-chrome-192x192.png -2.51 KB -> 2.48 KB Leanified: 33 B (1.28%) -Processing: android-chrome-512x512.png -5.49 KB -> 5.25 KB Leanified: 241 B **(4.29%)** -Processing: apple-touch-icon.png -2.57 KB -> 2.54 KB Leanified: 30 B (1.14%) -Processing: banner.png -13.07 KB -> 12.93 KB Leanified: 138 B (1.03%) -Processing: mstile-150x150.png -2.24 KB -> 2.20 KB Leanified: 38 B (1.66%) -Processing: favicon-16x16.png -559 B -> 366 B Leanified: 193 B **(34.53%)** -Processing: favicon-32x32.png -969 B -> 663 B Leanified: 306 B **(31.58%)** -Processing: favicon.ico -2.59 KB -> 1.90 KB Leanified: 703 B **(26.53%)** -``` - -Google lighthouse will often notice when your pictures could be more compressed, this may even help SEO. - - ### Pre gzip/brotli content to serve with nginx: If you are serving your site with nginx, you can pre gzip your content. @@ -630,24 +368,18 @@ rsync -zvrh ~/.dev/abridge/public/ web:/var/www/abridge Nginx does not come by default with brotli support, but adding it was not difficult. -## Reporting Issues - -We use GitHub Issues as the official bug tracker for **abridge**. -Please search [existing issues](https://github.com/jieiku/abridge/issues). -It’s possible someone has already reported the same problem. -If your problem or idea is not addressed yet, [open a new issue](https://github.com/jieiku/abridge/issues/new). +(Netlify brotli gzips your files automatically, no exta work required.) ## Contributing and Philosophy We'd love your help! Especially with fixes to issues. -The overall idea behind abridge is to be lightweight and fast, and to work properly even if javascript is disabled. +The overall idea behind abridge is to be lightweight, fast, and to work properly even if javascript is disabled. -The only feature that some people may consider a necessity that relies on javascript is the Search. +The only feature that may be considered a necessity that relies on javascript is the Search. -Any feature added to abridge that relies on javascript will do so with it disabled by default. +New features that rely on javascript will do so with it disabled by default unless lightweight and useful. ## License -**abridge** is distributed under the terms of the -[MIT license](https://github.com/jieiku/abridge/blob/master/LICENSE). +**abridge** is distributed under the terms of the [MIT license](https://github.com/jieiku/abridge/blob/master/LICENSE). diff --git a/content/overview-abridge.fr.md b/content/overview-abridge.fr.md index d38ced9..1fda697 100644 --- a/content/overview-abridge.fr.md +++ b/content/overview-abridge.fr.md @@ -16,11 +16,49 @@ Vous pouvez ensuite modifier ou commenter les valeurs de ce fichier si nécessai Vous devez également décommenter la ligne #theme = "abridge" dans votre fichier racine zola config.toml. Cela indique à votre site racine zola d'utiliser le thème abrégé dans le dossier des thèmes. -Vous pouvez définir le nombre d'éléments qui apparaissent sur la page d'accueil en modifiant `themes\abridge\content\_index.md` le fichier et en ajustant `paginate_by = 5` +## Pagination -Vous pouvez définir la largeur globale de la page en éditant `themes\abridge\sass\_variables.scss` le fichier et en ajustant ces deux lignes: +Vous pouvez définir le nombre d'éléments qui apparaissent sur la page d'accueil en modifiant `content\_index.md` le fichier et en ajustant `paginate_by = 3` + +## Sass Overrides + +Les variables SCSS abrégées peuvent être remplacées en modifiant `sass\abridge.scss` fichier dans le dossier sass racine de votre projet. + +### Page Width + +```scss +$mw:75%,// largeur maximale +``` + +### Abridge Theme Modes ```scss -$mw:50% !default;// largeur maximale -$mb:1200px !default;// valeur à laquelle passer de la disposition fluide à l'utilisation de la largeur maximale +$abridgeMode: "switcher",//valeurs valides : switcher, auto, dark, light ``` + +### Colors and Styles + +Vous pouvez spécifier le modèle de couleur que vous souhaitez utiliser comme base: +```scss +$color: "orange",// modèle de couleur à utiliser/remplacer: orange, blue, blueshade +``` + +Remplacez ensuite les couleurs individuelles si nécessaire: +```scss +/// Dark Colors +$f1d: #ccc,// Font Color Primary +$f2d: #ddd,// Font Color Headers +$c1d: #111,// Background Color Primary +$c2d: #222,// Background Color Secondary +... +``` + +### Footer Social Icons + +Vous devez configurer les icônes sociales que vous prévoyez d'utiliser. (rend la taille du fichier css plus petite) + +Pour les désactiver tous simplement, vous pouvez définir `$enable-icons: false` + +Sinon, activez uniquement les icônes dont vous avez besoin, par exemple pour le courrier que vous définiriez `$icon-mail: true` + +Vous devez ensuite désactiver toutes les icônes que vous n'utilisez pas. diff --git a/content/overview-abridge.md b/content/overview-abridge.md index 93e740b..f68ef2f 100644 --- a/content/overview-abridge.md +++ b/content/overview-abridge.md @@ -16,11 +16,49 @@ You can then edit or comment out the values in this file as necessary. You should also uncomment out the line #theme = "abridge" in your root zola config.toml file. This tells your root zola site to use the abridge theme in the themes folder. -You can set the number of items that appear on the home page by editing `themes\abridge\content\_index.md` file and adjusting `paginate_by = 5` +## Pagination -You can set the overal page width by editing `themes\abridge\sass\_variables.scss` file, and adjusting these two lines: +You can set the number of items that appear on the home page by editing `content\_index.md` file and adjusting `paginate_by = 3` + +## Sass Overrides + +Abridge SCSS variables can be overrided by editing `sass\abridge.scss` file in your project's root sass folder. + +### Page Width + +```scss +$mw:75%,// max-width +``` + +### Abridge Theme Modes ```scss -$mw:50% !default;// max-width -$mb:1200px !default;// value at which to switch from fluid layout to using max-width +$abridgeMode: "switcher",//valid values: switcher, auto, dark, light ``` + +### Colors and Styles + +You can specify which color template you want to use as a base: +```scss +$color: "orange",// color template to use/override: orange, blue, blueshade +``` + +Then override individual colors as needed: +```scss +/// Dark Colors +$f1d: #ccc,// Font Color Primary +$f2d: #ddd,// Font Color Headers +$c1d: #111,// Background Color Primary +$c2d: #222,// Background Color Secondary +... +``` + +### Footer Social Icons + +You should configure which social icons you plan to use. (makes the css file size smaller) + +To simply turn them all off you can set `$enable-icons: false` + +Otherwise enable only the icons you need, eg for mail you would set `$icon-mail: true` + +You should then disable all the icons that you do not use. diff --git a/content/overview-code-blocks.fr.md b/content/overview-code-blocks.fr.md index a21c15a..b640069 100644 --- a/content/overview-code-blocks.fr.md +++ b/content/overview-code-blocks.fr.md @@ -99,6 +99,38 @@ taxonomies = [ ``` +### CSS +```css +html { + font-size: var(--fs); +} + +.c { + text-align: center; +} +``` + +### SCSS +```scss + +$font: Roboto system-ui -apple-system BlinkMacSystemFont "Segoe UI" Oxygen Ubuntu Cantarell "Fira Sans" "Droid Sans" "Helvetica Neue" "Noto Sans" Helvetica Arial sans-serif !default; +$font-mono: ui-monospace Menlo Monaco Consolas "SF Mono" "Cascadia Mono" "Segoe UI Mono" "DejaVu Sans Mono" "Liberation Mono" "Roboto Mono" "Oxygen Mono" "Ubuntu Monospace" "Ubuntu Mono" "Source Code Pro" "Fira Mono" "Droid Sans Mono" "Courier New" Courier monospace !default; + +@mixin font { + // convert space separated list to comma separated list + $font: list.join($font, "", $separator: comma); + $font: functions.remove($font, ""); + $font-mono: list.join($font-mono, "", $separator: comma); + $font-mono: functions.remove($font-mono, ""); + + $font: functions.font-var($font, $fontExt-Main, $findFont-Main); + $font-mono: functions.font-var($font-mono, $fontExt-Code, $findFont-Code); + + #{--ff}: $font; + #{--fm}: $font-mono;//code +} +``` + ### javascript ```javascript function closeSearch() {//close the search displaying the regular page. @@ -343,37 +375,3 @@ for yr in lwr..upr do end end ``` - -### SCSS -```scss - -$font: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Noto Sans", Helvetica, Arial, sans-serif !default; -$font-mono: ui-monospace, Menlo, Monaco, Consolas, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "DejaVu Sans Mono", "Liberation Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Ubuntu Mono", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", Courier, monospace !default; - -@mixin root { - #{--ff}: $font; - #{--fm}: $font-mono;//code - - --fs: 1rem; //font-size - - // Responsive typography - @if $enable-responsive-typography { - @if map-get($breakpoints, "lg") { - @media (min-width: map-get($breakpoints, "lg")) { - --fs: 1.08rem; - } - } - } -} -``` - -### CSS -```css -html { - font-size: var(--fs); -} - -.c { - text-align: center; -} -``` diff --git a/content/overview-code-blocks.md b/content/overview-code-blocks.md index 916dcc1..46f5922 100644 --- a/content/overview-code-blocks.md +++ b/content/overview-code-blocks.md @@ -99,6 +99,38 @@ taxonomies = [ ``` +### CSS +```css +html { + font-size: var(--fs); +} + +.c { + text-align: center; +} +``` + +### SCSS +```scss + +$font: Roboto system-ui -apple-system BlinkMacSystemFont "Segoe UI" Oxygen Ubuntu Cantarell "Fira Sans" "Droid Sans" "Helvetica Neue" "Noto Sans" Helvetica Arial sans-serif !default; +$font-mono: ui-monospace Menlo Monaco Consolas "SF Mono" "Cascadia Mono" "Segoe UI Mono" "DejaVu Sans Mono" "Liberation Mono" "Roboto Mono" "Oxygen Mono" "Ubuntu Monospace" "Ubuntu Mono" "Source Code Pro" "Fira Mono" "Droid Sans Mono" "Courier New" Courier monospace !default; + +@mixin font { + // convert space separated list to comma separated list + $font: list.join($font, "", $separator: comma); + $font: functions.remove($font, ""); + $font-mono: list.join($font-mono, "", $separator: comma); + $font-mono: functions.remove($font-mono, ""); + + $font: functions.font-var($font, $fontExt-Main, $findFont-Main); + $font-mono: functions.font-var($font-mono, $fontExt-Code, $findFont-Code); + + #{--ff}: $font; + #{--fm}: $font-mono;//code +} +``` + ### javascript ```javascript function closeSearch() {//close the search displaying the regular page. @@ -343,37 +375,3 @@ for yr in lwr..upr do end end ``` - -### SCSS -```scss - -$font: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Noto Sans", Helvetica, Arial, sans-serif !default; -$font-mono: ui-monospace, Menlo, Monaco, Consolas, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "DejaVu Sans Mono", "Liberation Mono", "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Ubuntu Mono", "Source Code Pro", "Fira Mono", "Droid Sans Mono", "Courier New", Courier, monospace !default; - -@mixin root { - #{--ff}: $font; - #{--fm}: $font-mono;//code - - --fs: 1rem; //font-size - - // Responsive typography - @if $enable-responsive-typography { - @if map-get($breakpoints, "lg") { - @media (min-width: map-get($breakpoints, "lg")) { - --fs: 1.08rem; - } - } - } -} -``` - -### CSS -```css -html { - font-size: var(--fs); -} - -.c { - text-align: center; -} -``` diff --git a/screenshot.png b/screenshot.png index 7b001a0..cd3a293 100644 Binary files a/screenshot.png and b/screenshot.png differ diff --git a/templates/posts.html b/templates/posts.html index e4562ab..b4e123e 100644 --- a/templates/posts.html +++ b/templates/posts.html @@ -51,6 +51,9 @@ This Template can also be used as the rendering template for Sections, eg: examp {%- if section_item.title %}

{{ section_item.title }}

{%- endif %} + + {{ section_item.content | safe }} + {%- for year, posts in section_item.pages | group_by(attribute="year") %} {%- if not hide_section_dates %} {%- if section_item.title %} -- cgit v1.3.1