From 747c656c512d11b0041d2a969f222cbf27bf1bde Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Fri, 13 Dec 2024 00:19:15 -0800 Subject: [PATCH] Tidy up some css --- sass/main.scss | 30 ++++++++++++++---------------- templates/blog/list.html | 32 +++++++++++++++++--------------- templates/blog/single.html | 4 +++- templates/macros/post.html | 4 ++-- templates/page.html | 2 +- 5 files changed, 37 insertions(+), 35 deletions(-) diff --git a/sass/main.scss b/sass/main.scss index 40bfc3899..ad1137813 100644 --- a/sass/main.scss +++ b/sass/main.scss @@ -148,23 +148,21 @@ main { display: flex; flex-direction: column; align-content: center; - padding: 2vh 0; background-color: var(--color-background); - & article, & { - & > div, & > section, & > p, & > h1, - & > h2, & > h3, & > h4, & > h5, & > h6, & > blockquote, - & > table, - & > ul, - & > ol, - & > nav { - padding-left: var(--margins); - padding-right: var(--margins); - } - & > ul > li > pre, - & > ol > li > pre { - margin-left: calc(var(--margins) * -1 - 1rem) !important; - margin-right: calc(var(--margins) * -1) !important; - } +} + +*:is(article, section, nav, div.excerpt) { + &::before { + padding-left: var(--margins); + padding-right: var(--margins); + } + & > *:is(p, h1, h2, h3, h4, h5, h6, blockquote, table, ul, ol, div.section-meta, div.post-meta) { + padding-left: var(--margins); + padding-right: var(--margins); + } + & > *:is(ul, ol) > li > pre { + margin-left: calc(var(--margins) * -1 - 1rem) !important; + margin-right: calc(var(--margins) * -1) !important; } } diff --git a/templates/blog/list.html b/templates/blog/list.html index bd3ee8f33..db768b1c1 100644 --- a/templates/blog/list.html +++ b/templates/blog/list.html @@ -1,18 +1,20 @@ {% extends "page.html" %} {% block main %} -{{ section.content | safe }} -
-{% for post in section.pages | default(value=[]) %} -{{ post::metadata(post=post) }} -{% if loop.last != true %} -
-{% endif %} -{% endfor %} -{% for subsection_path in section.subsections | default(value=[]) %} -{{ section::metadata(path=subsection_path) }} -{% if loop.last != true %} -
-{% endif %} -{% endfor %} -{% endblock main %} \ No newline at end of file +
+ {{ section.content | safe }} +
+
+ {% for post in section.pages | default(value=[]) %} + {{ post::metadata(post=post) }} + {% if loop.last != true %} +
+ {% endif %} + {% endfor %} + {% for subsection_path in section.subsections | default(value=[]) %} + {{ section::metadata(path=subsection_path) }} + {% if loop.last != true %} +
+ {% endif %} + {% endfor %} + {% endblock main %} \ No newline at end of file diff --git a/templates/blog/single.html b/templates/blog/single.html index 213cbe3c4..2df2d6724 100644 --- a/templates/blog/single.html +++ b/templates/blog/single.html @@ -1,5 +1,7 @@ {%- extends "page.html" -%} {%- block main -%} -{{ page.content | safe }} +
+ {{ page.content | safe }} +
{%- endblock main -%} \ No newline at end of file diff --git a/templates/macros/post.html b/templates/macros/post.html index 9df996edc..520b5c2b8 100644 --- a/templates/macros/post.html +++ b/templates/macros/post.html @@ -4,10 +4,10 @@

{{ post.title | markdown(i
{{ post.description | default(value="") | markdown(inline=true) | safe }}
- +