From 2d1cccf83a2a654957a38357e024c31926ab5be6 Mon Sep 17 00:00:00 2001 From: Lucas Amaro Date: Mon, 11 Apr 2022 20:32:42 -0300 Subject: [PATCH] Major update, overhaul (basically) everything --- .gitignore | 7 +- Gemfile | 30 +- Gemfile.lock | 90 +- README.md | 219 +- _config.yml | 194 +- _includes/_copyright-year.js | 5 + _includes/_enhanced-details.js | 103 + _includes/analytics.html | 19 + _includes/archive-link.html | 1 + _includes/chartjs/defaults.html | 300 - _includes/chartjs/firefox-details-fix.html | 19 - _includes/chartjs/warning-narrow-screen.html | 3 - _includes/color-scheme-switch.html | 10 - _includes/copyright-year.min.js | 1 + _includes/darken.html | 75 - _includes/divider.html | 2 +- _includes/duckduckgo-search.html | 2 +- _includes/enhanced-details.min.js | 1 + _includes/figure.html | 17 + _includes/fix-linenos.html | 8 + _includes/footer.html | 78 +- _includes/head.html | 154 +- _includes/header.html | 10 +- _includes/interact/mortality-curves.html | 41 - _includes/interact/mortality-data.html | 75 - _includes/post-nav.html | 17 + _includes/prompt.html | 3 + _includes/related.html | 37 + _includes/sidenote.html | 3 +- _includes/spacer.html | 1 - _includes/svg.html | 166 +- _includes/toc.html | 212 +- _includes/toc.liquid | 182 + _includes/youtube.html | 10 +- _layouts/archive-by-date.html | 31 + _layouts/archive-by-tag.html | 67 + _layouts/archive-by-topic.html | 67 + _layouts/archive-item.html | 40 + _layouts/archive.html | 42 + _layouts/default.html | 69 +- _layouts/feed.xml | 113 + _layouts/home.html | 102 +- _layouts/html_minifier.liquid | 5 + _layouts/js_minifier.liquid | 2 + _layouts/listing.html | 65 - _layouts/page-with-related.html | 35 + _layouts/page.html | 33 +- _layouts/post-with-nav.html | 39 + _layouts/post-with-related.html | 39 + _layouts/post.html | 35 +- _layouts/redirect.html | 20 +- _pages/404.md | 13 +- _pages/about.md | 50 +- _pages/archive.md | 8 + _pages/jekyll-theme.md | 5 + _pages/tags.md | 9 + _pages/thanks.md | 55 +- _pages/theme.md | 271 +- _pages/topics.md | 9 + _plugins/flexible_include.rb | 213 + _posts/2021-01-01-textual-post.md | 61 - ...e.md => 2021-01-02-basic-html-elements.md} | 54 +- ...2021-02-01-post-with-bells-and-whistles.md | 494 - _posts/2021-12-01-code-highlighting.md | 160 + .../2021-12-01-image-and-video.md | 102 + ...0px-Fortaleza_-_Cear\303\241_-_Brasil.jpg" | Bin 0 -> 108536 bytes ...2022-01-01-sidenotes-caveats-testground.md | 46 - _posts/2022-02-01-svg-icons.md | 36 + _posts/2022-03-01-math-katex.md | 93 + _posts/2022-03-01-sidenotes.md | 75 + _posts/2022-03-01-svg-icons.md | 60 - _sass/_code-blocks.scss | 53 + _sass/_code.scss | 68 - _sass/_critical.scss | 6 + _sass/_details.scss | 243 + _sass/_interactivity.scss | 206 + _sass/_main.scss | 511 + _sass/_sidenotes.scss | 141 + _sass/_toc.scss | 79 + _sass/_utilities.scss | 166 + _sass/base/_color.scss | 122 + _sass/base/_html-body.scss | 48 + _sass/base/_modern-normalize.scss | 307 + _sass/base/_sizing.scss | 62 + _sass/base/_typography.scss | 122 + .../_base16-default-dark.scss | 83 + .../_base16-default-light.scss | 83 + .../_base16-tomorrow-dark.scss | 83 + .../_base16-tomorrow-light.scss | 83 + _sass/pygments-css-themes/_poole.scss | 3 +- assets/css/code-blocks.min.scss | 15 + assets/css/papicu.min.scss | 10 + assets/css/papicu.noncode.min.scss | 11 + assets/icons/original-image.png | Bin 319 -> 0 bytes assets/img/safari-shot-homepage-dark.png | Bin 182000 -> 0 bytes assets/img/safari-shot-homepage-light.png | Bin 185885 -> 0 bytes .../screenshot-advanced-sidenotes-light.png | Bin 81508 -> 0 bytes .../screenshot-another-example-post-light.png | Bin 93248 -> 0 bytes assets/img/screenshot-homepage-light.png | Bin 40798 -> 0 bytes ...hot-post-with-bells-and-whistles-light.png | Bin 114787 -> 0 bytes assets/img/screenshot-textual-post-light.png | Bin 105942 -> 0 bytes assets/js/_partials/_anchors.js | 7 + assets/js/_partials/_chartjs.js | 382 + assets/js/_partials/_katex.js | 115 + assets/js/_partials/_papaparse.js | 54 + assets/js/_partials/_papaparse.wonderload.js | 50 + assets/js/_partials/_tobii.js | 8 + assets/js/_partials/_toc.js | 14 + assets/js/anchors.bundle.min.js | 1 + assets/js/chartjs.setup.min.js | 1 + assets/js/katex.tweaks.min.js | 1 + assets/js/papaparse.setup.min.js | 1 + assets/js/tobii.bundle.min.js | 1 + assets/js/toc.bundle.min.js | 1 + assets/main.scss | 1087 - assets/rouge.scss | 9 - assets/site.webmanifest | 17 - assets/vendors/anchor-js@4.3.1.min.js | 9 + ...colorschemes@0.4.0-tableau.ColorBlind10.js | 190 + ...rschemes@0.4.0-tableau.ColorBlind10.min.js | 1 + .../chartjs-plugin-colorschemes@0.4.0.js | 1195 + .../chartjs-plugin-crosshair@1.1.6.min.js | 7 + assets/vendors/chartjs-plugins.min.js | 1 + assets/vendors/chartjs@2.9.4.min.js | 7 + assets/vendors/fonts/KaTeX_AMS-Regular.ttf | Bin 0 -> 63632 bytes assets/vendors/fonts/KaTeX_AMS-Regular.woff | Bin 0 -> 33516 bytes assets/vendors/fonts/KaTeX_AMS-Regular.woff2 | Bin 0 -> 28076 bytes .../vendors/fonts/KaTeX_Caligraphic-Bold.ttf | Bin 0 -> 12368 bytes .../vendors/fonts/KaTeX_Caligraphic-Bold.woff | Bin 0 -> 7716 bytes .../fonts/KaTeX_Caligraphic-Bold.woff2 | Bin 0 -> 6912 bytes .../fonts/KaTeX_Caligraphic-Regular.ttf | Bin 0 -> 12344 bytes .../fonts/KaTeX_Caligraphic-Regular.woff | Bin 0 -> 7656 bytes .../fonts/KaTeX_Caligraphic-Regular.woff2 | Bin 0 -> 6908 bytes assets/vendors/fonts/KaTeX_Fraktur-Bold.ttf | Bin 0 -> 19584 bytes assets/vendors/fonts/KaTeX_Fraktur-Bold.woff | Bin 0 -> 13296 bytes assets/vendors/fonts/KaTeX_Fraktur-Bold.woff2 | Bin 0 -> 11348 bytes .../vendors/fonts/KaTeX_Fraktur-Regular.ttf | Bin 0 -> 19572 bytes .../vendors/fonts/KaTeX_Fraktur-Regular.woff | Bin 0 -> 13208 bytes .../vendors/fonts/KaTeX_Fraktur-Regular.woff2 | Bin 0 -> 11316 bytes assets/vendors/fonts/KaTeX_Main-Bold.ttf | Bin 0 -> 51336 bytes assets/vendors/fonts/KaTeX_Main-Bold.woff | Bin 0 -> 29912 bytes assets/vendors/fonts/KaTeX_Main-Bold.woff2 | Bin 0 -> 25324 bytes .../vendors/fonts/KaTeX_Main-BoldItalic.ttf | Bin 0 -> 32968 bytes .../vendors/fonts/KaTeX_Main-BoldItalic.woff | Bin 0 -> 19412 bytes .../vendors/fonts/KaTeX_Main-BoldItalic.woff2 | Bin 0 -> 16780 bytes assets/vendors/fonts/KaTeX_Main-Italic.ttf | Bin 0 -> 33580 bytes assets/vendors/fonts/KaTeX_Main-Italic.woff | Bin 0 -> 19676 bytes assets/vendors/fonts/KaTeX_Main-Italic.woff2 | Bin 0 -> 16988 bytes assets/vendors/fonts/KaTeX_Main-Regular.ttf | Bin 0 -> 53580 bytes assets/vendors/fonts/KaTeX_Main-Regular.woff | Bin 0 -> 30772 bytes assets/vendors/fonts/KaTeX_Main-Regular.woff2 | Bin 0 -> 26272 bytes .../vendors/fonts/KaTeX_Math-BoldItalic.ttf | Bin 0 -> 31196 bytes .../vendors/fonts/KaTeX_Math-BoldItalic.woff | Bin 0 -> 18668 bytes .../vendors/fonts/KaTeX_Math-BoldItalic.woff2 | Bin 0 -> 16400 bytes assets/vendors/fonts/KaTeX_Math-Italic.ttf | Bin 0 -> 31308 bytes assets/vendors/fonts/KaTeX_Math-Italic.woff | Bin 0 -> 18748 bytes assets/vendors/fonts/KaTeX_Math-Italic.woff2 | Bin 0 -> 16440 bytes assets/vendors/fonts/KaTeX_SansSerif-Bold.ttf | Bin 0 -> 24504 bytes .../vendors/fonts/KaTeX_SansSerif-Bold.woff | Bin 0 -> 14408 bytes .../vendors/fonts/KaTeX_SansSerif-Bold.woff2 | Bin 0 -> 12216 bytes .../vendors/fonts/KaTeX_SansSerif-Italic.ttf | Bin 0 -> 22364 bytes .../vendors/fonts/KaTeX_SansSerif-Italic.woff | Bin 0 -> 14112 bytes .../fonts/KaTeX_SansSerif-Italic.woff2 | Bin 0 -> 12028 bytes .../vendors/fonts/KaTeX_SansSerif-Regular.ttf | Bin 0 -> 19436 bytes .../fonts/KaTeX_SansSerif-Regular.woff | Bin 0 -> 12316 bytes .../fonts/KaTeX_SansSerif-Regular.woff2 | Bin 0 -> 10344 bytes assets/vendors/fonts/KaTeX_Script-Regular.ttf | Bin 0 -> 16648 bytes .../vendors/fonts/KaTeX_Script-Regular.woff | Bin 0 -> 10588 bytes .../vendors/fonts/KaTeX_Script-Regular.woff2 | Bin 0 -> 9644 bytes assets/vendors/fonts/KaTeX_Size1-Regular.ttf | Bin 0 -> 12228 bytes assets/vendors/fonts/KaTeX_Size1-Regular.woff | Bin 0 -> 6496 bytes .../vendors/fonts/KaTeX_Size1-Regular.woff2 | Bin 0 -> 5468 bytes assets/vendors/fonts/KaTeX_Size2-Regular.ttf | Bin 0 -> 11508 bytes assets/vendors/fonts/KaTeX_Size2-Regular.woff | Bin 0 -> 6188 bytes .../vendors/fonts/KaTeX_Size2-Regular.woff2 | Bin 0 -> 5208 bytes assets/vendors/fonts/KaTeX_Size3-Regular.ttf | Bin 0 -> 7588 bytes assets/vendors/fonts/KaTeX_Size3-Regular.woff | Bin 0 -> 4420 bytes .../vendors/fonts/KaTeX_Size3-Regular.woff2 | Bin 0 -> 3624 bytes assets/vendors/fonts/KaTeX_Size4-Regular.ttf | Bin 0 -> 10364 bytes assets/vendors/fonts/KaTeX_Size4-Regular.woff | Bin 0 -> 5980 bytes .../vendors/fonts/KaTeX_Size4-Regular.woff2 | Bin 0 -> 4928 bytes .../fonts/KaTeX_Typewriter-Regular.ttf | Bin 0 -> 27556 bytes .../fonts/KaTeX_Typewriter-Regular.woff | Bin 0 -> 16028 bytes .../fonts/KaTeX_Typewriter-Regular.woff2 | Bin 0 -> 13568 bytes assets/vendors/gumshoejs@5.1.2.js | 484 + assets/vendors/gumshoejs@5.1.2.min.js | 2 + assets/vendors/katex@0.15.2.min.css | 1 + assets/vendors/listjs@2.3.1.js | 2020 ++ assets/vendors/listjs@2.3.1.min.js | 1 + assets/vendors/tobii@2.3.3.min.css | 1 + assets/vendors/tobii@2.3.3.min.js | 1 + gulpfile.js | 364 + index.md | 4 +- netlify.toml | 73 + package-lock.json | 20985 ++++++++++++++++ package.json | 40 + papicu.gemspec | 110 + screenshot.png | Bin 0 -> 40938 bytes 198 files changed, 31192 insertions(+), 3271 deletions(-) create mode 100644 _includes/_copyright-year.js create mode 100644 _includes/_enhanced-details.js create mode 100644 _includes/analytics.html create mode 100644 _includes/archive-link.html delete mode 100644 _includes/chartjs/defaults.html delete mode 100644 _includes/chartjs/firefox-details-fix.html delete mode 100644 _includes/chartjs/warning-narrow-screen.html delete mode 100644 _includes/color-scheme-switch.html create mode 100644 _includes/copyright-year.min.js delete mode 100644 _includes/darken.html create mode 100644 _includes/enhanced-details.min.js create mode 100644 _includes/figure.html create mode 100644 _includes/fix-linenos.html delete mode 100644 _includes/interact/mortality-curves.html delete mode 100644 _includes/interact/mortality-data.html create mode 100644 _includes/post-nav.html create mode 100644 _includes/prompt.html create mode 100644 _includes/related.html delete mode 100644 _includes/spacer.html create mode 100644 _includes/toc.liquid create mode 100644 _layouts/archive-by-date.html create mode 100644 _layouts/archive-by-tag.html create mode 100644 _layouts/archive-by-topic.html create mode 100644 _layouts/archive-item.html create mode 100644 _layouts/archive.html create mode 100644 _layouts/feed.xml delete mode 100644 _layouts/listing.html create mode 100644 _layouts/page-with-related.html create mode 100644 _layouts/post-with-nav.html create mode 100644 _layouts/post-with-related.html create mode 100644 _pages/archive.md create mode 100644 _pages/jekyll-theme.md create mode 100644 _pages/tags.md mode change 120000 => 100644 _pages/theme.md create mode 100644 _pages/topics.md create mode 100644 _plugins/flexible_include.rb delete mode 100644 _posts/2021-01-01-textual-post.md rename _posts/{2021-01-02-another-example.md => 2021-01-02-basic-html-elements.md} (76%) delete mode 100644 _posts/2021-02-01-post-with-bells-and-whistles.md create mode 100644 _posts/2021-12-01-code-highlighting.md create mode 100644 _posts/2021-12-01-image-and-video/2021-12-01-image-and-video.md create mode 100644 "_posts/2021-12-01-image-and-video/640px-Fortaleza_-_Cear\303\241_-_Brasil.jpg" delete mode 100644 _posts/2022-01-01-sidenotes-caveats-testground.md create mode 100644 _posts/2022-02-01-svg-icons.md create mode 100644 _posts/2022-03-01-math-katex.md create mode 100644 _posts/2022-03-01-sidenotes.md delete mode 100644 _posts/2022-03-01-svg-icons.md create mode 100644 _sass/_code-blocks.scss delete mode 100644 _sass/_code.scss create mode 100644 _sass/_critical.scss create mode 100644 _sass/_details.scss create mode 100644 _sass/_interactivity.scss create mode 100644 _sass/_main.scss create mode 100644 _sass/_sidenotes.scss create mode 100644 _sass/_toc.scss create mode 100644 _sass/_utilities.scss create mode 100644 _sass/base/_color.scss create mode 100644 _sass/base/_html-body.scss create mode 100644 _sass/base/_modern-normalize.scss create mode 100644 _sass/base/_sizing.scss create mode 100644 _sass/base/_typography.scss create mode 100644 _sass/pygments-css-themes/_base16-default-dark.scss create mode 100644 _sass/pygments-css-themes/_base16-default-light.scss create mode 100644 _sass/pygments-css-themes/_base16-tomorrow-dark.scss create mode 100644 _sass/pygments-css-themes/_base16-tomorrow-light.scss create mode 100644 assets/css/code-blocks.min.scss create mode 100644 assets/css/papicu.min.scss create mode 100644 assets/css/papicu.noncode.min.scss delete mode 100644 assets/icons/original-image.png delete mode 100644 assets/img/safari-shot-homepage-dark.png delete mode 100644 assets/img/safari-shot-homepage-light.png delete mode 100644 assets/img/screenshot-advanced-sidenotes-light.png delete mode 100644 assets/img/screenshot-another-example-post-light.png delete mode 100644 assets/img/screenshot-homepage-light.png delete mode 100644 assets/img/screenshot-post-with-bells-and-whistles-light.png delete mode 100644 assets/img/screenshot-textual-post-light.png create mode 100644 assets/js/_partials/_anchors.js create mode 100644 assets/js/_partials/_chartjs.js create mode 100644 assets/js/_partials/_katex.js create mode 100644 assets/js/_partials/_papaparse.js create mode 100644 assets/js/_partials/_papaparse.wonderload.js create mode 100644 assets/js/_partials/_tobii.js create mode 100644 assets/js/_partials/_toc.js create mode 100644 assets/js/anchors.bundle.min.js create mode 100644 assets/js/chartjs.setup.min.js create mode 100644 assets/js/katex.tweaks.min.js create mode 100644 assets/js/papaparse.setup.min.js create mode 100644 assets/js/tobii.bundle.min.js create mode 100644 assets/js/toc.bundle.min.js delete mode 100644 assets/main.scss delete mode 100644 assets/rouge.scss delete mode 100644 assets/site.webmanifest create mode 100644 assets/vendors/anchor-js@4.3.1.min.js create mode 100644 assets/vendors/chartjs-plugin-colorschemes@0.4.0-tableau.ColorBlind10.js create mode 100644 assets/vendors/chartjs-plugin-colorschemes@0.4.0-tableau.ColorBlind10.min.js create mode 100644 assets/vendors/chartjs-plugin-colorschemes@0.4.0.js create mode 100644 assets/vendors/chartjs-plugin-crosshair@1.1.6.min.js create mode 100644 assets/vendors/chartjs-plugins.min.js create mode 100644 assets/vendors/chartjs@2.9.4.min.js create mode 100644 assets/vendors/fonts/KaTeX_AMS-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_AMS-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_AMS-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Caligraphic-Bold.ttf create mode 100644 assets/vendors/fonts/KaTeX_Caligraphic-Bold.woff create mode 100644 assets/vendors/fonts/KaTeX_Caligraphic-Bold.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Caligraphic-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_Caligraphic-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_Caligraphic-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Fraktur-Bold.ttf create mode 100644 assets/vendors/fonts/KaTeX_Fraktur-Bold.woff create mode 100644 assets/vendors/fonts/KaTeX_Fraktur-Bold.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Fraktur-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_Fraktur-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_Fraktur-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Main-Bold.ttf create mode 100644 assets/vendors/fonts/KaTeX_Main-Bold.woff create mode 100644 assets/vendors/fonts/KaTeX_Main-Bold.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Main-BoldItalic.ttf create mode 100644 assets/vendors/fonts/KaTeX_Main-BoldItalic.woff create mode 100644 assets/vendors/fonts/KaTeX_Main-BoldItalic.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Main-Italic.ttf create mode 100644 assets/vendors/fonts/KaTeX_Main-Italic.woff create mode 100644 assets/vendors/fonts/KaTeX_Main-Italic.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Main-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_Main-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_Main-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Math-BoldItalic.ttf create mode 100644 assets/vendors/fonts/KaTeX_Math-BoldItalic.woff create mode 100644 assets/vendors/fonts/KaTeX_Math-BoldItalic.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Math-Italic.ttf create mode 100644 assets/vendors/fonts/KaTeX_Math-Italic.woff create mode 100644 assets/vendors/fonts/KaTeX_Math-Italic.woff2 create mode 100644 assets/vendors/fonts/KaTeX_SansSerif-Bold.ttf create mode 100644 assets/vendors/fonts/KaTeX_SansSerif-Bold.woff create mode 100644 assets/vendors/fonts/KaTeX_SansSerif-Bold.woff2 create mode 100644 assets/vendors/fonts/KaTeX_SansSerif-Italic.ttf create mode 100644 assets/vendors/fonts/KaTeX_SansSerif-Italic.woff create mode 100644 assets/vendors/fonts/KaTeX_SansSerif-Italic.woff2 create mode 100644 assets/vendors/fonts/KaTeX_SansSerif-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_SansSerif-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_SansSerif-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Script-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_Script-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_Script-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Size1-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_Size1-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_Size1-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Size2-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_Size2-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_Size2-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Size3-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_Size3-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_Size3-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Size4-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_Size4-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_Size4-Regular.woff2 create mode 100644 assets/vendors/fonts/KaTeX_Typewriter-Regular.ttf create mode 100644 assets/vendors/fonts/KaTeX_Typewriter-Regular.woff create mode 100644 assets/vendors/fonts/KaTeX_Typewriter-Regular.woff2 create mode 100644 assets/vendors/gumshoejs@5.1.2.js create mode 100644 assets/vendors/gumshoejs@5.1.2.min.js create mode 100644 assets/vendors/katex@0.15.2.min.css create mode 100644 assets/vendors/listjs@2.3.1.js create mode 100644 assets/vendors/listjs@2.3.1.min.js create mode 100644 assets/vendors/tobii@2.3.3.min.css create mode 100644 assets/vendors/tobii@2.3.3.min.js create mode 100644 gulpfile.js create mode 100644 netlify.toml create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 papicu.gemspec create mode 100644 screenshot.png diff --git a/.gitignore b/.gitignore index e0fb224..eaf4fcb 100644 --- a/.gitignore +++ b/.gitignore @@ -15,5 +15,10 @@ _site/ .jekyll-metadata # misc +_gulp/ _/ -TODOs.md \ No newline at end of file +TODOs.md +tmp/ + +# node +node_modules/ \ No newline at end of file diff --git a/Gemfile b/Gemfile index 2b1cef6..f785cfe 100644 --- a/Gemfile +++ b/Gemfile @@ -1,16 +1,26 @@ # frozen_string_literal: true + source "https://rubygems.org" -gem "jekyll", "~> 4.1" +# NOTE: gems under `group :jekyll_plugins do` should be loaded irrespectively of +# `_config.yml`, but for some unknown reason I couldn't make it work! +# https://jekyllrb.com/docs/plugins/installation/ +# +# I am doing the following: +# - alternative / forked versions of gems are specified below +# - all other gems are specified in `.gemspec` +# - jekyll plugins are loaded explicitly in `_config.yml` + + +# alternative / forked versions of gems -# sensible plugins -gem "jekyll-feed" -gem "jekyll-seo-tag" -gem "jekyll-sitemap" -gem "jekyll-optional-front-matter" -gem "jekyll-redirect-from" -gem "jekyll-archives" -gem "jekyll-last-modified-at" +gem "jekyll-feed", github: "drscream/jekyll-feed", branch: "feature/template-feed-xml" +# also works: +# gem "jekyll-feed", github: "drscream/jekyll-feed", ref: "refs/pull/362/head" + +# TODO: track if / when this PR will be merged into the main repo +# - https://github.com/jekyll/jekyll-feed/pull/362 gem "katex", github: "lucasrla/katex-ruby" -gem "kramdown-math-katex" \ No newline at end of file + +gemspec \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 32e1c30..107cbed 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,11 @@ +GIT + remote: https://github.com/drscream/jekyll-feed.git + revision: 5543314b93ef8e671fe79ee045a4fa0f971ed69f + branch: feature/template-feed-xml + specs: + jekyll-feed (0.16.0) + jekyll (>= 3.7, < 5.0) + GIT remote: https://github.com/lucasrla/katex-ruby.git revision: 5125cdbbef52a640846e5a27114459ae97f0cfb9 @@ -5,20 +13,55 @@ GIT katex (0.6.3) execjs (~> 2.7) +PATH + remote: . + specs: + papicu (0.1.0) + classifier-reborn (~> 2.2.0) + gsl (~> 2.1.0) + jekyll (~> 4.1) + jekyll-archives (~> 2.2.1) + jekyll-feed + jekyll-last-modified-at (~> 1.3.0) + jekyll-optional-front-matter (~> 0.3.2) + jekyll-postfiles (~> 3.1.0) + jekyll-redirect-from (~> 0.16.0) + jekyll-remote-theme (~> 0.4.3) + jekyll-seo-tag (~> 2.8.0) + jekyll-sitemap (~> 1.4.0) + katex + kramdown-math-katex (~> 1.0.1) + sass-embedded (~> 1.4.0) + GEM remote: https://rubygems.org/ specs: addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) + classifier-reborn (2.2.0) + fast-stemmer (~> 1.0) colorator (1.1.0) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) + ethon (0.15.0) + ffi (>= 1.15.0) eventmachine (1.2.7) execjs (2.8.1) + fast-stemmer (1.0.2) ffi (1.15.5) forwardable-extended (2.6.0) + google-protobuf (3.20.0) + gsl (2.1.0.3) + html-proofer (3.19.3) + addressable (~> 2.3) + mercenary (~> 0.3) + nokogiri (~> 1.12) + parallel (~> 1.3) + rainbow (~> 3.0) + typhoeus (~> 1.3) + yell (~> 2.0) http_parser.rb (0.8.0) i18n (1.10.0) concurrent-ruby (~> 1.0) @@ -39,15 +82,20 @@ GEM terminal-table (~> 2.0) jekyll-archives (2.2.1) jekyll (>= 3.6, < 5.0) - jekyll-feed (0.16.0) - jekyll (>= 3.7, < 5.0) jekyll-last-modified-at (1.3.0) jekyll (>= 3.7, < 5.0) posix-spawn (~> 0.3.9) jekyll-optional-front-matter (0.3.2) jekyll (>= 3.0, < 5.0) + jekyll-postfiles (3.1.0) + jekyll (>= 3.8.6, < 5) jekyll-redirect-from (0.16.0) jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) jekyll-sass-converter (2.2.0) sassc (> 2.0.1, < 3.0) jekyll-seo-tag (2.8.0) @@ -56,7 +104,8 @@ GEM jekyll (>= 3.7, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - kramdown (2.3.1) + json (2.6.1) + kramdown (2.3.2) rexml kramdown-math-katex (1.0.1) katex (~> 0.4) @@ -68,36 +117,51 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) + mini_portile2 (2.8.0) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + parallel (1.22.1) pathutil (0.16.2) forwardable-extended (~> 2.6) posix-spawn (0.3.15) public_suffix (4.0.6) + racc (1.6.0) + rainbow (3.1.1) + rake (13.0.6) rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) rexml (3.2.5) rouge (3.28.0) + rubyzip (2.3.2) safe_yaml (1.0.5) + sass-embedded (1.4.2) + google-protobuf (~> 3.19) + rake (>= 10.0.0) sassc (2.4.0) ffi (~> 1.9) terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) + typhoeus (1.4.0) + ethon (>= 0.9.0) unicode-display_width (1.8.0) + w3c_validators (1.3.7) + json (>= 1.8) + nokogiri (~> 1.6) + rexml (~> 3.2) + yell (2.2.2) PLATFORMS ruby DEPENDENCIES - jekyll (~> 4.1) - jekyll-archives - jekyll-feed - jekyll-last-modified-at - jekyll-optional-front-matter - jekyll-redirect-from - jekyll-seo-tag - jekyll-sitemap + bundler + html-proofer (~> 3.0) + jekyll-feed! katex! - kramdown-math-katex + papicu! + w3c_validators (~> 1.3) BUNDLED WITH 2.1.4 diff --git a/README.md b/README.md index 0da28b9..d7069f8 100644 --- a/README.md +++ b/README.md @@ -1,218 +1,9 @@ ---- -layout: page -permalink: /theme -title: Papicu -description: "A minimalist Jekyll theme with text-centric layout. Features dark mode, KaTeX, Sidenotes, Chart.js, Lightbox, TOC, etc." -# image: https://papicu.netlify.app/assets/img/screenshot-homepage-light.png og:type=website and JSON-LD's @type=WebPage, https://cards-dev.twitter.com/validator does not load this type of image -# EITHER change the type of this page to og|Article JSON|BlogPosting (an easy way is to change the layout from `page` to `post`) -# OR put a square image here (see below) -image: https://papicu.netlify.app/assets/icons/original-image.png -lightbox: true -toc: true -code_highlighter: true ---- +# Papicu -

Papicu

+Papicu is a Jekyll theme that I put together for myself. But, if you like it, Papicu is free to use and modify. -Papicu is a minimalist [Jekyll](https://jekyllrb.com/) theme. +A screenshot of Papicu - Jekyll Theme -It's been heavily inspired by [Clio](https://github.com/danromero/clio), another Jekyll theme. In fact, Papicu is basically a fork of Clio. I put it together to meet my own needs. But, if you like it, Papicu is free to use and modify. The source code is available at [github.com/lucasrla/papicu](https://github.com/lucasrla/papicu). +*** -Try the live demo at [papicu.netlify.app](https://papicu.netlify.app). - - -## What's inside? - - - Home Page (light mode) - - - - Home Page (dark mode) - - -Main features: - -- Dark / light mode -- Privacy-conscious analytics (not Google Analytics) -- Support to [KaTeX](https://katex.org) -- Support to [Chart.js](https://www.chartjs.org) interactive charts -- Support to sidenotes (a.k.a. margin notes) -- Support to table of contents (TOC) -- Support to deep anchor links -- Support to lightbox for image zooming -- Expandable & collapsible content -- Lazy-loaded, responsive YouTube embeds with 16:9 aspect ratio - -Papicu also includes: - -- A homepage that displays a brief introduction and the most recent blog posts in reverse chronological order -- An about page located at `/about/` -- A few sample blog posts -- An `RSS` feed - -Performance-wise: - -- [Lighthouse](https://developers.google.com/web/tools/lighthouse/) via [web.dev/measure](https://web.dev/measure/): [99 performance (see PageSpeed below), 95 accessibility, 100 best practices, 100 SEO](https://lighthouse-dot-webdotdevsite.appspot.com//lh/html?url=https%3A%2F%2Fpapicu.netlify.app%2F) -- PageSpeed: [Papicu theme home page scores 99](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fpapicu.netlify.app), [a heavy-loaded post with third-party scripts gets 93](https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fpapicu.netlify.app%2Fpost-with-bells-and-whistles%2F) -- W3C: [valid HTML](https://validator.w3.org/nu/?showsource=yes&showoutline=yes&showimagereport=yes&doc=https%3A%2F%2Fpapicu.netlify.app) - - -## Setup - -### Option A: use jekyll-remote-theme - -First, have a Jekyll website/blog set up on your local machine. - -If you are new to Jekyll, get familiar with it first: [jekyllrb.com/docs](https://jekyllrb.com/docs/). - -1. Add the following to your `Gemfile` - - ```ruby - gem "jekyll-remote-theme" - gem "katex", github: "lucasrla/katex-ruby" - gem "kramdown-math-katex" - ``` - -2. Install the gems by running on terminal - - ```sh - bundle install - ``` - -3. Add the following to your `_config.yml` - - ```yml - markdown: kramdown - - kramdown: - parse_block_html: true - math_engine: katex - - plugins: - - jekyll-remote-theme - - remote_theme: lucasrla/papicu - ``` - -4. By default `remote_theme: lucasrla/papicu` points to `HEAD`, the latest commit of Papicu. Optionally, you can refer `remote_theme` to a specific commit, tag or branch: - - ```yml - remote_theme: lucasrla/papicu@1316b145a02c610347b9172da3d2feba32aaf595 # pointing to commit: https://github.com/lucasrla/papicu/commit/1316b145a02c610347b9172da3d2feba32aaf595 - ``` - - ```yml - remote_theme: lucasrla/papicu@v1.0.0 # pointing to (a theoretical) release tag v1.0.0 (please note that papicu has no releases yet) - ``` - -5. Now, run jekyll on terminal - - ```sh - bundle exec jekyll serve - ``` - -6. Visit your website at [http://127.0.0.1:4000](http://127.0.0.1:4000) - -### Option B: clone or fork this repository - -If you are reasonably well-versed in Jekyll, clone or fork this repository and have fun. - - -## Deployment - -### Issues with GitHub Pages - -Unfortunately, Papicu is not compatible with the GitHub Pages standard workflow. - -Why? Because, as of early March 2022, GitHub Pages ([gem version 225](https://rubygems.org/gems/github-pages/versions/225)) still uses Jekyll `=3.9.0`. Papicu needs Jekyll `~>4.1` to take advantage of `slugified_categories` (which we rely on for [well-formed permalinks](https://jekyllrb.com/docs/permalinks/#placeholders)). - -For those who are really interested, it is possible circumvent this limitation and run Papicu on GitHub Pages by using GitHub Actions. Read [Jekyll's official guide on GitHub Actions](https://jekyllrb.com/docs/continuous-integration/github-actions/) for the details. - -### Netlify - -Alternatively, sign up for an account with [Netlify](https://www.netlify.com/) and deploy your website with them for free. We did that for our demo page: [https://papicu.netlify.app](https://papicu.netlify.app). - -If you need help, read [A Step-by-Step Guide: Jekyll 4.0 on Netlify](https://www.netlify.com/blog/2020/04/02/a-step-by-step-guide-jekyll-4.0-on-netlify/). - - -## Usage - -### Running Jekyll on your local machine - -First, you must install `ruby` and `bundler` locally. If you are on macOS, read the instructions at [lucasrla.github.io/macos-setup/ruby](https://lucasrla.github.io/macos-setup/ruby). - -Next, make sure `bundler` is configured with isolated environments by project: - -```sh -bundle config set bin bin/ -bundle config set path vendor.noindex/ -``` - -Now, install Jekyll: - -```sh -bundle install - -# and then check if it has been installed properly -bundle info jekyll -``` - -Finally, run: - -```sh -# We are passing `local` as `jekyll.environment` and checking for that inside `default.html` -# to avoid sending analytics events when running locally. -# For more info: https://jekyllrb.com/docs/configuration/environments/ - -JEKYLL_ENV=local bundle exec jekyll serve -``` - - -### Post with examples - -Each example post inside `_posts/` demonstrates a few of Papicu features. - -Have a look, for example, at the post titled [Post containing demos of several features](https://papicu.netlify.app/post-with-bells-and-whistles/), and make sure you review its source code `_posts/2021-02-01-post-with-bells-and-whistles.md` as well. - - -### Favicon generator - -Try [realfavicongenerator.net](https://realfavicongenerator.net). - - -### Metadata – JSON-LD, Open Graph, and Twitter Cards - -Papicu takes advantage of [jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag/) to easily generate relevant metadata tags for search engines and social media. - -[Twitter Cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards), [Open Graph](https://ogp.me/) and [JSON-LD](https://en.wikipedia.org/wiki/JSON-LD) ([Google's guide](https://developers.google.com/search/docs/guides/intro-structured-data)) are supported out-of-the-box. - -Please note that jekyll-seo-tag, as of [v2.8.0](https://github.com/jekyll/jekyll-seo-tag/releases/tag/v2.8.0), sets the Twitter Cards to `summary_large_image` only if there is an actual image referenced (say, at your post's front-matter). If there is none, it will default to `summary`. See, for instance, their issue [#287](https://github.com/jekyll/jekyll-seo-tag/issues/287). - - -## License - -Papicu itself is distributed under the terms of the [MIT License](https://en.wikipedia.org/wiki/MIT_License). Plugins and third-party code have their own licenses. Check them out. - - -## Credits and Acknowledgments - -- Code, examples, and inspiration from Jekyll themes [Clio](https://github.com/danromero/clio) and [Poole](https://github.com/poole/poole/) -- Dark mode via [Darken](https://github.com/ColinEspinas/darken) -- Privacy-conscious analytics via [Shynet](https://github.com/milesmcc/shynet/) -- Table of Contents via [jekyll-toc](https://github.com/allejo/jekyll-toc) and [Gumshoe](https://github.com/cferdinandi/gumshoe/) -- [KaTeX](https://katex.org) support via [kramdown](https://github.com/gettalong/kramdown), [math-katex](https://github.com/kramdown/math-katex), and [katex-ruby](https://github.com/glebm/katex-ruby/) -- Interactive charts via [Chart.js](https://www.chartjs.org) -- Sidenotes via [@kslstn/sidenotes](https://github.com/kslstn/sidenotes) ([blog post](https://www.kooslooijesteijn.net/blog/sidenotes-without-js)) -- Redirects via [jekyll-redirect-from](https://github.com/jekyll/jekyll-redirect-from) -- YouTube embeds via [jekyll-youtube](https://github.com/pibby/jekyll-youtube) -- YouTube lazy loading via [dev.to/haggen](https://dev.to/haggen/lazy-load-embedded-youtube-videos-520g) -- Compressed HTML via [jekyll-minifier](https://github.com/Mendeo/jekyll-minifier) -- Anchor links via [AnchorJS](https://www.bryanbraun.com/anchorjs/) -- Image lightbox via [Tobii](https://github.com/midzer/tobii) -- Searchable, sortable, filterable tables and lists via [List.js](https://listjs.com/) -- [And other foundational Jekyll plugins](https://github.com/lucasrla/papicu/blob/main/Gemfile) - - -## What does papicu mean? - -Papicu means "narrow, elongated pond" in an indigenous language from Brazil. It is also the name of a [neighborhood in Fortaleza](https://goo.gl/maps/qJeHn1RXG8vH7k3f9), [a city of northeastern Brazil](https://en.wikipedia.org/wiki/Fortaleza). +[![Netlify Status](https://api.netlify.com/api/v1/badges/f244b0fe-138f-4e70-8c7d-a10c60963125/deploy-status)](https://app.netlify.com/sites/papicu/deploys) \ No newline at end of file diff --git a/_config.yml b/_config.yml index 9a04666..f370614 100644 --- a/_config.yml +++ b/_config.yml @@ -1,76 +1,163 @@ +################################# SITE INFO + title: "John Doe" tagline: "John Doe’s personal website" description: "A longer description of John Doe’s personal website" url: https://papicu.netlify.app email: site@john_doe_website.com -locale: en_US # papicu's homepage and twitter cards use this handler twitter: username: "john_doe_website" -# this is due to JSON-LD +# used by JSON-LD schema.org metadata author: name: "John Doe" url: https://john_doe_author.com email: me@john_doe_author.com twitter: "john_doe_author" -# uncomment and set this up if you are using shynet -# shynet: https://shynet.john_doe_website.com/ingress/uuid-universally-unique-identifier/ +lang: en +locale: en_US -favicon_color: "#5AC8FA" +################################# THEME -baseurl: "" +# theme: papicu -markdown: kramdown +# remote_theme: lucasrla/papicu +# +# https://github.com/benbalter/jekyll-remote-theme/ +# > You may also optionally specify a branch, tag, or commit to use by appending an @ and the Git ref (e.g., benbalter/retlab@v1.0.0 or benbalter/retlab@develop). If you don't specify a Git ref, the HEAD ref will be used. -kramdown: - parse_block_html: true - math_engine: katex +################################# THEME COLORS -permalink: /:slugified_categories/:title/ +colors: + # both used in `theme-color` meta tag + # make sure these two match the background colors in `_sass/base/_color.scss` + background_light: "#fafafa" + background_dark: "#222222" -sass: - sass_dir: _sass - style: :compressed + # used in safari's `mask-icon` meta tag + # remove this if you have set your own `mask-icon` in `_includes/head.html` + favicon_safari_mask_icon: "#5ac8fa" + +################################# ANALYTICS + +# set this up with a proper URL if you are using Shynet +analytics: + shynet: + # MUST insert an url with NO trailing slash! + url: https://shynet.john_doe_website.com/ingress/uuid-universally-unique-identifier + # add tiny pixel to count feed reads, must add `_layouts/feed.xml` file + pixel_feed: true + +################################# JEKYLL-FEED + +feed: + # https://github.com/jekyll/jekyll-feed#posts-limit + posts_limit: 20 + # https://github.com/jekyll/jekyll-feed/pull/362 + template: _layouts/feed.xml + +################################# JEKYLL PLUGINS plugins: - - jekyll-feed - jekyll-seo-tag - jekyll-sitemap - jekyll-optional-front-matter - jekyll-redirect-from - jekyll-archives - jekyll-last-modified-at + - jekyll-postfiles + - jekyll-remote-theme + +################################# KRAMDOWN / KATEX + +kramdown: + # https://kramdown.gettalong.org/converter/html.html#option-math-engine + math_engine: katex + # https://kramdown.gettalong.org/converter/html.html#option-footnote-backlink-inline + footnote_backlink_inline: true + # + # syntax_highlighter_opts: + # # https://github.com/gettalong/kramdown/blob/70121c00e318e0bffb4b74bbef1acc5b071d5ed7/lib/kramdown/converter/syntax_highlighter/rouge.rb + # # https://github.com/rouge-ruby/rouge#formatters + # css_class: rouge + # # which is shorter than .highlight, but it doesn't work with the most recent kramdown/rouge versions + +################################# JEKYLL-SASS-CONVERTER + +sass: + implementation: sass-embedded + style: compressed + sourcemap: never + +################################# JEKYLL-ARCHIVES + +jekyll-archives: + layouts: + category: archive-item + tag: archive-item + enabled: + - categories + - tags + permalinks: + category: /:name/ + tag: /tag/:name/ + slug_mode: latin # MUST be the same as in `slugify_mode` + +################################# RELATED POSTS (LSI) + +# see `.gemspec` and `_includes/related.html` for more info +lsi: true + +################################# FILES TO INCLUDE/EXCLUDE FROM BUILD +# +# whatever you need, must be added explicitly on your own `_config.yml` +# +# any jekyll site need to declare `include` and `exclude` explicitly +# one cannot rely on the defaults listed by a theme's `_config.yml` include: - _pages/ exclude: - - "vendor.noindex/" - - "bin/" - - "TODOs.md" - - "README.md" + - vendor/ + - vendor.noindex/ + - bin/ + - "*.gemspec" + - TODOs.md + - README.md + - RESEARCH.md + - LICENSE + - node_modules/ + - package*.json + - gulpfile.js + - .vscode/ +################################# DEFAULTS (AUTOMATICALLY ADDED TO FRONT MATTER) +# +# whatever you need, must be added explicitly on your own `_config.yml` +# +# any jekyll site need to declare `defaults` explicitly +# ne cannot rely on the defaults listed by a theme's `_config.yml` +# # ref: https://jekyllrb.com/docs/configuration/front-matter-defaults/ + defaults: - - scope: - path: "assets/**/*.pdf" - values: - sitemap: false - - scope: - path: "assets/**/*.csv" - values: - sitemap: false + # MUST KEEP THIS AS FIRST ENTRY, we are using + # `site.defaults[0].values.image.path` in `_layouts/archive.html` - scope: path: "" - type: "pages" + type: "pages" + # NOTE: category/tag/archive pages are NOT included in this "pages" scope + # so we are inserting `og:image` and `twitter:image` + # manually in `_layouts/archive.html` values: image: path: "/assets/img/papicu-blue-square-512.png" # jekyll-seo-tag v2.8.0 does not output `width` and `height` to meta - # tags if they're set here. it seems to recognize only the `path` + # tags if they're set here. it seems to get only `path` from defaults - scope: path: "" type: "posts" @@ -78,11 +165,44 @@ defaults: image: path: "/assets/img/papicu-blue-square-512.png" -jekyll-archives: - enabled: - - categories - layouts: - category: listing - permalinks: - category: /:name/ - slug_mode: pretty \ No newline at end of file +################################# SLUGS +# +# whatever you need, must be added explicitly on your own `_config.yml` + +permalink: /:slugified_categories/:title/ + +# https://jekyllrb.com/docs/liquid/filters/#options-for-the-slugify-filter +# default: removes spaces and non-alphanumeric characters +# latin: like default plus converts àèïòü to aeiou +# pretty: like default but keeps the following chars ._~!$&'()+,;=@` +# ascii: like default plus removes non-ASCII chars (eg non-latin alphabets) + +slugify_mode: latin # MUST be the same as in `jekyll-archives: slug_mode` + +################################# BASE URL + +# if you're deploying on GitHub Pages AND you don't have a custom domain, +# change `baseurl` from "" to "/YOUR_REPO_NAME" +baseurl: "" +# we use the `relative_url` filter in URL paths pretty much everywhere to +# automatically prepend `baseurl` +# more info: https://jekyllrb.com/docs/liquid/filters/ + +################################# LAYOUT LIQUID-BASED MINIFIERS + +# _layouts/{html,js}_minifier.liquid +liquid_minifiers: + # html_minifier breaks down with the html code in `enhanced-details.js`` + # escaping the opening < symbol (with \<) didn't help there + html: false + js: false + +# ################################# JS MINIFIER (not using it anymore) + +# # jekyll-js-converter +# javascript: +# javascript_dir: assets/js/_partials +# load_paths: +# - assets/vendors +# - _posts +# source_map: never \ No newline at end of file diff --git a/_includes/_copyright-year.js b/_includes/_copyright-year.js new file mode 100644 index 0000000..a583d2b --- /dev/null +++ b/_includes/_copyright-year.js @@ -0,0 +1,5 @@ +let yearEl = document.querySelector('#copyright-year'); + +if(yearEl){ + yearEl.innerText = new Date().getFullYear(); +} \ No newline at end of file diff --git a/_includes/_enhanced-details.js b/_includes/_enhanced-details.js new file mode 100644 index 0000000..3243992 --- /dev/null +++ b/_includes/_enhanced-details.js @@ -0,0 +1,103 @@ +const bottomElHtml = "\
\\\\<\/path\>\<\/svg\>\<\/span\>\<\/div\>".trim(); +let bottomTemplate = document.createElement('template'); +bottomTemplate.innerHTML = bottomElHtml; + +const topElHtml = "\
\\\\<\/path\>\<\/svg\>\<\/span\>\<\/div\>".trim(); +let topTemplate = document.createElement('template'); +topTemplate.innerHTML = topElHtml; + +const expandElHtml = "\
\\\\<\/path\>\<\/svg\>\<\/span\>\<\/div\>".trim(); +let expandTemplate = document.createElement('template'); +expandTemplate.innerHTML = expandElHtml; + +function closeDetailsFromBtn(stickyDivEl) { + const detailsEl = stickyDivEl.parentNode.parentNode; + const summaryTop = detailsEl.firstElementChild.getBoundingClientRect().top; + let scrollPosition = 0; + + if(summaryTop < 0){ + // TODO: improve this scroll position to look better on Firefox Focus iOS, + // the hardcoded `32px` is just a quick (and very poor) workaround + scrollPosition = summaryTop + window.pageYOffset - 32; + } + + detailsEl.open = false; + + if (scrollPosition != 0){ + // el.firstElementChild.scrollIntoView({behavior: "auto"}); + window.scrollTo({ + top: scrollPosition, + behavior: "instant" + }); + } +} + +function expandDetailsFromBtn(expandDivEl) { + expandDivEl.previousElementSibling.open = true; +} + +function stylizedPluses() { + const signedSummaries = document.querySelectorAll("summary.signed-text, summary.signed-heading"); + + signedSummaries.forEach(function(summaryEl){ + const detailsEl = summaryEl.parentElement; + + // details is closed, hide ::after pseudo element AND insert expand button + if (!detailsEl.open) { + // thanks to https://stackoverflow.com/questions/41215490/hide-pseudo-element-on-click + document.documentElement.style.setProperty('--display-pseudo-el', 'none'); + detailsEl.insertAdjacentHTML("afterend", expandElHtml); + } + + // add/remove expand button on toggle + detailsEl.addEventListener("toggle", (event) => { + let expandPresent = detailsEl.nextElementSibling.isEqualNode(expandTemplate.content.firstChild); + + // details is closing AND expand button is missing, insert it + if (!detailsEl.open && !expandPresent) { + detailsEl.insertAdjacentHTML("afterend", expandElHtml); + } + + // details is closing AND expand button is present, remove it + if (detailsEl.open && expandPresent) { + detailsEl.nextElementSibling.remove(); + } + }); + }); +} + +function stickyCrevrons() { + const contentDetails = document.querySelectorAll("details.content-details, details.section-details"); + + contentDetails.forEach(function(detailsEl){ + const divContainer = detailsEl.querySelector("div"); + + // details is open, insert sticky chevrons right away + if (detailsEl.open) { + divContainer.insertAdjacentHTML("afterbegin", topElHtml); + divContainer.insertAdjacentHTML("beforeend", bottomElHtml); + } + + // add/remove sticky chevrons on toggle + detailsEl.addEventListener("toggle", (event) => { + let chevronsPresent = divContainer.lastChild.isEqualNode(bottomTemplate.content.firstChild) && divContainer.firstChild.isEqualNode(topTemplate.content.firstChild); + + // details is closing AND sticky chevrons are present, remove them + if (!detailsEl.open && chevronsPresent) { + divContainer.firstChild.remove(); + divContainer.lastChild.remove(); + } + + // details is opening AND sticky chevrons are missing, insert them + if (detailsEl.open && !chevronsPresent) { + divContainer.insertAdjacentHTML("afterbegin", topElHtml); + divContainer.insertAdjacentHTML("beforeend", bottomElHtml); + } + }); + }); +} + +if (window.matchMedia('(max-width: 640px)').matches){ + stylizedPluses(); + stickyCrevrons(); +} \ No newline at end of file diff --git a/_includes/analytics.html b/_includes/analytics.html new file mode 100644 index 0000000..7f7a100 --- /dev/null +++ b/_includes/analytics.html @@ -0,0 +1,19 @@ +{% if jekyll.environment != "local" and site.analytics.shynet %} + + {% comment %} This is to prevent double slashes "//" {% endcomment %} + + {% comment %} + {% assign shynet_last_char = site.analytics.shynet | slice: -1 %} + + {% if shynet_last_char == "/" %} + {% assign new_length = site.analytics.shynet | size | minus: 1 %} + {% assign shynet_url = site.analytics.shynet | slice: 0, new_length %} + {% else %} + {% assign shynet_url = site.analytics.shynet %} + {% endif %} + {% endcomment %} + + + + +{% endif %} \ No newline at end of file diff --git a/_includes/archive-link.html b/_includes/archive-link.html new file mode 100644 index 0000000..95d9b68 --- /dev/null +++ b/_includes/archive-link.html @@ -0,0 +1 @@ +([a]({{ include.url }})) \ No newline at end of file diff --git a/_includes/chartjs/defaults.html b/_includes/chartjs/defaults.html deleted file mode 100644 index 76010a2..0000000 --- a/_includes/chartjs/defaults.html +++ /dev/null @@ -1,300 +0,0 @@ - \ No newline at end of file diff --git a/_includes/chartjs/firefox-details-fix.html b/_includes/chartjs/firefox-details-fix.html deleted file mode 100644 index 428143f..0000000 --- a/_includes/chartjs/firefox-details-fix.html +++ /dev/null @@ -1,19 +0,0 @@ - \ No newline at end of file diff --git a/_includes/chartjs/warning-narrow-screen.html b/_includes/chartjs/warning-narrow-screen.html deleted file mode 100644 index 1e00c86..0000000 --- a/_includes/chartjs/warning-narrow-screen.html +++ /dev/null @@ -1,3 +0,0 @@ -
-

⚠️ Your screen is almost too narrow for the interactive chart below. Please rotate your device for a better experience.

-
\ No newline at end of file diff --git a/_includes/color-scheme-switch.html b/_includes/color-scheme-switch.html deleted file mode 100644 index 149eb5d..0000000 --- a/_includes/color-scheme-switch.html +++ /dev/null @@ -1,10 +0,0 @@ -
- Light - Dark - {% comment %} - TODO: implement the "Auto" mode a la Apple Developer (a third state) & remove Darken (which is limited to an on/off toggle) - - Auto - - {% endcomment %} -
\ No newline at end of file diff --git a/_includes/copyright-year.min.js b/_includes/copyright-year.min.js new file mode 100644 index 0000000..1aeffd4 --- /dev/null +++ b/_includes/copyright-year.min.js @@ -0,0 +1 @@ +let yearEl=document.querySelector("#copyright-year");yearEl&&(yearEl.innerText=(new Date).getFullYear()); \ No newline at end of file diff --git a/_includes/darken.html b/_includes/darken.html deleted file mode 100644 index c9c2ab8..0000000 --- a/_includes/darken.html +++ /dev/null @@ -1,75 +0,0 @@ - \ No newline at end of file diff --git a/_includes/divider.html b/_includes/divider.html index bf96b47..582ad43 100644 --- a/_includes/divider.html +++ b/_includes/divider.html @@ -1 +1 @@ -
\ No newline at end of file +
\ No newline at end of file diff --git a/_includes/duckduckgo-search.html b/_includes/duckduckgo-search.html index 7f54f2f..6e6c602 100644 --- a/_includes/duckduckgo-search.html +++ b/_includes/duckduckgo-search.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/_includes/enhanced-details.min.js b/_includes/enhanced-details.min.js new file mode 100644 index 0000000..bdb21b1 --- /dev/null +++ b/_includes/enhanced-details.min.js @@ -0,0 +1 @@ +const bottomElHtml="
".trim();let bottomTemplate=document.createElement("template");bottomTemplate.innerHTML=bottomElHtml;const topElHtml="
".trim();let topTemplate=document.createElement("template");topTemplate.innerHTML=topElHtml;const expandElHtml="
".trim();let expandTemplate=document.createElement("template");function closeDetailsFromBtn(e){const t=e.parentNode.parentNode;e=t.firstElementChild.getBoundingClientRect().top;let o=0;e<0&&(o=e+window.pageYOffset-32),t.open=!1,0!=o&&window.scrollTo({top:o,behavior:"instant"})}function expandDetailsFromBtn(e){e.previousElementSibling.open=!0}function stylizedPluses(){const e=document.querySelectorAll("summary.signed-text, summary.signed-heading");e.forEach(function(e){const o=e.parentElement;o.open||(document.documentElement.style.setProperty("--display-pseudo-el","none"),o.insertAdjacentHTML("afterend",expandElHtml)),o.addEventListener("toggle",e=>{var t=o.nextElementSibling.isEqualNode(expandTemplate.content.firstChild);o.open||t||o.insertAdjacentHTML("afterend",expandElHtml),o.open&&t&&o.nextElementSibling.remove()})})}function stickyCrevrons(){const e=document.querySelectorAll("details.content-details, details.section-details");e.forEach(function(o){const n=o.querySelector("div");o.open&&(n.insertAdjacentHTML("afterbegin",topElHtml),n.insertAdjacentHTML("beforeend",bottomElHtml)),o.addEventListener("toggle",e=>{var t=n.lastChild.isEqualNode(bottomTemplate.content.firstChild)&&n.firstChild.isEqualNode(topTemplate.content.firstChild);!o.open&&t&&(n.firstChild.remove(),n.lastChild.remove()),o.open&&!t&&(n.insertAdjacentHTML("afterbegin",topElHtml),n.insertAdjacentHTML("beforeend",bottomElHtml))})})}expandTemplate.innerHTML=expandElHtml,window.matchMedia("(max-width: 640px)").matches&&(stylizedPluses(),stickyCrevrons()); \ No newline at end of file diff --git a/_includes/figure.html b/_includes/figure.html new file mode 100644 index 0000000..c398fa7 --- /dev/null +++ b/_includes/figure.html @@ -0,0 +1,17 @@ +{% if include.src and include.caption and include.w and include.h %} + {% assign alt = include.alt | default: include.caption | strip_html %} +
+ {% if include.lightbox_img %} + + {% endif %} + {{ alt }} + {% if include.lightbox_img %} + + {% endif %} +
+ {{ include.caption }} +
+
+{% else %} +{% include prompt.html type="accent" text="`ERROR: Missing parameter(s) in figure`.

Make sure you provide the following parameters: `src`, `caption`, `w`, and `h`." %} +{% endif %} \ No newline at end of file diff --git a/_includes/fix-linenos.html b/_includes/fix-linenos.html new file mode 100644 index 0000000..0c69682 --- /dev/null +++ b/_includes/fix-linenos.html @@ -0,0 +1,8 @@ +{% comment %} +thanks to https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901 +{% endcomment %} + +{% if _code contains '
' %}
+  {% assign _code = _code | replace: "
", "" %} +{% endif %} \ No newline at end of file diff --git a/_includes/footer.html b/_includes/footer.html index 4e34367..c7628bd 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,38 +1,60 @@ -