From 3a2d198d153efc8a69e7640f7dcde88207268ff3 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 22 Sep 2023 08:40:59 +0200 Subject: Replace zola with DOM-based static site generation code --- themes/bear/.envrc | 1 - themes/bear/.gitignore | 1 - themes/bear/LICENSE | 21 --- themes/bear/README.md | 83 ------------ themes/bear/config.toml | 35 ----- themes/bear/content/_index.md | 23 ---- themes/bear/content/bear.md | 15 --- themes/bear/content/blog/_index.md | 3 - themes/bear/content/blog/markdown-syntax.md | 130 ------------------- themes/bear/content/zola.md | 36 ------ themes/bear/flake.lock | 61 --------- themes/bear/flake.nix | 20 --- themes/bear/netlify.toml | 25 ---- themes/bear/screenshot.png | Bin 262700 -> 0 bytes themes/bear/templates/404.html | 8 -- themes/bear/templates/base.html | 30 ----- themes/bear/templates/footer.html | 5 - themes/bear/templates/header.html | 11 -- themes/bear/templates/index.html | 7 - themes/bear/templates/nav.html | 6 - themes/bear/templates/page.html | 29 ----- themes/bear/templates/section.html | 34 ----- themes/bear/templates/security_tags.html | 2 - themes/bear/templates/seo_tags.html | 2 - themes/bear/templates/style.css | 193 ---------------------------- themes/bear/templates/style.css.html | 1 - themes/bear/templates/taxonomy_list.html | 14 -- themes/bear/templates/taxonomy_single.html | 34 ----- themes/bear/theme.toml | 25 ---- 29 files changed, 855 deletions(-) delete mode 100644 themes/bear/.envrc delete mode 100644 themes/bear/.gitignore delete mode 100644 themes/bear/LICENSE delete mode 100644 themes/bear/README.md delete mode 100644 themes/bear/config.toml delete mode 100644 themes/bear/content/_index.md delete mode 100644 themes/bear/content/bear.md delete mode 100644 themes/bear/content/blog/_index.md delete mode 100644 themes/bear/content/blog/markdown-syntax.md delete mode 100644 themes/bear/content/zola.md delete mode 100644 themes/bear/flake.lock delete mode 100644 themes/bear/flake.nix delete mode 100644 themes/bear/netlify.toml delete mode 100644 themes/bear/screenshot.png delete mode 100644 themes/bear/templates/404.html delete mode 100644 themes/bear/templates/base.html delete mode 100644 themes/bear/templates/footer.html delete mode 100644 themes/bear/templates/header.html delete mode 100644 themes/bear/templates/index.html delete mode 100644 themes/bear/templates/nav.html delete mode 100644 themes/bear/templates/page.html delete mode 100644 themes/bear/templates/section.html delete mode 100644 themes/bear/templates/security_tags.html delete mode 100644 themes/bear/templates/seo_tags.html delete mode 100644 themes/bear/templates/style.css delete mode 120000 themes/bear/templates/style.css.html delete mode 100644 themes/bear/templates/taxonomy_list.html delete mode 100644 themes/bear/templates/taxonomy_single.html delete mode 100644 themes/bear/theme.toml (limited to 'themes') diff --git a/themes/bear/.envrc b/themes/bear/.envrc deleted file mode 100644 index 3550a30..0000000 --- a/themes/bear/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake diff --git a/themes/bear/.gitignore b/themes/bear/.gitignore deleted file mode 100644 index 87174b6..0000000 --- a/themes/bear/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/public/ diff --git a/themes/bear/LICENSE b/themes/bear/LICENSE deleted file mode 100644 index ddc924b..0000000 --- a/themes/bear/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2023 Alan Pearce -Copyright (c) 2020 Jan Raasch - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/themes/bear/README.md b/themes/bear/README.md deleted file mode 100644 index db77233..0000000 --- a/themes/bear/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# Zola ʕ•ᴥ•ʔ Bear Blog - -[![Netlify Status](https://api.netlify.com/api/v1/badges/121b53ce-c913-4604-9179-eb3cca31cd2c/deploy-status)](https://app.netlify.com/sites/zola-bearblog/deploys) - -🧸 A [Zola](https://www.getzola.org/)-theme based on [Bear Blog](https://bearblog.dev). - -> Free, no-nonsense, super-fast blogging. - -## Demo - -For a current & working demo of this theme, please check out 🎯. - -## Screenshot - -![Screenshot][screenshot] - -When the user's browser is running »dark mode«, the dark color scheme will be used automatically. The default is the light/white color scheme. Check out the [`style.html`](https://codeberg.org/alanpearce/zola-bearblog/src/branch/main/templates/style.html)-file for the implementation. - -## Installation - -If you already have a Zola site on your machine, you can simply add this theme via - -``` -git submodule add https://codeberg.org/alanpearce/zola-bearblog themes/zola-bearblog -``` - -Then, adjust the `config.toml` as detailed below. - -For more information, read the official [setup guide][zola-setup-guide] of Zola. - -Alternatively, you can quickly deploy a copy of the theme site to Netlify using this button: - -[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://gitlab.com/alanpearce/zola-bearblog) - -(Note that this method makes it harder to keep up-to-date with theme updates, which might be necessary for newer versions of Zola.) - -## Adjust configuration / config.toml - -Please check out the included [config.toml](https://codeberg.org/alanpearce/zola-bearblog/src/branch/main/config.toml) - -## Content & structure - -### Menu - -Create an array in `extra` with a key of `main_menu`. `url` is passed to [`get_url`](https://www.getzola.org/documentation/templates/overview/#get-url) - -```toml -[[extra.main_menu]] -name = "Bear" -url = "@/bear.md" - -[[extra.main_menu]] -name = "Zola" -url = "@/zola.md" - -[[extra.main_menu]] -name = "Blog" -url = "@/blog/_index.md" -``` - -### Adding / editing content - -#### Index-Page - -The contents of the `index`-page may be changed by editing your `content/_index.md`-file. - - -### Adding your branding / colors / css - -Add a `custom_head.html`-file to your `templates/`-directory. In there you may add a ` - {% include "custom_head.html" ignore missing -%} - - - {% include "header.html" ignore missing -%} - {% block main %}{%- endblock -%} - {% include "footer.html" ignore missing -%} - {% include "custom_body.html" ignore missing -%} - - diff --git a/themes/bear/templates/footer.html b/themes/bear/templates/footer.html deleted file mode 100644 index c952a93..0000000 --- a/themes/bear/templates/footer.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/themes/bear/templates/header.html b/themes/bear/templates/header.html deleted file mode 100644 index 55c1756..0000000 --- a/themes/bear/templates/header.html +++ /dev/null @@ -1,11 +0,0 @@ - -
-

- - {{- config.title -}} - -

- -
{{ "" -}} diff --git a/themes/bear/templates/index.html b/themes/bear/templates/index.html deleted file mode 100644 index 6caf1d5..0000000 --- a/themes/bear/templates/index.html +++ /dev/null @@ -1,7 +0,0 @@ -{% extends "base.html" %} - -{% block main %} -
- {{ section.content | safe }} -
-{% endblock %} diff --git a/themes/bear/templates/nav.html b/themes/bear/templates/nav.html deleted file mode 100644 index fe5fdd6..0000000 --- a/themes/bear/templates/nav.html +++ /dev/null @@ -1,6 +0,0 @@ - Home -{%- if config.extra.main_menu %} - {%- for item in config.extra.main_menu %} - {{ item.name }} - {%- endfor %} -{%- endif -%} diff --git a/themes/bear/templates/page.html b/themes/bear/templates/page.html deleted file mode 100644 index 93611b5..0000000 --- a/themes/bear/templates/page.html +++ /dev/null @@ -1,29 +0,0 @@ -{% extends "base.html" %} - -{% block title %}{{ page.title }} | {{ super() }}{% endblock %} - -{% block main %} - {%- if not page.extra.menu %} -

{{ page.title }}

- {%- if page.date %} -

- -

- {%- endif %} - {%- endif %} -
- {{ page.content | trim | safe }} -
- -{% endblock %} diff --git a/themes/bear/templates/section.html b/themes/bear/templates/section.html deleted file mode 100644 index f633036..0000000 --- a/themes/bear/templates/section.html +++ /dev/null @@ -1,34 +0,0 @@ -{% extends "base.html" %} - -{% block main %} -
- {%- if taxonomy.term %} -

Filtering for "{{ section.title }}"

- - Remove filter - - {%- endif %} - - -
-{% endblock %} diff --git a/themes/bear/templates/security_tags.html b/themes/bear/templates/security_tags.html deleted file mode 100644 index 0f922ea..0000000 --- a/themes/bear/templates/security_tags.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/themes/bear/templates/seo_tags.html b/themes/bear/templates/seo_tags.html deleted file mode 100644 index 4eb2bc8..0000000 --- a/themes/bear/templates/seo_tags.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/themes/bear/templates/style.css b/themes/bear/templates/style.css deleted file mode 100644 index e1e12aa..0000000 --- a/themes/bear/templates/style.css +++ /dev/null @@ -1,193 +0,0 @@ -body { - font-family: Verdana, sans-serif; - margin: auto; - padding: 20px; - max-width: 720px; - text-align: left; - background-color: #fff; - word-wrap: break-word; - overflow-wrap: break-word; - line-height: 1.5; - color: #444; -} - -.skip { - position: absolute; - top: -3em; - background: #fff; -} -.skip:focus { - top: 0; -} - -h1, -h2, -h3, -h4, -h5, -h6, -strong, -b { - color: #222; -} - -a { - color: #3273dc; -} - -.title { - color: #222; - text-decoration: none; - border: 0; -} - -time { - font-style: italic; -} - -.title span { - font-weight: 400; -} - -nav a { - margin-right: 10px; -} - -.tags { - padding: unset; - font-size: small; -} - -.tags > li { - list-style: none; - display: inline-block; -} - -textarea { - width: 100%; - font-size: 1rem; -} - -input { - font-size: 1rem; -} - -main,article { - line-height: 1.6; -} - -table { - width: 100%; -} - -img { - max-width: 100%; -} - -code { - padding: 2px 5px; - background-color: #f2f2f2; -} - -pre code { - color: #222; - display: block; - padding: 20px; - white-space: pre-wrap; - font-size: 0.875rem; - overflow-x: auto; -} - -div.highlight pre { - background-color: initial; - color: initial; -} - -div.highlight code { - background-color: unset; - color: unset; -} - -blockquote { - border-left: 1px solid #999; - color: #222; - padding-left: 20px; - font-style: italic; -} - -footer { - padding: 25px; - text-align: center; -} - -.helptext { - color: #777; - font-size: small; -} - -.errorlist { - color: #eba613; - font-size: small; -} - -/* blog posts */ -ul.blog-posts { - list-style-type: none; - padding: unset; -} - -ul.blog-posts li { - display: flex; -} - -ul.blog-posts li span { - flex: 0 0 130px; -} - -ul.blog-posts li a:visited { - color: #8b6fcb; -} - -@media (prefers-color-scheme: dark) { - body { - background-color: #333; - color: #ddd; - } - - h1, - h2, - h3, - h4, - h5, - h6, - strong, - b { - color: #eee; - } - - a { - color: #8cc2dd; - } - - code { - background-color: #777; - } - - pre code { - color: #ddd; - } - - blockquote { - color: #ccc; - } - - textarea, - input { - background-color: #252525; - color: #ddd; - } - - .helptext { - color: #aaa; - } -} diff --git a/themes/bear/templates/style.css.html b/themes/bear/templates/style.css.html deleted file mode 120000 index f6b71cc..0000000 --- a/themes/bear/templates/style.css.html +++ /dev/null @@ -1 +0,0 @@ -style.css \ No newline at end of file diff --git a/themes/bear/templates/taxonomy_list.html b/themes/bear/templates/taxonomy_list.html deleted file mode 100644 index abf4294..0000000 --- a/themes/bear/templates/taxonomy_list.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} - -{% block main %} -
- -
- {% set tags = get_taxonomy(kind="tags") %} - {% for post in tags.items %} - #{{ post.name }}  - {% endfor %} -
-
-
-{% endblock %} diff --git a/themes/bear/templates/taxonomy_single.html b/themes/bear/templates/taxonomy_single.html deleted file mode 100644 index a96139c..0000000 --- a/themes/bear/templates/taxonomy_single.html +++ /dev/null @@ -1,34 +0,0 @@ -{% extends "base.html" %} - -{% block rss -%} - - {%- set rss_path = "/tags/" ~ term.name ~ "/" ~ config.feed_filename %} - -{%- endblock -%} - -{% block main -%} -
- {%- if taxonomy.term %} -

Filtering for "{{ term.name }}"

- - Remove filter - - {%- endif %} - -
-{% endblock %} diff --git a/themes/bear/theme.toml b/themes/bear/theme.toml deleted file mode 100644 index 902c8ec..0000000 --- a/themes/bear/theme.toml +++ /dev/null @@ -1,25 +0,0 @@ -name = "Bear" -description = "Bear blog theme" -license = "MIT" -homepage = "https://codeberg.org/alanpearce/zola-bearblog" -# The minimum version of Zola required -min_version = "0.4.0" -# An optional live demo URL -demo = "https://zola-bearblog.netlify.app/" - -# Any variable there can be overridden in the end user `config.toml` -# You don't need to prefix variables by the theme name but as this will -# be merged with user data, some kind of prefix or nesting is preferable -# Use snake_casing to be consistent with the rest of Zola -[extra] -date_format="%d %b, %Y" -webserver_sends_csp_headers=false - -[author] -name = "Alan Pearce" -homepage = "https://alanpearce.eu" - -[original] -author = "janraasch" -repo = "https://github.com/janraasch/hugo-bearblog/" -homepage = "https://www.janraasch.com" -- cgit 1.4.1