Add icons

This commit is contained in:
BBaoVanC 2021-10-05 19:12:10 -05:00
parent 0a05fa3979
commit 29414e01ac
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
5 changed files with 35 additions and 3 deletions

View File

@ -21,7 +21,7 @@
} }
.tags { .tags {
padding-left: 5px; padding-left: 10px;
} }
@ -93,6 +93,18 @@ hr {
/* Icons */
.icon {
width: 20px;
height: 20px;
color: lightgray;
text-align: center;
display: inline;
vertical-align: middle;
}
/* Breadcrumb navigation */ /* Breadcrumb navigation */
ul.breadcrumb { ul.breadcrumb {
padding 10px 16px; padding 10px 16px;

View File

@ -17,19 +17,26 @@
{{ if or .Date (.GetTerms "tags") }} {{ if or .Date (.GetTerms "tags") }}
<div class="post-metadata"> <div class="post-metadata">
{{ if .Date }} {{ if .Date }}
{{ partial "icon.html" "calendar" }}
<time datetime="{{ .Date.Format "January 2, 2006" }}" pubdate> <time datetime="{{ .Date.Format "January 2, 2006" }}" pubdate>
{{ .Date.Format "January 2, 2006" }} {{ .Date.Format "January 2, 2006" }}
</time> </time>
{{ if ne .Lastmod .Date }} {{ if ne .Lastmod .Date }}
<time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate> <time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate>
(Modified {{ .Lastmod.Format "January 2, 2006" }}) (Modified {{ .Lastmod.Format "January 2, 2006" }})
</time> </time>
{{ end }} {{ end }}
{{ end }} {{ end }}
<span class="tags"> <span class="tags">
{{ range (.GetTerms "tags") }} {{ range (.GetTerms "tags") }}
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a> <span class="tag">
{{ partial "icon.html" "tag" }}
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
</span>
{{ end }} {{ end }}
</span> </span>
</div> </div>

View File

@ -3,24 +3,33 @@
<h1>{{ .Title | markdownify }}</h1> <h1>{{ .Title | markdownify }}</h1>
</div> </div>
{{ if or .Date (.GetTerms "tags") }}
<div class="post-metadata"> <div class="post-metadata">
{{ if .Date }} {{ if .Date }}
{{ partial "icon.html" "calendar" }}
<time datetime="{{ .Date.Format "2006-01-02" }}" pubdate> <time datetime="{{ .Date.Format "2006-01-02" }}" pubdate>
{{ .Date.Format "January 2, 2006" }} {{ .Date.Format "January 2, 2006" }}
</time> </time>
{{ if ne .Lastmod .Date }} {{ if ne .Lastmod .Date }}
<time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate> <time datetime="{{ .Lastmod.Format "2006-01-02" }}" pubdate>
(Modified {{ .Lastmod.Format "January 2, 2006" }}) (Modified {{ .Lastmod.Format "January 2, 2006" }})
</time> </time>
{{ end }} {{ end }}
{{ end }} {{ end }}
<span class="tags"> <span class="tags">
{{ range (.GetTerms "tags") }} {{ range (.GetTerms "tags") }}
<a href="{{ .Permalink }}">#{{ .LinkTitle }}</a> <span class="tag">
{{ partial "icon.html" "tag" }}
<a href="{{ .Permalink }}">{{ .LinkTitle }}</a>
</span>
{{ end }} {{ end }}
</span> </span>
</div> </div>
{{ end }}
{{ if .Params.Toc }} {{ if .Params.Toc }}
<div id="table-of-contents"> <div id="table-of-contents">

View File

@ -0,0 +1,3 @@
<svg class="icon" fill="none" stroke="lightgray" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<use href="{{ printf "/feather-sprite.svg#%s" . | relURL }}" />
</svg>

After

Width:  |  Height:  |  Size: 189 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 53 KiB