Replace "View source" with "Edit history"

This commit is contained in:
BBaoVanC 2022-05-08 16:13:46 -05:00
parent 7dd01894da
commit 8d81f5e37c
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
8 changed files with 21 additions and 22 deletions

View File

@ -766,7 +766,7 @@ li.disabled > .page-link:hover {
@media print {
.top,
.section-header-link,
.post-meta-view-source,
.post-meta-edit-history,
.prevnext,
.share-buttons,
.related-posts,

View File

@ -30,6 +30,7 @@ params:
# used for "View source" (unset by default)
# gitFileURL: https://github.com/BBaoVanC/bobatheme/blob/master
# gitFileIcon: github-circle
# gitHistoryURL: https://github.com/BBaoVanC/bobatheme/commits/master
# display a "Latest Posts" section on the homepage below its content
homepageLatestPosts: true

View File

@ -27,6 +27,9 @@ readingtime:
one: "{{ . }} min"
other: "{{ . }} mins"
edit_history:
other: "Edit history"
# Post count
no_posts:
@ -61,8 +64,8 @@ aria_back_to_top_button:
aria_rss_link:
other: "RSS feed link"
aria_post_meta_view_source:
other: "link to page source"
aria_post_meta_edit_history:
other: "link to page edit history"
aria_post_meta_translations:
other: "translations"

View File

@ -27,6 +27,9 @@ readingtime:
one: "{{ . }} min"
other: "{{ . }} mins"
edit_history:
other: "Historial de cambios"
# Post count
no_posts:
@ -61,8 +64,8 @@ newer_post:
# aria_rss_link:
# other: "RSS feed link"
# aria_post_meta_view_source:
# other: "link to page source"
# aria_post_meta_edit_history:
# other: "link to page edit history"
# aria_post_meta_translations:
# other: "translations"

View File

@ -0,0 +1,8 @@
{{ if and .Site.Params.gitHistoryURL .File.Path }}
<span class="post-meta-item post-meta-edit-history" aria-label="{{ i18n "aria_post_meta_edit_history" }}">
{{ partial "icon.html" "history" }}
<a href="{{ printf "%s/content/%s" .Site.Params.gitHistoryURL .File.Path }}" target="_blank" rel="noopener">
{{- i18n "edit_history" -}}
</a>
</span>
{{ end }}

View File

@ -1,13 +0,0 @@
{{ if and .Site.Params.gitFileURL .File.Path }}
<span class="post-meta-item post-meta-view-source" aria-label="{{ i18n "aria_post_meta_view_source" }}">
{{ with .Site.Params.gitFileIcon }}
{{ partial "icon.html" . }}
{{ else }}
{{ partial "icon.html" "file" }}
{{ end }}
<a href="{{ printf "%s/content/%s" .Site.Params.gitFileURL .File.Path }}" target="_blank" rel="noopener">
View source
</a>
</span>
{{ end }}

View File

@ -24,7 +24,7 @@
{{ partial "post-meta-item/authors.html" . }}
{{ partial "post-meta-item/translations.html" . }}
{{ partial "post-meta-item/readingtime.html" . }}
{{ partial "post-meta-item/viewsource.html" . }}
{{ partial "post-meta-item/edithistory.html" . }}
{{ partial "post-meta-item/categories.html" . }}
{{ partial "post-meta-item/tags.html" . }}
</div>

View File

@ -16,7 +16,4 @@
{{ end }}
{{ partial "post-meta-item/translations.html" . }}
{{ if .File }}
{{ partial "post-meta-item/viewsource.html" . }}
{{ end }}
</div>