Move warnings before toc to fix toc placement

The placement was off for pages with warnings.
This commit is contained in:
Philipp Oppermann
2019-04-04 13:59:07 +02:00
parent 042c934c6e
commit beb1306a1d
2 changed files with 13 additions and 11 deletions

View File

@@ -11,10 +11,6 @@
{% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
</time>
<div class="warning">
<b>No longer updated!</b> You are viewing the a post of the first edition of “Writing an OS in Rust”, which is no longer updated. You can find the second edition <a href="{{ get_url(path = "./second-edition/_index.md") }}">here</a>.
</div>
<aside id="toc-aside">
<h2>Table of Contents</h2>
<ol>
@@ -28,6 +24,11 @@
</li>{% endfor %}
</ol>
</aside>
<div class="warning">
<b>No longer updated!</b> You are viewing the a post of the first edition of “Writing an OS in Rust”, which is no longer updated. You can find the second edition <a href="{{ get_url(path = "./second-edition/_index.md") }}">here</a>.
</div>
{{ page.content | safe }}
{% endblock main %}

View File

@@ -14,13 +14,6 @@
{% if page.extra.updated %} (updated on {{ page.extra.updated | date(format="%b %d, %Y") }}) {% endif %}
</time>
{% if page.extra.warning %}
<div class="warning">
{% if page.extra.warning_short %} <b>{{ page.extra.warning_short }}</b> {% endif %}
{{ page.extra.warning | markdown(inline=true)}}
</div>
{% endif %}
<aside id="toc-aside">
<h2>Table of Contents</h2>
<ol>
@@ -34,6 +27,14 @@
</li>{% endfor %}
</ol>
</aside>
{% if page.extra.warning %}
<div class="warning">
{% if page.extra.warning_short %} <b>{{ page.extra.warning_short }}</b> {% endif %}
{{ page.extra.warning | markdown(inline=true)}}
</div>
{% endif %}
{{ page.content | safe | replace(from="<!-- toc -->", to=macros::toc(toc=toc))}}
<div class="post-footer-support">