Fix post actions

This commit is contained in:
Jan-Lukas Else 2021-09-08 08:18:19 +02:00
parent 74ea0f5576
commit 79f807e01a
3 changed files with 24 additions and 12 deletions

View File

@ -194,10 +194,6 @@ details summary {
margin-bottom: 1em; margin-bottom: 1em;
} }
.flex {
display: flex;
}
.hide { .hide {
display: none; display: none;
} }
@ -242,6 +238,17 @@ details summary {
height: 400px; height: 400px;
} }
#post-actions {
@extend .p;
display: flex;
flex-wrap: wrap;
gap: 5px;
* {
text-align: center;
}
}
// Print // Print
@media print { @media print {
html { html {

View File

@ -145,16 +145,12 @@ details summary > *:first-child {
border-bottom: 1px solid var(--primary, #000); border-bottom: 1px solid var(--primary, #000);
} }
.p, table { .p, #post-actions, table {
display: block; display: block;
margin-top: 1em; margin-top: 1em;
margin-bottom: 1em; margin-bottom: 1em;
} }
.flex {
display: flex;
}
.hide { .hide {
display: none; display: none;
} }
@ -199,6 +195,15 @@ details summary > *:first-child {
height: 400px; height: 400px;
} }
#post-actions {
display: flex;
flex-wrap: wrap;
gap: 5px;
}
#post-actions * {
text-align: center;
}
@media print { @media print {
html { html {
--background: #fff; --background: #fff;

View File

@ -1,7 +1,7 @@
{{ define "postactions" }} {{ define "postactions" }}
<div class="p flex" id="post-actions"> <div id="post-actions">
<a href="https://www.addtoany.com/share#url={{ absolute .Data.Path }}{{ with .Data.RenderedTitle }}&title={{ . }}{{ end }}" target="_blank" rel="nofollow noopener noreferrer" class="button">{{ string .Blog.Lang "share" }}</a>&nbsp; <a href="https://www.addtoany.com/share#url={{ absolute .Data.Path }}{{ with .Data.RenderedTitle }}&title={{ . }}{{ end }}" target="_blank" rel="nofollow noopener noreferrer" class="button">{{ string .Blog.Lang "share" }}</a>
<a id="translateBtn" href="https://translate.google.com/translate?u={{ absolute .Data.Path }}" target="_blank" rel="nofollow noopener noreferrer" class="button">{{ string .Blog.Lang "translate" }}</a>&nbsp; <a id="translateBtn" href="https://translate.google.com/translate?u={{ absolute .Data.Path }}" target="_blank" rel="nofollow noopener noreferrer" class="button">{{ string .Blog.Lang "translate" }}</a>
<script defer src="{{ asset "js/translate.js" }}"></script> <script defer src="{{ asset "js/translate.js" }}"></script>
<button id="speakBtn" class="hide" data-speak="{{ string .Blog.Lang "speak" }}" data-stopspeak="{{ string .Blog.Lang "stopspeak" }}"></button> <button id="speakBtn" class="hide" data-speak="{{ string .Blog.Lang "speak" }}" data-stopspeak="{{ string .Blog.Lang "stopspeak" }}"></button>
{{ if .Data.TTS }} {{ if .Data.TTS }}