Skip to content

Commit 747c656

Browse files
committed
Tidy up some css
1 parent 3eab5d3 commit 747c656

File tree

5 files changed

+37
-35
lines changed

5 files changed

+37
-35
lines changed

sass/main.scss

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -148,23 +148,21 @@ main {
148148
display: flex;
149149
flex-direction: column;
150150
align-content: center;
151-
padding: 2vh 0;
152151
background-color: var(--color-background);
153-
& article, & {
154-
& > div, & > section, & > p, & > h1,
155-
& > h2, & > h3, & > h4, & > h5, & > h6, & > blockquote,
156-
& > table,
157-
& > ul,
158-
& > ol,
159-
& > nav {
160-
padding-left: var(--margins);
161-
padding-right: var(--margins);
162-
}
163-
& > ul > li > pre,
164-
& > ol > li > pre {
165-
margin-left: calc(var(--margins) * -1 - 1rem) !important;
166-
margin-right: calc(var(--margins) * -1) !important;
167-
}
152+
}
153+
154+
*:is(article, section, nav, div.excerpt) {
155+
&::before {
156+
padding-left: var(--margins);
157+
padding-right: var(--margins);
158+
}
159+
& > *:is(p, h1, h2, h3, h4, h5, h6, blockquote, table, ul, ol, div.section-meta, div.post-meta) {
160+
padding-left: var(--margins);
161+
padding-right: var(--margins);
162+
}
163+
& > *:is(ul, ol) > li > pre {
164+
margin-left: calc(var(--margins) * -1 - 1rem) !important;
165+
margin-right: calc(var(--margins) * -1) !important;
168166
}
169167
}
170168

templates/blog/list.html

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
{% extends "page.html" %}
22

33
{% block main %}
4-
{{ section.content | safe }}
5-
<hr>
6-
{% for post in section.pages | default(value=[]) %}
7-
{{ post::metadata(post=post) }}
8-
{% if loop.last != true %}
9-
<hr>
10-
{% endif %}
11-
{% endfor %}
12-
{% for subsection_path in section.subsections | default(value=[]) %}
13-
{{ section::metadata(path=subsection_path) }}
14-
{% if loop.last != true %}
15-
<hr>
16-
{% endif %}
17-
{% endfor %}
18-
{% endblock main %}
4+
<article>
5+
{{ section.content | safe }}
6+
</article>
7+
<hr>
8+
{% for post in section.pages | default(value=[]) %}
9+
{{ post::metadata(post=post) }}
10+
{% if loop.last != true %}
11+
<hr>
12+
{% endif %}
13+
{% endfor %}
14+
{% for subsection_path in section.subsections | default(value=[]) %}
15+
{{ section::metadata(path=subsection_path) }}
16+
{% if loop.last != true %}
17+
<hr>
18+
{% endif %}
19+
{% endfor %}
20+
{% endblock main %}

templates/blog/single.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{%- extends "page.html" -%}
22

33
{%- block main -%}
4-
{{ page.content | safe }}
4+
<article>
5+
{{ page.content | safe }}
6+
</article>
57
{%- endblock main -%}

templates/macros/post.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ <h2 class="post-title"><a href="{{ post.permalink }}">{{ post.title | markdown(i
44
<h5 class="description">{{ post.description | default(value="") | markdown(inline=true) | safe }}</h5>
55
<div class="excerpt">
66
{{ post.summary | safe }}
7-
<a class="continue-reading" href="{{ post.permalink }}#continue-reading">Continue reading...</a>
87
</div>
9-
8+
109
<div class="post-meta">
10+
<a class="continue-reading" href="{{ post.permalink }}#continue-reading">Continue reading...</a>
1111
{%- if post.date -%}
1212
<div class="posted-on">
1313
<time datetime="{{ post.date | date(format=" %Y-%m-%d %H:%M") }}">{{ post.date | date(format="%Y-%m-%d")

templates/page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<main>
88
{% include "partials/toc.html" %}
99
{% block main %}
10-
{{ page.content | safe }}
10+
{{ page.content | safe }}
1111
{% endblock main %}
1212
</main>
1313
{% include "partials/footer.html" %}

0 commit comments

Comments
 (0)