-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add json-based feed & post embedding * feat(docs): prep for docs site * feat(docs): add deploy action, update package.json * feat(docs): add docs dir * feat(docs): move to simple deployment * feat(docs): fix script url * feat(docs): rebuild/deploy * feat(docs): update page
- Loading branch information
Showing
10 changed files
with
1,843 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/node_modules | ||
.parcel-cache | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Embed The Fed</title><link rel="stylesheet" href="https://unpkg.com/mvp.css"><style>details{border:1px solid #000;padding:1rem}fed-embed:where(:defined):where(:not(.styled)){background:#0000000d;margin-top:1rem;padding:0 1rem}</style></head><body> <main> <h1>Embed The Fed</h1> <p>All it takes is a single javascript file & one new element in your markup to embed any fediverse feed you want!</p> <code><script src="https://cdn.jsdelivr.net/gh/andy-blum/fed-embed/dist/fed-embed.min.js"><script></code> <hr> <h2>Get all posts by a user</h2> <code><fed-embed data-user="https://mastodon.social/@mastodon"></fed-embed></code> <details> <summary>Demo</summary> <fed-embed data-user="https://mastodon.social/@mastodon"></fed-embed> </details> <hr> <h2>Get a single post</h2> <code><fed-embed data-post="https://mastodon.social/@Mastodon/5258563"></fed-embed></code> <details> <summary>Demo</summary> <fed-embed data-post="https://mastodon.social/@Mastodon/5258563"></fed-embed> </details> <hr> <h2>Style it however you want</h2> <code style="white-space:break-spaces"> fed-embed.styled { border: 10px dashed orange; background: darkviolet; color: white; text-transform: uppercase; font-weight: bolder; } <fed-embed class="styled" data-post="https://mastodon.social/@Mastodon/5258563"></fed-embed> </code> <details> <summary>Demo</summary> <style>fed-embed.styled{color:#fff;text-transform:uppercase;background:#9400d3;border:10px dashed orange;font-weight:bolder}</style> <fed-embed class="styled" data-post="https://mastodon.social/@Mastodon/5258563"></fed-embed> </details> </main> <script src="index.08d28b45.js"></script> </body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Embed The Fed</title> | ||
<link rel="stylesheet" href="https://unpkg.com/mvp.css"> | ||
<style> | ||
details { | ||
border: 1px solid black; | ||
padding: 1rem; | ||
} | ||
|
||
fed-embed:where(:defined):where(:not(.styled)) { | ||
padding: 0 1rem; | ||
margin-top: 1rem; | ||
background: rgba(0,0,0,0.05); | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<main> | ||
<h1>Embed The Fed</h1> | ||
<p>All it takes is a single javascript file & one new element in your markup to embed any fediverse feed you want!</p> | ||
<code><script src="https://cdn.jsdelivr.net/gh/andy-blum/fed-embed/dist/fed-embed.min.js"><script></code> | ||
|
||
<hr> | ||
<h2>Get all posts by a user</h2> | ||
<code><fed-embed data-user="https://mastodon.social/@mastodon"></fed-embed></code> | ||
|
||
<details> | ||
<summary>Demo</summary> | ||
<fed-embed data-user="https://mastodon.social/@mastodon"></fed-embed> | ||
</details> | ||
|
||
<hr> | ||
|
||
<h2>Get a single post</h2> | ||
|
||
<code><fed-embed data-post="https://mastodon.social/@Mastodon/5258563"></fed-embed></code> | ||
|
||
<details> | ||
<summary>Demo</summary> | ||
<fed-embed data-post="https://mastodon.social/@Mastodon/5258563"></fed-embed> | ||
</details> | ||
|
||
<hr> | ||
|
||
<h2>Style it however you want</h2> | ||
|
||
<code style="white-space:break-spaces;"> | ||
fed-embed.styled { | ||
border: 10px dashed orange; | ||
background: darkviolet; | ||
color: white; | ||
text-transform: uppercase; | ||
font-weight: bolder; | ||
} | ||
|
||
<fed-embed class="styled" data-post="https://mastodon.social/@Mastodon/5258563"></fed-embed> | ||
</code> | ||
|
||
<details> | ||
<summary>Demo</summary> | ||
<style> | ||
fed-embed.styled { | ||
border: 10px dashed orange; | ||
background: darkviolet; | ||
color: white; | ||
text-transform: uppercase; | ||
font-weight: bolder; | ||
} | ||
</style> | ||
<fed-embed class="styled" data-post="https://mastodon.social/@Mastodon/5258563"></fed-embed> | ||
</details> | ||
</main> | ||
<script src="./dist/fed-embed.min.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
{ | ||
"name": "rss-feed", | ||
"name": "fed-embed", | ||
"version": "1.0.0", | ||
"description": "A standalone web component you can use to embed an RSS feed on a webpage.", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"jsmin": "^1.0.1", | ||
"parcel": "^2.9.3", | ||
"typescript": "^5.1.6" | ||
}, | ||
"scripts": { | ||
"start": "yarn tsc && node build.mjs" | ||
"build": "yarn tsc && node build.mjs", | ||
"dev": "parcel index.html --dist-dir './test' --no-source-maps", | ||
"deploy": "parcel build index.html --dist-dir './docs' --no-source-maps --public-url ./" | ||
} | ||
} |
Oops, something went wrong.