diff options
author | wlh233 <wlh233@live.com> | 2021-08-24 16:41:55 +0300 |
---|---|---|
committer | wlh233 <wlh233@live.com> | 2021-08-24 16:41:55 +0300 |
commit | 43cd8c06d462566bf460e2701b34f9a9396517b6 (patch) | |
tree | 074c57359bd7e3ac2ef9e94dc1ba2bb879de0859 | |
parent | 539caeec7c7dc5fac4fb0ff872e639262b495f69 (diff) |
fix issue#2 and 中文乱码
-rw-r--r-- | assets/css/common.scss | 14 | ||||
-rw-r--r-- | layouts/partials/posts.html | 24 |
2 files changed, 21 insertions, 17 deletions
diff --git a/assets/css/common.scss b/assets/css/common.scss index 2b5e2e4..3af0c70 100644 --- a/assets/css/common.scss +++ b/assets/css/common.scss @@ -109,21 +109,25 @@ body { /* posts */ .post-box { - position: relative; + display: flex; + flex-wrap: wrap; + padding: 1.25rem 0 0 1.25rem; +} +.post-box-title { + margin-right: 1.25rem; + width: 100%; } .post-box-tags { - position: absolute; - right: 0rem; - bottom: 0rem; + margin-left: auto; } .post-box-tag { color: $primary; font-size: 0.9em; } .post-box-meta { - padding-bottom: 0.1rem; opacity: 0.8; font-size: 0.9rem; + width: 100%; } #back-to-top { background: $primary; diff --git a/layouts/partials/posts.html b/layouts/partials/posts.html index f1addb0..dc61fd2 100644 --- a/layouts/partials/posts.html +++ b/layouts/partials/posts.html @@ -9,15 +9,6 @@ {{ $paginator := .Paginate (where (where .Site.Pages "Type" "post") "Kind" "page") }} {{ range $paginator.Pages }} <div class="box post-box"> - {{ with .Params.Tags }} - <div class="post-box-tags"> - {{ range .}} - <span class="post-tag post-box-tag"> - <a href="{{ $ctx.Site.BaseURL }}{{ "/tags/" | relLangURL }}{{ . | urlize}}">#{{ . }}</a> - </span> - {{ end }} - </div> - {{ end }} <div class="post-box-title"> <a href="{{ .Permalink }}" class="title is-size-5">{{ .Title }}</a> </div> @@ -26,11 +17,20 @@ {{ with .Params.Categories }} ・ {{ range .}} <span class="post-tag post-box-category"> - <a href="{{ $ctx.Site.BaseURL }}{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> + <a href="{{ $ctx.Site.BaseURL }}{{ "/categories/" | relLangURL }}{{ . | urlize }}/">{{ . }}</a> </span> {{ end }} {{ end }} </div> + {{ with .Params.Tags }} + <div class="post-box-tags"> + {{ range .}} + <span class="post-tag post-box-tag"> + <a href="{{ $ctx.Site.BaseURL }}{{ "/tags/" | relLangURL }}{{ . | urlize}}/">#{{ . }}</a> + </span> + {{ end }} + </div> + {{ end }} </div> {{ end }} </div> @@ -50,7 +50,7 @@ <div class="content"> {{ range .Site.Taxonomies.categories.ByCount }} <div class="container" style="margin-bottom: 0.5rem"> - <a href="{{ $ctx.Site.BaseURL }}{{ "/categories/" | relLangURL }}{{ .Name | urlize }}">{{ .Name }}</a> + <a href="{{ $ctx.Site.BaseURL }}{{ "/categories/" | relLangURL }}{{ .Name | urlize }}/">{{ .Name }}</a> <span class="tag is-pulled-right"> {{ .Count }} </span> @@ -90,4 +90,4 @@ </div> </div> </div> -</section>
\ No newline at end of file +</section> |