update taxonomies design

This commit is contained in:
Dmitry Kolosov 2020-02-15 22:07:42 +03:00
parent 6694659336
commit 71fce0bf28
4 changed files with 49 additions and 52 deletions

View File

@ -14,6 +14,7 @@
{{ if .Params.date }} {{ if .Params.date }}
<div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div> <div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div>
{{ end }} {{ end }}
<div class="article-taxonomies">
{{ if .Params.categories }} {{ if .Params.categories }}
<ul class="article-categories"> <ul class="article-categories">
{{ range .Params.categories }} {{ range .Params.categories }}
@ -21,18 +22,16 @@
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
{{ if and (.Params.categories) (.Params.tags) }}
|
{{ end }}
{{ if .Params.tags }} {{ if .Params.tags }}
<ul class="article-tags"> <ul class="article-tags">
{{ range .Params.tags }} {{ range .Params.tags }}
<li><a href="/tags/{{ . }}">{{ . }}</a></li> <li><a href="/tags/{{ . }}">#{{ . }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
</div> </div>
</div> </div>
</div>
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@ -11,6 +11,7 @@
{{ if .Params.date }} {{ if .Params.date }}
<div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div> <div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div>
{{ end }} {{ end }}
<div class="article-taxonomies">
{{ if .Params.categories }} {{ if .Params.categories }}
<ul class="article-categories"> <ul class="article-categories">
{{ range .Params.categories }} {{ range .Params.categories }}
@ -18,17 +19,15 @@
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
{{ if and (.Params.categories) (.Params.tags) }}
|
{{ end }}
{{ if .Params.tags }} {{ if .Params.tags }}
<ul class="article-tags"> <ul class="article-tags">
{{ range .Params.tags }} {{ range .Params.tags }}
<li><a href="/tags/{{ . }}">{{ . }}</a></li> <li><a href="/tags/{{ . }}">#{{ . }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
</div> </div>
</div>
</article> </article>
{{ if .Site.DisqusShortname }} {{ if .Site.DisqusShortname }}
{{ template "_internal/disqus.html" . }} {{ template "_internal/disqus.html" . }}

View File

@ -20,6 +20,7 @@
{{ if .Params.date }} {{ if .Params.date }}
<div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div> <div class="article-date">{{ .Params.date.Format "2006-01-02" }}</div>
{{ end }} {{ end }}
<div class="article-taxonomies">
{{ if .Params.categories }} {{ if .Params.categories }}
<ul class="article-categories"> <ul class="article-categories">
{{ range .Params.categories }} {{ range .Params.categories }}
@ -27,17 +28,15 @@
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
{{ if and (.Params.categories) (.Params.tags) }}
|
{{ end }}
{{ if .Params.tags }} {{ if .Params.tags }}
<ul class="article-tags"> <ul class="article-tags">
{{ range .Params.tags }} {{ range .Params.tags }}
<li><a href="/tags/{{ . }}">{{ . }}</a></li> <li><a href="/tags/{{ . }}">#{{ . }}</a></li>
{{ end }} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
</div> </div>
</div>
</article> </article>
{{ end }} {{ end }}
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}

View File

@ -175,6 +175,10 @@ article header h1 a {
margin-bottom: 1.5em; margin-bottom: 1.5em;
} }
.article-taxonomies {
display: inline;
}
.article-date { .article-date {
white-space: nowrap; white-space: nowrap;
} }
@ -183,27 +187,23 @@ article header h1 a {
display: inline; display: inline;
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin-right: 1em;
} }
.article-categories li { .article-categories li {
display: inline; display: inline;
margin-left: 1em; margin-right: 1em;
} }
.article-tags { .article-tags {
display: inline;
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 0; margin: 0;
} }
.article-tags li:first-of-type {
margin-left: 0;
}
.article-tags li { .article-tags li {
display: inline; display: inline;
margin-left: 1em; margin-right: 1em;
} }
article img { article img {