Compare commits

...

5 Commits

9 changed files with 38 additions and 24 deletions

View File

@ -357,12 +357,17 @@
justify-content: center;
}
.share-buttons button,
.share-buttons a {
background-color: var(--background-2);
padding: 4px;
border-radius: 8px;
}
.share-buttons button {
border: none;
}
.share-buttons svg {
width: 32px;
height: 32px;
@ -557,7 +562,7 @@ blockquote {
}
hr {
border-color: var(--background-highlight);
border: 1px solid var(--background-highlight);
}
table.markdown {
@ -760,10 +765,12 @@ li.disabled > .page-link:hover {
/* Print compatibility */
@media print {
.top,
.breadcrumb,
.section-header-link,
.post-meta-edit-history,
.prevnext,
.comments {
.share-buttons,
.related-posts,
.latest-posts {
display: none;
}

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
@ -41,6 +42,7 @@ params:
# linkedin: true
# reddit: true
# telegram: true
# print: true
# show "Latest Posts" section at bottom of content pages
# latestPostsOnContent: 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" 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>

View File

@ -52,4 +52,11 @@
</a>
{{ end }}
*/}}
{{ if .Site.Params.shareButtons.print }}
<button class="print-share"
onclick="window.print(); share_event('Print');">
{{- partial "icon.html" "printer" -}}
</button>
{{ end }}
</div>