Taxonomy initial commit, tags and categories (#90)
* Taxonomy initial commit, tags and categories * WIP: Show in footer for comparison * Fix post meta
This commit is contained in:
parent
764b9ffef3
commit
fd3ec89897
|
@ -6,16 +6,13 @@
|
|||
header {
|
||||
margin-top: 6.4rem;
|
||||
margin-bottom: 3.2rem;
|
||||
h1, h2 {
|
||||
h1 {
|
||||
font-size: 4.2rem;
|
||||
line-height: 4.6rem;
|
||||
margin: 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 1.8rem;
|
||||
line-height: 2.2rem;
|
||||
color: $fg-color;
|
||||
margin-top: 1.8rem;
|
||||
@media only screen and (max-device-width : 768px) {
|
||||
font-size: 1.6rem;
|
||||
font-size: 4.0rem;
|
||||
line-height: 4.4rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -28,13 +25,17 @@
|
|||
margin-bottom: .75em;
|
||||
}
|
||||
.post-meta {
|
||||
.posted-on {
|
||||
display: inline-block;
|
||||
i {
|
||||
text-align: center;
|
||||
width: 1.6rem;
|
||||
margin-left: 0;
|
||||
margin-right: 1.5rem;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
.reading-time {
|
||||
display: inline-block;
|
||||
.date {
|
||||
.posted-on {
|
||||
margin-left: 0;
|
||||
margin-right: 1.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,16 @@ body.rtl {
|
|||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.tags,
|
||||
.categories {
|
||||
i {
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
ul {
|
||||
li {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{{ define "title" }}
|
||||
{{ .Title }} · {{ .Site.Title }}
|
||||
{{- if eq .Kind "taxonomy" -}}
|
||||
{{- .Data.Singular | title -}}
|
||||
{{- print ": " -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- .Title }} · {{ .Site.Title -}}
|
||||
{{ end }}
|
||||
{{ define "content" }}
|
||||
{{ partial "list.html" . }}
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
<section class="container list">
|
||||
<h1 class="title">{{ .Title }}</h1>
|
||||
<h1 class="title">
|
||||
{{- if eq .Kind "taxonomy" -}}
|
||||
{{- .Data.Singular | title -}}
|
||||
{{- print ": " -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- .Title -}}
|
||||
</h1>
|
||||
<ul>
|
||||
{{ range .Paginator.Pages }}
|
||||
<li>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
<div class="categories">
|
||||
<i class="fas fa-folder"></i>
|
||||
{{- range $index, $el := . -}}
|
||||
{{- if gt $index 0 }}
|
||||
<span class="separator">•</span>
|
||||
{{- end }}
|
||||
<a href="{{ ( print "categories/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
|
||||
{{- end -}}
|
||||
</div>
|
|
@ -0,0 +1,9 @@
|
|||
<div class="tags">
|
||||
<i class="fas fa-tag"></i>
|
||||
{{- range $index, $el := . -}}
|
||||
{{- if gt $index 0 }}
|
||||
<span class="separator">•</span>
|
||||
{{- end }}
|
||||
<a href="{{ ( print "tags/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
|
||||
{{- end -}}
|
||||
</div>
|
|
@ -9,16 +9,20 @@
|
|||
<h1 class="title">{{ .Title }}</h1>
|
||||
</div>
|
||||
<div class="post-meta">
|
||||
<span class="posted-on">
|
||||
<i class="far fa-calendar"></i>
|
||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}
|
||||
</time>
|
||||
</span>
|
||||
<span class="reading-time">
|
||||
<i class="far fa-clock"></i>
|
||||
{{ i18n "readingTime" .ReadingTime }}
|
||||
</span>
|
||||
<div class="date">
|
||||
<span class="posted-on">
|
||||
<i class="fas fa-calendar"></i>
|
||||
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
|
||||
{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}
|
||||
</time>
|
||||
</span>
|
||||
<span class="reading-time">
|
||||
<i class="fas fa-clock"></i>
|
||||
{{ i18n "readingTime" .ReadingTime }}
|
||||
</span>
|
||||
</div>
|
||||
{{ with .Page.Params.Categories }}{{ partial "taxonomy/categories" . }}{{ end }}
|
||||
{{ with .Page.Params.Tags }}{{ partial "taxonomy/tags" . }}{{ end }}
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
{"Target":"css/coder.min.da5204b40ef8cbcb52b75a8cac5656a9cebc00a15e25c865a4b84a3c06b3ed82.css","MediaType":"text/css","Data":{"Integrity":"sha256-2lIEtA74y8tSt1qMrFZWqc68AKFeJchlpLhKPAaz7YI="}}
|
||||
{"Target":"css/coder.min.cf79e6c3b1f6a5f3b633af689738b135c8ae60005166ed909a402efbb88959e2.css","MediaType":"text/css","Data":{"Integrity":"sha256-z3nmw7H2pfO2M69olzixNciuYABRZu2QmkAu+7iJWeI="}}
|
Loading…
Reference in New Issue