1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-25 03:34:29 +01:00

Use HTML5 aside and section tags for sidebar

The HTML5 aside tag is for content that is tangentially related to
the content around the aside tag, but is considered separate from
that content. Section tags are semantic HTML5 elements that inform
computers about content structure, as opposed to div tags which
can be used for structure OR style.

See: http://diveinto.html5doctor.com/semantics.html
This commit is contained in:
Alan Orth 2016-09-02 10:18:18 +03:00
parent 1f0799b9f1
commit 6059f6cbea
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -1,21 +1,21 @@
<div class="col-sm-3 offset-sm-1 blog-sidebar">
<div class="sidebar-module sidebar-module-inset">
<aside class="col-sm-3 offset-sm-1 blog-sidebar">
<section class="sidebar-module sidebar-module-inset">
<h4>About</h4>
<p>Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>
</div>
</section>
{{ if isset .Site.Params.sidebar "num_recent_posts" }}
<div class="sidebar-module">
<section class="sidebar-module">
<h4>Recent Posts</h4>
<ol class="list-unstyled">
{{ range first .Site.Params.sidebar.num_recent_posts .Site.Pages }}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{ end }}
</ol>
</div>
</section>
{{ end }}
<div class="sidebar-module">
<section class="sidebar-module">
<h4>Archives</h4>
<ol class="list-unstyled">
<li><a href="#">March 2014</a></li>
@ -31,13 +31,13 @@
<li><a href="#">May 2013</a></li>
<li><a href="#">April 2013</a></li>
</ol>
</div>
<div class="sidebar-module">
</section>
<section class="sidebar-module">
<h4>Elsewhere</h4>
<ol class="list-unstyled">
<li><a href="#">GitHub</a></li>
<li><a href="#">Twitter</a></li>
<li><a href="#">Facebook</a></li>
</ol>
</div>
</div><!-- /.blog-sidebar -->
</section>
</aside><!-- /.blog-sidebar -->