mirror of
https://github.com/mbirth/wiki.git
synced 2024-11-09 13:16:45 +00:00
Optimise paging output. Remove test search page.
This commit is contained in:
parent
58f795722b
commit
2059e6bf2a
12
index.html
12
index.html
@ -2,7 +2,7 @@
|
|||||||
title: Welcome to the Wiki
|
title: Welcome to the Wiki
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
<h3>Welcome to GitHub Pages.</h3>
|
<h3>Latest posts:</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for post in paginator.posts %}
|
{% for post in paginator.posts %}
|
||||||
@ -13,7 +13,7 @@ layout: default
|
|||||||
{% if paginator.total_pages > 1 %}
|
{% if paginator.total_pages > 1 %}
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
{% if paginator.previous_page %}
|
{% if paginator.previous_page %}
|
||||||
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« Newer</a>
|
<a href="{{ paginator.previous_page_path | prepend: site.url | replace: '//', '/' }}">« Newer</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span>« Newer</span>
|
<span>« Newer</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -22,20 +22,21 @@ layout: default
|
|||||||
{% if page == paginator.page %}
|
{% if page == paginator.page %}
|
||||||
<em>{{ page }}</em>
|
<em>{{ page }}</em>
|
||||||
{% elsif page == 1 %}
|
{% elsif page == 1 %}
|
||||||
<a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
|
<a href="{{ '/index.html' | prepend: site.url | replace: '//', '/' }}">{{ page }}</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
|
<a href="{{ site.paginate_path | prepend: site.url | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% if paginator.next_page %}
|
{% if paginator.next_page %}
|
||||||
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Older »</a>
|
<a href="{{ paginator.next_page_path | prepend: site.url | replace: '//', '/' }}">Older »</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span>Older »</span>
|
<span>Older »</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% comment %}
|
||||||
All posts:
|
All posts:
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
@ -56,3 +57,4 @@ Categories:
|
|||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endcomment %}
|
||||||
|
17
search.html
17
search.html
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
title: Search
|
|
||||||
---
|
|
||||||
<script>
|
|
||||||
(function() {
|
|
||||||
var cx = '005859900804634181508:3bt_l7jyk2e';
|
|
||||||
var gcse = document.createElement('script');
|
|
||||||
gcse.type = 'text/javascript';
|
|
||||||
gcse.async = true;
|
|
||||||
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
|
|
||||||
'//www.google.com/cse/cse.js?cx=' + cx;
|
|
||||||
var s = document.getElementsByTagName('script')[0];
|
|
||||||
s.parentNode.insertBefore(gcse, s);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<gcse:search></gcse:search>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user