mirror of
https://github.com/xplosionmind/quitsocialmedia.club.git
synced 2024-12-22 21:37:55 +01:00
48 lines
6.9 KiB
HTML
48 lines
6.9 KiB
HTML
<section class='flex box'>
|
||
<h2 style='margin-right:1rem'>{% if lang == 'it' %}Condividi{% else %}Share{% endif %}</h2>
|
||
<div id='share' class='flex'>
|
||
<!-- Copy URL -->
|
||
<script>
|
||
function Copy(text) {
|
||
var inputc = document.body.appendChild(document.createElement('input'));
|
||
inputc.value = window.location.href;
|
||
inputc.focus();
|
||
inputc.select();
|
||
document.execCommand('copy');
|
||
inputc.parentNode.removeChild(inputc);
|
||
alert('{% if lang == 'it' %}URL copiato{% else %}URL has been copied{% endif %}');
|
||
}
|
||
</script>
|
||
<svg title='{% if lang == 'it' %}Copia URL{% else %}Copy URL{% endif %}' onclick='Copy()' class='button' viewBox='0 0 24 24' ><path d='M13.29 9.29l-4 4a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l4-4a1 1 0 0 0-1.42-1.42z' fill='var(--background)'/><path d='M12.28 17.4L11 18.67a4.2 4.2 0 0 1-5.58.4 4 4 0 0 1-.27-5.93l1.42-1.43a1 1 0 0 0 0-1.42 1 1 0 0 0-1.42 0l-1.27 1.28a6.15 6.15 0 0 0-.67 8.07 6.06 6.06 0 0 0 9.07.6l1.42-1.42a1 1 0 0 0-1.42-1.42z' fill='var(--background)'/><path d='M19.66 3.22a6.18 6.18 0 0 0-8.13.68L10.45 5a1.09 1.09 0 0 0-.17 1.61 1 1 0 0 0 1.42 0L13 5.3a4.17 4.17 0 0 1 5.57-.4 4 4 0 0 1 .27 5.95l-1.42 1.43a1 1 0 0 0 0 1.42 1 1 0 0 0 1.42 0l1.42-1.42a6.06 6.06 0 0 0-.6-9.06z' fill='var(--background)'/></svg>
|
||
<!-- Mastodon --><svg title='Share on Mastodon' onclick='share_on_mastodon();' class='button' width='300' height='300' version='1.1' viewBox='0 0 281.2 281.2' ><rect width='281.2' height='281.2' style='fill:var(--primary);'/><path d='m244.2 161.9c-3.181 16.37-28.49 34.28-57.56 37.75-15.16 1.809-30.08 3.471-46 2.741-26.03-1.192-46.56-6.212-46.56-6.212 0 2.534 0.1562 4.946 0.4688 7.202 3.384 25.69 25.47 27.22 46.39 27.94 21.12 0.7225 39.92-5.206 39.92-5.206l0.8675 19.09s-14.77 7.931-41.08 9.39c-14.51 0.7975-32.52-0.365-53.51-5.919-45.51-12.04-53.33-60.55-54.53-109.8-0.365-14.61-0.14-28.39-0.14-39.92 0-50.33 32.98-65.08 32.98-65.08 16.63-7.636 45.16-10.85 74.82-11.09h0.7288c29.66 0.2425 58.21 3.454 74.84 11.09 0 0 32.98 14.75 32.98 65.08 0 0 0.4138 37.13-4.599 62.92' fill='var(--background)'/><path d='m209.9 102.9v60.94h-24.14v-59.15c0-12.47-5.246-18.8-15.74-18.8-11.6 0-17.42 7.508-17.42 22.35v32.38h-24v-32.38c0-14.85-5.816-22.35-17.42-22.35-10.49 0-15.74 6.329-15.74 18.8v59.15h-24.14v-60.94c0-12.46 3.171-22.35 9.541-29.68 6.569-7.322 15.17-11.08 25.85-11.08 12.36 0 21.71 4.749 27.9 14.25l6.014 10.08 6.015-10.08c6.185-9.499 15.54-14.25 27.9-14.25 10.68 0 19.28 3.754 25.85 11.08 6.369 7.322 9.54 17.22 9.54 29.68' fill='var(--primary)'/></svg>
|
||
<script>
|
||
function share_on_mastodon() {
|
||
var default_url = localStorage['mastodon_instance'];
|
||
|
||
if (!default_url)
|
||
default_url = 'https://';
|
||
|
||
var instance = prompt('Enter your instance’s address: (for example mastodon.uno)', default_url);
|
||
if (instance) {
|
||
if ( !instance.startsWith('https://') && !instance.startsWith('http://') )
|
||
instance = 'https://' + instance;
|
||
var url = window.location.href;
|
||
var title = document.getElementsByTagName('title')[0].innerHTML;
|
||
if ( !instance.endsWith('/') )
|
||
instance = instance + '/';
|
||
localStorage['mastodon_instance'] = instance;
|
||
var author = '@tommi@mastodon.uno';
|
||
mastodon_url = instance + 'share?text=' + encodeURIComponent(title + '\n\n' + url + '\n\n' + author);
|
||
window.open(mastodon_url, '_blank');
|
||
}
|
||
}
|
||
</script>
|
||
<!-- Pocket --><a href='https://getpocket.com/save?url={{ encoded_absolute_url }}&title={{ title | url_encode }}'>
|
||
<svg class='button' width='24' height='24' viewBox='0 0 24 24'><path fill-rule='evenodd' clip-rule='evenodd' fill='var(--background)' d='M0.9999,10.6312 L0.9999,4.0682 C0.9999,2.9302 1.9309,2.0002 3.0679,2.0002 L20.9329,2.0002 C22.0699,2.0002 22.9999,2.9302 22.9999,4.0682 L22.9999,10.6312 L22.9999,10.6432 C22.9999,16.7182 18.0749,21.6432 11.9999,21.6432 C5.9249,21.6432 0.9999,16.7182 0.9999,10.6432 L0.9999,10.6312 Z M12.0151,12.0203514 L7.86472144,8.02991037 C7.26754166,7.4557433 6.31797743,7.47439879 5.74381037,8.07157856 C5.1696433,8.66875834 5.18829879,9.61832257 5.78547856,10.1924896 L10.9754786,15.1824896 C11.556135,15.7407701 12.474065,15.7407701 13.0547214,15.1824896 L18.2447214,10.1924896 C18.8419012,9.61832257 18.8605567,8.66875834 18.2863896,8.07157856 C17.7122226,7.47439879 16.7626583,7.4557433 16.1654786,8.02991037 L12.0151,12.0203514 Z'></path></svg>
|
||
</a>
|
||
<!-- Facebook --><a href='https://facebook.com/sharer/sharer.php?u={{ encoded_absolute_url }}'><svg class='button' viewBox='0 0 24 24'><path d='M17 3.5a.5.5 0 0 0-.5-.5H14a4.77 4.77 0 0 0-5 4.5v2.7H6.5a.5.5 0 0 0-.5.5v2.6a.5.5 0 0 0 .5.5H9v6.7a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-6.7h2.62a.5.5 0 0 0 .49-.37l.72-2.6a.5.5 0 0 0-.48-.63H13V7.5a1 1 0 0 1 1-.9h2.5a.5.5 0 0 0 .5-.5z' fill='var(--background)'/></svg></a>
|
||
<!-- Twitter --><a href='https://twitter.com/intent/tweet/?url={{ encoded_absolute_url }}'><svg class='button' viewBox='0 0 24 24'><path fill='var(--background)' d='M8.08 20A11.07 11.07 0 0 0 19.52 9 8.09 8.09 0 0 0 21 6.16a.44.44 0 0 0-.62-.51 1.88 1.88 0 0 1-2.16-.38 3.89 3.89 0 0 0-5.58-.17A4.13 4.13 0 0 0 11.49 9C8.14 9.2 5.84 7.61 4 5.43a.43.43 0 0 0-.75.24 9.68 9.68 0 0 0 4.6 10.05A6.73 6.73 0 0 1 3.38 18a.45.45 0 0 0-.14.84A11 11 0 0 0 8.08 20'/></svg></a>
|
||
<!-- WhatsApp --><a href='whatsapp://send?text={{ encoded_absolute_url }}'><svg class='button' width='24' height='24' version='1.1' viewBox='-23 -21 18 18' ><path d='m-8.84-17.3c-1.37-1.37-3.19-2.13-5.13-2.13-4 0-7.26 3.25-7.26 7.26-5.45e-4 1.28 0.333 2.53 0.973 3.63l-1.03 3.76 3.85-1.01c1.06 0.578 2.25 0.883 3.47 0.883h0.0031c4 0 7.26-3.26 7.26-7.26 7.92e-4 -1.94-0.754-3.76-2.13-5.13zm-5.13 11.2h-0.0025c-1.28-0.104-1.95-0.0736-3.29-0.973l-2.29 0.599 0.61-2.22c-0.91-1.72-1.05-2.38-1.06-3.44 0.0012-3.32 2.71-6.03 6.03-6.03 1.61 5.47e-4 3.13 0.629 4.27 1.77 1.13 1.14 1.77 2.66 1.77 4.27-0.00144 3.32-2.71 6.03-6.03 6.03zm1.75-5.24c-0.692 0.209-0.44 0.964-0.772 1.06-0.181-0.091-1.04-0.366-1.74-0.982-0.616-0.49-1.14-0.836-1.3-1.6 0.336-0.356 1.17-0.611 1.01-1.23-0.259-0.561-0.656-0.988-0.977-1.17-1.24-0.846-1.66 0.897-1.66 1.52-0.0747 2.33 3.11 5.06 5.84 4.98 1.01-0.124 1.55-1.19 1.31-1.69-0.472-0.603-0.982-1.04-1.72-0.878z' fill='var(--background)'/></svg></a>
|
||
<!-- Telegram --><a href='https://t.me/share/url?url={{ encoded_absolute_url }}'><svg class='button' width='128' height='128' version='1.1' viewBox='0 0 128 128' ><path d='m20.1 54.1c26.3-11.5 43.9-19 52.7-22.7 25.1-10.4 30.3-12.3 33.7-12.3 0.748-0.0126 2.42 0.173 3.5 1.05 0.914 0.742 1.17 1.74 1.29 2.45 0.12 0.703 0.27 2.31 0.151 3.56-1.36 14.3-7.25 49-10.2 65-1.27 6.77-3.76 9.04-6.18 9.27-5.25 0.483-9.23-3.47-14.3-6.8-7.95-5.21-12.4-8.46-20.2-13.5-8.92-5.88-3.14-9.11 1.95-14.4 1.33-1.38 24.5-22.4 24.9-24.3 0.056-0.239 0.108-1.13-0.421-1.6-0.528-0.47-1.31-0.309-1.87-0.181-0.798 0.181-13.5 8.58-38.1 25.2-3.61 2.48-6.87 3.68-9.8 3.62-3.23-0.0697-9.43-1.82-14-3.32-5.66-1.84-10.2-2.81-9.77-5.94 0.204-1.63 2.45-3.29 6.72-4.99z' fill='var(--background)'/></svg></a>
|
||
</div>
|
||
</section> |