From c539297c7f442aa78feff9e0494c734b6596dff6 Mon Sep 17 00:00:00 2001 From: Sirn Thanabulpong Date: Sat, 5 Oct 2024 07:13:15 +0900 Subject: [PATCH] Initial dark mode --- assets/styles/main.css | 2 +- fanboi2/templates/boards/index.jinja2 | 2 +- fanboi2/templates/components/divider.jinja2 | 2 +- fanboi2/templates/components/post.jinja2 | 24 +++++++++++ fanboi2/templates/layout.jinja2 | 8 ++-- fanboi2/templates/topics/index.jinja2 | 46 +++++++-------------- 6 files changed, 47 insertions(+), 37 deletions(-) create mode 100644 fanboi2/templates/components/post.jinja2 diff --git a/assets/styles/main.css b/assets/styles/main.css index d500672..20abfea 100644 --- a/assets/styles/main.css +++ b/assets/styles/main.css @@ -20,6 +20,6 @@ @apply [&>p.thumbnails>a.thumbnail_img]:object-cover; @apply [&>p.thumbnails>a.thumbnail_img]:rounded-md; @apply [&_a.anchor]:text-[#08c]; - @apply [&_a.anchor]:hover:text-porcelain-500; + @apply [&_a.anchor:hover]:text-porcelain-500; } } diff --git a/fanboi2/templates/boards/index.jinja2 b/fanboi2/templates/boards/index.jinja2 index c22cb29..fd2c196 100644 --- a/fanboi2/templates/boards/index.jinja2 +++ b/fanboi2/templates/boards/index.jinja2 @@ -7,7 +7,7 @@ {% call render_divider_item() %} {% call render_container() %} {{ board.title }} -

{{ board.description }}

+

{{ board.description }}

{% endcall %} {% endcall %} {% endfor %} diff --git a/fanboi2/templates/components/divider.jinja2 b/fanboi2/templates/components/divider.jinja2 index 6f64ded..5c762b0 100644 --- a/fanboi2/templates/components/divider.jinja2 +++ b/fanboi2/templates/components/divider.jinja2 @@ -1,5 +1,5 @@ {% macro render_divider() -%} -
+
{{ caller() }}
{%- endmacro %} diff --git a/fanboi2/templates/components/post.jinja2 b/fanboi2/templates/components/post.jinja2 new file mode 100644 index 0000000..31e8552 --- /dev/null +++ b/fanboi2/templates/components/post.jinja2 @@ -0,0 +1,24 @@ +{% macro render_post(post) -%} +
+
+
+
{{ post.number }}
+
{{ post.name }}
+ +
{{ post | format_post_ident }}
+
+
+ {{ post | format_post }} +
+
+
Posted {{ post.created_at | datetime }}
+
+
+
+{%- endmacro %} + +{% macro render_post_container() -%} +
+ {{ caller() }} +
+{%- endmacro %} diff --git a/fanboi2/templates/layout.jinja2 b/fanboi2/templates/layout.jinja2 index eadbc40..b7a0528 100644 --- a/fanboi2/templates/layout.jinja2 +++ b/fanboi2/templates/layout.jinja2 @@ -8,9 +8,9 @@ - +
-
+
-