diff options
author | Pierre Equoy <pierre.equoy@protonmail.com> | 2022-01-17 16:11:06 +0800 |
---|---|---|
committer | Pierre Equoy <pierre.equoy@protonmail.com> | 2022-01-17 16:21:59 +0800 |
commit | 7b9a859e5e30180808794748e47e529485544b8d (patch) | |
tree | 73284354d762fefa9daf8180a5c2d755cd0f6db2 | |
parent | fe4f1ec4eada14b4da42a48b15c83082c112306d (diff) | |
download | pelican-7b9a859e5e30180808794748e47e529485544b8d.tar.gz |
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.
-rw-r--r-- | pelican/themes/simple/templates/article.html | 6 | ||||
-rw-r--r-- | pelican/themes/simple/templates/base.html | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pelican/themes/simple/templates/article.html b/pelican/themes/simple/templates/article.html index f85c7410..6dd0d967 100644 --- a/pelican/themes/simple/templates/article.html +++ b/pelican/themes/simple/templates/article.html @@ -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 %} diff --git a/pelican/themes/simple/templates/base.html b/pelican/themes/simple/templates/base.html index 2c17dbfb..b1ea57da 100644 --- a/pelican/themes/simple/templates/base.html +++ b/pelican/themes/simple/templates/base.html @@ -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>, |