Use the demo site as the default hosting for all files.

This commit is contained in:
Stefan Bohacek 2024-05-17 19:51:26 -04:00
parent eaf9c50140
commit ec8d12cdb3
No known key found for this signature in database
GPG key ID: FC75CD588A42BC10
2 changed files with 7 additions and 17 deletions

View file

@ -15,17 +15,7 @@ You can see a demo at [fediverse-share-button.stefanbohacek.dev](https://fediver
## How to use ## How to use
1. Download the files in this repo. Add the following snippet to where you want your sharing button to show up:
2. Add the JavaScript code and CSS stylesheet to your page.
```html
<link rel="stylesheet" href="./fediverse-share-button/styles.min.css">
<script src="./fediverse-share-button/script.min.js" defer class="fsb-script"></script>
```
Note that if you need to change where the `fediverse-share-button` folder is uploaded, you will also have to change the JS and CSS paths above, and also the path of the initial Mastodon logo below.
3. Add a sharing prompt to your page.
```html ```html
<form class="fsb-prompt"> <form class="fsb-prompt">
@ -47,8 +37,12 @@ Note that if you need to change where the `fediverse-share-button` folder is upl
target="_blank" target="_blank"
href=""></a>.</p> href=""></a>.</p>
</form> </form>
<link rel="stylesheet" href="https://fediverse-share-button.stefanbohacek.dev/fediverse-share-button/styles.min.css">
<script src="https://fediverse-share-button.stefanbohacek.dev/fediverse-share-button/script.min.js" defer class="fsb-script"></script>
``` ```
Alternatively, you can download the code from this repo and host all the JS, CSS, and image files yourself.
## FAQ ## FAQ
**Q: How does this work?** **Q: How does this work?**

View file

@ -9,8 +9,7 @@
<meta name="description" <meta name="description"
content="One of the current objections to Communism, and Socialism altogether, is that the idea is so old, and yet it has content="One of the current objections to Communism, and Socialism altogether, is that the idea is so old, and yet it has
never been realized."> never been realized.">
<link rel="stylesheet" <link rel="stylesheet" href="https://fediverse-share-button.stefanbohacek.dev/fediverse-share-button/styles.min.css">
href="./fediverse-share-button/styles.min.css">
<style> <style>
body { body {
padding: 20px 24px; padding: 20px 24px;
@ -89,10 +88,7 @@
target="_blank" target="_blank"
href=""></a>.</p> href=""></a>.</p>
</form> </form>
<script class="fsb-script" <script src="https://fediverse-share-button.stefanbohacek.dev/fediverse-share-button/script.min.js" defer class="fsb-script"></script>
src="./fediverse-share-button/script.min.js"
defer>
</script>
</body> </body>
</html> </html>