mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-12 01:47:28 -05:00
Replace "View source" with "Edit history"
This commit is contained in:
8
layouts/partials/post-meta-item/edithistory.html
Normal file
8
layouts/partials/post-meta-item/edithistory.html
Normal 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 }}
|
@ -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 }}
|
@ -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>
|
||||
|
@ -16,7 +16,4 @@
|
||||
{{ end }}
|
||||
|
||||
{{ partial "post-meta-item/translations.html" . }}
|
||||
{{ if .File }}
|
||||
{{ partial "post-meta-item/viewsource.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user