mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Use for loop on index page instead of hardcoding post numbers
This commit is contained in:
@@ -82,7 +82,7 @@ main img {
|
|||||||
border: 2px solid #fc0
|
border: 2px solid #fc0
|
||||||
}
|
}
|
||||||
|
|
||||||
.posts.exceptions {
|
.posts.interrupts {
|
||||||
border: 2px solid #f66;
|
border: 2px solid #f66;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ main img {
|
|||||||
color: #990;
|
color: #990;
|
||||||
}
|
}
|
||||||
|
|
||||||
.post-category.exceptions {
|
.post-category.interrupts {
|
||||||
color: #f33;
|
color: #f33;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,27 +23,22 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="bare-bones" class="post-category bare-bones">Bare Bones</div>
|
<div>
|
||||||
<div class="posts bare-bones">
|
{% set chapter = "none" %}
|
||||||
{{ macros::post_link(page=posts.0) }}
|
{% for post in posts %}
|
||||||
{{ macros::post_link(page=posts.1) }}
|
{% if post.extra["chapter"] %}
|
||||||
{{ macros::post_link(page=posts.2) }}
|
{% if post.extra["chapter"] != chapter %}
|
||||||
{{ macros::post_link(page=posts.3) }}
|
{# Begin new chapter #}
|
||||||
|
{% set_global chapter = post.extra["chapter"] %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="exceptions" class="post-category exceptions">Exceptions</div>
|
<div id="{{chapter | slugify}}" class="post-category {{chapter | slugify}}">{{ chapter }}</div>
|
||||||
<div class="posts exceptions">
|
<div class="posts {{chapter | slugify}}">
|
||||||
{{ macros::post_link(page=posts.4) }}
|
{% endif %}
|
||||||
{{ macros::post_link(page=posts.5) }}
|
{% endif %}
|
||||||
{{ macros::post_link(page=posts.6) }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="memory-management" class="post-category memory-management">Memory Management</div>
|
{{ macros::post_link(page=post) }}
|
||||||
<div class="posts memory-management">
|
{% endfor %}
|
||||||
{{ macros::post_link(page=posts.7) }}
|
|
||||||
{{ macros::post_link(page=posts.8) }}
|
|
||||||
{{ macros::post_link(page=posts.9) }}
|
|
||||||
{{ macros::post_link(page=posts.10) }}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="posts subscribe">
|
<div class="posts subscribe">
|
||||||
|
|||||||
Reference in New Issue
Block a user