fix(css): hide share button by default

This commit is contained in:
Ming Di Leom 2021-11-18 10:32:54 +00:00
parent ed521ca896
commit b72ffb1c39
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
3 changed files with 9 additions and 3 deletions

View File

@ -746,11 +746,14 @@ unhide (via JS) if Web Share API is supported */
.article .article-entry a.headerlink,
.article-title a#btnshare {
margin-left: 0.5em;
display: inline-block;
height: 1em;
width: 1em;
}
.article .article-entry a.headerlink {
display: inline-block;
}
@media (max-width: 768px) {
.article-title {
font-size: 1.8rem;

View File

@ -1066,11 +1066,14 @@ unhide (via JS) if Web Share API is supported */
.article .article-entry a.headerlink,
.article-title a#btnshare {
margin-left: 0.5em;
display: inline-block;
height: 1em;
width: 1em;
}
.article .article-entry a.headerlink {
display: inline-block;
}
@media (max-width: 768px) {
.article-title {
font-size: 1.8rem;

View File

@ -32,7 +32,7 @@ if (navigator.share && document.location.protocol === 'https:') {
const shareBtn = document.getElementById('btnshare')
// Unhide share-button if supported
shareBtn.style.display = 'initial'
shareBtn.style.display = 'inline-block'
shareBtn.addEventListener('click', async () => {
const query = (selector) => {