site/blog.html
melf1 ed63db3dfc Added elevator.js to the weblog.
Nachdem eyecandy.js bereits positive Resonanz hervorgerufen hat, wird nun mit elevator.js ein weiterer Vorstoß gewagt.
2015-04-22 21:31:39 +02:00

43 lines
1.3 KiB
HTML

---
layout: default
---
{% for post in site.posts %}
{% if forloop.first == false %}
<hr>
{% endif %}
<div class="container">
<div class="row">
<div class="col-md-12 post">
<header class="post-header">
<h1 class="post-title">{{ post.title }}</h1>
<p class="post-meta">{{ post.date | date: "%b %-d, %Y" }}{% if post.author %} • {{ post.author }}{% endif %}{% if post.meta %} • {{ post.meta }}{% endif %}</p>
</header>
<article class="post-content">
{{post.content}}
{% assign wordcount = post.content | number_of_words %}
{% if wordcount > 200 %}
<p><a class="btn btn-default" href="{{ post.url | prepend: site.baseurl }}" role="button">&gt; Weiterlesen</a></p>
{% endif %}
</article>
</div>
</div>
</div>
{% endfor %}
<div class="elevator-button" style="text-align: center; margin: auto; cursor: pointer;">Back to Top</div>
<script src="js/elevator.min.js"></script>
<script>
// Elevator script: https://github.com/tholman/elevator.js
window.onload = function() {
var elevator = new Elevator({
element: document.querySelector('.elevator-button'),
mainAudio: '/media/elevator-music.mp3', // Music from http://www.bensound.com/
endAudio: '/media/ding.mp3', // Music from http://www.bensound.com/
duration: 20000 // milliseconds
});
}
</script>