Skip to content

Commit

Permalink
Hermit-V2 Theme Update
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Dec 31, 2023
1 parent 3b7c0a5 commit 2569706
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,14 @@ a.footnote-ref {
margin-right: .5em;

&::before {
content: "#"
{{- with .Site.Params.tagSymbol | default "#" -}}content: "{{ . }}"{{- end -}}
}
}
.category {
margin-right: .5em;

&::before {
{{- with .Site.Params.categorySymbol | default "⊲" -}}content: "{{ . }}"{{- end -}}
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions hugo.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ enableEmoji = true
[taxonomies]
tag = "tags"
# Categories are disabled by default.
# category = "categories"

[params]
dateform = "Jan 2, 2006"
Expand Down Expand Up @@ -84,6 +85,8 @@ enableEmoji = true
# legacyLayout = false
shareSocial = true
# googleTagManager = "GTM-XXXXXXXX"
# tagSymbol = "#"
# categorySymbol = "⊲"

[[params.socialLinks]]
name = "mastodon"
Expand Down
3 changes: 3 additions & 0 deletions layouts/partials/posts_single_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
{{- with .Params.tags }}
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_tags") -}}{{- range . -}}<span class="tag"><a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">{{.}}</a></span>{{- end }}</p>
{{- end }}
{{- with .Params.categories }}
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_categories") -}}{{- range . -}}<span class="category"><a href="{{ "categories/" | absLangURL }}{{ . | urlize }}">{{.}}</a></span>{{- end }}</p>
{{- end }}
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_wordcount") }}{{ i18n "wordCount" . -}} {{- partial "readTime.html" . -}}</p>
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_date") }}{{ dateFormat .Site.Params.dateformNumTime .Date.Local -}}
{{- if and (not (eq .Page.Params.ShowLastmod nil)) (.Page.Params.ShowLastmod) -}}
Expand Down
2 changes: 2 additions & 0 deletions layouts/partials/svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>
{{- else if (eq .name "posts_single_git_commit") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-git-commit"><circle cx="12" cy="12" r="4"></circle><line x1="1.05" y1="12" x2="7" y2="12"></line><line x1="17.01" y1="12" x2="22.96" y2="12"></line></svg>
{{- else if (eq .name "posts_single_categories") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-folder"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>
{{- else if (eq .name "posts_single_tags") -}}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-tag meta-icon"><path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path><line x1="7" y1="7" x2="7" y2="7"></line></svg>
{{- else if (eq .name "share") -}}
Expand Down

0 comments on commit 2569706

Please sign in to comment.