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

View File

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

View File

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

View File

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