Compare commits
78 Commits
Author | SHA1 | Date |
---|---|---|
Nikita Karamov | d5de42c40b | |
Nikita Karamov | f41dd8636f | |
Nikita Karamov | 13b1ca9804 | |
Nikita Karamov | 0682b0b0b0 | |
Nikita Karamov | 3e0bae3461 | |
Nikita Karamov | 9d21baf43b | |
Nikita Karamov | d64e95e3a4 | |
Nikita Karamov | fa7bb62967 | |
pre-commit-ci[bot] | b31215510b | |
pre-commit-ci[bot] | 4c6a6fb38e | |
Nikita Karamov | 7037b6bb6c | |
Nikita Karamov | 2a66e00dfd | |
pre-commit-ci[bot] | d3915fea4a | |
pre-commit-ci[bot] | 14406a93f8 | |
Nikita Karamov | 00ec68742a | |
Nikita Karamov | f8e4f260f7 | |
Nikita Karamov | 96e0aabd91 | |
Nikita Karamov | 09b22f705d | |
Nikita Karamov | aaffdbf7dc | |
Nikita Karamov | c35a7d5a81 | |
Nikita Karamov | c1dfacdcd4 | |
Nikita Karamov | a82093cf3f | |
Nikita Karamov | 65223a738e | |
Nikita Karamov | da8bcdf609 | |
Nikita Karamov | 3640a8e05d | |
Nikita Karamov | 82965c4154 | |
Nikita Karamov | 84b18b0371 | |
Nikita Karamov | 90eb6d92c5 | |
Nikita Karamov | 29e14cddf2 | |
Nikita Karamov | 6394054207 | |
Nikita Karamov | e09d68153d | |
Nikita Karamov | 39759faebf | |
dependabot[bot] | ca7e1a940f | |
Nikita Karamov | 0bc83571ff | |
Nikita Karamov | b0dcf28ce2 | |
Nikita Karamov | ebd35d9213 | |
Nikita Karamov | 3dd118b0bf | |
Nikita Karamov | 7446a07f2f | |
Nikita Karamov | 5169986c3a | |
Nikita Karamov | 989a18ed88 | |
Nikita Karamov | b7ed60cd47 | |
Nikita Karamov | 347c7ccf36 | |
pre-commit-ci[bot] | 0744c5b315 | |
Nikita Karamov | 58319f5bb9 | |
pre-commit-ci[bot] | b144ee3649 | |
Nikita Karamov | a3ddfd8210 | |
pre-commit-ci[bot] | ca8e754dc2 | |
Nikita Karamov | dbe8ed5bb3 | |
Nikita Karamov | 2a95cabada | |
pre-commit-ci[bot] | 000f0db9e0 | |
Nikita Karamov | b9faaa6002 | |
Nikita Karamov | f805295cc4 | |
Nikita Karamov | 1258053c02 | |
Isaac Kabucho | cf704dec66 | |
Isaac Kabucho | d4865ddf54 | |
Isaac Kabucho | b1af98b111 | |
Isaac Kabucho | 64f7e8d947 | |
Isaac Kabucho | bb746fcbd1 | |
Nikita Karamov | b2331876ba | |
Nikita Karamov | ea995ce107 | |
Anderson Joseph | aba136b312 | |
Anderson Joseph | b92ac9baa7 | |
Nikita Karamov | 301277d018 | |
Nikita Karamov | 9ca9aa8740 | |
Nikita Karamov | afbd45d2eb | |
pre-commit-ci[bot] | c780131a93 | |
Nikita Karamov | d2370aeaf6 | |
Nikita Karamov | 2be4684875 | |
Nikita Karamov | 6b9ef4212e | |
pre-commit-ci[bot] | 7ca6e9f201 | |
Jake Howard | 3620323d7c | |
Nikita Karamov | 3150d947f7 | |
Nikita Karamov | d553e74367 | |
Nikita Karamov | ec3e40623a | |
Nikita Karamov | e689e2f401 | |
Nikita Karamov | de9b21ed33 | |
Nikita Karamov | 000e3b1b1f | |
Nikita Karamov | 348bddf4fa |
|
@ -1,37 +0,0 @@
|
|||
name: Test
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: latest
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
cache: pnpm
|
||||
- name: Install dependencies
|
||||
run: pnpm install --ignore-scripts
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
- name: Build
|
||||
run: pnpm build
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
- name: Check size
|
||||
uses: getsentry/size-limit-action@v5
|
||||
with:
|
||||
main_branch: main
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
skip_step: build
|
|
@ -0,0 +1,36 @@
|
|||
name: Publish
|
||||
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
cache: pnpm
|
||||
- name: Install dependencies
|
||||
run: pnpm install --ignore-scripts
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
- name: Publish to NPM (with provenance)
|
||||
run: pnpm publish --no-git-checks --access public --tag ${{ github.event.release.prerelease && 'next' || 'latest' }}
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
NPM_CONFIG_PROVENANCE: "true"
|
|
@ -0,0 +1,31 @@
|
|||
name: Size Limit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
size:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_JOB_NUMBER: 1
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Fetch Git refs
|
||||
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: pnpm
|
||||
- name: Check package size
|
||||
uses: andresz1/size-limit-action@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -0,0 +1,33 @@
|
|||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
FORCE_COLOR: 2
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: pnpm
|
||||
- name: Install dependencies
|
||||
run: pnpm install --ignore-scripts
|
||||
# pre-commit dioes this for us
|
||||
# - name: Lint
|
||||
# run: pnpm run lint
|
||||
- name: Build
|
||||
run: pnpm run build
|
|
@ -3,3 +3,5 @@ dist/
|
|||
.idea/
|
||||
node_modules/
|
||||
.vscode/
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
exclude: 'src/icons/.*\.svg'
|
||||
- id: fix-byte-order-marker
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
|
@ -11,17 +12,24 @@ repos:
|
|||
- id: check-toml
|
||||
- id: check-yaml
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: "v3.0.0"
|
||||
rev: "v4.0.0-alpha.8"
|
||||
hooks:
|
||||
- id: prettier
|
||||
additional_dependencies:
|
||||
- prettier@3
|
||||
- repo: https://github.com/pre-commit/mirrors-eslint
|
||||
rev: "v8.43.0"
|
||||
rev: "v9.0.0-alpha.2"
|
||||
hooks:
|
||||
- id: eslint
|
||||
files: \.([jt]s|astro)$ # *.js, *.ts and *.astro
|
||||
types: [file]
|
||||
additional_dependencies:
|
||||
- eslint
|
||||
- eslint-config-prettier
|
||||
- eslint-plugin-unicorn
|
||||
- eslint@8
|
||||
- eslint-config-prettier@9
|
||||
- eslint-plugin-unicorn@49
|
||||
- prettier@3
|
||||
- repo: https://github.com/kytta/mirrors-svgo
|
||||
rev: v3.2.0
|
||||
hooks:
|
||||
- id: svgo
|
||||
files: "^src/icons/"
|
||||
|
|
65
CHANGELOG.md
|
@ -4,6 +4,63 @@ All notable changes to this project will be documented in this file.
|
|||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [2.5.0] - 2024-02-04
|
||||
|
||||
### Added
|
||||
|
||||
- [#108](https://github.com/kytta/shareon/pull/108)
|
||||
Fediverse button (via [Share₂Fedi](https://github.com/kytta/share2fedi))
|
||||
|
||||
## [2.4.0] - 2023-12-07
|
||||
|
||||
### Added
|
||||
|
||||
- [#99](https://github.com/kytta/shareon/pull/99)
|
||||
Email button
|
||||
- [#100](https://github.com/kytta/shareon/pull/100)
|
||||
Print button
|
||||
|
||||
### Behind-the-scenes
|
||||
|
||||
- [#95](https://github.com/kytta/shareon/pull/95)
|
||||
Update to Vite v5
|
||||
- [#101](https://github.com/kytta/shareon/pull/101)
|
||||
Enable automatic package publishing
|
||||
|
||||
## [2.3.0] - 2023-08-01
|
||||
|
||||
### Added
|
||||
|
||||
- [#80](https://github.com/kytta/shareon/pull/80):
|
||||
Tumblr button by [Isaac](https://github.com/kabszac)
|
||||
|
||||
### Behind-the-scenes
|
||||
|
||||
- [#82](https://github.com/kytta/shareon/pull/82):
|
||||
PNPM is now enforced by [Anderson](https://github.com/andersonjoseph)
|
||||
|
||||
## [2.2.3] - 2023-07-19
|
||||
|
||||
### Fixed
|
||||
|
||||
- v2.2.2 was published with the bug not fixed.
|
||||
|
||||
## [2.2.2] - 2023-07-15
|
||||
|
||||
### Fixed
|
||||
|
||||
- [#71](https://github.com/kytta/shareon/pull/71):
|
||||
Web Share icon got minified incorrectly, causing it to not show up at all.
|
||||
Fixed by Jake.
|
||||
|
||||
## [2.2.1] - 2023-07-15
|
||||
|
||||
### Behind-the-scenes
|
||||
|
||||
- [#70](https://github.com/kytta/shareon/pull/70):
|
||||
Icon minification and inlining happens automatically now. As a bonus, the CSS
|
||||
size went a bit down :)
|
||||
|
||||
## [2.2.0] - 2023-07-15
|
||||
|
||||
### Added
|
||||
|
@ -292,7 +349,13 @@ Initial release of shareon
|
|||
- Add Telegram button
|
||||
- Add Twitter button
|
||||
|
||||
[unreleased]: https://github.com/kytta/shareon/compare/v2.2.0...main
|
||||
[unreleased]: https://github.com/kytta/shareon/compare/v2.5.0...main
|
||||
[2.4.0]: https://github.com/kytta/shareon/compare/v2.4.0...v2.5.0
|
||||
[2.4.0]: https://github.com/kytta/shareon/compare/v2.3.0...v2.4.0
|
||||
[2.3.0]: https://github.com/kytta/shareon/compare/v2.2.3...v2.3.0
|
||||
[2.2.3]: https://github.com/kytta/shareon/compare/v2.2.2...v2.2.3
|
||||
[2.2.2]: https://github.com/kytta/shareon/compare/v2.2.1...v2.2.2
|
||||
[2.2.1]: https://github.com/kytta/shareon/compare/v2.2.0...v2.2.1
|
||||
[2.2.0]: https://github.com/kytta/shareon/compare/v2.1.0...v2.2.0
|
||||
[2.1.0]: https://github.com/kytta/shareon/compare/v2.0.2...v2.1.0
|
||||
[2.0.2]: https://github.com/kytta/shareon/compare/v2.0.1...v2.0.2
|
||||
|
|
|
@ -0,0 +1,117 @@
|
|||
# Contributing to Shareon
|
||||
|
||||
Shareon welcomes contributions and corrections. Before contributing, please make sure you have read the guidelines below. If you decide to contribute anything, please follow the steps below.
|
||||
|
||||
0. Install [pnpm](https://pnpm.io/installation):
|
||||
1. Install [pre-commit](https://pre-commit.com/)
|
||||
2. Fork this repository
|
||||
3. Clone the fork
|
||||
4. Enable pre-commit in the repo:
|
||||
|
||||
```sh
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
5. Create a new branch from the latest commit on `main`
|
||||
6. Start hacking on the new branch
|
||||
7. Commit and push to the new branch
|
||||
8. Make a pull request to `main`
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Requesting a button](#requesting-a-button)
|
||||
- [Adding or updating a button](#adding-or-updating-a-button)
|
||||
- [Testing Package Locally](#testing-package-locally)
|
||||
|
||||
## Requesting a button
|
||||
|
||||
We welcome requests for new buttons. Before you submit a new issue, make sure:
|
||||
|
||||
- No one has requested the button before. If you find an existing issue or pull request, add a reaction to show your support.
|
||||
- The website in question has a share page. Usually, such websites offer their own 'Share' buttons.
|
||||
- The website is not illegal (e.g. piracy, malware, threatening material, spam, etc.)
|
||||
|
||||
If you have additional information, such as the address of the Share page, links to the documentation or to other implementations, put it in the issue description.
|
||||
|
||||
## Adding or updating a button
|
||||
|
||||
**Note**: If you decide to add a new button without requesting it first, the requirements above still apply.
|
||||
|
||||
### 1. Identify share page address
|
||||
|
||||
If a website has its own 'Share' button, it will also usually have some documentation for it. This might be the SDK docs or the button constructor. In some cases, there is nothing of sorts, and one has to reverse-engineer this.
|
||||
|
||||
Most websites use a fixed share page that expects URL parameters to contain metadata like URL, page title, and/or post text. For example, the Twitter share page has the base URL `https://twitter.com/intent/tweet` and can accept URL parameters `url`, `text`, `via`, and `hashtags`.
|
||||
|
||||
### 2. Add JavaScript code for the button
|
||||
|
||||
For the button to work, it needs an entry in the `urlBuilderMap`. It's located on top of `src/shareon.js`.
|
||||
|
||||
The key of the map is the ID of the website, which is usually its name. It should be all lowercase and only include dashes. Try to keep it as short as possible, e.g. `teams` instead of `microsoft-teams`.
|
||||
|
||||
The value of the map is a function that accepts a "preset" (aka "page data") object. This object contains data about the page or of the post, such as url, title, media, text, via, hashtags, and Facebook app ID, all URL-encoded. The function should return a complete Share URL.
|
||||
|
||||
> **Note** This is subject to change in Shareon v3, where we plan to migrate to a `URL` builder. See [issue #61 on GitHub](https://github.com/kytta/shareon/issues/61) for information.
|
||||
|
||||
Once you;ve added the entry, the button is ready to go. If the button accepts properties that are not defined in the "preset", let us know before implementing it.
|
||||
|
||||
### 3. Add the icon
|
||||
|
||||
We heavily rely on icons from the [Simple Icons](https://github.com/simple-icons/simple-icons) project. As such, the requirements for the icons are similar.
|
||||
|
||||
- The icon MUST be SVG
|
||||
- The name the icon MUST match the `urlBuilderMap` key
|
||||
- The icon MUST have a `viewBox` of `0 0 24 24` and have no dimensions
|
||||
- The icon must have the maximal size possible, i.e. the icon should be touching at least two sides of the viewbox
|
||||
- The icon MUST be all white, either via the `fill` or via the `stroke` attribute
|
||||
|
||||
The easiest path for you to go is to just find the icon on Simple Icons and download it to `src/icons/`. They already meet all requirements. You do have to change the colour from `currentColor` to `#fff`, though.
|
||||
|
||||
If the website does not have its icon on Simple Icons, follow [their contributing guide](https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md) to request and/or add it. We will assist you in this task, if needed.
|
||||
|
||||
### 4. Optimize the icon
|
||||
|
||||
All icons for Shareon should be optimized with the [SVGO tool](https://github.com/svg/svgo). The pre-commit hook you've installed does it automatically before commiting. Alternatively, you can run SVGO on the icon you've just added like so:
|
||||
|
||||
```bash
|
||||
npx svgo src/icons/ICONNAME.svg
|
||||
```
|
||||
|
||||
After optimizing the icon, double-check it against your original version to ensure no visual imperfections have crept in.
|
||||
|
||||
### 5. Add styles
|
||||
|
||||
In `src/shareon.css`, add two lines for the icon: one for the colour and one for the icon. The class of the button MUST match the `urlBuilderMap` key and the icon name. The colour should be the official website colour, preferably taken from Simple Icons. The icon should be referenced using the local path, it will be inlined on build. Example:
|
||||
|
||||
```css
|
||||
.shareon > .pinterest {
|
||||
background-color: #bd081c; /* Official colour, as taken from Simple Icons */
|
||||
}
|
||||
.shareon > .pinterest:before {
|
||||
background-image: url("icons/pinterest.svg"); /* Icon taken Simple Icons and optimized with SVGO */
|
||||
}
|
||||
```
|
||||
|
||||
### 6. Test the icon
|
||||
|
||||
Open `index.html` in the repository root and add the icon to the list of all buttons. Then, launch the dev server:
|
||||
|
||||
```sh
|
||||
pnpm dev --open
|
||||
```
|
||||
|
||||
The final button should:
|
||||
|
||||
- Have a proper icon. It should:
|
||||
- be white
|
||||
- be vertically and horizontally centered
|
||||
- Open the share page on click
|
||||
- Fill out the data on the share page
|
||||
|
||||
### 7. Update docs
|
||||
|
||||
Update `README.md` to include the new button in the code snippets. If the button supports non-standard (not just `url` or `title`) `data-` attributes, mention it in 'Share metadata'
|
||||
|
||||
### 8. Create a Pull Request
|
||||
|
||||
Once you've completed the previous steps, create a pull request to merge your edits into the `main` branch. You can run `pnpm lint` to check if there are any issues you still need to address. If there are any, run `pre-commit`, and it will fix most of them.
|
21
README.md
|
@ -89,11 +89,12 @@ Shareon.init();
|
|||
|
||||
Create a container with class `shareon` and populate it with elements, class
|
||||
names of which match the names of the social networks (or `copy-url`, for the
|
||||
'Copy URL' button:
|
||||
'Copy URL' button, or `print` for the 'Print' button):
|
||||
|
||||
```html
|
||||
<div class="shareon">
|
||||
<a class="facebook"></a>
|
||||
<a class="fediverse"></a>
|
||||
<a class="linkedin"></a>
|
||||
<a class="mastodon"></a>
|
||||
<!-- FB App ID is required for the Messenger button to function -->
|
||||
|
@ -104,11 +105,14 @@ names of which match the names of the social networks (or `copy-url`, for the
|
|||
<a class="reddit"></a>
|
||||
<a class="teams"></a>
|
||||
<a class="telegram"></a>
|
||||
<a class="tumblr"></a>
|
||||
<a class="twitter"></a>
|
||||
<a class="viber"></a>
|
||||
<a class="vkontakte"></a>
|
||||
<a class="whatsapp"></a>
|
||||
<a class="copy-url"></a>
|
||||
<a class="email"></a>
|
||||
<a class="print"></a>
|
||||
</div>
|
||||
```
|
||||
|
||||
|
@ -137,23 +141,28 @@ Apart from the URL and title, some networks support extra parameters:
|
|||
|
||||
- you **MUST** add `data-fb-app-id` to the FB Messenger button to make sharing
|
||||
even possible
|
||||
- add `data-s2f-instance` to the Fediverse button to set your Share₂Fedi
|
||||
instance
|
||||
- add `data-media` to an Odnoklassniki, Pinterest, or VK button to customize
|
||||
the pinned picture
|
||||
- add `data-text` to a WhatsApp, Mastodon, Telegram, or Viber button to add
|
||||
- add `data-text` to a Mastodon, Telegram, Tumblr, Viber, or WhatsApp button to add
|
||||
custom message text
|
||||
- add `data-via` to a Twitter or Mastodon button to mention a user
|
||||
- add `data-hashtags` to a Twitter or Facebook button to include hashtags in the shared post.
|
||||
- Twitter supports multiple hashtags, and you need to specify them with out `#` and seperated with `,`, it shoule be something like this `ai,technologies,aigc`.
|
||||
- Facebook only supports a single hashtag. If you pass multiple hashtags with `,` seperated, the library will only use the first one.
|
||||
- add `data-via` to a Mastodon, Tumblr, or Twitter button to mention a user
|
||||
- add `data-hashtags` to a Facebook, Tumblr, or Twitter button to include hashtags in the shared post.
|
||||
- should be a comma-separated string, for example `stuff,tech,buttons`
|
||||
- Twitter & Tumblr support multiple hashtags
|
||||
- Facebook only supports a single hashtag; only the first one will be used
|
||||
|
||||
Here are all custom parameters:
|
||||
|
||||
```html
|
||||
<div class="shareon" data-url="https://custom.url/for-this-page">
|
||||
<a class="facebook" data-title="Custom Facebook title" data-hashtags="awesome"></a>
|
||||
<a class="fediverse" data-s2f-instance="s2f.mydomain.example"></a>
|
||||
<a class="messenger" data-fb-app-id="0123456789012345"></a>
|
||||
<a class="pinterest" data-media="https://custom.picture/for-pinterest">Pin</a>
|
||||
<a class="telegram" data-text="Check this out!"></a>
|
||||
<a class="tumblr" data-hashtags="nice,buttons" data-text="These are some nice buttons" data-via="myblog"></a>
|
||||
<a class="twitter" data-via="MyNickname" data-hashtags="shareon,awesome,brilliant"></a>
|
||||
<a class="mastodon" data-via="@MyNickname@myserver.social"></a>
|
||||
<a class="whatsapp" data-url="https://custom.url/for-whatsapp">Send</a>
|
||||
|
|
14
index.html
|
@ -30,6 +30,7 @@
|
|||
<h2><code><a></code></h2>
|
||||
<div class="shareon">
|
||||
<a class="facebook"></a>
|
||||
<a class="fediverse"></a>
|
||||
<a class="linkedin"></a>
|
||||
<a class="mastodon"></a>
|
||||
<a class="messenger" data-fb-app-id="3619024578167617"></a>
|
||||
|
@ -39,11 +40,14 @@
|
|||
<a class="reddit"></a>
|
||||
<a class="teams"></a>
|
||||
<a class="telegram"></a>
|
||||
<a class="tumblr"></a>
|
||||
<a class="twitter"></a>
|
||||
<a class="viber"></a>
|
||||
<a class="vkontakte"></a>
|
||||
<a class="whatsapp"></a>
|
||||
<a class="copy-url"></a>
|
||||
<a class="email"></a>
|
||||
<a class="print"></a>
|
||||
<a class="web-share"></a>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -51,6 +55,7 @@
|
|||
<h2><code><button></code></h2>
|
||||
<div class="shareon">
|
||||
<button class="facebook"></button>
|
||||
<button class="fediverse"></button>
|
||||
<button class="linkedin"></button>
|
||||
<button class="mastodon"></button>
|
||||
<button class="messenger" data-fb-app-id="3619024578167617"></button>
|
||||
|
@ -60,11 +65,14 @@
|
|||
<button class="reddit"></button>
|
||||
<button class="teams"></button>
|
||||
<button class="telegram"></button>
|
||||
<button class="tumblr"></button>
|
||||
<button class="twitter"></button>
|
||||
<button class="viber"></button>
|
||||
<button class="vkontakte"></button>
|
||||
<button class="whatsapp"></button>
|
||||
<button class="copy-url"></button>
|
||||
<button class="email"></button>
|
||||
<button class="print"></button>
|
||||
<button class="web-share"></button>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -77,6 +85,7 @@
|
|||
data-text="hey check this out"
|
||||
>
|
||||
<a class="facebook"></a>
|
||||
<a class="fediverse" data-s2f-instance="share2fedi.vercel.app"></a>
|
||||
<a class="linkedin"></a>
|
||||
<a class="mastodon" data-via="@NickKaramoff@fosstodon.org"></a>
|
||||
<a class="messenger" data-fb-app-id="3619024578167617"></a>
|
||||
|
@ -86,11 +95,13 @@
|
|||
<a class="reddit"></a>
|
||||
<a class="teams"></a>
|
||||
<a class="telegram"></a>
|
||||
<a class="tumblr"></a>
|
||||
<a class="twitter" data-via="nickkaramoff"></a>
|
||||
<a class="viber"></a>
|
||||
<a class="vkontakte"></a>
|
||||
<a class="whatsapp"></a>
|
||||
<a class="copy-url"></a>
|
||||
<a class="email"></a>
|
||||
<a class="web-share"></a>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -98,6 +109,7 @@
|
|||
<h2>Specimen</h2>
|
||||
<div class="shareon specimen">
|
||||
<a class="facebook"></a>
|
||||
<a class="fediverse"></a>
|
||||
<a class="linkedin"></a>
|
||||
<a class="mastodon">Toot</a>
|
||||
<a class="messenger" data-fb-app-id="3619024578167617"></a>
|
||||
|
@ -108,12 +120,14 @@
|
|||
<a class="reddit"></a>
|
||||
<a class="teams"></a>
|
||||
<a class="telegram"></a>
|
||||
<a class="tumblr"></a>
|
||||
<a class="twitter">Tweet</a>
|
||||
<a class="viber"></a>
|
||||
<br />
|
||||
<a class="vkontakte">Поделиться</a>
|
||||
<a class="whatsapp"></a>
|
||||
<a class="copy-url"></a>
|
||||
<a class="email"></a>
|
||||
<a class="web-share">Share</a>
|
||||
</div>
|
||||
</section>
|
||||
|
|
32
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "shareon",
|
||||
"version": "2.2.0",
|
||||
"version": "2.5.0",
|
||||
"description": "Lightweight, stylish and ethical share buttons for popular social networks",
|
||||
"license": "MIT",
|
||||
"homepage": "https://shareon.js.org",
|
||||
|
@ -49,22 +49,24 @@
|
|||
"test": "pnpm run lint && pnpm run build && pnpm run size",
|
||||
"postversion": "pnpm run build",
|
||||
"prepublishOnly": "rm -rf ./package && clean-publish",
|
||||
"postpublish": "rm -rf ./package"
|
||||
"postpublish": "rm -rf ./package",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@size-limit/preset-small-lib": "^8.2.6",
|
||||
"autoprefixer": "^10.4.14",
|
||||
"@size-limit/preset-small-lib": "^11.0.1",
|
||||
"autoprefixer": "^10.4.16",
|
||||
"clean-publish": "^4.2.0",
|
||||
"eslint": "^8.45.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"eslint-plugin-unicorn": "^47.0.0",
|
||||
"postcss": "^8.4.26",
|
||||
"eslint": "^8.55.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-unicorn": "^49.0.0",
|
||||
"postcss": "^8.4.32",
|
||||
"postcss-calc": "^9.0.1",
|
||||
"postcss-css-variables": "^0.19.0",
|
||||
"postcss-csso": "^6.0.1",
|
||||
"prettier": "^3.0.0",
|
||||
"size-limit": "^8.2.6",
|
||||
"vite": "^4.4.4"
|
||||
"postcss-url": "^10.1.3",
|
||||
"prettier": "^3.1.0",
|
||||
"size-limit": "^11.0.1",
|
||||
"vite": "^5.0.6"
|
||||
},
|
||||
"prettier": {
|
||||
"embeddedLanguageFormatting": "off"
|
||||
|
@ -96,6 +98,10 @@
|
|||
},
|
||||
"postcss": {
|
||||
"plugins": {
|
||||
"postcss-url": {
|
||||
"url": "inline",
|
||||
"optimizeSvgEncode": true
|
||||
},
|
||||
"postcss-css-variables": {},
|
||||
"postcss-calc": {},
|
||||
"autoprefixer": {},
|
||||
|
@ -104,12 +110,12 @@
|
|||
},
|
||||
"size-limit": [
|
||||
{
|
||||
"limit": "6 KB",
|
||||
"limit": "6 KiB",
|
||||
"path": "./dist/shareon.min.css",
|
||||
"brotli": true
|
||||
},
|
||||
{
|
||||
"limit": "1 KB",
|
||||
"limit": "1 KiB",
|
||||
"path": "./dist/shareon.es.js",
|
||||
"brotli": true
|
||||
}
|
||||
|
|
775
pnpm-lock.yaml
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 6 9 17l-5-5"/></svg>
|
After Width: | Height: | Size: 183 B |
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg>
|
After Width: | Height: | Size: 287 B |
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><rect height="16" rx="2" width="20" x="2" y="4"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/></g></svg>
|
After Width: | Height: | Size: 265 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073"/></svg>
|
After Width: | Height: | Size: 375 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M5.239 8.64a2.43 2.43 0 0 1-1.041 1.036l5.714 5.736 1.377-.698zm7.537 7.566-1.378.698 2.895 2.907a2.43 2.43 0 0 1 1.041-1.037zm6.61-5.297-3.234 1.64.238 1.526 3.66-1.856a2.43 2.43 0 0 1-.663-1.31m-5.113 2.592-7.649 3.876a2.43 2.43 0 0 1 .664 1.31l7.223-3.66zm-2.46-9.549-3.69 7.205 1.089 1.094 3.908-7.628a2.43 2.43 0 0 1-1.307-.67m-4.65 9.078-1.87 3.65a2.44 2.44 0 0 1 1.307.67l1.652-3.226zm-2.998-3.34a2.44 2.44 0 0 1-1.216.255 3 3 0 0 1-.235-.025l1.092 6.983a2.44 2.44 0 0 1 1.216-.255q.118.007.234.025zm3.129 9.03a2.4 2.4 0 0 1 .025.49 2.4 2.4 0 0 1-.256.96l6.98 1.121a2.4 2.4 0 0 1-.025-.49 2.4 2.4 0 0 1 .257-.96zm12.78-6.476-3.222 6.29a2.43 2.43 0 0 1 1.307.671l3.222-6.29a2.43 2.43 0 0 1-1.307-.671M15.68 3.348a2.44 2.44 0 0 1-1.04 1.036l4.99 5.01a2.43 2.43 0 0 1 1.04-1.037zm-4.554-.731L4.818 5.813a2.43 2.43 0 0 1 .663 1.31l6.309-3.197a2.43 2.43 0 0 1-.664-1.31m3.502 1.774a2.44 2.44 0 0 1-1.236.264 3 3 0 0 1-.213-.022l.559 3.578 1.524.244zm-.565 5.9 1.32 8.46a2.43 2.43 0 0 1 1.199-.246q.128.007.254.028l-1.249-7.998zM5.486 7.15a2.4 2.4 0 0 1 .027.498 2.4 2.4 0 0 1-.253.953l3.58.575.704-1.374zm6.137.986L10.92 9.51l8.46 1.36a2.4 2.4 0 0 1-.024-.485 2.4 2.4 0 0 1 .26-.966zM13.645.015a2.212 2.212 0 1 0-.24 4.418 2.212 2.212 0 1 0 .24-4.418m8.261 8.293a2.212 2.212 0 1 0-.24 4.418 2.212 2.212 0 1 0 .24-4.418M16.57 18.725a2.212 2.212 0 1 0-.24 4.419 2.212 2.212 0 1 0 .24-4.419M5.01 16.871a2.212 2.212 0 1 0-.24 4.418 2.212 2.212 0 1 0 .24-4.418M3.204 5.307a2.212 2.212 0 1 0-.24 4.418 2.212 2.212 0 1 0 .24-4.418"/></svg>
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.722 23.72h-4.91v-7.692c0-1.834-.038-4.194-2.559-4.194-2.56 0-2.95 1.995-2.95 4.06v7.827H8.394V7.902h4.716v2.157h.063c.659-1.244 2.261-2.556 4.655-2.556 4.974 0 5.894 3.274 5.894 7.535v8.683ZM.388 7.902h4.923v15.819H.388zM2.85 5.738A2.85 2.85 0 0 1 0 2.886a2.851 2.851 0 1 1 2.85 2.852"/></svg>
|
After Width: | Height: | Size: 378 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z"/></svg>
|
After Width: | Height: | Size: 512 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38q.398-.092.786-.213c.585-.184 1.27-.39 1.774-.753a.06.06 0 0 0 .023-.043v-1.809a.05.05 0 0 0-.02-.041.05.05 0 0 0-.046-.01 20.3 20.3 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.6 5.6 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422q.059-.011.11-.024c2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545m-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102q0-1.965 1.011-3.12c.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164q1.012 1.155 1.012 3.12z"/></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M.001 11.639C.001 4.949 5.241 0 12.001 0S24 4.95 24 11.639s-5.24 11.638-12 11.638c-1.21 0-2.38-.16-3.47-.46a.96.96 0 0 0-.64.05l-2.39 1.05a.96.96 0 0 1-1.35-.85l-.07-2.14a.97.97 0 0 0-.32-.68A11.39 11.389 0 0 1 .002 11.64zm8.32-2.19-3.52 5.6c-.35.53.32 1.139.82.75l3.79-2.87c.26-.2.6-.2.87 0l2.8 2.1c.84.63 2.04.4 2.6-.48l3.52-5.6c.35-.53-.32-1.13-.82-.75l-3.79 2.87c-.25.2-.6.2-.86 0l-2.8-2.1a1.8 1.8 0 0 0-2.61.48"/></svg>
|
After Width: | Height: | Size: 505 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 0a6.2 6.2 0 0 0-6.194 6.195 6.2 6.2 0 0 0 6.195 6.192 6.2 6.2 0 0 0 6.193-6.192A6.2 6.2 0 0 0 12.001 0zm0 3.63a2.567 2.567 0 0 1 2.565 2.565 2.57 2.57 0 0 1-2.564 2.564 2.57 2.57 0 0 1-2.565-2.564 2.567 2.567 0 0 1 2.565-2.564zM6.807 12.6a1.814 1.814 0 0 0-.91 3.35 11.6 11.6 0 0 0 3.597 1.49l-3.462 3.463a1.815 1.815 0 0 0 2.567 2.566L12 20.066l3.405 3.403a1.813 1.813 0 0 0 2.564 0c.71-.709.71-1.858 0-2.566l-3.462-3.462a11.6 11.6 0 0 0 3.596-1.49 1.814 1.814 0 1 0-1.932-3.073 7.87 7.87 0 0 1-8.34 0c-.318-.2-.674-.29-1.024-.278"/></svg>
|
After Width: | Height: | Size: 625 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026z"/></svg>
|
After Width: | Height: | Size: 877 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m18.813 10.259-5.646 5.419a1.65 1.65 0 0 1-2.282 0l-5.646-5.419a1.645 1.645 0 0 1 2.276-2.376l4.511 4.322 4.517-4.322a1.643 1.643 0 0 1 2.326.049 1.64 1.64 0 0 1-.045 2.326zm5.083-7.546a2.16 2.16 0 0 0-2.041-1.436H2.179c-.9 0-1.717.564-2.037 1.405-.094.25-.142.511-.142.774v7.245l.084 1.441c.348 3.277 2.047 6.142 4.682 8.139q.069.053.143.105l.03.023a11.9 11.9 0 0 0 4.694 2.072c.786.158 1.591.24 2.389.24.739 0 1.481-.067 2.209-.204.088-.029.176-.045.264-.06.023 0 .049-.015.074-.029a12 12 0 0 0 4.508-2.025l.029-.031.135-.105c2.627-1.995 4.324-4.862 4.686-8.148L24 10.678V3.445c0-.251-.031-.5-.121-.742z"/></svg>
|
After Width: | Height: | Size: 695 B |
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 9V2h12v7M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2M6 14h12v8H6z"/></svg>
|
After Width: | Height: | Size: 266 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M19.512 1.173a1.88 1.88 0 0 1 1.877 1.874 1.884 1.884 0 0 1-1.877 1.857c-.99 0-1.817-.783-1.873-1.773l-3.897-.82-1.201 5.623c2.737.105 5.223.949 7.015 2.234a2.53 2.53 0 0 1 1.812-.737A2.634 2.634 0 0 1 24 12.063c0 1.075-.653 2-1.516 2.423q.066.388.063.78c0 4.043-4.698 7.31-10.512 7.31s-10.512-3.267-10.512-7.31c0-.275.022-.55.064-.801a2.63 2.63 0 0 1-1.559-2.402 2.634 2.634 0 0 1 2.633-2.632c.694 0 1.347.294 1.811.735 1.812-1.325 4.32-2.146 7.12-2.232l1.329-6.276a.5.5 0 0 1 .21-.296.52.52 0 0 1 .357-.063l4.361.926c.3-.644.952-1.057 1.663-1.052M7.917 18.052c-.13 0-.254.05-.347.14a.497.497 0 0 0 0 .696c1.264 1.263 3.728 1.37 4.444 1.37s3.16-.084 4.444-1.37a.545.545 0 0 0 .044-.695.5.5 0 0 0-.697 0c-.82.8-2.527 1.095-3.77 1.095s-2.97-.294-3.77-1.095a.5.5 0 0 0-.348-.143zm-.051-5.989A1.88 1.88 0 0 0 5.99 13.94c0 1.031.842 1.873 1.876 1.873a1.88 1.88 0 0 0 1.873-1.874 1.88 1.88 0 0 0-1.873-1.875Zm8.254 0a1.88 1.88 0 0 0-1.873 1.876c0 1.031.842 1.873 1.875 1.873a1.88 1.88 0 0 0 1.875-1.874 1.88 1.88 0 0 0-1.877-1.875"/></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20.625 8.127q-.55 0-1.025-.205t-.832-.563-.563-.832T18 5.502q0-.54.205-1.02t.563-.837q.357-.358.832-.563.474-.205 1.025-.205.54 0 1.02.205t.837.563q.358.357.563.837t.205 1.02q0 .55-.205 1.025t-.563.832q-.357.358-.837.563t-1.02.205m0-3.75q-.469 0-.797.328t-.328.797.328.797.797.328.797-.328.328-.797-.328-.797-.797-.328M24 10.002v5.578q0 .774-.293 1.46t-.803 1.194q-.51.51-1.195.803-.686.293-1.459.293-.445 0-.908-.105-.463-.106-.85-.329-.293.95-.855 1.729t-1.319 1.336-1.67.861-1.898.305q-1.148 0-2.162-.398-1.014-.399-1.805-1.102t-1.312-1.664-.674-2.086h-5.8q-.411 0-.704-.293T0 16.881V6.873q0-.41.293-.703t.703-.293h8.59q-.34-.715-.34-1.5 0-.727.275-1.365.276-.639.75-1.114.475-.474 1.114-.75.638-.275 1.365-.275t1.365.275 1.114.75q.474.475.75 1.114.275.638.275 1.365t-.275 1.365q-.276.639-.75 1.113-.475.475-1.114.75-.638.276-1.365.276-.188 0-.375-.024-.188-.023-.375-.058v1.078h10.875q.469 0 .797.328t.328.797M12.75 2.373q-.41 0-.78.158-.368.158-.638.434-.27.275-.428.639-.158.363-.158.773t.158.78q.159.368.428.638.27.27.639.428t.779.158.773-.158q.364-.159.64-.428.274-.27.433-.639t.158-.779-.158-.773q-.159-.364-.434-.64-.275-.275-.639-.433-.363-.158-.773-.158M6.937 9.814h2.25V7.94H2.814v1.875h2.25v6h1.875zm10.313 7.313v-6.75H12v6.504q0 .41-.293.703t-.703.293H8.309q.152.809.556 1.5.405.691.985 1.19.58.497 1.318.779.738.281 1.582.281.926 0 1.746-.352.82-.351 1.436-.966.615-.616.966-1.43.352-.815.352-1.752m5.25-1.547v-5.203h-3.75v6.855q.305.305.691.452.387.146.809.146.469 0 .879-.176.41-.175.715-.48.304-.305.48-.715t.176-.879"/></svg>
|
After Width: | Height: | Size: 1.6 KiB |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M20.888 3.551c.168-.003.54.039.781.235.162.14.264.335.288.547.026.156.06.514.033.793-.302 3.189-1.616 10.924-2.285 14.495-.282 1.512-.838 2.017-1.378 2.066-1.17.11-2.058-.773-3.192-1.515-1.774-1.165-2.777-1.889-4.5-3.025-1.99-1.31-.7-2.033.434-3.209.297-.309 5.455-5.002 5.556-5.427.012-.054.024-.252-.094-.356s-.292-.069-.418-.04q-.267.061-8.504 5.62-1.208.831-2.187.806c-.72-.013-2.104-.405-3.134-.739C1.025 13.39.022 13.174.11 12.476q.068-.544 1.5-1.114 8.816-3.84 11.758-5.064c5.599-2.328 6.763-2.733 7.521-2.747Z"/></svg>
|
After Width: | Height: | Size: 607 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M14.563 24c-5.093 0-7.031-3.756-7.031-6.411V9.747H5.116V6.648c3.63-1.313 4.512-4.596 4.71-6.469C9.84.051 9.941 0 9.999 0h3.517v6.114h4.801v3.633h-4.82v7.47c.016 1.001.375 2.371 2.207 2.371h.09c.631-.02 1.486-.205 1.936-.419l1.156 3.425c-.436.636-2.4 1.374-4.156 1.404h-.178z"/></svg>
|
After Width: | Height: | Size: 364 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M21.543 7.104c.015.211.015.423.015.636 0 6.507-4.954 14.01-14.01 14.01v-.003A13.94 13.94 0 0 1 0 19.539a9.88 9.88 0 0 0 7.287-2.041 4.93 4.93 0 0 1-4.6-3.42 4.9 4.9 0 0 0 2.223-.084A4.926 4.926 0 0 1 .96 9.167v-.062a4.9 4.9 0 0 0 2.235.616A4.93 4.93 0 0 1 1.67 3.148a13.98 13.98 0 0 0 10.15 5.144 4.929 4.929 0 0 1 8.39-4.49 9.9 9.9 0 0 0 3.128-1.196 4.94 4.94 0 0 1-2.165 2.724A9.8 9.8 0 0 0 24 4.555a10 10 0 0 1-2.457 2.549"/></svg>
|
After Width: | Height: | Size: 515 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M11.4 0C9.473.028 5.333.344 3.02 2.467 1.302 4.187.696 6.7.633 9.817S.488 18.776 6.12 20.36h.003l-.004 2.416s-.037.977.61 1.177c.777.242 1.234-.5 1.98-1.302.407-.44.972-1.084 1.397-1.58 3.85.326 6.812-.416 7.15-.525.776-.252 5.176-.816 5.892-6.657.74-6.02-.36-9.83-2.34-11.546-.596-.55-3.006-2.3-8.375-2.323 0 0-.395-.025-1.037-.017zm.058 1.693c.545-.004.88.017.88.017 4.542.02 6.717 1.388 7.222 1.846 1.675 1.435 2.53 4.868 1.906 9.897v.002c-.604 4.878-4.174 5.184-4.832 5.395-.28.09-2.882.737-6.153.524 0 0-2.436 2.94-3.197 3.704-.12.12-.26.167-.352.144-.13-.033-.166-.188-.165-.414l.02-4.018c-4.762-1.32-4.485-6.292-4.43-8.895.054-2.604.543-4.738 1.996-6.173 1.96-1.773 5.474-2.018 7.11-2.03zm.38 2.602a.304.304 0 0 0-.004.607c1.624.01 2.946.537 4.028 1.592 1.073 1.046 1.62 2.468 1.633 4.334.002.167.14.3.307.3a.304.304 0 0 0 .3-.304c-.014-1.984-.618-3.596-1.816-4.764-1.19-1.16-2.692-1.753-4.447-1.765zm-3.96.695a.98.98 0 0 0-.616.117l-.01.002c-.43.247-.816.562-1.146.932l-.008.008q-.4.484-.46.948a.6.6 0 0 0-.007.14q0 .205.065.4l.013.01c.135.48.473 1.276 1.205 2.604.42.768.903 1.5 1.446 2.186q.405.517.87.984l.132.132q.466.463.984.87a15.5 15.5 0 0 0 2.186 1.447c1.328.733 2.126 1.07 2.604 1.206l.01.014a1.3 1.3 0 0 0 .54.055q.466-.055.948-.46c.004 0 .003-.002.008-.005.37-.33.683-.72.93-1.148l.003-.01c.225-.432.15-.842-.18-1.12-.004 0-.698-.58-1.037-.83q-.54-.383-1.113-.71c-.51-.285-1.032-.106-1.248.174l-.447.564c-.23.283-.657.246-.657.246-3.12-.796-3.955-3.955-3.955-3.955s-.037-.426.248-.656l.563-.448c.277-.215.456-.737.17-1.248a13 13 0 0 0-.71-1.115 28 28 0 0 0-.83-1.035.82.82 0 0 0-.502-.297zm4.49.88a.303.303 0 0 0-.018.606c1.16.085 2.017.466 2.645 1.15.63.688.93 1.524.906 2.57a.306.306 0 0 0 .61.013c.025-1.175-.334-2.193-1.067-2.994-.74-.81-1.777-1.253-3.05-1.346h-.024zm.463 1.63a.305.305 0 0 0-.3.287c-.008.167.12.31.288.32.523.028.875.175 1.113.422.24.245.388.62.416 1.164a.304.304 0 0 0 .605-.03c-.03-.644-.215-1.178-.58-1.557-.367-.378-.893-.574-1.52-.607h-.018z"/></svg>
|
After Width: | Height: | Size: 2.0 KiB |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.199 4.841H.11c.194 9.312 4.85 14.907 13.012 14.907h.462v-5.327c3 .299 5.268 2.492 6.178 5.327H24c-1.164-4.237-4.223-6.58-6.133-7.475 1.91-1.105 4.596-3.79 5.238-7.432h-3.85c-.836 2.955-3.313 5.641-5.67 5.895V4.84h-3.85v10.326C7.347 14.57 4.333 11.675 4.199 4.84Z"/></svg>
|
After Width: | Height: | Size: 355 B |
|
@ -0,0 +1 @@
|
|||
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#fff" stroke-width="2" d="M18 2a3 3 0 1 0 0 6 3 3 0 1 0 0-6zM6 9a3 3 0 1 0 0 6 3 3 0 1 0 0-6zm12 7a3 3 0 1 0 0 6 3 3 0 1 0 0-6zm-9.41-2.49 6.83 3.98m-.01-10.98-6.82 3.98"/></svg>
|
After Width: | Height: | Size: 264 B |
|
@ -0,0 +1 @@
|
|||
<svg fill="#fff" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52s.198-.298.298-.497c.099-.198.05-.371-.025-.52s-.669-1.612-.916-2.207c-.242-.579-.487-.5-.669-.51a13 13 0 0 0-.57-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074s2.096 3.2 5.077 4.487c.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413s.248-1.289.173-1.413c-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.82 9.82 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.82 11.82 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.9 11.9 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.82 11.82 0 0 0-3.48-8.413"/></svg>
|
After Width: | Height: | Size: 1.1 KiB |
|
@ -74,114 +74,136 @@
|
|||
}
|
||||
|
||||
.shareon > .copy-url:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/g%3E%3C/svg%3E");
|
||||
background-image: url("icons/copy-url.svg");
|
||||
}
|
||||
|
||||
.shareon > .copy-url.done:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/copy-url-done.svg");
|
||||
}
|
||||
|
||||
.shareon > .email:before {
|
||||
background-image: url("icons/email.svg");
|
||||
}
|
||||
|
||||
.shareon > .facebook {
|
||||
background-color: #1877f2;
|
||||
}
|
||||
.shareon > .facebook:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/facebook.svg");
|
||||
}
|
||||
|
||||
.shareon > .fediverse {
|
||||
background-color: #8a54af;
|
||||
}
|
||||
.shareon > .fediverse:before {
|
||||
background-image: url("icons/fediverse.svg");
|
||||
}
|
||||
|
||||
.shareon > .linkedin {
|
||||
background-color: #0a66c2;
|
||||
}
|
||||
.shareon > .linkedin:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M23.722 23.72h-4.91v-7.692c0-1.834-.038-4.194-2.559-4.194-2.56 0-2.95 1.995-2.95 4.06v7.827H8.394V7.902h4.716v2.157h.063c.659-1.244 2.261-2.556 4.655-2.556 4.974 0 5.894 3.274 5.894 7.535v8.683ZM.388 7.902h4.923v15.819H.388zM2.85 5.738A2.849 2.849 0 0 1 0 2.886a2.851 2.851 0 1 1 2.85 2.852Z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/linkedin-in.svg");
|
||||
}
|
||||
.shareon > .linkedin:not(:empty):before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/linkedin.svg");
|
||||
}
|
||||
|
||||
.shareon > .mastodon {
|
||||
background-color: #6364ff;
|
||||
}
|
||||
.shareon > .mastodon:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/mastodon.svg");
|
||||
}
|
||||
|
||||
.shareon > .messenger {
|
||||
background-color: #00b2ff;
|
||||
}
|
||||
.shareon > .messenger:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M.001 11.639C.001 4.949 5.241 0 12.001 0S24 4.95 24 11.639c0 6.689-5.24 11.638-12 11.638-1.21 0-2.38-.16-3.47-.46a.96.96 0 0 0-.64.05l-2.39 1.05a.96.96 0 0 1-1.35-.85l-.07-2.14a.97.97 0 0 0-.32-.68A11.39 11.389 0 0 1 .002 11.64zm8.32-2.19-3.52 5.6c-.35.53.32 1.139.82.75l3.79-2.87c.26-.2.6-.2.87 0l2.8 2.1c.84.63 2.04.4 2.6-.48l3.52-5.6c.35-.53-.32-1.13-.82-.75l-3.79 2.87c-.25.2-.6.2-.86 0l-2.8-2.1a1.8 1.8 0 0 0-2.61.48z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/messenger.svg");
|
||||
}
|
||||
|
||||
.shareon > .odnoklassniki {
|
||||
background-color: #ee8208;
|
||||
}
|
||||
.shareon > .odnoklassniki:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 0a6.2 6.2 0 0 0-6.194 6.195 6.2 6.2 0 0 0 6.195 6.192 6.2 6.2 0 0 0 6.193-6.192A6.2 6.2 0 0 0 12.001 0zm0 3.63a2.567 2.567 0 0 1 2.565 2.565 2.568 2.568 0 0 1-2.564 2.564 2.568 2.568 0 0 1-2.565-2.564 2.567 2.567 0 0 1 2.565-2.564zM6.807 12.6a1.814 1.814 0 0 0-.91 3.35 11.611 11.611 0 0 0 3.597 1.49l-3.462 3.463a1.815 1.815 0 0 0 2.567 2.566L12 20.066l3.405 3.403a1.813 1.813 0 0 0 2.564 0c.71-.709.71-1.858 0-2.566l-3.462-3.462a11.593 11.593 0 0 0 3.596-1.49 1.814 1.814 0 1 0-1.932-3.073 7.867 7.867 0 0 1-8.34 0c-.318-.2-.674-.29-1.024-.278z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/odnoklassniki.svg");
|
||||
}
|
||||
|
||||
.shareon > .pinterest {
|
||||
background-color: #bd081c;
|
||||
}
|
||||
.shareon > .pinterest:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/pinterest.svg");
|
||||
}
|
||||
|
||||
.shareon > .pocket {
|
||||
background-color: #ef3f56;
|
||||
}
|
||||
.shareon > .pocket:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m18.813 10.259-5.646 5.419a1.649 1.649 0 0 1-2.282 0l-5.646-5.419a1.645 1.645 0 0 1 2.276-2.376l4.511 4.322 4.517-4.322a1.643 1.643 0 0 1 2.326.049 1.64 1.64 0 0 1-.045 2.326l-.011.001zm5.083-7.546a2.163 2.163 0 0 0-2.041-1.436H2.179c-.9 0-1.717.564-2.037 1.405-.094.25-.142.511-.142.774v7.245l.084 1.441c.348 3.277 2.047 6.142 4.682 8.139.045.036.094.07.143.105l.03.023a11.899 11.899 0 0 0 4.694 2.072c.786.158 1.591.24 2.389.24.739 0 1.481-.067 2.209-.204.088-.029.176-.045.264-.06.023 0 .049-.015.074-.029a12.002 12.002 0 0 0 4.508-2.025l.029-.031.135-.105c2.627-1.995 4.324-4.862 4.686-8.148L24 10.678V3.445c0-.251-.031-.5-.121-.742l.017.01z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/pocket.svg");
|
||||
}
|
||||
|
||||
.shareon > .print:before {
|
||||
background-image: url("icons/print.svg");
|
||||
}
|
||||
|
||||
.shareon > .reddit {
|
||||
background-color: #ff4500;
|
||||
}
|
||||
.shareon > .reddit:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19.512 1.173a1.88 1.88 0 0 1 1.877 1.874 1.884 1.884 0 0 1-1.877 1.857c-.99 0-1.817-.783-1.873-1.773l-3.897-.82-1.201 5.623c2.737.105 5.223.949 7.015 2.234a2.525 2.525 0 0 1 1.812-.737A2.634 2.634 0 0 1 24 12.063c0 1.075-.653 2-1.516 2.423.044.258.065.519.063.78 0 4.043-4.698 7.31-10.512 7.31s-10.512-3.267-10.512-7.31c0-.275.022-.55.064-.801a2.627 2.627 0 0 1-1.559-2.402 2.634 2.634 0 0 1 2.633-2.632c.694 0 1.347.294 1.811.735 1.812-1.325 4.32-2.146 7.12-2.232l1.329-6.276a.513.513 0 0 1 .21-.296.521.521 0 0 1 .357-.063l4.361.926c.3-.644.952-1.057 1.663-1.052ZM7.917 18.052c-.13 0-.254.05-.347.14a.497.497 0 0 0 0 .696c1.264 1.263 3.728 1.37 4.444 1.37.716 0 3.16-.084 4.444-1.37a.545.545 0 0 0 .044-.695.498.498 0 0 0-.697 0c-.82.8-2.527 1.095-3.77 1.095-1.243 0-2.97-.294-3.77-1.095a.49.49 0 0 0-.348-.143v.002Zm-.051-5.989A1.88 1.88 0 0 0 5.99 13.94c0 1.031.842 1.873 1.876 1.873a1.878 1.878 0 0 0 1.873-1.874 1.878 1.878 0 0 0-1.873-1.875Zm8.254 0a1.878 1.878 0 0 0-1.873 1.876c0 1.031.842 1.873 1.875 1.873a1.878 1.878 0 0 0 1.875-1.874 1.88 1.88 0 0 0-1.877-1.875Z'/%3E%3C/svg%3E");
|
||||
}
|
||||
|
||||
.shareon > .telegram {
|
||||
background-color: #26a5e4;
|
||||
}
|
||||
.shareon > .telegram:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.888 3.551c.168-.003.54.039.781.235.162.14.264.335.288.547.026.156.06.514.033.793-.302 3.189-1.616 10.924-2.285 14.495-.282 1.512-.838 2.017-1.378 2.066-1.17.11-2.058-.773-3.192-1.515-1.774-1.165-2.777-1.889-4.5-3.025-1.99-1.31-.7-2.033.434-3.209.297-.309 5.455-5.002 5.556-5.427.012-.054.024-.252-.094-.356-.117-.104-.292-.069-.418-.04-.178.04-3.013 1.915-8.504 5.62-.806.554-1.534.823-2.187.806-.72-.013-2.104-.405-3.134-.739C1.025 13.39.022 13.174.11 12.476c.045-.363.546-.734 1.5-1.114 5.878-2.56 9.796-4.249 11.758-5.064 5.599-2.328 6.763-2.733 7.521-2.747Z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/reddit.svg");
|
||||
}
|
||||
|
||||
.shareon > .teams {
|
||||
background-color: #6264a7;
|
||||
}
|
||||
.shareon > .teams:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20.625 8.127q-.55 0-1.025-.205-.475-.205-.832-.563-.358-.357-.563-.832Q18 6.053 18 5.502q0-.54.205-1.02t.563-.837q.357-.358.832-.563.474-.205 1.025-.205.54 0 1.02.205t.837.563q.358.357.563.837.205.48.205 1.02 0 .55-.205 1.025-.205.475-.563.832-.357.358-.837.563-.48.205-1.02.205zm0-3.75q-.469 0-.797.328-.328.328-.328.797 0 .469.328.797.328.328.797.328.469 0 .797-.328.328-.328.328-.797 0-.469-.328-.797-.328-.328-.797-.328zM24 10.002v5.578q0 .774-.293 1.46-.293.685-.803 1.194-.51.51-1.195.803-.686.293-1.459.293-.445 0-.908-.105-.463-.106-.85-.329-.293.95-.855 1.729-.563.78-1.319 1.336-.756.557-1.67.861-.914.305-1.898.305-1.148 0-2.162-.398-1.014-.399-1.805-1.102-.79-.703-1.312-1.664t-.674-2.086h-5.8q-.411 0-.704-.293T0 16.881V6.873q0-.41.293-.703t.703-.293h8.59q-.34-.715-.34-1.5 0-.727.275-1.365.276-.639.75-1.114.475-.474 1.114-.75.638-.275 1.365-.275t1.365.275q.639.276 1.114.75.474.475.75 1.114.275.638.275 1.365t-.275 1.365q-.276.639-.75 1.113-.475.475-1.114.75-.638.276-1.365.276-.188 0-.375-.024-.188-.023-.375-.058v1.078h10.875q.469 0 .797.328.328.328.328.797zM12.75 2.373q-.41 0-.78.158-.368.158-.638.434-.27.275-.428.639-.158.363-.158.773 0 .41.158.78.159.368.428.638.27.27.639.428.369.158.779.158.41 0 .773-.158.364-.159.64-.428.274-.27.433-.639.158-.369.158-.779 0-.41-.158-.773-.159-.364-.434-.64-.275-.275-.639-.433-.363-.158-.773-.158zM6.937 9.814h2.25V7.94H2.814v1.875h2.25v6h1.875zm10.313 7.313v-6.75H12v6.504q0 .41-.293.703t-.703.293H8.309q.152.809.556 1.5.405.691.985 1.19.58.497 1.318.779.738.281 1.582.281.926 0 1.746-.352.82-.351 1.436-.966.615-.616.966-1.43.352-.815.352-1.752zm5.25-1.547v-5.203h-3.75v6.855q.305.305.691.452.387.146.809.146.469 0 .879-.176.41-.175.715-.48.304-.305.48-.715t.176-.879Z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/teams.svg");
|
||||
}
|
||||
|
||||
.shareon > .telegram {
|
||||
background-color: #26a5e4;
|
||||
}
|
||||
.shareon > .telegram:before {
|
||||
background-image: url("icons/telegram.svg");
|
||||
}
|
||||
|
||||
.shareon > .tumblr {
|
||||
background-color: #36465d;
|
||||
}
|
||||
.shareon > .tumblr:before {
|
||||
background-image: url("icons/tumblr.svg");
|
||||
}
|
||||
|
||||
.shareon > .twitter {
|
||||
background-color: #1da1f2;
|
||||
background-color: #1d9bf0;
|
||||
}
|
||||
.shareon > .twitter:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M23.953 4.57a10 10 0 0 1-2.825.775 4.958 4.958 0 0 0 2.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 0 0-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 0 0-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 0 1-2.228-.616v.06a4.923 4.923 0 0 0 3.946 4.827 4.996 4.996 0 0 1-2.212.085 4.936 4.936 0 0 0 4.604 3.417 9.867 9.867 0 0 1-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 0 0 7.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0 0 24 4.59z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/twitter.svg");
|
||||
}
|
||||
|
||||
.shareon > .viber {
|
||||
background-color: #7360f2;
|
||||
}
|
||||
.shareon > .viber:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.4 0C9.473.028 5.333.344 3.02 2.467 1.302 4.187.696 6.7.633 9.817.57 12.933.488 18.776 6.12 20.36h.003l-.004 2.416s-.037.977.61 1.177c.777.242 1.234-.5 1.98-1.302.407-.44.972-1.084 1.397-1.58 3.85.326 6.812-.416 7.15-.525.776-.252 5.176-.816 5.892-6.657.74-6.02-.36-9.83-2.34-11.546-.596-.55-3.006-2.3-8.375-2.323 0 0-.395-.025-1.037-.017zm.058 1.693c.545-.004.88.017.88.017 4.542.02 6.717 1.388 7.222 1.846 1.675 1.435 2.53 4.868 1.906 9.897v.002c-.604 4.878-4.174 5.184-4.832 5.395-.28.09-2.882.737-6.153.524 0 0-2.436 2.94-3.197 3.704-.12.12-.26.167-.352.144-.13-.033-.166-.188-.165-.414l.02-4.018c-4.762-1.32-4.485-6.292-4.43-8.895.054-2.604.543-4.738 1.996-6.173 1.96-1.773 5.474-2.018 7.11-2.03zm.38 2.602a.304.304 0 0 0-.004.607c1.624.01 2.946.537 4.028 1.592 1.073 1.046 1.62 2.468 1.633 4.334.002.167.14.3.307.3a.304.304 0 0 0 .3-.304c-.014-1.984-.618-3.596-1.816-4.764-1.19-1.16-2.692-1.753-4.447-1.765zm-3.96.695a.981.981 0 0 0-.616.117l-.01.002c-.43.247-.816.562-1.146.932-.002.004-.006.004-.008.008-.267.323-.42.638-.46.948a.596.596 0 0 0-.007.14c0 .136.022.27.065.4l.013.01c.135.48.473 1.276 1.205 2.604.42.768.903 1.5 1.446 2.186.27.344.56.673.87.984l.132.132c.31.308.64.6.984.87a15.524 15.524 0 0 0 2.186 1.447c1.328.733 2.126 1.07 2.604 1.206l.01.014a1.275 1.275 0 0 0 .54.055c.31-.036.627-.19.948-.46.004 0 .003-.002.008-.005.37-.33.683-.72.93-1.148l.003-.01c.225-.432.15-.842-.18-1.12-.004 0-.698-.58-1.037-.83-.36-.255-.73-.492-1.113-.71-.51-.285-1.032-.106-1.248.174l-.447.564c-.23.283-.657.246-.657.246-3.12-.796-3.955-3.955-3.955-3.955s-.037-.426.248-.656l.563-.448c.277-.215.456-.737.17-1.248a12.73 12.73 0 0 0-.71-1.115 28.35 28.35 0 0 0-.83-1.035.822.822 0 0 0-.502-.297zm4.49.88a.303.303 0 0 0-.018.606c1.16.085 2.017.466 2.645 1.15.63.688.93 1.524.906 2.57a.306.306 0 0 0 .61.013c.025-1.175-.334-2.193-1.067-2.994-.74-.81-1.777-1.253-3.05-1.346h-.024zm.463 1.63a.305.305 0 0 0-.3.287c-.008.167.12.31.288.32.523.028.875.175 1.113.422.24.245.388.62.416 1.164a.304.304 0 0 0 .605-.03c-.03-.644-.215-1.178-.58-1.557-.367-.378-.893-.574-1.52-.607h-.018z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/viber.svg");
|
||||
}
|
||||
|
||||
.shareon > .vkontakte {
|
||||
background-color: #0077ff;
|
||||
}
|
||||
.shareon > .vkontakte:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.199 4.841H.11c.194 9.312 4.85 14.907 13.012 14.907h.462v-5.327c3 .299 5.268 2.492 6.178 5.327H24c-1.164-4.237-4.223-6.58-6.133-7.475 1.91-1.105 4.596-3.79 5.238-7.432h-3.85c-.836 2.955-3.313 5.641-5.67 5.895V4.84h-3.85v10.326C7.347 14.57 4.333 11.675 4.199 4.84Z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/vkontakte.svg");
|
||||
}
|
||||
|
||||
.shareon > .web-share:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23fff' stroke-width='2'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.59 13.51l6.83 3.98m-.01-10.98l-6.82 3.98'/%3E%3C/g%3E%3C/svg%3E");
|
||||
background-image: url("icons/web-share.svg");
|
||||
}
|
||||
|
||||
.shareon > .whatsapp {
|
||||
background-color: #25d366;
|
||||
}
|
||||
.shareon > .whatsapp:before {
|
||||
background-image: url("data:image/svg+xml,%3Csvg fill='%23fff' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51a12.8 12.8 0 0 0-.57-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 0 1-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 0 1-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 0 1 2.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0 0 12.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 0 0 5.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 0 0-3.48-8.413Z'/%3E%3C/svg%3E");
|
||||
background-image: url("icons/whatsapp.svg");
|
||||
}
|
||||
|
|
|
@ -13,11 +13,14 @@ import "./shareon.css";
|
|||
* media?: string,
|
||||
* text?: string,
|
||||
* via?: string,
|
||||
* fbAppId?: string
|
||||
* fbAppId?: string,
|
||||
* s2fInstance?: string,
|
||||
* }) => string}}
|
||||
*/
|
||||
const urlBuilderMap = {
|
||||
facebook: (d) => `https://www.facebook.com/sharer/sharer.php?u=${d.url}${d.hashtags? `&hashtag=%23${d.hashtags.split('%2C')[0]}` : ''}`,
|
||||
facebook: (d) => `https://www.facebook.com/sharer/sharer.php?u=${d.url}${d.hashtags ? `&hashtag=%23${d.hashtags.split('%2C')[0]}` : ''}`,
|
||||
fediverse: (d) => `https://${d.s2fInstance}/?text=${d.title}%0D%0A${d.url}${d.text ? `%0D%0A%0D%0A${d.text}` : ''}${d.via ? `%0D%0A%0D%0A${d.via}` : ''}`,
|
||||
email: (d) => `mailto:?subject=${d.title}&body=${d.url}`,
|
||||
linkedin: (d) => `https://www.linkedin.com/sharing/share-offsite/?url=${d.url}`,
|
||||
mastodon: (d) => `https://toot.kytta.dev/?text=${d.title}%0D%0A${d.url}${d.text ? `%0D%0A%0D%0A${d.text}` : ''}${d.via ? `%0D%0A%0D%0A${d.via}` : ''}`,
|
||||
messenger: (d) => `https://www.facebook.com/dialog/send?app_id=${d.fbAppId}&link=${d.url}&redirect_uri=${d.url}`,
|
||||
|
@ -27,7 +30,8 @@ const urlBuilderMap = {
|
|||
reddit: (d) => `https://www.reddit.com/submit?title=${d.title}&url=${d.url}`,
|
||||
teams: (d) => `https://teams.microsoft.com/share?href=${d.url}${d.text ? `&msgText=${d.text}` : ''}`,
|
||||
telegram: (d) => `https://telegram.me/share/url?url=${d.url}${d.text ? `&text=${d.text}` : ''}`,
|
||||
twitter: (d) => `https://twitter.com/intent/tweet?url=${d.url}&text=${d.title}${d.via ? `&via=${d.via}` : ''}${d.hashtags? `&hashtags=${d.hashtags}` : ''}`,
|
||||
tumblr: (d) => `https://www.tumblr.com/widgets/share/tool?posttype=link${d.hashtags ? `&tags=${d.hashtags}` : ''}&title=${d.title}&content=${d.url}&canonicalUrl=${d.url}${d.text ? `&caption=${d.text}` : ''}${d.via ? `&show-via=${d.via}` : ''}`,
|
||||
twitter: (d) => `https://twitter.com/intent/tweet?url=${d.url}&text=${d.title}${d.via ? `&via=${d.via}` : ''}${d.hashtags ? `&hashtags=${d.hashtags}` : ''}`,
|
||||
viber: (d) => `viber://forward?text=${d.title}%0D%0A${d.url}${d.text ? `%0D%0A%0D%0A${d.text}` : ''}`,
|
||||
vkontakte: (d) => `https://vk.com/share.php?url=${d.url}&title=${d.title}${d.media ? `&image=${d.media}` : ''}`,
|
||||
whatsapp: (d) => `https://wa.me/?text=${d.title}%0D%0A${d.url}${d.text ? `%0D%0A%0D%0A${d.text}` : ''}`,
|
||||
|
@ -66,6 +70,13 @@ const init = () => {
|
|||
});
|
||||
}
|
||||
|
||||
// if it's "Print"
|
||||
if (cls === "print") {
|
||||
child.addEventListener("click", () => {
|
||||
window.print();
|
||||
});
|
||||
}
|
||||
|
||||
// if it's "Web Share"
|
||||
if (cls === "web-share") {
|
||||
const data = {
|
||||
|
@ -117,6 +128,11 @@ const init = () => {
|
|||
fbAppId: encodeURIComponent(
|
||||
child.dataset.fbAppId || container.dataset.fbAppId || "",
|
||||
),
|
||||
s2fInstance: encodeURIComponent(
|
||||
child.dataset.s2fInstance ||
|
||||
container.dataset.s2fInstance ||
|
||||
"s2f.kytta.dev",
|
||||
),
|
||||
};
|
||||
const url = urlBuilderMap[cls](preset);
|
||||
|
||||
|
|
|
@ -0,0 +1,92 @@
|
|||
/*!
|
||||
* SVGO configuration from simple-icons, modified.
|
||||
*
|
||||
* See: https://github.com/simple-icons/simple-icons/blob/4e36921e759278e83f2e6775e0fb78ba76131eec/svgo.config.mjs
|
||||
*/
|
||||
|
||||
export default {
|
||||
multipass: true,
|
||||
eol: "lf",
|
||||
plugins: [
|
||||
"cleanupAttrs",
|
||||
"mergeStyles",
|
||||
"minifyStyles",
|
||||
"inlineStyles",
|
||||
"removeDoctype",
|
||||
"removeXMLProcInst",
|
||||
"removeComments",
|
||||
"removeMetadata",
|
||||
"removeDesc",
|
||||
"removeUselessDefs",
|
||||
"removeEditorsNSData",
|
||||
"removeEmptyAttrs",
|
||||
"removeHiddenElems",
|
||||
"removeEmptyText",
|
||||
"removeEmptyContainers",
|
||||
"convertStyleToAttrs",
|
||||
"convertColors",
|
||||
"cleanupEnableBackground",
|
||||
{
|
||||
name: "convertPathData",
|
||||
params: {
|
||||
// 3 decimals of precision in floating point numbers
|
||||
floatPrecision: 3,
|
||||
},
|
||||
},
|
||||
"convertTransform",
|
||||
{
|
||||
name: "removeUnknownsAndDefaults",
|
||||
},
|
||||
"removeUselessStrokeAndFill",
|
||||
"removeNonInheritableGroupAttrs",
|
||||
"removeUnusedNS",
|
||||
"cleanupIds",
|
||||
"cleanupNumericValues",
|
||||
"cleanupListOfValues",
|
||||
"collapseGroups",
|
||||
"removeRasterImages",
|
||||
{
|
||||
// Compound all <path>s into one
|
||||
name: "mergePaths",
|
||||
params: {
|
||||
force: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
// Convert basic shapes (such as <circle>) to <path>
|
||||
name: "convertShapeToPath",
|
||||
params: {
|
||||
// including <arc>
|
||||
convertArcs: true,
|
||||
},
|
||||
},
|
||||
"convertEllipseToCircle",
|
||||
{
|
||||
// Sort the attributes on the <svg> tag
|
||||
name: "sortAttrs",
|
||||
params: {
|
||||
order: ["fill", "stroke", "viewBox"],
|
||||
xmlnsOrder: "end",
|
||||
},
|
||||
},
|
||||
"sortDefsChildren",
|
||||
"removeDimensions",
|
||||
|
||||
{
|
||||
name: "removeAttrs",
|
||||
params: {
|
||||
attrs: ["svg:(?!(role|xmlns))", "path:(?!d)"],
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "addAttributesToSVGElement",
|
||||
params: {
|
||||
attributes: [{ xmlns: "http://www.w3.org/2000/svg" }],
|
||||
},
|
||||
},
|
||||
"removeOffCanvasPaths",
|
||||
"removeStyleElement",
|
||||
"removeScriptElement",
|
||||
"removeTitle",
|
||||
],
|
||||
};
|