diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2014-10-20 16:38:24 -0700 |
---|---|---|
committer | Zhiming Wang <zmwangx@gmail.com> | 2014-10-20 16:38:24 -0700 |
commit | d139da3a3277f73d7f01e4283d8dc01630a5317c (patch) | |
tree | 5a58aeb89869f09cc48543c0540a1fbd4910040e /source/_layouts | |
parent | c434de5977c316c8406c00bb24221fa61ca8fe88 (diff) | |
download | my_new_personal_website-d139da3a3277f73d7f01e4283d8dc01630a5317c.tar.xz my_new_personal_website-d139da3a3277f73d7f01e4283d8dc01630a5317c.zip |
initial setup
Diffstat (limited to '')
-rw-r--r-- | source/_layouts/category_index.html | 17 | ||||
-rw-r--r-- | source/_layouts/default.html | 14 | ||||
-rw-r--r-- | source/_layouts/page.html | 42 | ||||
-rw-r--r-- | source/_layouts/post.html | 43 |
4 files changed, 116 insertions, 0 deletions
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 +--- + +<div id="blog-archives" class="category"> +{% for post in site.categories[page.category] %} +{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} +{% unless year == this_year %} + {% assign year = this_year %} + <h2>{{ year }}</h2> +{% endunless %} +<article> + {% include archive_post.html %} +</article> +{% endfor %} +</div> 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 %} +<body {% if page.body_id %} id="{{ page.body_id }}" {% endif %} {% if page.sidebar == false %} class="no-sidebar" {% endif %} {% if page.sidebar == 'collapse' or site.sidebar == 'collapse' %} class="collapse-sidebar sidebar-footer" {% endif %}> + <header role="banner">{% include header.html %}</header> + <nav role="navigation">{% include navigation.html %}</nav> + <div id="main"> + <div id="content"> + {{ content | expand_urls: root_url }} + </div> + </div> + <footer role="contentinfo">{% include footer.html %}</footer> + {% include after_footer.html %} +</body> +</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 +--- + +<div> +<article role="article"> + {% if page.title %} + <header> + <h1 class="entry-title">{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}</h1> + {% if page.date %}<p class="meta">{% include post/date.html %}{{ time }}</p>{% endif %} + </header> + {% endif %} + {{ content }} + {% unless page.footer == false %} + <footer> + {% if page.date or page.author %}<p class="meta"> + {% 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 %} + </p>{% endif %} + {% unless page.sharing == false %} + {% include post/sharing.html %} + {% endunless %} + </footer> + {% endunless %} +</article> +{% if site.disqus_short_name and page.comments == true %} + <section> + <h1>Comments</h1> + <div id="disqus_thread" aria-live="polite">{% include post/disqus_thread.html %}</div> + </section> +{% endif %} +</div> +{% unless page.sidebar == false %} +<aside class="sidebar"> + {% if site.page_asides.size %} + {% include_array page_asides %} + {% else %} + {% include_array default_asides %} + {% endif %} +</aside> +{% 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 +--- + +<div> +<article class="hentry" role="article"> + {% include article.html %} + <footer> + <p class="meta"> + {% include post/author.html %} + {% include post/date.html %}{{ time }}{% if updated %} {{ updated }}{% endif %} + {% include post/categories.html %} + </p> + {% unless page.sharing == false %} + {% include post/sharing.html %} + {% endunless %} + <p class="meta"> + {% if page.previous.url %} + <a class="basic-alignment left" href="{{page.previous.url}}" title="Previous Post: {{page.previous.title}}">« {{page.previous.title}}</a> + {% endif %} + {% if page.next.url %} + <a class="basic-alignment right" href="{{page.next.url}}" title="Next Post: {{page.next.title}}">{{page.next.title}} »</a> + {% endif %} + </p> + </footer> +</article> +{% if site.disqus_short_name and page.comments == true %} + <section> + <h1>Comments</h1> + <div id="disqus_thread" aria-live="polite">{% include post/disqus_thread.html %}</div> + </section> +{% endif %} +</div> +{% unless page.sidebar == false %} +<aside class="sidebar"> + {% if site.post_asides.size %} + {% include_array post_asides %} + {% else %} + {% include_array default_asides %} + {% endif %} +</aside> +{% endunless %} |