mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-24 03:23:14 +01:00
Add tags & fix columns
This commit is contained in:
parent
afa09c5bdf
commit
9ba3c26be5
2 changed files with 28 additions and 7 deletions
|
@ -415,10 +415,20 @@ figure {
|
|||
}
|
||||
|
||||
.side-by-side {
|
||||
column-count: 2;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
|
||||
& > * {
|
||||
flex-grow: 1;
|
||||
|
||||
&.double {
|
||||
flex-grow: 2;
|
||||
}
|
||||
}
|
||||
|
||||
@media #{$media-size-phone} {
|
||||
column-count: 1;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
header {
|
||||
|
@ -426,7 +436,10 @@ figure {
|
|||
text-decoration: underline;
|
||||
}
|
||||
|
||||
& > * {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tags {
|
||||
list-style-type: none;
|
||||
margin: 0 0 0 2em;
|
||||
}
|
|
@ -6,8 +6,9 @@
|
|||
<div class="content">{{ .Content }}</div>
|
||||
{{ end }}
|
||||
|
||||
<div> {{/* class="side-by-side" once I have the tag cloud ready */}}
|
||||
<div>
|
||||
{{ $tags := slice }}
|
||||
<div class="side-by-side">
|
||||
<div class="double">
|
||||
{{ range .Pages }}
|
||||
{{ if gt (len .Pages) 0 }}
|
||||
<div class="posts-group">
|
||||
|
@ -20,6 +21,7 @@
|
|||
</a>
|
||||
</li>
|
||||
{{ range .Pages }}
|
||||
{{ $tags = union $tags .Params.tags }}
|
||||
<li class="post-item">
|
||||
<a href="{{.Permalink}}">
|
||||
<span class="post-title">{{.Title}}</span>
|
||||
|
@ -31,6 +33,12 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<ol class="tags">
|
||||
{{ range (uniq (sort $tags)) }}
|
||||
<li><a href="/tags/{{ . }}">{{ . }}</a></li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue