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 {
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 */
ul.breadcrumb {
padding 10px 16px;

View File

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

View File

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