shareon/index.html

287 lines
8.5 KiB
HTML
Raw Normal View History

2022-02-08 14:37:13 -05:00
<!DOCTYPE html>
2022-02-11 10:39:21 -05:00
<html lang="en-GB">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2023-03-21 10:04:42 -04:00
<title>Shareon Lightweight, stylish, and ethical share buttons</title>
<meta
name="title"
content="Shareon Lightweight, stylish, and ethical share buttons"
/>
2022-02-11 10:39:21 -05:00
<meta
name="description"
2023-03-21 10:04:42 -04:00
content="Theyre under 6 kB in size, look good, and don't track your users. It's the perfect choice for your blog, news site, or project page!"
2022-02-11 10:39:21 -05:00
/>
<meta
name="keywords"
content="share buttons, sharing, social networks, share via, share on"
/>
<meta name="author" content="Nikita Karamov" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/awsm.css/dist/awsm.min.css"
/>
<link
2022-02-13 10:04:11 -05:00
href="https://cdn.jsdelivr.net/npm/shareon@2/dist/shareon.min.css"
2022-02-11 10:39:21 -05:00
rel="stylesheet"
/>
<script
2022-02-13 10:04:11 -05:00
src="https://cdn.jsdelivr.net/npm/shareon@2/dist/shareon.iife.js"
2022-02-11 10:39:21 -05:00
defer
init
></script>
<!-- fixes for awsm.css -->
2022-02-08 14:37:13 -05:00
<style>
2023-03-21 08:55:22 -04:00
.shareon.specimen {
font-weight: bold;
max-width: 500px;
margin: 0 auto;
}
2023-03-21 09:37:14 -04:00
.shareon > a,
.shareon > a:hover,
.shareon > a:visited {
2022-02-11 10:39:21 -05:00
color: #fff;
}
2022-02-08 14:37:13 -05:00
2022-02-11 10:39:21 -05:00
button:not([disabled]):hover {
border: none;
}
2022-02-08 14:37:13 -05:00
</style>
2022-02-11 10:39:21 -05:00
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/site.webmanifest" />
2023-03-21 10:04:42 -04:00
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://shareon.js.org/" />
<meta
property="og:title"
content="Shareon Lightweight, stylish, and ethical share buttons"
/>
<meta
property="og:description"
content="Theyre under 6 kB in size, look good, and don't track your users. It's the perfect choice for your blog, news site, or project page!"
/>
<meta property="og:image" content="https://shareon.js.org/banner.png" />
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://shareon.js.org/" />
<meta
property="twitter:title"
content="Shareon Lightweight, stylish, and ethical share buttons"
/>
<meta
property="twitter:description"
content="Theyre under 6 kB in size, look good, and don't track your users. It's the perfect choice for your blog, news site, or project page!"
/>
<meta
property="twitter:image"
content="https://shareon.js.org/banner.png"
/>
<meta name="twitter:creator" content="@KyttaWasHere" />
2022-02-11 10:39:21 -05:00
</head>
<body>
2022-02-08 14:37:13 -05:00
<header>
2022-02-11 10:39:21 -05:00
<p>
<img
src="./icon.svg"
alt="Shareon logo — the Postal Horn emoji"
width="64"
height="64"
/>
</p>
<h1>Shareon</h1>
<p>Lightweight, stylish, and ethical share buttons</p>
<nav>
<ul>
<li>
<a href="https://www.npmjs.com/package/shareon">npm</a>
</li>
<li>
2023-01-25 10:41:47 -05:00
<a href="https://github.com/kytta/shareon">source code</a>
2022-02-11 10:39:21 -05:00
</li>
</ul>
</nav>
2022-02-08 14:37:13 -05:00
</header>
<main>
2022-02-11 10:39:21 -05:00
<article>
<h2>
<a id="what-is-it" href="#what-is-it" aria-hidden="true"></a>
What is it?
</h2>
<p>Shareon are share buttons for popular social networks.</p>
<div
2023-03-21 08:55:22 -04:00
class="shareon specimen"
2022-02-11 10:39:21 -05:00
data-title="Shareon — lightweight, stylish, and ethical share buttons"
style="text-align: center"
>
2023-07-14 18:49:13 -04:00
<a class="facebook"></a>
2022-02-11 10:39:21 -05:00
<a class="linkedin"></a>
2023-07-14 18:49:13 -04:00
<a class="mastodon">Toot</a>
2022-02-11 10:39:21 -05:00
<a class="messenger" data-fb-app-id="3619024578167617"></a>
<a class="odnoklassniki"></a>
2023-03-21 08:55:22 -04:00
<a class="pinterest">Pin</a>
2023-07-14 18:49:13 -04:00
<br />
2022-02-11 10:39:21 -05:00
<a class="pocket"></a>
<a class="reddit"></a>
2023-07-14 18:49:13 -04:00
<a class="teams"></a>
2022-02-11 10:39:21 -05:00
<a class="telegram"></a>
2023-07-14 18:49:13 -04:00
<a class="twitter">Tweet</a>
2022-02-11 10:39:21 -05:00
<a class="viber"></a>
2023-07-14 18:49:13 -04:00
<br />
<a class="vkontakte">Поделиться</a>
2022-02-11 10:39:21 -05:00
<a class="whatsapp"></a>
2023-07-14 18:49:13 -04:00
<a class="copy-url"></a>
<a class="web-share">Share</a>
2022-02-11 10:39:21 -05:00
</div>
<p>Unlike many other share buttons, Shareon are:</p>
<ul>
<li>
2023-07-14 18:49:13 -04:00
<b>lightweight</b>, clocking in at only 6 KB brotlied code (JS+CSS),
2022-02-11 10:39:21 -05:00
</li>
<li>
<b>stylish</b>, using official vector logos and colours with no
visual mess, and
</li>
<li>
<b>ethical</b>, since they do not insert any pesky tracking code.
</li>
</ul>
2022-02-08 14:37:13 -05:00
2022-02-11 10:39:21 -05:00
<p>
The whole JavaScript code is quick and simple: it only populates the
buttons with share links. This makes Shareon the perfect choice for
your blog, news site, or project page!
</p>
</article>
<article>
<h2>
<a id="install" href="#install" aria-hidden="true"></a>
Install
</h2>
<p>Simply load the needed files from the CDN:</p>
<pre><code>&lt;link
href="https://cdn.jsdelivr.net/npm/shareon@2/dist/shareon.min.css"
rel="stylesheet"
&gt;
&lt;script
src="https://cdn.jsdelivr.net/npm/shareon@2/dist/shareon.iife.js"
defer
init
&gt;&lt;/script&gt;</code></pre>
<aside>
<p>
Want other options? Check the
2023-01-25 10:41:47 -05:00
<a href="https://github.com/kytta/shareon/#install"
2022-02-11 10:39:21 -05:00
>extended docs</a
>
2023-01-25 10:41:47 -05:00
on GitHub!
2022-02-11 10:39:21 -05:00
</p>
</aside>
<p>or install it via NPM and bundle it in a JS file:</p>
<pre><code>import * as Shareon from "shareon";
import "shareon/css";
Shareon.init();</code></pre>
</article>
<article>
<h2>
<a id="usage" href="#usage" aria-hidden="true"></a>
Usage
</h2>
2022-02-08 14:37:13 -05:00
2022-02-11 10:39:21 -05:00
<p>
Create a container with class <code>shareon</code> and populate it
with elements, class names of which match the names of the social
networks:
</p>
2022-02-08 14:37:13 -05:00
2022-02-11 10:39:21 -05:00
<pre><code>&lt;div class="shareon"&gt;
2022-02-08 14:37:13 -05:00
&lt;a class="facebook"&gt;&lt;/a&gt;
&lt;a class="linkedin"&gt;&lt;/a&gt;
&lt;a class="mastodon"&gt;&lt;/a&gt;
&lt;!-- FB App ID is required for the Messenger button to function --&gt;
&lt;a class="messenger" data-fb-app-id="0123456789012345"&gt;&lt;/a&gt;
&lt;a class="odnoklassniki"&gt;&lt;/a&gt;
&lt;a class="pinterest"&gt;&lt;/a&gt;
&lt;a class="pocket"&gt;&lt;/a&gt;
2022-02-11 10:39:21 -05:00
&lt;a class="reddit"&gt;&lt;/a&gt;
2023-07-14 18:49:13 -04:00
&lt;a class="teams"&gt;&lt;/a&gt;
2022-02-11 10:39:21 -05:00
&lt;a class="telegram"&gt;&lt;/a&gt;
&lt;a class="twitter"&gt;&lt;/a&gt;
&lt;a class="viber"&gt;&lt;/a&gt;
&lt;a class="vkontakte"&gt;&lt;/a&gt;
&lt;a class="whatsapp"&gt;&lt;/a&gt;
2023-03-20 14:30:59 -04:00
&lt;a class="copy-url"&gt;&lt;/a&gt;
2022-02-08 14:37:13 -05:00
&lt;/div&gt;</code></pre>
2022-02-11 10:39:21 -05:00
<div class="shareon">
<a class="facebook"></a>
<a class="linkedin"></a>
<a class="mastodon"></a>
<a class="messenger" data-fb-app-id="3619024578167617"></a>
<a class="odnoklassniki"></a>
<a class="pinterest"></a>
<a class="pocket"></a>
2023-01-25 14:59:59 -05:00
<a class="reddit"></a>
2023-07-14 18:49:13 -04:00
<a class="teams"></a>
2023-01-25 14:59:59 -05:00
<a class="telegram"></a>
<a class="twitter"></a>
<a class="viber"></a>
<a class="vkontakte"></a>
<a class="whatsapp"></a>
2023-03-20 14:30:59 -04:00
<a class="copy-url"></a>
2022-02-11 10:39:21 -05:00
</div>
2022-02-08 14:37:13 -05:00
2022-02-11 10:39:21 -05:00
<p>
You can customize the shared URL and page title with
<code>data-</code> attributes:
</p>
2022-02-08 14:37:13 -05:00
2022-02-11 10:39:21 -05:00
<pre><code>&lt;div class="shareon" data-url="https://custom.url/for-this-page"&gt;
&lt;a class="facebook" data-title="Custom Facebook title"&gt;&lt;/a&gt;
2022-02-08 14:37:13 -05:00
&lt;a class="twitter" data-title="Custom Twitter title"&gt;&lt;/a&gt;
&lt;/div&gt;</code></pre>
2022-02-11 10:39:21 -05:00
<p>
Read more in the
2023-01-25 10:41:47 -05:00
<a href="https://github.com/kytta/shareon/#usage">README</a>
on GitHub!
2022-02-11 10:39:21 -05:00
</p>
</article>
2022-02-08 14:37:13 -05:00
</main>
<footer>
2022-02-11 10:39:21 -05:00
<p>
2023-07-14 18:49:13 -04:00
Copyright © 20202023
2022-02-11 10:39:21 -05:00
<a href="https://www.kytta.dev/">Nikita Karamov</a>
<br />
Licenced under the MIT License.
</p>
<p>
Website built with
<a href="https://igoradamenko.github.io/awsm.css/index.html"
>awsm.css</a
>
</p>
2022-02-08 14:37:13 -05:00
</footer>
2022-02-11 10:39:21 -05:00
</body>
2022-02-08 14:37:13 -05:00
</html>