Use <main> and <article> tags in simple theme

Add a <main> tag to surround all the content blocks, so that it's easier
to target the main part of a page (be it an article, the list of posts
or the different categories) using CSS.

Because of this, the <section> part of the article.html template is made
redundant, so it is removed.

Finally, the generic <div> is replaced by an <article> tag to surround
the article's content.
This commit is contained in:
Pierre Equoy 2022-01-17 16:11:06 +08:00
commit 7b9a859e5e
2 changed files with 4 additions and 4 deletions

View file

@ -22,7 +22,6 @@
{% endblock %}
{% block content %}
<section id="content" class="body">
<header>
<h1 class="entry-title">
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark"
@ -60,8 +59,7 @@
</div>
{% endif %}
</footer><!-- /.post-info -->
<div class="entry-content">
<article>
{{ article.content }}
</div><!-- /.entry-content -->
</section>
</article>
{% endblock %}

View file

@ -51,8 +51,10 @@
{% endfor %}
{% endif %}
</ul></nav><!-- /#menu -->
<main>
{% block content %}
{% endblock %}
</main>
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="https://getpelican.com/">Pelican</a>,