8000 fix: localize the full date and full lastmod by razonyang · Pull Request #17 · hbstack/revision · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: localize the full date and full lastmod #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions layouts/partials/hb/modules/revision/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{{- $format := default ":date_full" $params.date_format }}
{{- if ne .Lastmod .Date }}
{{- $lastmod := .Lastmod | time.Format $format }}
<span class="hb-revision-lastmod me-2" title="{{ i18n `revised_at` (dict `Date` .Lastmod) }}">
{{- $lastmodFull := printf "%s %s" (.Lastmod | time.Format ":date_full") (.Lastmod | time.Format ":time_full") }}
<span class="hb-revision-lastmod me-2" title="{{ i18n `revised_at` (dict `Date` $lastmodFull) }}">
{{- if $icons }}
{{ partial "icons/icon" (dict "vendor" "bs" "name" "pencil-square") }}
<span>{{ $lastmod }}</span>
Expand All @@ -14,7 +15,8 @@
</span>
{{- end }}
{{- $date := .Date | time.Format $format }}
<span class="hb-revision-date" title="{{ i18n `created_at` (dict `Date` .Date) }}">
{{- $dateFull := printf "%s %s" (.Date | time.Format ":date_full") (.Date | time.Format ":time_full") }}
<span class="hb-revision-date" title="{{ i18n `created_at` (dict `Date` $dateFull) }}">
{{- if $icons }}
{{ partial "icons/icon" (dict "vendor" "bs" "name" "calendar-plus") }}
<span>{{ $date }}</span>
Expand Down
0