From d139da3a3277f73d7f01e4283d8dc01630a5317c Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Mon, 20 Oct 2014 16:38:24 -0700 Subject: initial setup --- source/_layouts/category_index.html | 17 +++++++++++++++ source/_layouts/default.html | 14 ++++++++++++ source/_layouts/page.html | 42 ++++++++++++++++++++++++++++++++++++ source/_layouts/post.html | 43 +++++++++++++++++++++++++++++++++++++ 4 files changed, 116 insertions(+) create mode 100644 source/_layouts/category_index.html create mode 100644 source/_layouts/default.html create mode 100644 source/_layouts/page.html create mode 100644 source/_layouts/post.html (limited to 'source/_layouts') diff --git a/source/_layouts/category_index.html b/source/_layouts/category_index.html new file mode 100644 index 00000000..85a63072 --- /dev/null +++ b/source/_layouts/category_index.html @@ -0,0 +1,17 @@ +--- +layout: page +footer: false +--- + +
+{% for post in site.categories[page.category] %} +{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} +{% unless year == this_year %} + {% assign year = this_year %} +

{{ year }}

+{% endunless %} +
+ {% include archive_post.html %} +
+{% endfor %} +
diff --git a/source/_layouts/default.html b/source/_layouts/default.html new file mode 100644 index 00000000..f23b07b8 --- /dev/null +++ b/source/_layouts/default.html @@ -0,0 +1,14 @@ +{% capture root_url %}{{ site.root | strip_slash }}{% endcapture %} +{% include head.html %} + +
{% include header.html %}
+ +
+
+ {{ content | expand_urls: root_url }} +
+
+ + {% include after_footer.html %} + + diff --git a/source/_layouts/page.html b/source/_layouts/page.html new file mode 100644 index 00000000..8ba6ec94 --- /dev/null +++ b/source/_layouts/page.html @@ -0,0 +1,42 @@ +--- +layout: default +--- + +
+
+ {% if page.title %} +
+

{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}

+ {% if page.date %}

{% include post/date.html %}{{ time }}

{% endif %} +
+ {% endif %} + {{ content }} + {% unless page.footer == false %} +
+ {% if page.date or page.author %}

+ {% if page.author %}{% include post/author.html %}{% endif %} + {% include post/date.html %}{% if updated %}{{ updated }}{% else %}{{ time }}{% endif %} + {% if page.categories %}{% include post/categories.html %}{% endif %} +

{% endif %} + {% unless page.sharing == false %} + {% include post/sharing.html %} + {% endunless %} +
+ {% endunless %} +
+{% if site.disqus_short_name and page.comments == true %} +
+

Comments

+
{% include post/disqus_thread.html %}
+
+{% endif %} +
+{% unless page.sidebar == false %} + +{% endunless %} diff --git a/source/_layouts/post.html b/source/_layouts/post.html new file mode 100644 index 00000000..b450681b --- /dev/null +++ b/source/_layouts/post.html @@ -0,0 +1,43 @@ +--- +layout: default +single: true +--- + +
+
+ {% include article.html %} +
+

+ {% include post/author.html %} + {% include post/date.html %}{{ time }}{% if updated %} {{ updated }}{% endif %} + {% include post/categories.html %} +

+ {% unless page.sharing == false %} + {% include post/sharing.html %} + {% endunless %} +

+ {% if page.previous.url %} + « {{page.previous.title}} + {% endif %} + {% if page.next.url %} + {{page.next.title}} » + {% endif %} +

+
+
+{% if site.disqus_short_name and page.comments == true %} +
+

Comments

+
{% include post/disqus_thread.html %}
+
+{% endif %} +
+{% unless page.sidebar == false %} + +{% endunless %} -- cgit v1.2.1