Add print button

This commit is contained in:
BBaoVanC 2022-05-08 15:21:41 -05:00
parent 9665133ba4
commit 7dd01894da
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
3 changed files with 13 additions and 0 deletions

View File

@ -357,12 +357,17 @@
justify-content: center; justify-content: center;
} }
.share-buttons button,
.share-buttons a { .share-buttons a {
background-color: var(--background-2); background-color: var(--background-2);
padding: 4px; padding: 4px;
border-radius: 8px; border-radius: 8px;
} }
.share-buttons button {
border: none;
}
.share-buttons svg { .share-buttons svg {
width: 32px; width: 32px;
height: 32px; height: 32px;

View File

@ -41,6 +41,7 @@ params:
# linkedin: true # linkedin: true
# reddit: true # reddit: true
# telegram: true # telegram: true
# print: true
# show "Latest Posts" section at bottom of content pages # show "Latest Posts" section at bottom of content pages
# latestPostsOnContent: true # latestPostsOnContent: true

View File

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