sipp11
10 years ago
13 changed files with 196 additions and 29 deletions
@ -0,0 +1,25 @@
|
||||
{% if paginator.total_pages > 1 %} |
||||
<div class="pagination"> |
||||
{% if paginator.previous_page %} |
||||
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">« Prev</a> |
||||
{% else %} |
||||
<span>« Prev</span> |
||||
{% endif %} |
||||
{{ site.baseurl }} |
||||
{% for page in (1..paginator.total_pages) %} |
||||
{% if page == paginator.page %} |
||||
<em>{{ page }}</em> |
||||
{% elsif page == 1 %} |
||||
<a href="{{ '/index.html' }}">{{ 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 | prepend: site.baseurl | replace: '//', '/' }}">Next »</a> |
||||
{% else %} |
||||
<span>Next »</span> |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
@ -0,0 +1,41 @@
|
||||
--- |
||||
layout: default |
||||
title : Archive |
||||
--- |
||||
<section id="archive"> |
||||
{% assign posts_collate = site.posts %} |
||||
|
||||
{% for post in posts_collate %} |
||||
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} |
||||
{% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %} |
||||
{% capture this_month_num %}{{ post.date | date: "%m" }}{% endcapture %} |
||||
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} |
||||
{% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %} |
||||
|
||||
{% if forloop.first %} |
||||
<h1 id="{{this_year}}">{{this_year}}</h1> |
||||
<h2 id ="{{this_year}}:{{this_month_num}}">{{this_month}}</h2> |
||||
<ul> |
||||
{% endif %} |
||||
|
||||
<li id="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %e, %Y" }} » <a href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a></li> |
||||
|
||||
{% if forloop.last %} |
||||
</ul> |
||||
{% else %} |
||||
{% if this_year != next_year %} |
||||
</ul> |
||||
<h1 id="{{ next_year }}">{{next_year}}</h1> |
||||
<h2 id="{{ next_year }}:{{ next_month }}">{{next_month}}</h2> |
||||
<ul> |
||||
{% else %} |
||||
{% if this_month != next_month %} |
||||
</ul> |
||||
<h2 id="{{ next_year }}:{{ next_month }}">{{next_month}}</h2> |
||||
<ul> |
||||
{% endif %} |
||||
{% endif %} |
||||
{% endif %} |
||||
{% endfor %} |
||||
{% assign posts_collate = nil %} |
||||
</section> |
@ -0,0 +1,11 @@
|
||||
#!/bin/sh |
||||
|
||||
RUSER=sipp11 |
||||
RHOST=do3 |
||||
PORT=22 |
||||
RPATH=/opt/www/maamnote |
||||
LPATH=./_site/ |
||||
|
||||
rsync -avu -e "ssh -p $PORT" $LPATH $RUSER@$RHOST:$RPATH \ |
||||
--exclude=.DS_Store --exclude=*.sh --exclude=*.pyc \ |
||||
--exclude=migrations --exclude=scripts |
@ -0,0 +1,29 @@
|
||||
--- |
||||
layout: default |
||||
title: Tags |
||||
--- |
||||
<!--TODO: Find a fix to tags with spaces--> |
||||
<ul class="tag_box inline"> |
||||
{% if site.tags.first[0] != null %}{% comment %} If tags exist {% endcomment %} |
||||
{% for tag in site.tags %}{% comment %} add an element like the following for each tag item {% endcomment %} |
||||
<li class="label label-success"><a href="#{{ tag[0] }}">{{ tag[0] }}{% comment %} This is just the tag name {% endcomment %} |
||||
<span>{{ tag[1].size }}</span>{% comment %} This counts the number of posts in a given tag {% endcomment %} |
||||
</a></li> |
||||
{% endfor %} |
||||
{% endif %} |
||||
</ul> |
||||
|
||||
{% for tag in site.tags %} |
||||
<h1 id="{{ tag[0] }}">{{ tag[0] }}</h1> |
||||
<ul> |
||||
{% for tag_post in tag[1] %} |
||||
{% if tag_post.title != null %} |
||||
{% if page.url == tag_post.url %} |
||||
<li class="active"><a href="#" class="active">{{tag_post.title}}</a></li> |
||||
{% else %} |
||||
<li>{{ tag_post.date | date: "%B %e, %Y" }} » <a href="{{tag_post.url}}">{{tag_post.title}}</a></li> |
||||
{% endif %} |
||||
{% endif %} |
||||
{% endfor %} |
||||
</ul> |
||||
{% endfor %} |
Loading…
Reference in new issue