From c6ec7c750588562c3a14c1ee0f2a7d00f467bbd6 Mon Sep 17 00:00:00 2001 From: serginogal Date: Fri, 3 Feb 2023 17:47:55 +0900 Subject: [PATCH 01/10] :sparkles: feat: add markdown support to index page --- templates/macros/macros.html | 6 ++++++ templates/section.html | 2 ++ 2 files changed, 8 insertions(+) diff --git a/templates/macros/macros.html b/templates/macros/macros.html index fa25568..029cea6 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -77,6 +77,12 @@ {% endmacro content %} +{% macro index_content(page) %} +
+ {{ page.content | safe }} +
+{% endmacro content %} + {% macro content(page) %}
diff --git a/templates/section.html b/templates/section.html index 01d1ff5..3b7d2c8 100644 --- a/templates/section.html +++ b/templates/section.html @@ -9,6 +9,8 @@ {{ post_macros::page_desc(desc=section.extra.desc) }} {% endif -%} +{{ post_macros::index_content(page=section) }} +
{{ post_macros::page_header(title=section.title) }} From 32ca1d3e9e8823ec05a629addbdcead5b54e2a18 Mon Sep 17 00:00:00 2001 From: welpo Date: Sun, 5 Feb 2023 02:21:50 +0100 Subject: [PATCH 02/10] =?UTF-8?q?=F0=9F=8D=B1=20fix:=20update=20theme=20sc?= =?UTF-8?q?reenshot=20in=20/projects?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/projects/tabi.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/projects/tabi.md b/content/projects/tabi.md index 183fd9a..731eaee 100644 --- a/content/projects/tabi.md +++ b/content/projects/tabi.md @@ -4,6 +4,6 @@ description = "A cute Zola theme." weight = 1 [extra] -remote_image = "https://user-images.githubusercontent.com/6399341/216358758-912b47e3-03ed-4b6d-b818-37cea7c42f45.png" +remote_image = "https://user-images.githubusercontent.com/6399341/216767530-cfe66699-ee6a-40b0-93ff-ce6879f5381e.png" link_to = "https://github.com/welpo/tabi" +++ \ No newline at end of file From c29697c4212d59588b75013c473790cd97445164 Mon Sep 17 00:00:00 2001 From: serginogal Date: Tue, 7 Feb 2023 00:03:08 +0900 Subject: [PATCH 03/10] :lipstick: feat: change markdown description style --- content/_index.md | 4 +++- templates/macros/macros.html | 19 ++++++++----------- templates/section.html | 4 +--- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/content/_index.md b/content/_index.md index 84e555d..18d5875 100644 --- a/content/_index.md +++ b/content/_index.md @@ -6,5 +6,7 @@ sort_by = "date" template = "section.html" [extra] -desc = {title = "Hello! I'm tabi~", img = "https://avatars.githubusercontent.com/u/6399341", text = "Tabi is a simple theme for Zola. It aims to be a personal page and home to blog posts. It features responsive design, dark and light modes, and high performance." } +desc = {title = "Hello! I'm tabi~", img = "https://avatars.githubusercontent.com/u/6399341" } +++ + +Tabi is a simple theme for Zola. It aims to be a personal page and home to blog posts. It features responsive design, dark and light modes, and high performance. \ No newline at end of file diff --git a/templates/macros/macros.html b/templates/macros/macros.html index 029cea6..55955af 100644 --- a/templates/macros/macros.html +++ b/templates/macros/macros.html @@ -60,28 +60,25 @@

{{ title }}

-{% endmacro content %} +{% endmacro page_header %} -{% macro page_desc(desc) %} +{% macro page_desc(desc, page) %} -{% endmacro content %} +{% endmacro page_desc %} -{% macro index_content(page) %} -
- {{ page.content | safe }} -
-{% endmacro content %} {% macro content(page) %}
diff --git a/templates/section.html b/templates/section.html index 3b7d2c8..3c9fe31 100644 --- a/templates/section.html +++ b/templates/section.html @@ -6,11 +6,9 @@ {% endif -%} {%- if section.extra.desc %} - {{ post_macros::page_desc(desc=section.extra.desc) }} + {{ post_macros::page_desc(desc=section.extra.desc, page=section) }} {% endif -%} -{{ post_macros::index_content(page=section) }} -
{{ post_macros::page_header(title=section.title) }} From 3434cbc92630d7a60963f51990216facd586e546 Mon Sep 17 00:00:00 2001 From: serginogal Date: Tue, 7 Feb 2023 17:26:29 +0900 Subject: [PATCH 04/10] :sparkles: feat: add archive screen --- content/archive/_index.md | 4 ++++ templates/archive.html | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 content/archive/_index.md create mode 100644 templates/archive.html diff --git a/content/archive/_index.md b/content/archive/_index.md new file mode 100644 index 0000000..5bc9a67 --- /dev/null +++ b/content/archive/_index.md @@ -0,0 +1,4 @@ ++++ +title = "archive" +template = "archive.html" ++++ diff --git a/templates/archive.html b/templates/archive.html new file mode 100644 index 0000000..5c49cf6 --- /dev/null +++ b/templates/archive.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} {% block main_content %} + +
+ {{ post_macros::page_header(title=section.title) }} +
+ +
+
    + {% set section_item = get_section(path="_index.md") %} {% for year, posts in + section_item.pages | group_by(attribute="year") %} {% if posts | length > 0 + %} +
  • +

    {{ year }}

    +
      + {% for post in posts %} +
    • +
      + + {{ post.date | date(format="%b %d") }} + +
      + {{ post.title }} +
    • + {% endfor %} +
    + {% endif %} {% endfor %} +
  • +
+
+{% endblock main_content %} From 19caf3fab117121e6d7e168cb4f189e44ae1f038 Mon Sep 17 00:00:00 2001 From: serginogal Date: Tue, 7 Feb 2023 17:28:42 +0900 Subject: [PATCH 05/10] :lipstick: style: add styles for archive screen --- sass/main.scss | 1 + sass/parts/_archive.scss | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 sass/parts/_archive.scss diff --git a/sass/main.scss b/sass/main.scss index 2fc0a40..58ee096 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -3,6 +3,7 @@ src: url('fonts/Inter.ttf'); font-display: swap; } +@import 'parts/archive.scss'; @import 'parts/_cards.scss'; @import 'parts/_code.scss'; @import 'parts/_header.scss'; diff --git a/sass/parts/_archive.scss b/sass/parts/_archive.scss new file mode 100644 index 0000000..0ed6508 --- /dev/null +++ b/sass/parts/_archive.scss @@ -0,0 +1,25 @@ +.archive { + .listing-title { + font-size: 1.5rem; + opacity: 0.8; + margin-bottom: 1rem; + } + + .listing-item { + padding: 0.2rem 1rem; + display: flex; + gap: 1rem; + .post-time { + width: 4rem; + .date { + opacity: 0.4; + } + } + } + + ul { + list-style: none; + padding: 0; + margin: 0; + } +} \ No newline at end of file From 3b5cc60e433a0c11039527a8785fdd8ced031377 Mon Sep 17 00:00:00 2001 From: serginogal Date: Tue, 7 Feb 2023 17:29:55 +0900 Subject: [PATCH 06/10] :wrench: chore: add archive route to nav-links --- config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/config.toml b/config.toml index 071f5ec..193762f 100644 --- a/config.toml +++ b/config.toml @@ -27,6 +27,7 @@ headerImage = "" # The icon is display besides the menu text but is not necessary. It needs to be placed under "menu_icon" in the static "folder" menu = [ { name = "home", url = "$BASE_URL/" }, + { name = "archive", url = "$BASE_URL/archive" }, { name = "tags", url = "$BASE_URL/tags" }, { name = "projects", url = "$BASE_URL/projects" }, ] From 31f70fffafd0a0adc0cae41368bbfbd25fb27880 Mon Sep 17 00:00:00 2001 From: welpo Date: Tue, 7 Feb 2023 13:58:02 +0100 Subject: [PATCH 07/10] =?UTF-8?q?=F0=9F=92=AC=20fix:=20capitalise=20Archiv?= =?UTF-8?q?e=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/archive/_index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/archive/_index.md b/content/archive/_index.md index 5bc9a67..2c032c0 100644 --- a/content/archive/_index.md +++ b/content/archive/_index.md @@ -1,4 +1,5 @@ +++ -title = "archive" +title = "Archive" +path = "archive" template = "archive.html" +++ From 55d928a3d59279eb5c54c861c293de3714342c48 Mon Sep 17 00:00:00 2001 From: serginogal Date: Tue, 7 Feb 2023 22:48:19 +0900 Subject: [PATCH 08/10] :pencil2: fix: _archive import typo --- sass/main.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass/main.scss b/sass/main.scss index 58ee096..157aa1b 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -3,7 +3,7 @@ src: url('fonts/Inter.ttf'); font-display: swap; } -@import 'parts/archive.scss'; +@import 'parts/_archive.scss'; @import 'parts/_cards.scss'; @import 'parts/_code.scss'; @import 'parts/_header.scss'; From 559c97d1f3a6f2e1da760ccb6adb5a20b5fe5b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar?= Date: Tue, 7 Feb 2023 14:54:39 +0100 Subject: [PATCH 09/10] =?UTF-8?q?=F0=9F=93=9D=20feat:=20remove=20Archive?= =?UTF-8?q?=20from=20TODO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 7367e43..8f681f5 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,6 @@ A simple blog theme powered by [Zola](getzola.org). See a live preview [here](ht - [x] Tags. - [X] Syntax highlighting. -### TODO: -- [ ] Archive. - See the project's roadmap [here](https://github.com/users/welpo/projects/1). ## Quick start From 099f094f317b84b5748a9a83796fabfb29dafc7f Mon Sep 17 00:00:00 2001 From: welpo Date: Tue, 7 Feb 2023 19:05:33 +0100 Subject: [PATCH 10/10] =?UTF-8?q?=F0=9F=90=9B=20fix:=20add=20end-of-file?= =?UTF-8?q?=20newline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sass/parts/_archive.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sass/parts/_archive.scss b/sass/parts/_archive.scss index 0ed6508..a48794f 100644 --- a/sass/parts/_archive.scss +++ b/sass/parts/_archive.scss @@ -22,4 +22,4 @@ padding: 0; margin: 0; } -} \ No newline at end of file +}