Put comments into a partial

* Also removed unnecessary Disqus style (didn't regenerate resources)
This commit is contained in:
Track3 2018-12-30 11:06:38 +08:00
parent 6f864b437d
commit efb0b592a0
4 changed files with 8 additions and 18 deletions

View file

@ -651,19 +651,8 @@ hr.post-end {
} }
} }
// Disqus
#disqus {
margin-top: 2.5em;
}
.dsq-brlink {
display: block;
text-align: center;
}
// Media Queries // Media Queries
// //
@media (min-width: 800px) { @media (min-width: 800px) {
.site-main { .site-main {
margin-top: 3em; margin-top: 3em;

View file

@ -8,9 +8,9 @@
<div class="content"> <div class="content">
{{ .Content }} {{ .Content }}
</div> </div>
{{- if and .Params.comments .Site.DisqusShortname }} {{- if .Params.comments }}
<div id="disqus" class="thin"> <div id="comments" class="thin">
{{ template "_internal/disqus.html" . }} {{ partial "comments.html" . }}
</div> </div>
{{- end }} {{- end }}
</main> </main>

View file

@ -0,0 +1,3 @@
{{- if .Site.DisqusShortname }}
{{ template "_internal/disqus.html" . }}
{{- end }}

View file

@ -50,11 +50,9 @@
</a> </a>
{{- end }} {{- end }}
</div> </div>
{{- if .Site.DisqusShortname }} <div id="comments" class="thin">
<div id="disqus" class="thin"> {{ partial "comments.html" . }}
{{ template "_internal/disqus.html" . }}
</div> </div>
{{- end }}
</main> </main>
{{ end }} {{ end }}