From 9df33276389c30c0b939b3d1cbb7186348f539f0 Mon Sep 17 00:00:00 2001 From: Joost Agterhoek Date: Tue, 27 Aug 2024 21:48:47 +0200 Subject: [PATCH] website supposedly works (but who knows, who knows...) --- config.toml | 207 ++++---------------------- content/_index.md | 39 ++++- content/about.md | 3 +- content/blog/2024-08-26-test-again.md | 7 + content/blog/2024-08-27-testing.md | 11 ++ content/blog/_index.md | 3 +- static/click.ogg | Bin 0 -> 1058 bytes static/css/style.css | 105 +++++++++++++ static/favicon.ico | Bin 0 -> 204 bytes static/icons.svg | 21 +++ static/js/script.js | 49 ++++++ templates/base.html | 18 +++ templates/blog-page.html | 47 ++++++ templates/footer.html | 23 +++ templates/head.html | 98 ++++++++++++ templates/header.html | 23 +++ templates/index.html | 29 ++++ templates/page.html | 42 ++++++ templates/section.html | 25 ++++ templates/shortcodes/img.html | 4 + templates/shortcodes/mark.html | 1 + templates/shortcodes/webring.html | 4 + templates/shortcodes/youtube.html | 9 ++ templates/tags/list.html | 10 ++ templates/tags/single.html | 20 +++ theme.toml | 13 ++ 26 files changed, 626 insertions(+), 185 deletions(-) create mode 100644 content/blog/2024-08-26-test-again.md create mode 100644 content/blog/2024-08-27-testing.md create mode 100644 static/click.ogg create mode 100644 static/css/style.css create mode 100644 static/favicon.ico create mode 100644 static/icons.svg create mode 100644 static/js/script.js create mode 100644 templates/base.html create mode 100644 templates/blog-page.html create mode 100644 templates/footer.html create mode 100644 templates/head.html create mode 100644 templates/header.html create mode 100644 templates/index.html create mode 100644 templates/page.html create mode 100644 templates/section.html create mode 100644 templates/shortcodes/img.html create mode 100644 templates/shortcodes/mark.html create mode 100644 templates/shortcodes/webring.html create mode 100644 templates/shortcodes/youtube.html create mode 100644 templates/tags/list.html create mode 100644 templates/tags/single.html create mode 100644 theme.toml diff --git a/config.toml b/config.toml index bf31632..653d6c5 100644 --- a/config.toml +++ b/config.toml @@ -1,194 +1,45 @@ -# The base URL of the site; the only required configuration variable. -base_url = "https://notes.joostagterhoek.nl" - -# The site title and description; used in feeds by default. -title = "Trying out a statically generated website" -description = "" - -# The default language; used in feeds. +base_url = "https://anemone.pages.dev" +title = "anemone" +description = "A minimalist Zola theme that prioritizes clean CSS and avoids heavy JavaScript. Enjoy a seamless user experience with lightning-fast load times. Let your content take center stage in a clutter-free, elegant design that enhances readability. Responsive and efficient, anemone brings focus to your ideas." +compile_sass = false +minify_html = true +generate_feeds = true default_language = "en" -# The site theme to use. -theme = "anemone" - -# For overriding the default output directory `public`, set it to another value (e.g.: "docs") -output_dir = "public" - -# Whether dotfiles at the root level of the output directory are preserved when (re)building the site. -# Enabling this also prevents the deletion of the output folder itself on rebuilds. -preserve_dotfiles_in_output = false - -# When set to "true", the Sass files in the `sass` directory in the site root are compiled. -# Sass files in theme directories are always compiled. -compile_sass = false - -# When set to "true", the generated HTML files are minified. -minify_html = false - -# A list of glob patterns specifying asset files to ignore when the content -# directory is processed. Defaults to none, which means that all asset files are -# copied over to the `public` directory. -# Example: -# ignored_content = ["*.{graphml,xlsx}", "temp.*", "**/build_folder"] -ignored_content = [] - -# Similar to ignored_content, a list of glob patterns specifying asset files to -# ignore when the static directory is processed. Defaults to none, which means -# that all asset files are copied over to the `public` directory -ignored_static = [] - -# When set to "true", a feed is automatically generated. -generate_feeds = true - -# The filenames to use for the feeds. Used as the template filenames, too. -# Defaults to ["atom.xml"], which has a built-in template that renders an Atom 1.0 feed. -# There is also a built-in template "rss.xml" that renders an RSS 2.0 feed. -feed_filenames = [ "atom.xml" ] - -# The number of articles to include in the feed. All items are included if -# this limit is not set (the default). -# feed_limit = 20 - -# When set to "true", files in the `static` directory are hard-linked. Useful for large -# static files. Note that for this to work, both `static` and the -# output directory need to be on the same filesystem. Note that the theme's `static` -# files are always copied, regardless of this setting. -hard_link_static = false - -# The default author for pages -author = "Joost Agterhoek" - -# The taxonomies to be rendered for the site and their configuration of the default languages -# Example: -# taxonomies = [ -# {name = "tags", feed = true}, # each tag will have its own feed -# {name = "tags"}, # you can have taxonomies with the same name in multiple languages -# {name = "categories", paginate_by = 5}, # 5 items per page for a term -# {name = "authors"}, # Basic definition: no feed or pagination -# ] -# taxonomies = [ - {name = "tags", feed = true}, - ] + {name = "tags", feed = true}, +] -# When set to "true", a search index is built from the pages and section -# content for `default_language`. -build_search_index = false +[languages.fr] +weight = 2 +languageName = "Français" +languageCode = "fr" -# Configuration of the Markdown rendering [markdown] -# When set to "true", all code blocks are highlighted. -highlight_code = false - -# A list of directories used to search for additional `.sublime-syntax` and `.tmTheme` files. -extra_syntaxes_and_themes = [] - -# The theme to use for code highlighting. -# See below for list of allowed values. -highlight_theme = "dracula" - -# When set to "true", emoji aliases translated to their corresponding -# Unicode emoji equivalent in the rendered Markdown files. (e.g.: :smile: => 😄) render_emoji = true +external_links_target_blank = true +smart_punctuation = true +highlight_code = false +highlight_theme = "gruvbox-dark" -# Whether external links are to be opened in a new tab -# If this is true, a `rel="noopener"` will always automatically be added for security reasons -external_links_target_blank = false - -# Whether to set rel="nofollow" for all external links -external_links_no_follow = false - -# Whether to set rel="noreferrer" for all external links -external_links_no_referrer = false - -# Whether smart punctuation is enabled (changing quotes, dashes, dots in their typographic form) -# For example, `...` into `…`, `"quote"` into `“curly”` etc -smart_punctuation = false - -# Whether to set decoding="async" and loading="lazy" for all images -# When turned on, the alt text must be plain text. -# For example, `![xx](...)` is ok but `![*x*x](...)` isn’t ok -lazy_async_image = false - -# Configuration of the link checker. -[link_checker] -# Skip link checking for external URLs that start with these prefixes -skip_prefixes = [ - "http://[2001:db8::]/", -] - -# Skip anchor checking for external URLs that start with these prefixes -skip_anchor_prefixes = [ - "https://caniuse.com/", -] - -# Treat internal link problems as either "error" or "warn", default is "error" -internal_level = "warn" - -# Treat external link problems as either "error" or "warn", default is "error" -external_level = "error" - -# Various slugification strategies, see below for details -# Defaults to everything being a slug [slugify] paths = "on" taxonomies = "on" anchors = "on" -# Whether to remove date prefixes for page path slugs. -# For example, content/posts/2016-10-08_a-post-with-dates.md => posts/a-post-with-dates -# When true, content/posts/2016-10-08_a-post-with-dates.md => posts/2016-10-08-a-post-with-dates -paths_keep_dates = false -[search] -# Whether to include the title of the page/section in the index -include_title = true -# Whether to include the description of the page/section in the index -include_description = false -# Whether to include the path of the page/section in the index -include_path = false -# Whether to include the rendered content of the page/section in the index -include_content = true -# At which character to truncate the content to. Useful if you have a lot of pages and the index would -# become too big to load on the site. Defaults to not being set. -# truncate_content_length = 100 +[link_checker] +internal_level = "warn" -# Wether to produce the search index as a javascript file or as a JSON file -# Accepted value "elasticlunr_javascript" or "elasticlunr_json" -index_format = "elasticlunr_javascript" - -# Optional translation object for the default language -# Example: -# default_language = "fr" -# -# [translations] -# title = "Un titre" -# -[translations] - -# Additional languages definition -# You can define language specific config values and translations: -# title, description, generate_feed, feed_filename, taxonomies, build_search_index -# as well as its own search configuration and translations (see above for details on those) -[languages] -# For example -# [languages.fr] -# title = "Mon blog" -# generate_feed = true -# taxonomies = [ -# {name = "auteurs"}, -# {name = "tags"}, -# ] -# build_search_index = false - -# You can put any kind of data here. The data -# will be accessible in all templates -# Example: -# [extra] -# author = "Famous author" -# -# author value will be available using {{ config.extra.author }} in templates -# [extra] +author = "Speyll" +display_author = true + +favicon = "favicon.ico" +image = "" + +default_theme = "light" +list_pages = false +twitter_card = true header_nav = [ { url = "/", name_en = "/home/", name_fr = "/accueil/" }, @@ -196,3 +47,7 @@ header_nav = [ { url = "/journal", name_en = "/journal/", name_fr = "/journal/" }, { url = "/blog", name_en = "/blog/", name_fr = "/blog/" } ] + +# Optional footer license text. It will only show, when using footer_content_license. +#footer_content_license = "Creative Commons Attribution 4.0 International" +#footer_content_license_link = "https://creativecommons.org/licenses/by/4.0/" diff --git a/content/_index.md b/content/_index.md index b30f18f..94d1d1e 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,13 +1,38 @@ +++ -template = "index.html" -title = "Test home page" +++ -Here you can find a website built with the static site generator [Zola](www.getzola.org). I want to try out a more direct workflow in writing/blogging and keeping up with projects than my [main website built with Grav](https://joostagterhoek.nl) can offer. Liking it so far! :star: +## Overview -## Blog posts -- 🥇 [My first blog post here](./blog/my-first-post) +anemone theme is designed to provide a nearly no-JavaScript, efficient, and minimalist experience for your website. Embracing simplicity, the theme focuses on content and readability, ensuring a seamless user experience without unnecessary distractions. -## Projects +> *"Useless blockquote"* -- (add gui-host-lookup) +## Blog Posts + +Explore our insightful blog posts on a variety of topics: + +- 🔥 [testing](./blog/testing) + +## Tags + +Browse our posts by tags: + +- [test](./tags/test) + +## Another List + +Discover additional content: + +- With Subitems + - With Subsubitems + - [Example Page](./about) +- this list is just the content of `content/_index.md`, the tests are shamelessly stolen from [no style, please!](https://www.getzola.org/themes/no-style-please/) + +## Online Presence + +Stay connected with us: + +- Email: [mail@joostagterhoek.nl](mailto:mail@joostagterhoek.nl) +- Code Repositories: [self-hosted Gitea](https://code.joostagterhoek.nl/joost) +- Socials: [my Pleroma-instance](https://social.joostagterhoek.nl/joost) + diff --git a/content/about.md b/content/about.md index 31100ea..c116cfd 100644 --- a/content/about.md +++ b/content/about.md @@ -1,5 +1,6 @@ +++ title = "About" +++ +This is an about page, nothing more nothing less `forget about it`. -Hi there! I'm Joost Agterhoek and this is one of my websites. Currently not my main one, that would be [this lovely place](https://joostagterhoek.nl). This is still a work in progress. +{{ youtube(id="pS6zJ7IsJkM" class="center") }} \ No newline at end of file diff --git a/content/blog/2024-08-26-test-again.md b/content/blog/2024-08-26-test-again.md new file mode 100644 index 0000000..cded6b4 --- /dev/null +++ b/content/blog/2024-08-26-test-again.md @@ -0,0 +1,7 @@ ++++ +title = "testing..again" +[taxonomies] + tags = ["test"] ++++ + +I just *keep* on testing...I guess I'm never happy 🧐 But! The end result will be just what I want. diff --git a/content/blog/2024-08-27-testing.md b/content/blog/2024-08-27-testing.md new file mode 100644 index 0000000..4cf90c9 --- /dev/null +++ b/content/blog/2024-08-27-testing.md @@ -0,0 +1,11 @@ ++++ +title = "testing" +[taxonomies] + tags = ["test"] ++++ + +testing! ♥️ + +I guess the testing...worked? Essentially, it all worked out. I had some issues with `zola serve` not automatically rebuilding and reloading the page upon editing data. That was handled by replacing the root folder for this website to the root of my WSL (as found [here](https://github.com/getzola/zola/issues/1440). This is something of a problem, as it would be great to test out any edits locally and then (maybe with a git hook) push a commit ánd sync the updated files to my server. But of course, we can't have everything, can we! + +Another thing that bothers me is that I found a solution to a 'bug', but I don't understand the solution. After writing some initial posts, I started to wonder how the base HTML pages work together with these Markdown files to produce the actual statically generated website pages. The syntax looks similar to Jinja, which I am sort of used to using in one of my Python projects. But for the life of me, I couldn't get the actual HTML (which would show some metadata like a date and author above a post like this one), to show up. Then I started looking at the Github-folder for this theme and git cloned that repo and whaddayaknow: that clone **does** produce the expected HTML! I compared files, even diffed some, to understand what I was missing in my files or folder structure. In the end I couldn't find it, so I simply copy and pasted the files. And of course, it worked immediately. Sigh. Again: we can't have everything. But! We do have emojis. So. That's something!🪅🌟🤣😉🙃 diff --git a/content/blog/_index.md b/content/blog/_index.md index 26e6ff8..04b2745 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -2,6 +2,7 @@ paginate_by = 15 title = "All blog posts" sort_by = "date" +page_template = "blog-page.html" +++ -> List of all *[tags](/tags)* +> List of all *[tags](/tags)* \ No newline at end of file diff --git a/static/click.ogg b/static/click.ogg new file mode 100644 index 0000000000000000000000000000000000000000..f9c6dc0677c4e2273fbba937fb47863b1a8ed9a9 GIT binary patch literal 1058 zcmeZIPY-5bVt|4f`K6~p%pa`>S2GIx7nBxzq$Z{?GFdP->;^0G2PuaGka9*K&+o|T z?TmIHGXp(C5HbKMkp<$^yyX0p)FNA;WHM0F$Ot5|_P_16%~G#ztPQdn zh%tGKR6>2;a( z-nWmpxcw?L^;oDNs#JVeu(Rt#!FiXtHS>Ww{`RcA*C_ihDCgdZ^9|Bwj_=gItGszP zZDy>6>J!&6XR-W%xA9qFEW$!r{2>NvCw3oES`cut&cCLENs-sd^6g@OkHjLEH9LRS zn951BfBI|WIPFra1DnQmov$?%>fkTg{iF zYB(6bpL$;!f1&layh5_1)`qp49;w&7OzPjR9cp^TPUHJI#`{@C`K&;79}n{#Q!u_Q zrT0ks@LPo)H9QJ3{V&>LWHw2^e6=|NsNfB^X4ZCFmvdM1_ig@brZMxA(|m^n^OaAE zHt-|Kepdg@t^X~4Q*E9Yvw?eKTz6;ZPEm8EJ_jsncAPO%J2WGM>x=eHkeUq)Xlk5~ zwFjZ8*#tL7qsb4_6PEa$V2`vjs6aMg4$Zo70Rbnk)amScH7yHzLM zou2Gu7oL1}Z^Sg-J6AOJXiuMZyk*Zt<7@icW_Tz`3T(R8yGC-Ul=$S-q&YWy+^?P3 z`t?rzf1okvCq_pGOxK-~UZNEoSQ+_TfW2hx+r3uDzV${PEn;|?g^pO z<ueY1MH)MUq!H%%m#BQ5Mwkyw>HSsuAFlB4i|@6bA|5qQ zMB=GjqGHu5_8*Kh@|Sg1?l{b7HnU(B$k?c>TX?KzZ3$k!%w_Y+h-?et=G5)KZ}VT1 z*46U+^JQa0Vr}dHFQWgNHfn)XLz4h7lDWRLJ`NPy;}c!Rqu=mhKS)W_1q>xGF4g8O Qd-#n9sOF15NKMZK07QDkzyJUM literal 0 HcmV?d00001 diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..85c84ac --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,105 @@ +#nav-bar { + padding: .625rem 0 0 0; + display: flex; + flex-direction: row; + gap: .25rem; + flex-wrap: wrap; + justify-content: flex-end; + align-items: center; + align-content: flex-end +} + +#footer-container { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; +} + +.accent-data { + color: var(--accent); +} + +.theme-transition { + transition: color 0.3s ease, background-color 0.3s ease; +} + +.tags-data { + display: flex; + flex-direction: column; + flex-wrap: wrap; + justify-content: flex-end; + align-items: flex-start; + align-content: flex-end +} + +.title-list li { + margin-bottom: .375rem; +} + +/* icons settings */ +.icons { + width: 1.3rem; + height: 1.3rem; + aspect-ratio: 1/1; + display: inline-block; + vertical-align: middle; + color: var(--text); + fill: var(--text); + background-color: transparent; + cursor: pointer; +} + +.icons:hover { + background-color: transparent; + color: var(--accent); +} + +/* footnotes */ +.footnote-definition { + margin: 0 0 0 .125rem; +} + +.footnote-definition-label { + color: var(--accent); +} + +.footnote-definition p { + display: inline; + margin: .625rem 0 0 .625rem; +} + +/* general classes */ +.no-style { + padding: 0; + margin: 0; + border: none; + border-radius: 0 +} + +.no-style:hover { + background-color: transparent; + color: var(--accent); +} + +.center { + text-align: center; +} + +.center img { + display: block; + margin: 1rem auto; +} + +.float-right { + float: right +} + +.float-left { + float: left +} + +/* shortcodes css */ +.webring { + margin: .375rem; +} \ No newline at end of file diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..7eb16eac96acaf14cbf976e8efb1caee8693285d GIT binary patch literal 204 zcmZQzU<5(|0R|wcz_5*hfk6z2I|KaOdAX#xfJ|Ob50@Yy4OGD(z`+J2gTe~DWM4f`EE<} literal 0 HcmV?d00001 diff --git a/static/icons.svg b/static/icons.svg new file mode 100644 index 0000000..374e315 --- /dev/null +++ b/static/icons.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/static/js/script.js b/static/js/script.js new file mode 100644 index 0000000..298b900 --- /dev/null +++ b/static/js/script.js @@ -0,0 +1,49 @@ +const toggleButton = document.getElementById('theme-toggle'); +const themeIcon = document.getElementById('theme-icon'); +const themeSound = document.getElementById('theme-sound'); + +// Function to update the theme icon based on the current theme +const updateThemeIcon = (isDarkMode) => { + const themeMode = isDarkMode ? 'darkMode' : 'lightMode'; + const iconPath = themeIcon.querySelector('use').getAttribute('href').replace(/#.*$/, `#${themeMode}`); + themeIcon.querySelector('use').setAttribute('href', iconPath); +}; + +// Function to update the theme based on the current mode +const updateTheme = (isDarkMode) => { + const theme = isDarkMode ? 'dark' : 'light'; + document.documentElement.setAttribute('data-theme', theme); + updateThemeIcon(isDarkMode); +}; + +// Function to toggle the theme +const toggleTheme = () => { + const isDarkMode = toggleButton.checked; + updateTheme(isDarkMode); + themeSound.play(); + localStorage.setItem('theme', isDarkMode ? 'dark' : 'light'); + + // Add transition class to body for smooth transition + document.body.classList.add('theme-transition'); + setTimeout(() => { + document.body.classList.remove('theme-transition'); + }, 300); +}; + +// Event listener for theme toggle +toggleButton.addEventListener('change', toggleTheme); + +// Function to initialize the theme based on the stored preference +const initializeTheme = () => { + const storedTheme = localStorage.getItem('theme'); + const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches; + const isDarkMode = storedTheme === 'dark' || (!storedTheme && prefersDark); + toggleButton.checked = isDarkMode; + updateTheme(isDarkMode); +}; + +// Initialize the theme +initializeTheme(); + +// Listen for changes in system preference +window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', initializeTheme); diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..7acec3b --- /dev/null +++ b/templates/base.html @@ -0,0 +1,18 @@ + + + + {% include "head.html" %} + + +
+ {% include "header.html" %} +
+
+ {% block content %} + {% endblock content %} +
+
+ {% include "footer.html" %} +
+ + \ No newline at end of file diff --git a/templates/blog-page.html b/templates/blog-page.html new file mode 100644 index 0000000..658c41e --- /dev/null +++ b/templates/blog-page.html @@ -0,0 +1,47 @@ +{% extends "base.html" %} + +{% block content %} +
../{{ page.slug }}
+ +{% if config.extra.author and config.extra.display_author == true %} + +{% endif %} +

{{ page.title }}

+ +{% if page.toc and page.extra.toc %} +

Table of contents

+
    + {% for h1 in page.toc %} +
  • + {{ h1.title }} + {% if h1.children %} + + {% endif %} +
  • + {% endfor %} +
+{% endif %} + +{{ page.content | safe }} + +

+ {% if page.taxonomies.tags %} + {% for tag in page.taxonomies.tags %} + /{{ tag }}/ + {% endfor %} + {% endif %} +

+{% endblock content %} \ No newline at end of file diff --git a/templates/footer.html b/templates/footer.html new file mode 100644 index 0000000..a17bcfa --- /dev/null +++ b/templates/footer.html @@ -0,0 +1,23 @@ +
+ diff --git a/templates/head.html b/templates/head.html new file mode 100644 index 0000000..ab47371 --- /dev/null +++ b/templates/head.html @@ -0,0 +1,98 @@ + + + + + +{% if page.title %} +{% set title = page.title %} +{% elif section.title %} +{% set title = section.title %} +{% elif config.title %} +{% set title = config.title %} +{% endif %} +{% if page.extra.author %} +{% set author = page.extra.author %} +{% elif section.extra.author %} +{% set author = section.extra.author %} +{% elif config.extra.author %} +{% set author = config.extra.author %} +{% endif %} +{% if page.description %} +{% set description = page.description | truncate(length=150) %} +{% elif section.description %} +{% set description = section.description | truncate(length=150) %} +{% elif config.description %} +{% set description = config.description | truncate(length=150) %} +{% endif %} +{% if page.extra.image %} +{% set image = get_url(path=page.extra.image, trailing_slash=false) %} +{% elif section.extra.image %} +{% set image = get_url(path=section.extra.image, trailing_slash=false) %} +{% elif config.extra.favicon %} +{% set image = get_url(path=config.extra.favicon, trailing_slash=false) %} +{% endif %} +{% if page.permalink %} +{% set url = page.permalink %} +{% elif section.permalink %} +{% set url = section.permalink %} +{% elif config.base_url %} +{% set url = config.base_url %} +{% endif %} +{% if title %} +{{ title }} +{% endif %} +{% block metatags %} +{% if title %} + +{% endif %} +{% if author %} + +{% endif %} +{% if description %} + +{% endif %} + + +{% if title %} + +{% endif %} +{% if title %} + +{% endif %} +{% if description %} + +{% endif %} +{% if image %} + +{% endif %} +{% set twitter_card = config.extra.twitter_card | default(value=true) %} +{% if twitter_card != false %} + + +{% if title %} + +{% endif %} +{% if description %} + +{% endif %} +{% if image %} + +{% endif %} +{% endif %} + +{% if image %} + +{% endif %} +{% endblock metatags %} +{% if config.generate_feeds %} +{% block feed %} + +{% endblock feed %} +{% endif %} +{% block css %} + + + +{% endblock css %} + + diff --git a/templates/header.html b/templates/header.html new file mode 100644 index 0000000..3109102 --- /dev/null +++ b/templates/header.html @@ -0,0 +1,23 @@ +{% set current_lang = config.default_language %} +{% if page %} + {% set current_lang = page.lang %} +{% elif section %} + {% set current_lang = section.lang %} +{% endif %} +{% if config.extra.header_nav %} + +{% endif %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..86a1c83 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,29 @@ +{% extends "base.html" %} + +{% block content %} +{{ section.content | safe }} + +{% if config.extra.list_pages %} + +{% if paginator %} +{% set pages = paginator.pages %} +{% else %} +{% set pages = section.pages %} +{% endif %} + +
    +{% for page in pages %} +
  • + {{ page.title }} +
    + {{ page.description }} +
  • +{% endfor %} +
+ +{% if paginator %} + +{% endif %} + +{% endif %} +{% endblock content %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..e217071 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,42 @@ +{% extends "base.html" %} + +{% block content %} +

{{ page.title }}

+ +{% if page.toc and page.extra.toc %} +

Table of contents

+
    +{% for h1 in page.toc %} +
  • + {{ h1.title }} + {% if h1.children %} + + {% endif %} +
  • +{% endfor %} +
+{% endif %} + +{{ page.content | safe }} + +

+{% if page.taxonomies.tags %} +{% for tag in page.taxonomies.tags %} +/{{ tag }}/ +{% endfor %} +{% endif %} +

+{% endblock content %} \ No newline at end of file diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..0ccdb10 --- /dev/null +++ b/templates/section.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} + +{% block content %} +

{{ section.title }}

+ +{{ section.content | safe }} + +{% if paginator %} +{% set pages = paginator.pages %} +{% else %} +{% set pages = section.pages %} +{% endif %} + + + +{% if paginator %} +
{% if paginator.previous %}   <{% endif %}   {{ paginator.current_index }} / {{ paginator.number_pagers }}   {% if paginator.next %}>   {% endif %}
+{% endif %} +{% endblock content %} \ No newline at end of file diff --git a/templates/shortcodes/img.html b/templates/shortcodes/img.html new file mode 100644 index 0000000..9bd9616 --- /dev/null +++ b/templates/shortcodes/img.html @@ -0,0 +1,4 @@ +
+ + {% if caption %}
{{caption}}
{% endif %} +
\ No newline at end of file diff --git a/templates/shortcodes/mark.html b/templates/shortcodes/mark.html new file mode 100644 index 0000000..3a6ee6e --- /dev/null +++ b/templates/shortcodes/mark.html @@ -0,0 +1 @@ +{{content}} \ No newline at end of file diff --git a/templates/shortcodes/webring.html b/templates/shortcodes/webring.html new file mode 100644 index 0000000..c59ed94 --- /dev/null +++ b/templates/shortcodes/webring.html @@ -0,0 +1,4 @@ + + +{{webringName}} + \ No newline at end of file diff --git a/templates/shortcodes/youtube.html b/templates/shortcodes/youtube.html new file mode 100644 index 0000000..abc23c7 --- /dev/null +++ b/templates/shortcodes/youtube.html @@ -0,0 +1,9 @@ +
+ +
\ No newline at end of file diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..662769e --- /dev/null +++ b/templates/tags/list.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block content %} +

{{ taxonomy.name }}

+

+{% for term in terms %} +#{{ term.name }}[{{ term.pages | length }}] +{% endfor %} +

+{% endblock content %} \ No newline at end of file diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..e143303 --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} + +{% block content %} +

{{ term.name }}

+{% if paginator %} +{% set pages = paginator.pages %} +{% else %} +{% set pages = term.pages %} +{% endif %} + +{% if paginator %} +

{% if paginator.previous %}<< First < Previous{% endif %} [{{ paginator.current_index }}/{{ paginator.number_pagers }}] {% if paginator.next %}Next > Last >>{% endif %}

+{% endif %} +{% endblock content %} \ No newline at end of file diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..0a8d084 --- /dev/null +++ b/theme.toml @@ -0,0 +1,13 @@ +name = "anemone" +description = "A minimalist Zola theme that prioritizes clean CSS and avoids heavy JavaScript. Enjoy a seamless user experience with lightning-fast load times. Let your content take center stage in a clutter-free, elegant design that enhances readability. Responsive and efficient, anemone brings focus to your ideas." +license = "MIT" +homepage = "https://github.com/Speyll/anemone" +min_version = "0.4.0" +demo = "https://anemone.pages.dev" + +[extra] + + +[author] +name = "Speyll" +homepage = "https://speyllsite.pages.dev/" \ No newline at end of file