-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.html
88 lines (87 loc) · 2.52 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Emfed: Mastodon Feed Embedding</title>
<link rel="stylesheet" type="text/css" href="toots.css">
<style>
body {
font-family: sans-serif;
display: flex;
align-items: stretch;
justify-content: space-around;
}
@media (max-width: 900px) {
body {
flex-direction: column;
align-items: center;
}
main {
width: 100%;
}
}
main {
max-width: 530px;
}
aside {
max-width: 400px;
}
.big {
font-size: 140%;
}
main pre {
overflow-x: auto;
}
h1 a {
text-decoration: none;
color: inherit;
}
h1 a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<main>
<h1><a href="https://github.com/sampsyo/emfed">Emfed</a></h1>
<p class="big">Twitter used to have a really convenient way to embed a
feed into your website, but now Twitter is dead.</p>
<p><a href="https://github.com/sampsyo/emfed">Emfed</a> is a simple,
in-browser way to embed
<a href="https://joinmastodon.org">Mastodon</a>
feeds into webpages.
To make a feed like the one on this page, you use simple markup like
this:</p>
<pre><a class="mastodon-feed"
href="https://mastodon.social/@Mastodon"
data-toot-limit="4"
>follow me into the Fediverse</a></pre>
<p>Then include the JavaScript:</p>
<pre><script type="module" src="https://esm.sh/emfed@1"></script></pre>
<p>Optionally, consider adding the stylesheet (or otherwise just style
it yourself, however you like):</p>
<pre><link rel="stylesheet" type="text/css"
href="https://esm.sh/emfed@1/toots.css"></pre>
<p>Alternatively, you can embed a single post along with its replies:</p>
<pre><a class="mastodon-thread"
href="https://mastodon.social/@Mastodon"
data-toot-id="112011697087209298"
>Single toot and its replies</a></pre>
<p>One place you can see Emfed in action is at the
<a href="https://beets.io">beets project</a>.
The <a href="https://github.com/sampsyo/emfed">code</a> is
<a href="https://unlicense.org">dedicated to the public domain</a>.
For more details, check out the
<a href="https://github.com/sampsyo/emfed">README</a>.</p>
</main>
<aside>
<a class="mastodon-feed"
href="https://mastodon.social/@Mastodon"
data-toot-limit="4"
data-toot-account-id="13179"
>@Mastodon@mastodon.social</a>
</aside>
<script type="module" src="emfed.js"></script>
</body>
</html>