mirror of
https://github.com/arcan1s/arcanis.me.git
synced 2025-07-04 01:15:46 +00:00
removed jekyll's paginations
First, it supports only one page path, so /ru/blog and /blog will have different view. But there is a plugin jekyll-paginator, but it seems doesn't work and github doesn't support an additional plugins. Second, paginator doesn't work correctly with pages with different tags (e.g. en and ru).
This commit is contained in:
19
blog/archive.html
Normal file
19
blog/archive.html
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
layout: default
|
||||
title: Archive
|
||||
comment: false
|
||||
share: false
|
||||
back: 2
|
||||
---
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<header>
|
||||
<h1>{{ page.title }}</h1>
|
||||
</header>
|
||||
<section>
|
||||
|
||||
{% for post in site.categories.en %}
|
||||
<p align="justify"><i>{{ post.date | date_to_string}}</i> » <a name="{{ post.short }}" class="anchor" href="#{{ post.short }}"><span class="octicon octicon-link"></span></a><a href="{{ post.url }}">{{ post.title }}</a> ({{ post.tags }})</p>
|
||||
{% endfor %}
|
||||
|
||||
<script type="text/javascript" src="http://datejs.googlecode.com/svn/trunk/build/date-en-US.js"></script>
|
@ -9,38 +9,15 @@ back: 1
|
||||
<div class="wrapper">
|
||||
<header>
|
||||
<h1>{{ page.title }}</h1>
|
||||
<h3><a name="archive" class="anchor" href="#archive"><span class="octicon octicon-link"></span></a><a href="/blog/archive">Archive</a></h3>
|
||||
</header>
|
||||
<section>
|
||||
|
||||
{% for post in paginator.posts %}
|
||||
<h1><a name="{{ post.short }}" class="anchor" href="#{{ post.short }}"><span class="octicon octicon-link"></span></a><a href="{{ post.url }}">{{ post.title }}</a></h1>
|
||||
<p align="justify"><i>{{ post.date | date_to_string}}</i></p>
|
||||
<p align="justify">{{ post.description }}</p>
|
||||
<p align="justify"><b>Tags</b>: {{ post.tags }}</p>
|
||||
{% for post in site.categories.en limit:10 %}
|
||||
<h1><a name="{{ post.short }}" class="anchor" href="#{{ post.short }}"><span class="octicon octicon-link"></span></a><a href="{{ post.url }}">{{ post.title }}</a></h1>
|
||||
<p align="justify"><i>{{ post.date | date_to_string}}</i></p>
|
||||
<p align="justify">{{ post.description }}</p>
|
||||
<p align="justify"><b>Tags</b>: {{ post.tags }}</p>
|
||||
{% endfor %}
|
||||
|
||||
{% if paginator.total_pages > 1 %}
|
||||
{% if paginator.previous_page %}
|
||||
<a href="{{ paginator.previous_page_path }}">« Prev</a>
|
||||
{% else %}
|
||||
<span>« Prev</span>
|
||||
{% endif %}
|
||||
|
||||
{% for page in (1..paginator.total_pages) %}
|
||||
{% if page == paginator.page %}
|
||||
<em>{{ page }}</em>
|
||||
{% elsif page == 1 %}
|
||||
<a href="{{ '/blog' }}">{{ page }}</a>
|
||||
{% else %}
|
||||
<a href="{{ site.paginate_path | replace: ':num', page }}">{{ page }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if paginator.next_page %}
|
||||
<a href="{{ paginator.next_page_path }}">Next »</a>
|
||||
{% else %}
|
||||
<span>Next »</span>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<script type="text/javascript" src="http://datejs.googlecode.com/svn/trunk/build/date-en-US.js"></script>
|
||||
|
Reference in New Issue
Block a user