mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Display posts of chapter as list
This commit is contained in:
@@ -555,6 +555,10 @@ main img {
|
||||
margin-right: -0.5rem;
|
||||
}
|
||||
|
||||
.posts ul {
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.posts.neutral {
|
||||
border: 2px solid #999;
|
||||
}
|
||||
|
||||
@@ -29,27 +29,28 @@
|
||||
<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" -%}
|
||||
{%- for post in posts -%}
|
||||
{%- if post.extra["chapter"] -%}
|
||||
{%- if post.extra["chapter"] != chapter -%}
|
||||
{%- if chapter != "none" -%}
|
||||
</ul></div>
|
||||
{%- endif -%}
|
||||
|
||||
{# Begin new chapter #}
|
||||
{%- set_global chapter = post.extra["chapter"] -%}
|
||||
</div>
|
||||
|
||||
{% set chapter_slug = chapter | slugify %}
|
||||
<div class="posts {{chapter_slug}}">
|
||||
{% set chapter_page = get_page(path = "edition-3/chapters/" ~ chapter_slug ~ ".md" ) %}
|
||||
<h2>{{ chapter_page.title }}</h2>
|
||||
{{ chapter_page.content | safe }}
|
||||
{% set chapter_slug = chapter | slugify %}
|
||||
<div class="posts {{chapter_slug}}">
|
||||
{% set chapter_page = get_page(path = "edition-3/chapters/" ~ chapter_slug ~ ".md" ) %}
|
||||
<h2>{{ chapter_page.title }}</h2>
|
||||
{{ chapter_page.content | safe }}
|
||||
|
||||
{%- endif -%}
|
||||
<ul>
|
||||
{%- endif -%}
|
||||
|
||||
{{ macros::post_link_edition_3(page=post) }}
|
||||
<li>{{ macros::post_link_edition_3(page=post) }}</li>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
</ul></div>
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user