+ mastodon timeline

This commit is contained in:
nicobo 2018-10-22 02:24:08 +02:00
parent dca1e0e86e
commit 89316ac24e
4 changed files with 35 additions and 1 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "assets/mastodon-timeline-widget"]
path = assets/mastodon-timeline-widget
url = https://github.com/AzetJP/mastodon-timeline-widget.git

View file

@ -83,6 +83,8 @@
<meta itemprop="description" content="{{ page_description }}">
<meta itemprop="image" content="{{ page_image }}">
<link rel="stylesheet" href="/assets/mastodon-timeline-widget/mastodon.widget.css">
<!-- rel prev and next -->
{% if paginator.previous_page %}
<link rel="prev" href="{{ paginator.previous_page_path | prepend: site.baseurl | prepend: site.url }}">
@ -95,9 +97,34 @@
<!-- Canonical link tag -->
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
{% feed_meta %}
<!-- Mastodon toots -->
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script type="text/javascript" src="/assets/mastodon-timeline-widget/mastodon.widget.js"></script>
<script>
$(document).ready(function() {
// jQUERY is required!
var mapi = new MastodonApi({
target_selector : '#myTimeline'
,instance_uri : '{{ site.author.mastodon }}'
,access_token : '84e7ac154c450bc9d0d68e52d94171556af38423e2eed4357dead21532fe30e1'
,account_id : '566645'
// === optional parameters ===
//,toots_limit : 5
// samples below require http://fontawesome.io
//,pic_icon : '<i class="fa fa-picture-o"></i>'
//,boosts_count_icon : '<i class="fa fa-retweet"></i>'
//,favourites_count_icon : '<i class="fa fa-star"></i>'
});
});
</script>
<script type="text/javascript">
var disqus_shortname = '{{ site.disqus_shortname }}';
</script>
</head>

@ -0,0 +1 @@
Subproject commit 389ecae923bb799f1e95e6234d9a5bea9be0f444

View file

@ -21,4 +21,7 @@ title: Home
<div class="container">
{% include pagination.html %}
</div>
<div id="myTimeline" class="mastodon-timeline mastodon-timeline-light"></div>
</section>