mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-12-21 01:52:19 +01:00
layouts/_default/single.html: Adjust Disqus logic
Bring the Disqus comments inside the <article> tag. The article has a sizeable bottom margin seprating it from the blog footer, and if Disqus comments are active they appear after this margin, and this looks ugly. Semantically, I think the comments should actually be inside the article tag anyways (since they are directly related), as well as further wrapped in article tags, but we don't control the code that Disqus injects so we'll have to make do with this. See: https://www.w3.org/TR/html5/sections.html#the-article-element
This commit is contained in:
parent
af39372a24
commit
1f6cc0cf42
@ -19,14 +19,22 @@
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
{{ if or (not .Site.Params.sharingicons.hide) (.Site.DisqusShortname) }}
|
||||
<hr>
|
||||
<footer>
|
||||
|
||||
{{ if not .Site.Params.sharingicons.hide }}
|
||||
{{ partial "sharing-icons.html" . }}
|
||||
{{ end }}
|
||||
</article> <!-- /.blog-post -->
|
||||
|
||||
{{ if and (.Site.DisqusShortname) (ne .Params.comments false) }}
|
||||
{{ partial "disqus.html" . }}
|
||||
{{ end }}
|
||||
{{ if and (.Site.DisqusShortname) (ne .Params.comments false) }}
|
||||
{{ partial "disqus.html" . }}
|
||||
{{ end }}
|
||||
</footer>
|
||||
{{ end }}
|
||||
|
||||
</article> <!-- /.blog-post -->
|
||||
|
||||
{{ end }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user