Tag and pagination support
Bug fix: don’t include js for share buttons if not in the post page.
This commit is contained in:
parent
ddce0d9ede
commit
b80d292d41
20 changed files with 319 additions and 88 deletions
|
|
@ -11,12 +11,30 @@
|
|||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
|
||||
{{ page.content | markdownify }}
|
||||
{{ page.content | markdownify }}
|
||||
|
||||
{% for post in site.posts %}
|
||||
<h4 align="left"><strong>{{ post.date | date_to_string }}</strong> <small>. {{ post.category }} .</small> <a href="{{ post.url }}"> <strong>{{ post.title }} </a> </strong> <small><a href="{{ post.url }}#disqus_thread">Comments</a></small></h4>
|
||||
{% endfor %}
|
||||
{% for post in paginator.posts %}
|
||||
<h4 align="left"><strong>{{ post.date | date_to_string }}</strong> <small>. {{ post.category }} .</small> <a href="{{ post.url }}"> <strong>{{ post.title }} </strong> </a> <small><a href="{{ post.url }}#disqus_thread">Comments</a></small></h4>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Pagination links -->
|
||||
<div class="pagination">
|
||||
|
||||
{% if paginator.previous_page and paginator.next_page%}
|
||||
<h4>
|
||||
<a href="{{ paginator.previous_page_path }}" class="previous">Newer Posts</a> <a href="{{ paginator.next_page_path }}" class="next">Older Posts</a>
|
||||
</h4>
|
||||
{% endif %}
|
||||
|
||||
{% if paginator.previous_page %}
|
||||
<h4><a href="{{ paginator.previous_page_path }}" class="previous">Newer Posts</a></h4>
|
||||
{% endif %}
|
||||
|
||||
{% if paginator.next_page %}
|
||||
<h4><a href="{{ paginator.next_page_path }}" class="next">Older Posts</a></h4>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
@ -24,7 +42,7 @@
|
|||
<section id="{{ page.title }}" class="container content-section text-center">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
{% include social-buttons.html %}
|
||||
{% include social-buttons.html %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -10,14 +10,14 @@
|
|||
{% include header.html %}
|
||||
|
||||
{% for page in site.pages %}
|
||||
|
||||
|
||||
{% if page.section-type == "about" %}
|
||||
|
||||
{% include about.html %}
|
||||
|
||||
{% elsif page.section-type == "blog" %}
|
||||
{% elsif page.section-type == "latest-post" %}
|
||||
|
||||
{% include blog.html %}
|
||||
{% include latest-post.html %}
|
||||
|
||||
{% elsif page.section-type == "career" %}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<h4><strong>{{ page.date | date_to_string }}</strong>
|
||||
<small> . {{ page.category }} . <a href="{{ page.url }}#disqus_thread">Comments</a><p/>
|
||||
{% for tag in page.tags %}
|
||||
<a href="/tags/{{tag}}.html">#{{ tag }}</a>
|
||||
<a href="/tags/{{ tag }}.html">#{{ tag }}</a>
|
||||
{% endfor %}
|
||||
</small>
|
||||
</h4>
|
||||
|
|
|
|||
43
_layouts/tag.html
Normal file
43
_layouts/tag.html
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
|
||||
{% include head.html %}
|
||||
|
||||
<body id="page-top" data-spy="scroll" data-target=".navbar-fixed-top">
|
||||
|
||||
{% include navigation.html %}
|
||||
|
||||
<section id="{{ page.title }}" class="container content-section text-center">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
|
||||
<div id="archives">
|
||||
<div>
|
||||
{% assign tag = page.title %}
|
||||
<h3 id="#{{ tag }}">#{{ tag }}</h3>
|
||||
{% for post in site.posts %}
|
||||
{% if post.tags contains tag %}
|
||||
<h4 align="left"><strong>{{ post.date | date_to_string }}</strong> <small>. {{ post.category }} .</small> <a href="{{ post.url }}"> <strong>{{ post.title }} </a> </strong> <small><a href="{{ site.url }}{{post.url }}#disqus_thread">Comments</a></small></h4>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="{{ page.title }}" class="container content-section text-center">
|
||||
<div class="row">
|
||||
<div class="col-lg-8 col-lg-offset-2">
|
||||
{% include social-buttons.html %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% include footer.html %}
|
||||
|
||||
{% include js.html %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue