Skip to content

Commit c066bdc

Browse files
committed
Replace Twitter feed with Mastodon
See jruby/jruby#8313
1 parent b6cd424 commit c066bdc

File tree

3 files changed

+34
-11
lines changed

3 files changed

+34
-11
lines changed

_layouts/home.html

+20-7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{% include head.html %}
55
<meta name="description" content="JRuby is a high performance, stable, fully threaded Java implementation of the Ruby programming language." />
66
<link href="/stylesheets/carousel.css" media="screen" rel="stylesheet" type="text/css" />
7+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@idotj/[email protected]/dist/mastodon-timeline.min.css" integrity="sha256-1UGgxsonaMCfOEnVOL89aMKSo3GEAmaRP0ISbsWa6lU=" crossorigin="anonymous" />
78
</head>
89
<body class="home">
910
{% include menu.html %}
@@ -36,16 +37,28 @@ <h4>InfoWorld 2010 Bossie Awards: Best of Open Source Software</h4></a>
3637
</ul>
3738
</div>
3839

39-
<div id="twitter" class="halfColumn">
40+
<div id="mastodon" class="halfColumn">
4041
<div style="clear:both; padding-top: 1.2em;"></div>
4142

42-
<a href="https://twitter.com/jruby" id="twitter-link" class="right">Follow us on Twitter</a>
43-
<h2>Recent Tweets <a href="https://twitter.com/jruby"><img src="/images/twitter_bird.png"/></a></h2>
44-
<div id="twitter_div">
45-
<h2 style="display: none;" ></h2>
46-
<a class="twitter-timeline" data-dnt="true" href="https://twitter.com/jruby" data-widget-id="316675942686793728">Tweets by @jruby</a>
47-
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
43+
<h2>Recent Toots <a href="https://ruby.social/@JRuby"><img src="/images/mastodon-logo-purple.svg" width="20" height="20" /></a></h2>
44+
45+
<div id="mt-container" class="mt-container">
46+
<div class="mt-body" role="feed">
47+
<div class="mt-loading-spinner"></div>
48+
</div>
4849
</div>
50+
51+
<script src="https://cdn.jsdelivr.net/npm/@idotj/[email protected]/dist/mastodon-timeline.umd.js" integrity="sha256-E6WPG6iq+qQIzvu3HPJJxoAeRdum5siq13x4ITjyxu8=" crossorigin="anonymous"></script>
52+
<script>
53+
const myTimeline = new MastodonTimeline.Init({
54+
instanceUrl: "https://ruby.social",
55+
timelineType: "profile",
56+
userId: "109306378143906411",
57+
profileName: "@jruby",
58+
maxNbPostShow: 1,
59+
hideCounterBar: true
60+
});
61+
</script>
4962
</div>
5063
</div>
5164
<div style="padding: 2em">

images/mastodon-logo-purple.svg

+10
Loading

stylesheets/main.css

+4-4
Original file line numberDiff line numberDiff line change
@@ -326,19 +326,19 @@ a:hover, a:active {
326326
#latest h3 + p {
327327
margin-top: 0;
328328
}
329-
#twitter ul {
329+
#mastodon ul {
330330
list-style: none;
331331
padding: 0;
332332
}
333-
#twitter li {
333+
#mastodon li {
334334
margin-bottom: 1.25em;
335335
}
336-
#twitter #twitter-link {
336+
#mastodon #mastodon-link {
337337
margin-top: 6px;
338338
font-size: 12px;
339339
text-transform: uppercase;
340340
}
341-
#twitter span {
341+
#mastodon span {
342342
display: block;
343343
}
344344
#white {

0 commit comments

Comments
 (0)