Browse Source

updated to auto-assign category icon - phase 2

master
jk 3 years ago
parent
commit
87204cca15
  1. 4
      themes/nipponalba/layouts/_default/list.html
  2. 10
      themes/nipponalba/layouts/_default/single.html
  3. 2
      themes/nipponalba/static/css/style.css

4
themes/nipponalba/layouts/_default/list.html

@ -8,14 +8,14 @@
{{ if eq .Type "note"}}
<span class="archive_content h-entry entry">
<span class="info-date"><a href="{{ .Permalink }}" class="u-url"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "2 Jan 2006 15:04 GMT" }}</time></a></span>
<span class="headline"><h1>{{ range .Params.category }}
<span class="headline">{{ range .Params.category }}
{{ if eq . "1"}}<h1><i class="fa fa-television" aria-hidden="true" title="Documentary note"></i> Documentary note</h1>{{ end }}
{{ if eq . "2"}}<h1><i class="fa fa-book" aria-hidden="true" title="Reading note"></i> Reading note</h1>{{ end }}
{{ if eq . "3"}}<h1><i class="fa fa-pencil-square-o" aria-hidden="true" title="TODO note"></i> TODO note</h1>{{ end }}
{{ if eq . "4"}}Test{{ end }}
{{ if eq . "5"}}Test{{ end }}
{{ if eq . "6"}}Test{{ end }}
{{ end }}</h1></span>
{{ end }}</span>
<section class="p-name e-content">{{ .Content }}</section>
<section class="info">
<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span><br/>

10
themes/nipponalba/layouts/_default/single.html

@ -5,14 +5,14 @@
</section>
<section class="post_content">
<span class="info-date"><a href="{{ .Permalink }}" class="u-url"><time class="dt-published" datetime="{{ .Date.Format "2 Jan 2006 15:04 GMT" }}">{{ .Date.Format "2 Jan 2006 15:04 GMT" }}</time></a></span>
<span class="headline"><h1>{{ range .Params.category }}
<span class="headline">{{ range .Params.category }}
{{ if eq . "1"}}<h1><i class="fa fa-television" aria-hidden="true" title="Documentary note"></i> Documentary note</h1>{{ end }}
{{ if eq . "2"}}<h1><i class="fa fa-book" aria-hidden="true" title="Reading note"></i> Reading note</h1>{{ end }}
{{ if eq . "3"}}<h1><i class="fa fa-pencil-square-o" aria-hidden="true" title="TODO note"></i> TODO note</h1>{{ end }}
{{ if eq . "4"}}Test{{ end }}
{{ if eq . "5"}}Test{{ end }}
{{ if eq . "6"}}Test{{ end }}
{{ end }}</h1></span>
{{ end }}</span>
<section class="e-content"><section class="e-content p-name">
{{ .Content }}
{{ if eq .Type "photo"}}
@ -24,17 +24,13 @@
<a href="{{ . }}"><img class="u-photo" src="{{ . }}" alt=" Trying to fix"/></a>
{{end}}
{{end}}
</section>
{{end}}
{{ if eq .Type "article" }}<section class="p-summary" style="display:none">
{{ .Page.Params.summary }}<br/>
</section>
{{ end }}<br/>
</section>
<section class="info">
<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span><br/>
<span class="categories_span">{{ with .Page.Params.category }}Categories: {{ partial "taxonomy/categories.html" . }}{{ end }}</span>
</section></section>
</article>
{{end}}

2
themes/nipponalba/static/css/style.css

@ -274,7 +274,7 @@ width:100%;
padding: 18px 0px;
font-size: 14px;
display:flex;
margin: 0 auto;
}
nav li{
position: relative;

Loading…
Cancel
Save