Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wayjam/hugo-theme-mixedpaper.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayJam So <imsuwj@gmail.com>2020-05-10 12:15:51 +0300
committerWayJam So <imsuwj@gmail.com>2020-05-10 12:15:51 +0300
commit36aba0c11a16c845f598908e6225472b5649d780 (patch)
treec2771d1858a70ac506866953ce3cfe6bf6d1de8f
parentb8a76222ff4134864976a03c061407e9a599ef97 (diff)
update: comment style
-rw-r--r--assets/css/main.scss20
-rw-r--r--layouts/_default/single.html20
-rw-r--r--layouts/partials/comments.html8
3 files changed, 34 insertions, 14 deletions
diff --git a/assets/css/main.scss b/assets/css/main.scss
index 0b8b9c3..11c2157 100644
--- a/assets/css/main.scss
+++ b/assets/css/main.scss
@@ -376,6 +376,12 @@ body {
.prev::before {
color: #009688;
}
+
+ &:after {
+ content: " ";
+ clear: both;
+ display: table;
+ }
}
/* List */
@@ -749,6 +755,18 @@ body {
#comments {
padding: 0.5em;
margin: 1em 0;
+ .leancloud_visitors {
+ display: block;
+ margin: 0.5em 0px;
+ .leancloud-visitors-count {
+ background: #9e9e9e;
+ font-size: 80%;
+ color: #fff;
+ font-weight: 600;
+ padding: 0.2em 0.5em;
+ border-radius: 50%;
+ }
+ }
}
/* Code Hightlight */
@@ -1225,7 +1243,7 @@ body {
color: #666;
font-style: italic;
&:hover {
- color: #6abfa3;
+ color: #6abfa3;
cursor: pointer;
}
}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index fbdd719..687a0e1 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -22,14 +22,16 @@
</div>
<div class="clearfix"></div>
</article>
- <div class="other_posts">
- {{ if .PrevInSection }}
- <a href="{{.PrevInSection.Permalink}}" class="prev">{{ .PrevInSection.LinkTitle }}</a>
- {{ end }}
- {{ if .NextInSection }}
- <a href="{{.NextInSection.Permalink}}" class="next">{{ .NextInSection.LinkTitle }}</a>
- {{ end }}
- </div>
- {{ partial "comments.html" . }}
+ {{ if not (eq .Type "section") }}
+ <div class="other_posts">
+ {{ if .PrevInSection }}
+ <a href="{{.PrevInSection.Permalink}}" class="prev">{{ .PrevInSection.LinkTitle }}</a>
+ {{ end }}
+ {{ if .NextInSection }}
+ <a href="{{.NextInSection.Permalink}}" class="next">{{ .NextInSection.LinkTitle }}</a>
+ {{ end }}
+ </div>
+ {{ partial "comments.html" . }}
+ {{ end }}
</section>
{{ end }}
diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html
index e7cc87b..363d4f2 100644
--- a/layouts/partials/comments.html
+++ b/layouts/partials/comments.html
@@ -1,12 +1,12 @@
<aside id="comments">
{{- $comment := .Site.Params.comment}}
- {{- if eq $comment.type "none" }}
+ {{- if or (eq $comment.type "none") (.Params.noComment) (eq .Type "section") }}
{{- else if eq $comment.type "valine"}}
{{- if $comment.valine.visitor -}}
<span id="{{ .RelPermalink | relURL }}" class="leancloud_visitors" data-flag-title="{{ .Title }}">
- <span class="post-meta-item-text">文章阅读量 </span>
- <span class="leancloud-visitors-count">0</span>
- </span>
+ <span class="post-meta-item-text">文章阅读量</span>
+ <span class="leancloud-visitors-count">0</span>
+ </span>
{{- end }}
<div id="vcomments"></div>
<script src="//unpkg.com/valine@latest/dist/Valine.min.js"></script>