diff --git a/README.md b/README.md index 09d860d..c8df389 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,18 @@ theme = "anemone" ## Release Notes -#### 02-03-2024 +#### 2025-04-09 + +This release introduces a **complete rewrite** of the project: simplified, improved, and optimized across the board. + +**If you are updating from an older release:** +1. Open your `config.toml` file and update it as needed (compare with the latest release for reference). +2. Remove the following line from `content/blog/_index.md`: + ```toml + page_template = "blog-page.html" + ``` + +#### 2024-03-02 This release brings several improvements and enhancements, focusing mainly on optimizing performance and user experience. Here's a summary of the key changes: - **suCSS Integration:** The core CSS now leverages the lightweight [suCSS framework](https://speyll.github.io/suCSS/) made by yours truly, providing better maintainability, robustness, and scalability. With suCSS, the theme should maintain consistent appearance across different browsers. @@ -70,8 +81,10 @@ The theme has a built-in feature that allows you to use multiple languages. For ```toml [languages.fr] -generate_feeds = true -build_search_index = true +weight = 2 +title = "anemone" +languageName = "Français" +languageCode = "fr" ``` #### Multilanguage-Ready Navigation Bar diff --git a/config.toml b/config.toml index 300ae5a..afe5d9c 100644 --- a/config.toml +++ b/config.toml @@ -1,18 +1,27 @@ +# General 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" +generate_sitemap = true +# Taxonomies taxonomies = [ - {name = "tags", feed = true}, + {name = "tags", feed = true, paginate_by = 10}, ] -[languages.fr] -generate_feeds = true +# Language +default_language = "en" + +[languages.en] build_search_index = true +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." + +[languages.fr] +build_search_index = true +title = "anemone" +description = "Un thème Zola minimaliste qui privilégie un CSS épuré et évite le JavaScript lourd. Profitez d'une expérience utilisateur fluide avec des temps de chargement ultra-rapides. Mettez votre contenu en valeur grâce à un design épuré et élégant qui améliore la lisibilité. Réactif et efficace, Anémone met en valeur vos idées." [markdown] render_emoji = true @@ -29,24 +38,18 @@ anchors = "on" [link_checker] internal_level = "warn" +# Extra [extra] author = "Speyll" -display_author = true - favicon = "favicon.ico" -image = "" - -default_theme = "light" list_pages = false twitter_card = true +enable_search = true +## Navigation header_nav = [ { url = "/", name_en = "/home/", name_fr = "/accueil/" }, { url = "/about", name_en = "/about/", name_fr = "/concernant/" }, { 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/blog/2020-07-07-overview-post.fr.md b/content/blog/2020-07-07-overview-post.fr.md index 789c888..6869461 100644 --- a/content/blog/2020-07-07-overview-post.fr.md +++ b/content/blog/2020-07-07-overview-post.fr.md @@ -1,5 +1,7 @@ +++ title = "Article de Présentation" +[extra] +display_published = false +++ Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit. Pellentesque vel lacinia neque. Praesent nulla quam, ullamcorper in sollicitudin ac, molestie sed justo. Cras aliquam, sapien id consectetur accumsan, augue magna faucibus ex, ut ultricies turpis tortor vel ante. In at rutrum tellus. @@ -75,4 +77,4 @@ image aléatoire d'un chien[^4] [^3]: ceci est une autre note de bas de page. -[^4]: ceci est une note de bas de page très très longue pour tester si une note de bas de page très très longue pose problème ou non. J'espère vivement qu'il n'y a pas de problèmes, mais vous savez parfois les problèmes surgissent de nulle part. \ No newline at end of file +[^4]: ceci est une note de bas de page très très longue pour tester si une note de bas de page très très longue pose problème ou non. J'espère vivement qu'il n'y a pas de problèmes, mais vous savez parfois les problèmes surgissent de nulle part. diff --git a/content/blog/2020-07-07-overview-post.md b/content/blog/2020-07-07-overview-post.md index 532b880..b9c7df7 100644 --- a/content/blog/2020-07-07-overview-post.md +++ b/content/blog/2020-07-07-overview-post.md @@ -1,5 +1,8 @@ +++ title = "Overview Post" +[extra] +display_published = false +toc = false +++ Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit. Pellentesque vel lacinia neque. Praesent nulla quam, ullamcorper in sollicitudin ac, molestie sed justo. Cras aliquam, sapien id consectetur accumsan, augue magna faucibus ex, ut ultricies turpis tortor vel ante. In at rutrum tellus. @@ -75,4 +78,4 @@ random image of a dog[^4] [^3]: this is another footnote. -[^4]: this is a very very long footnote to test if a very very long footnote brings some problems or not. I strongly hope that there are no problems but you know sometimes problems arise from nowhere. \ No newline at end of file +[^4]: this is a very very long footnote to test if a very very long footnote brings some problems or not. I strongly hope that there are no problems but you know sometimes problems arise from nowhere. diff --git a/content/blog/2020-07-08-language-tests.md b/content/blog/2020-07-08-language-tests.md index cb8fed6..fee3bf3 100644 --- a/content/blog/2020-07-08-language-tests.md +++ b/content/blog/2020-07-08-language-tests.md @@ -2,6 +2,9 @@ title = "Language Tests" [taxonomies] tags = ["example"] +[extra] +display_published = true +author = "Speyll" +++ Note: I took this test post from [moving](https://github.com/huangyz0918/moving), which is another Jekyll theme which is better that this one so I should not have linked it because now you will decide to use it instead of mine. @@ -49,4 +52,4 @@ From [亂數假文產生器 - Chinese Lorem Ipsum.](http://www.richyli.com/tool/ 因林可相儿应满军,热影省条律因资再,整肃赤心将届。 局广写两量备验还,南教事争工民的,备进研上布。 素身电活非直,速这区交示从,百层达。 资量那毛什京身,白这快。 半打容三手开常价或,手严量般象式效,名可重芽门适。 来设什一我么,光界美么或,住身式准。 造酸改表委验众办地百养,商物战众本列听度名院,制压录丽快与千机内。 住需当四议决得命南然照按民置,当住命形金决否矿单外。 气象理离开新集增际,三划方工义很年关,拉许准孝口。 构片出干计由备美打养,持育总指承入无己。 -From [假文生成器, lorem ipsum Chinese](http://www.cancms.com/content/dummytext) \ No newline at end of file +From [假文生成器, lorem ipsum Chinese](http://www.cancms.com/content/dummytext) diff --git a/content/blog/2020-07-08-very-very-very-long-title-and-very-very-very-short-content.md b/content/blog/2020-07-08-very-very-very-long-title-and-very-very-very-short-content.md index 08d657a..52460b0 100644 --- a/content/blog/2020-07-08-very-very-very-long-title-and-very-very-very-short-content.md +++ b/content/blog/2020-07-08-very-very-very-long-title-and-very-very-very-short-content.md @@ -1,5 +1,10 @@ +++ title = "Very Very Very Long Title And Very Very Very Short Content" +date = 2024-01-01 + +[extra] +display_published = true +author = "Speyll" +++ -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vel lacinia neque. Praesent nulla quam, ullamcorper in sollicitudin ac, molestie sed justo. Cras aliquam, sapien id consectetur accumsan, augue magna faucibus ex, ut ultricies turpis tortor vel ante. In at rutrum tellus. Nullam vestibulum metus eu purus malesuada, volutpat mattis leo facilisis. \ No newline at end of file +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque vel lacinia neque. Praesent nulla quam, ullamcorper in sollicitudin ac, molestie sed justo. Cras aliquam, sapien id consectetur accumsan, augue magna faucibus ex, ut ultricies turpis tortor vel ante. In at rutrum tellus. Nullam vestibulum metus eu purus malesuada, volutpat mattis leo facilisis. diff --git a/content/blog/2020-07-09-post-example-with-headings-and-toc.md b/content/blog/2020-07-09-post-example-with-headings-and-toc.md index 9596919..9b0879e 100644 --- a/content/blog/2020-07-09-post-example-with-headings-and-toc.md +++ b/content/blog/2020-07-09-post-example-with-headings-and-toc.md @@ -1,9 +1,13 @@ +++ title = "Post Example With Headings And Toc" +date = 2024-01-01 +draft = false [taxonomies] - tags = ["example"] +tags = ["example"] [extra] - toc = true +toc = true +display_published = true +author = "Speyll" +++ Mauris viverra dictum ultricies. Vestibulum quis ipsum euismod, facilisis metus sed, varius ipsum. Donec scelerisque lacus libero, eu dignissim sem venenatis at. Nunc a egestas tortor, sed feugiat leo. diff --git a/content/blog/_index.md b/content/blog/_index.md index 04b2745..aea5590 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,8 +1,7 @@ +++ -paginate_by = 15 title = "All blog posts" +paginate_by = 15 sort_by = "date" -page_template = "blog-page.html" +++ -> List of all *[tags](/tags)* \ No newline at end of file +[🔖 List](/tags) diff --git a/content/journal.md b/content/journal.md index cdede58..a661ca1 100644 --- a/content/journal.md +++ b/content/journal.md @@ -2,6 +2,9 @@ title = "Personal journal" date = 2019-10-05 draft = false + +[extra] +display_published = false +++ ## 2023-06-29 🔧 @@ -23,4 +26,4 @@ Vivamus molestie, ipsum id ullamcorper facilisis, velit neque elementum metus, q vel mollis varius. Aenean non bibendum dui, eget facilisis turpis. Cras eleifend mi vel leo malesuada, ac vestibulum est condimentum. Aenean accumsan felis elit, sed porttitor nulla volutpat nec. In leo purus, condimentum ut augue sed, imperdiet dapibus sapien. Proin id ullamcorper nisi. ## 2022-10-27 💢 -facilisis sapien, quis faucibus leo urna ut diam. Etiam eu dolor vestibulum, cursus odio at, aliquam nibh. Donec molestie metus non purus facilisis euismod. In interdum luctus libero, in mollis est tincidunt at. Nam congue, nibh nec tempus elementum, nunc sapien placerat felis, id dignissim sapien tellus a libero. Nunc at elementum tortor, eget scelerisque elit. Donec ultricies mi at accumsan semper. Pellentesque vehicula leo sed urna dapibus, quis feugiat arcu auctor. \ No newline at end of file +facilisis sapien, quis faucibus leo urna ut diam. Etiam eu dolor vestibulum, cursus odio at, aliquam nibh. Donec molestie metus non purus facilisis euismod. In interdum luctus libero, in mollis est tincidunt at. Nam congue, nibh nec tempus elementum, nunc sapien placerat felis, id dignissim sapien tellus a libero. Nunc at elementum tortor, eget scelerisque elit. Donec ultricies mi at accumsan semper. Pellentesque vehicula leo sed urna dapibus, quis feugiat arcu auctor. diff --git a/static/css/style.css b/static/css/style.css index 85c84ac..1affa22 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1,12 +1,15 @@ +:root { + --icon-size: 1.3rem; + --icon-color: var(--text); +} + #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 + padding: 0.625rem 0 0; + display: flex; + flex-wrap: wrap; + gap: 0.25rem; + justify-content: flex-end; + align-items: center; } #footer-container { @@ -38,21 +41,37 @@ } /* 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; +.icon { + width: var(--icon-size); + height: var(--icon-size); + display: inline-block; + vertical-align: middle; + color: var(--icon-color); + fill: currentColor; + transition: color 0.3s ease; + cursor: pointer; } -.icons:hover { - background-color: transparent; - color: var(--accent); +.icon:hover { + --icon-color: var(--accent); +} + +/* Theme toggle specific styles */ +.theme-toggle { + cursor: pointer; + padding: 0; + margin: 0; + background: none; + border: none; + display: inline-flex; +} + +.theme-toggle:hover .icon { + --icon-color: var(--accent); +} + +.theme-toggle:active { + transform: scale(0.95); } /* footnotes */ @@ -70,16 +89,25 @@ } /* general classes */ +/* Cleaned no-style class */ .no-style { - padding: 0; - margin: 0; - border: none; - border-radius: 0 + all: unset; + background: none !important; + border: none !important; } .no-style:hover { - background-color: transparent; - color: var(--accent); + background: transparent; + color: inherit; +} + +/* Modern float replacement */ +.float-right { + margin-inline-start: auto; +} + +.float-left { + margin-inline-end: auto; } .center { @@ -91,15 +119,7 @@ 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/icons.svg b/static/icons.svg index 374e315..6fe3989 100644 --- a/static/icons.svg +++ b/static/icons.svg @@ -18,4 +18,4 @@ - \ No newline at end of file + diff --git a/static/js/script.js b/static/js/script.js index 298b900..2455f71 100644 --- a/static/js/script.js +++ b/static/js/script.js @@ -1,49 +1,64 @@ -const toggleButton = document.getElementById('theme-toggle'); -const themeIcon = document.getElementById('theme-icon'); -const themeSound = document.getElementById('theme-sound'); +class ThemeManager { + constructor() { + // Cache DOM elements once + this.toggle = document.getElementById('theme-toggle'); + this.icon = document.getElementById('theme-icon'); -// 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); -}; + // Get data attributes once + const { iconBase, iconDark, iconLight, soundSrc } = this.toggle.dataset; + this.iconBase = iconBase; + this.iconDark = iconDark; + this.iconLight = iconLight; -// 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); -}; + // Create audio element only when needed + this.sound = new Audio(soundSrc); -// Function to toggle the theme -const toggleTheme = () => { - const isDarkMode = toggleButton.checked; - updateTheme(isDarkMode); - themeSound.play(); - localStorage.setItem('theme', isDarkMode ? 'dark' : 'light'); + this.init(); + } - // Add transition class to body for smooth transition - document.body.classList.add('theme-transition'); - setTimeout(() => { - document.body.classList.remove('theme-transition'); - }, 300); -}; + init() { + this.setInitialTheme(); + this.toggle.addEventListener('click', () => this.toggleTheme()); + } -// Event listener for theme toggle -toggleButton.addEventListener('change', toggleTheme); + setInitialTheme() { + const savedTheme = localStorage.getItem('theme'); + const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches; + const initialTheme = savedTheme || (systemDark ? 'dark' : 'light'); -// 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); -}; + document.documentElement.setAttribute('data-theme', initialTheme); + this.updateIcon(initialTheme === 'dark'); + } -// Initialize the theme -initializeTheme(); + toggleTheme() { + const isDark = document.documentElement.getAttribute('data-theme') === 'dark'; + const newTheme = isDark ? 'light' : 'dark'; -// Listen for changes in system preference -window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', initializeTheme); + document.body.classList.add('theme-transition'); + document.documentElement.setAttribute('data-theme', newTheme); + + // Use the inverse to update the icon to match the new theme + this.updateIcon(!isDark); + + localStorage.setItem('theme', newTheme); + + // Use requestAnimationFrame for better performance on transition + requestAnimationFrame(() => { + setTimeout(() => { + document.body.classList.remove('theme-transition'); + }, 300); + }); + + this.sound.play().catch(() => {}); + } + + + // Extracted common functionality + updateIcon(isDark) { + this.icon.setAttribute('href', + `${this.iconBase}${isDark ? this.iconDark : this.iconLight}`); + } +} + +// Use modern syntax +document.addEventListener('DOMContentLoaded', () => new ThemeManager()); diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..d68fe43 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block content %} +
+

404 - Not Found

+

The page you're looking for doesn't exist.

+ ← Return home +
+{% endblock %} diff --git a/templates/atom.xml b/templates/atom.xml new file mode 100644 index 0000000..051cf75 --- /dev/null +++ b/templates/atom.xml @@ -0,0 +1,38 @@ + + + {{ config.title }} + + + {{ now() | date(format="%Y-%m-%dT%H:%M:%S%z") }} + {{ config.base_url }} + + {% set root = get_section(path="_index.md") %} + + {# Process pages with valid dates #} + {% for page in root.pages %} + {% if page.date %} + + {{ page.title }} + + {{ page.date | date(format="%Y-%m-%dT%H:%M:%S%z") }} + {{ page.permalink }} + {{ page.content | escape }} + + {% endif %} + {% endfor %} + + {% for subsection in root.subsections %} + {% set sub = get_section(path=subsection) %} + {% for page in sub.pages %} + {% if page.date %} + + {{ page.title }} + + {{ page.date | date(format="%Y-%m-%dT%H:%M:%S%z") }} + {{ page.permalink }} + {{ page.content | escape }} + + {% endif %} + {% endfor %} + {% endfor %} + diff --git a/templates/base.html b/templates/base.html index 7acec3b..096658e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,18 +1,58 @@ - - {% include "head.html" %} - - -
- {% include "header.html" %} -
-
- {% block content %} - {% endblock content %} -
- - - \ No newline at end of file + + + + + {% block rss %} + + {% endblock %} + {{ config.title }}{% if page.title %} | {{ page.title }}{% endif %} + + + + + + + + + + + + {% set current_lang = config.default_language %} + {% if page %} + {% set current_lang = page.lang %} + {% elif section %} + {% set current_lang = section.lang %} + {% endif %} + + +
+ {% block content %}{% endblock %} +
+ + + + + + + diff --git a/templates/blog-page.html b/templates/blog-page.html deleted file mode 100644 index 658c41e..0000000 --- a/templates/blog-page.html +++ /dev/null @@ -1,47 +0,0 @@ -{% 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

- -{% 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/blog/page.html b/templates/blog/page.html new file mode 100644 index 0000000..ffa144c --- /dev/null +++ b/templates/blog/page.html @@ -0,0 +1,58 @@ +{% extends "base.html" %} + +{% block head %} +{{ super() }} +{% include "partials/schema-article.html" %} +{% endblock %} + +{% block content %} +
+
+ {% if page.date and page.extra.display_published | default(value=true) %} + + {% endif %} + + {% if page.extra.author %} + + {% endif %} + +

{{ page.title }}

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

Table of content

+ +
+{% endif %} + +
+ {{ page.content | safe }} +
+ + {% if page.taxonomies.tags %} + + {% endif %} +
+{% endblock %} diff --git a/templates/blog/section.html b/templates/blog/section.html new file mode 100644 index 0000000..04c39fc --- /dev/null +++ b/templates/blog/section.html @@ -0,0 +1,15 @@ +{# templates/section.html #} +{% extends "base.html" %} + +{% block content %} +
+

{{ section.title }}

+ {{ section.content | safe }} + + +
+{% endblock %} diff --git a/templates/footer.html b/templates/footer.html index a17bcfa..e0409c0 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -1,23 +1,4 @@
diff --git a/templates/head.html b/templates/head.html deleted file mode 100644 index ab47371..0000000 --- a/templates/head.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - -{% 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 deleted file mode 100644 index 3109102..0000000 --- a/templates/header.html +++ /dev/null @@ -1,23 +0,0 @@ -{% 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 index 86a1c83..d78ba0e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,29 +1,20 @@ {% extends "base.html" %} {% block content %} -{{ section.content | safe }} + {{ section.content | safe }} -{% if config.extra.list_pages %} + {% if config.extra.list_pages %} + + {% endif %} -{% 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 %} - -{% endif %} -{% endblock content %} + {% if paginator %} + {% include "partials/pagination.html" %} + {% endif %} +{% endblock %} diff --git a/templates/page.html b/templates/page.html index e217071..acd165d 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,42 +1,58 @@ {% extends "base.html" %} +{% block head %} +{{ super() }} +{% include "partials/schema-article.html" %} +{% endblock %} + {% block content %} -

{{ page.title }}

+
+
+ {% if page.date and page.extra.display_published | default(value=true) %} + + {% endif %} -{% if page.toc and page.extra.toc %} -

Table of contents

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

Table of content

- {% endif %} - -{% endfor %} - +
{% endif %} -{{ page.content | safe }} +
+ {{ page.content | safe }} +
-

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

-{% endblock content %} \ No newline at end of file + {% if page.taxonomies.tags %} +
+ {% for tag in page.taxonomies.tags %} + #{{ tag }} + {% endfor %} +
+ {% endif %} +
+{% endblock %} diff --git a/templates/partials/content-listing-item.html b/templates/partials/content-listing-item.html new file mode 100644 index 0000000..7a6b63e --- /dev/null +++ b/templates/partials/content-listing-item.html @@ -0,0 +1,8 @@ +
  • + {% if page.date %} + + {% endif %} + + {{ page.title }} + +
  • diff --git a/templates/partials/pagination.html b/templates/partials/pagination.html new file mode 100644 index 0000000..3652733 --- /dev/null +++ b/templates/partials/pagination.html @@ -0,0 +1,17 @@ + diff --git a/templates/partials/schema-article.html b/templates/partials/schema-article.html new file mode 100644 index 0000000..498b398 --- /dev/null +++ b/templates/partials/schema-article.html @@ -0,0 +1,21 @@ + diff --git a/templates/section.html b/templates/section.html index 0ccdb10..f77f3ef 100644 --- a/templates/section.html +++ b/templates/section.html @@ -1,25 +1,19 @@ {% extends "base.html" %} {% block content %} -

    {{ section.title }}

    +
    +

    {{ section.title }}

    + {{ section.content | safe }} -{{ 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 + {% if paginator %} + {% include "partials/pagination.html" %} + {% endif %} +
    +{% endblock %} diff --git a/templates/shortcodes/webring.html b/templates/shortcodes/webring.html index c59ed94..a523761 100644 --- a/templates/shortcodes/webring.html +++ b/templates/shortcodes/webring.html @@ -1,4 +1,4 @@ - + {{webringName}} - \ No newline at end of file + diff --git a/templates/shortcodes/youtube.html b/templates/shortcodes/youtube.html index abc23c7..51f44d4 100644 --- a/templates/shortcodes/youtube.html +++ b/templates/shortcodes/youtube.html @@ -1,9 +1,10 @@
    - -
    \ No newline at end of file + diff --git a/templates/sitemap.xml b/templates/sitemap.xml new file mode 100644 index 0000000..1512b55 --- /dev/null +++ b/templates/sitemap.xml @@ -0,0 +1,20 @@ + + + {% set root = get_section(path="_index.md") %} + {% for page in root.pages %} + + {{ page.permalink | safe }} + {% if page.date %}{{ page.date | date(format="%Y-%m-%d") }}{% endif %} + + {% endfor %} + + {% for subsection in root.subsections %} + {% set sub = get_section(path=subsection) %} + {% for page in sub.pages %} + + {{ page.permalink | safe }} + {% if page.date %}{{ page.date | date(format="%Y-%m-%d") }}{% endif %} + + {% endfor %} + {% endfor %} + diff --git a/templates/tags/list.html b/templates/tags/list.html index 662769e..e03ab99 100644 --- a/templates/tags/list.html +++ b/templates/tags/list.html @@ -1,10 +1,13 @@ {% extends "base.html" %} {% block content %} -

    {{ taxonomy.name }}

    -

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

    All Tags

    + +{% endblock %} diff --git a/templates/tags/single.html b/templates/tags/single.html index e143303..1526843 100644 --- a/templates/tags/single.html +++ b/templates/tags/single.html @@ -1,20 +1,13 @@ {% extends "base.html" %} {% block content %} -

    {{ term.name }}

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

    Posts tagged: {{ term.name }}

    -{% 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 +{% endblock %}