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,23 +14,22 @@
{{ 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 }}
{{ if .Params.categories }} <div class="article-taxonomies">
<ul class="article-categories"> {{ if .Params.categories }}
{{ range .Params.categories }} <ul class="article-categories">
<li><a href="/categories/{{ . }}">{{ . }}</a></li> {{ range .Params.categories }}
<li><a href="/categories/{{ . }}">{{ . }}</a></li>
{{ end }}
</ul>
{{ end }} {{ end }}
</ul> {{ if .Params.tags }}
{{ end }} <ul class="article-tags">
{{ if and (.Params.categories) (.Params.tags) }} {{ range .Params.tags }}
| <li><a href="/tags/{{ . }}">#{{ . }}</a></li>
{{ end }} {{ end }}
{{ if .Params.tags }} </ul>
<ul class="article-tags">
{{ range .Params.tags }}
<li><a href="/tags/{{ . }}">{{ . }}</a></li>
{{ end }} {{ end }}
</ul> </div>
{{ end }}
</div> </div>
</div> </div>
{{ end }} {{ end }}

View File

@ -11,23 +11,22 @@
{{ 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 }}
{{ if .Params.categories }} <div class="article-taxonomies">
<ul class="article-categories"> {{ if .Params.categories }}
{{ range .Params.categories }} <ul class="article-categories">
<li><a href="/categories/{{ . }}">{{ . }}</a></li> {{ range .Params.categories }}
<li><a href="/categories/{{ . }}">{{ . }}</a></li>
{{ end }}
</ul>
{{ end }} {{ end }}
</ul> {{ if .Params.tags }}
{{ end }} <ul class="article-tags">
{{ if and (.Params.categories) (.Params.tags) }} {{ range .Params.tags }}
| <li><a href="/tags/{{ . }}">#{{ . }}</a></li>
{{ end }} {{ end }}
{{ if .Params.tags }} </ul>
<ul class="article-tags">
{{ range .Params.tags }}
<li><a href="/tags/{{ . }}">{{ . }}</a></li>
{{ end }} {{ end }}
</ul> </div>
{{ end }}
</div> </div>
</article> </article>
{{ if .Site.DisqusShortname }} {{ if .Site.DisqusShortname }}

View File

@ -20,23 +20,22 @@
{{ 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 }}
{{ if .Params.categories }} <div class="article-taxonomies">
<ul class="article-categories"> {{ if .Params.categories }}
{{ range .Params.categories }} <ul class="article-categories">
<li><a href="/categories/{{ . }}">{{ . }}</a></li> {{ range .Params.categories }}
<li><a href="/categories/{{ . }}">{{ . }}</a></li>
{{ end }}
</ul>
{{ end }} {{ end }}
</ul> {{ if .Params.tags }}
{{ end }} <ul class="article-tags">
{{ if and (.Params.categories) (.Params.tags) }} {{ range .Params.tags }}
| <li><a href="/tags/{{ . }}">#{{ . }}</a></li>
{{ end }} {{ end }}
{{ if .Params.tags }} </ul>
<ul class="article-tags">
{{ range .Params.tags }}
<li><a href="/tags/{{ . }}">{{ . }}</a></li>
{{ end }} {{ end }}
</ul> </div>
{{ end }}
</div> </div>
</article> </article>
{{ end }} {{ end }}

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 {