Display posts of chapter as list

This commit is contained in:
Philipp Oppermann
2020-12-28 19:48:47 +01:00
parent 7cc3d5e3b9
commit 5c3015acc3
2 changed files with 21 additions and 16 deletions

View File

@@ -555,6 +555,10 @@ main img {
margin-right: -0.5rem; margin-right: -0.5rem;
} }
.posts ul {
padding-left: 2em;
}
.posts.neutral { .posts.neutral {
border: 2px solid #999; border: 2px solid #999;
} }

View File

@@ -29,14 +29,15 @@
<p>In the following posts, we explain how to create an operating system for the <code>x86_64</code> architecture step for step. Starting from scratch, we create a bootable OS kernel, implement basic input/output support, show how to test and debug our kernel, explain virtual memory management, and add support for multitasking and userspace programs.</p> <p>In the following posts, we explain how to create an operating system for the <code>x86_64</code> architecture step for step. Starting from scratch, we create a bootable OS kernel, implement basic input/output support, show how to test and debug our kernel, explain virtual memory management, and add support for multitasking and userspace programs.</p>
--> -->
<div>
{%- set chapter = "none" -%} {%- set chapter = "none" -%}
{%- for post in posts -%} {%- for post in posts -%}
{%- if post.extra["chapter"] -%}
{%- if post.extra["chapter"] != chapter -%} {%- if post.extra["chapter"] != chapter -%}
{%- if chapter != "none" -%}
</ul></div>
{%- endif -%}
{# Begin new chapter #} {# Begin new chapter #}
{%- set_global chapter = post.extra["chapter"] -%} {%- set_global chapter = post.extra["chapter"] -%}
</div>
{% set chapter_slug = chapter | slugify %} {% set chapter_slug = chapter | slugify %}
<div class="posts {{chapter_slug}}"> <div class="posts {{chapter_slug}}">
@@ -44,12 +45,12 @@
<h2>{{ chapter_page.title }}</h2> <h2>{{ chapter_page.title }}</h2>
{{ chapter_page.content | safe }} {{ chapter_page.content | safe }}
{%- endif -%} <ul>
{%- endif -%} {%- endif -%}
{{ macros::post_link_edition_3(page=post) }} <li>{{ macros::post_link_edition_3(page=post) }}</li>
{%- endfor -%} {%- endfor -%}
</div> </ul></div>
<hr> <hr>