forked from Chaospott/site
activated pagination
This commit is contained in:
parent
adfe912a50
commit
1e27c99dd1
@ -10,3 +10,5 @@ url: "https://chaospott.de"
|
||||
markdown: kramdown
|
||||
permalink: /:year/:month/:day/:title
|
||||
paginate: 5
|
||||
gems: [jekyll-paginate]
|
||||
paginate_path: "/blog/:num"
|
||||
|
@ -16,7 +16,7 @@
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="divider-vertical"></li>
|
||||
<li><a href="/blog.html">Logbuch</a></li>
|
||||
<li><a href="/blog/">Logbuch</a></li>
|
||||
<li class="divider-vertical"></li>
|
||||
<li><a href="/#about">Über uns</a></li>
|
||||
<li class="divider-vertical"></li>
|
||||
|
61
blog/index.html
Normal file
61
blog/index.html
Normal file
@ -0,0 +1,61 @@
|
||||
---
|
||||
layout: default
|
||||
---
|
||||
<script src="js/elevator.js"></script>
|
||||
{% for post in paginator.posts %}
|
||||
{% if forloop.first == false %}
|
||||
<hr>
|
||||
{% endif %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-12 post">
|
||||
|
||||
<header class="post-header">
|
||||
<h2 class="post-title">
|
||||
<a href="{{ post.url | prepend: site.baseurl }}">
|
||||
{{ post.title }}
|
||||
</a>
|
||||
</h2>
|
||||
<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">
|
||||
> Weiterlesen
|
||||
</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="elevator-button{{ forloop.index0 }}" class="elevator-button"><i class="fa fa-arrow-up"></i></div>
|
||||
|
||||
|
||||
<script>
|
||||
// unfortunately elevator does not support a list of elements yet, hotfix for now, should be removed asap
|
||||
// Elevator script: https://github.com/tholman/elevator.js
|
||||
var elevator{{ forloop.index0 }} = new Elevator({
|
||||
element: document.querySelector('#elevator-button{{ forloop.index0 }}'),
|
||||
mainAudio: '/media/elevator-music.mp3', // Music from http://www.bensound.com/
|
||||
endAudio: '/media/ding.mp3', // Music from http://www.bensound.com/
|
||||
duration: {{ forloop.index | times: 500 }}
|
||||
});
|
||||
</script>
|
||||
{% endfor %}
|
||||
|
||||
<div class="page-navigation" style="text-align:center">
|
||||
{% if paginator.previous_page %}
|
||||
<a href="{{ paginator.previous_page_path }}">Zurück</a>
|
||||
{% endif %}
|
||||
| Seite {{ paginator.page }} von {{ paginator.total_pages }} |
|
||||
{% if paginator.next_page %}
|
||||
<a href="{{ paginator.next_page_path }}">Vor</a>
|
||||
{% endif %}
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user