From 225d98e11e139a8fd0b36bf22fd93a79fe4fc430 Mon Sep 17 00:00:00 2001 From: daudix Date: Sun, 11 Aug 2024 03:53:25 +0300 Subject: [PATCH] Fix adaptivity of post tags --- sass/_article-list.scss | 7 +++++++ sass/_tags.scss | 6 +----- templates/article_list.html | 31 +++++++++++++++++------------- templates/taxonomy_single.html | 35 +++++++++++++++++++--------------- 4 files changed, 46 insertions(+), 33 deletions(-) diff --git a/sass/_article-list.scss b/sass/_article-list.scss index 611ea9f..7a9e7f6 100644 --- a/sass/_article-list.scss +++ b/sass/_article-list.scss @@ -170,6 +170,13 @@ background-color: var(--yellow-fg); } } + + div { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + gap: 0.25rem; + } } hr:last-of-type { diff --git a/sass/_tags.scss b/sass/_tags.scss index 8620765..ec4b900 100644 --- a/sass/_tags.scss +++ b/sass/_tags.scss @@ -1,15 +1,11 @@ .tags { - display: flex; + display: inline-flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; list-style: none; - &.end { - float: inline-end; - } - li { display: inline-flex; transition: var(--transition); diff --git a/templates/article_list.html b/templates/article_list.html index 291e23b..99ddc0a 100644 --- a/templates/article_list.html +++ b/templates/article_list.html @@ -44,23 +44,28 @@ {{ page.description | markdown | safe }} {%- endif %} {%- if page.date -%} - - - {%- if page.authors -%} - • {% include "partials/authors.html" -%} - {%- endif -%} +
+ + + {%- if page.authors -%} + • {% include "partials/authors.html" -%} + {%- endif -%} + {%- if page.taxonomies -%} {%- for name, taxon in page.taxonomies %} -
    - {%-for item in taxon -%} -
  • {{ item }}
  • - {%- endfor %} -
+ +
    + {%-for item in taxon -%} +
  • {{ item }}
  • + {%- endfor %} +
+
{%- endfor -%} {%- endif %} -
+ +
{%- endif -%}
diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html index 164b74d..6a42b0e 100644 --- a/templates/taxonomy_single.html +++ b/templates/taxonomy_single.html @@ -43,23 +43,28 @@ {{ page.description | markdown | safe }} {%- endif %} {%- if page.date -%} - - - {%- if page.authors -%} - • {% include "partials/authors.html" -%} - {%- endif -%} +
+ + + {%- if page.authors -%} + • {% include "partials/authors.html" -%} + {%- endif -%} + {%- if page.taxonomies -%} - {%- for name, taxon in page.taxonomies -%} -
    - {%- for item in taxon -%} -
  • {{ item }}
  • - {%- endfor -%} -
+ {%- for name, taxon in page.taxonomies %} + +
    + {%-for item in taxon -%} +
  • {{ item }}
  • + {%- endfor %} +
+
{%- endfor -%} - {%- endif -%} -
+ {%- endif %} + +
{%- endif -%}