diff options
author | Jade Dominguez <plusjade@gmail.com> | 2011-12-30 14:17:44 -0800 |
---|---|---|
committer | Jade Dominguez <plusjade@gmail.com> | 2012-01-11 15:13:40 -0800 |
commit | 4c18e3c136bea49e3335ab594ae22d999892cf27 (patch) | |
tree | 6ee24ea94d767bc6c69081531350a6776a5f9fcb /_includes |
version 0.0.1
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/helpers/categories_list.html | 34 | ||||
-rw-r--r-- | _includes/helpers/liquid_raw.html | 29 | ||||
-rw-r--r-- | _includes/helpers/pages_list.html | 37 | ||||
-rw-r--r-- | _includes/helpers/posts_collate.html | 52 | ||||
-rw-r--r-- | _includes/helpers/tags_list.html | 30 | ||||
-rw-r--r-- | _includes/production/analytics.html | 5 | ||||
-rw-r--r-- | _includes/themes/mark-reid/default.html | 75 | ||||
-rw-r--r-- | _includes/themes/mark-reid/page.html | 6 | ||||
-rw-r--r-- | _includes/themes/mark-reid/post.html | 31 | ||||
-rw-r--r-- | _includes/themes/tom/default.html | 60 | ||||
-rw-r--r-- | _includes/themes/tom/page.html | 3 | ||||
-rw-r--r-- | _includes/themes/tom/post.html | 17 |
12 files changed, 379 insertions, 0 deletions
diff --git a/_includes/helpers/categories_list.html b/_includes/helpers/categories_list.html new file mode 100644 index 0000000..2ced2d2 --- /dev/null +++ b/_includes/helpers/categories_list.html @@ -0,0 +1,34 @@ +{% comment %}<!-- +The categories_list include is a listing helper for categories. +Usage: + 1) assign the 'categories_list' variable to a valid array of tags. + 2) include helpers/categories_list.html. + example: + <ul> + {% assign categories_list = site.categories %} + {% include helpers/categories_list.html %} + </ul> + + Notes: + Categories can be either a Hash of Category objects (hashes) or an Array of category-names (strings). + The encapsulating 'if' statement checks whether categories_list is a Hash or Array. + site.categories is a Hash while page.categories is an array. + + This helper can be seen in use at: ../_layouts/default.html +-->{% endcomment %} + +{% if categories_list.first[0] == null %} + {% for category in categories_list %} + <li><a href="{{ site.var.categories_path }}#{{ category }}-ref"> + {{ category | join: "/" }} <span>{{ site.categories[category].size }}</span> + </a></li> + {% endfor %} +{% else %} + {% for category in categories_list %} + <li><a href="{{ site.var.categories_path }}#{{ category[0] }}-ref"> + {{ category[0] | join: "/" }} <span>{{ category[1].size }}</span> + </a></li> + {% endfor %} +{% endif %} + +{% assign categories_list = null %} diff --git a/_includes/helpers/liquid_raw.html b/_includes/helpers/liquid_raw.html new file mode 100644 index 0000000..54a15e4 --- /dev/null +++ b/_includes/helpers/liquid_raw.html @@ -0,0 +1,29 @@ +{% comment%}<!-- +The liquid_raw helper is a way to display raw liquid code, as opposed to parsing it. +Normally you'd use Liquid's built in 'raw' tag. +The problem is GitHub Jekyll does not support the current Liquid release. +GitHub Jekyll supports the deprecated 'literal' tag. +Using one will break the other if you plan to deploy to GitHub pages. + see: https://github.com/mojombo/jekyll/issues/425 + +Since I don't want to mess with Liquid versions, I'll just rewrite the way I +intend to give liquid examples. It's not an elegant by any means: + +Usage: + 1) Define a 'text' variable with the block of liquid code you intend to display. + 2) Pass the text variable to include helpers/liquid_raw.html. + + example: + {% capture text %}|.% for tag in tags_list %.| + <li><a href="|.{ site.var.tags_path }.||.{ tag[0] }.|-ref">|.{ tag[0] }.| <span>|.{tag[1].size}.|</span></a></li> + |.% endfor %.| + + |.% assign tags_list = null %.|{% endcapture %} + {% include helpers/liquid_raw.html %} + + As seen here, you must use "|." and ".|" as opening and closing brackets. +-->{% endcomment%} + +<pre><code>{{text | replace:"|.", "{" | replace:".|", "}" | replace:">", ">" | replace:"<", "<" }}</code></pre> + +{% assign text = null %}
\ No newline at end of file diff --git a/_includes/helpers/pages_list.html b/_includes/helpers/pages_list.html new file mode 100644 index 0000000..44c5279 --- /dev/null +++ b/_includes/helpers/pages_list.html @@ -0,0 +1,37 @@ +{% comment %}<!-- +The pages_list include is a listing helper. +Usage: + 1) assign the 'pages_list' variable to a valid array of pages or posts. + 2) include helpers/pages_list.html. + example: + <ul> + {% assign pages_list = site.pages %} + {% include helpers/pages_list.html %} + </ul> + + Grouping: (optional): + assign the 'group' variable to constrain the list to only pages/posts + in the given group. Note you must define the group manually in the page/post + meta-data to use this feature. + Grouping is mainly helpful for non-post pages. + If you want to group posts, it's easier/better to tag them, then pass the tagged posts array. + i.e. site.tags.cool_tag (this returns an array of posts tagged: cool_tag) + + This helper can be seen in use at: ../_layouts/default.html +-->{% endcomment %} + + +{% for node in pages_list %} + {% if group == null or group == node.group %} + + {% if page.url == node.url %} + <li><a href="{{node.url}}" class="active">{{node.title}}</a></li> + {% else %} + <li><a href="{{node.url}}">{{node.title}}</a></li> + {% endif %} + + {% endif %} +{% endfor %} + +{% assign pages_list = null %} +{% assign group = null %} diff --git a/_includes/helpers/posts_collate.html b/_includes/helpers/posts_collate.html new file mode 100644 index 0000000..7e55554 --- /dev/null +++ b/_includes/helpers/posts_collate.html @@ -0,0 +1,52 @@ +{% comment %}<!-- +Collate_posts helper. Collated posts by year and month. +Usage: + 1) assign the 'posts_collate' variable to a valid array of posts. + 2) include helpers/posts_collate.html. + example: + {% assign posts_collate = site.posts %} + {% include helpers/posts_collate.html %} + + Ordering: + Posts are displayed in reverse chronological order. + For normal chronological order: + 1) Change the for loop to this: + => 'for post in site.posts reversed' + 2) Next make sure to change 'post.previous.date' to: + => 'post.next.date' + +-->{% endcomment %} + +{% for post in posts_collate %} + {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} + {% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %} + {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} + {% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %} + + {% if forloop.first %} + <h2>{{this_year}}</h2> + <h3>{{this_month}}</h3> + <ul> + {% endif %} + + <li><span>{{ post.date | date: "%B %e, %Y" }}</span> <a href="{{ post.url }}">{{ post.title }}</a></li> + + {% if forloop.last %} + </ul> + {% else %} + {% if this_year != next_year %} + </ul> + <h2>{{next_year}}</h2> + <h3>{{next_month}}</h3> + <ul> + {% else %} + {% if this_month != next_month %} + </ul> + <h3>{{next_month}}</h3> + <ul> + {% endif %} + {% endif %} + {% endif %} +{% endfor %} + +{% assign posts_collate = null %} diff --git a/_includes/helpers/tags_list.html b/_includes/helpers/tags_list.html new file mode 100644 index 0000000..d2518e0 --- /dev/null +++ b/_includes/helpers/tags_list.html @@ -0,0 +1,30 @@ +{% comment %}<!-- +The tags_list include is a listing helper for tags. +Usage: + 1) assign the 'tags_list' variable to a valid array of tags. + 2) include helpers/tags_list.html. + example: + <ul> + {% assign tags_list = site.tags %} + {% include helpers/tags_list.html %} + </ul> + + Notes: + Tags can be either a Hash of tag objects (hashes) or an Array of tag-names (strings). + The encapsulating 'if' statement checks whether tags_list is a Hash or Array. + site.tags is a Hash while page.tags is an array. + + This helper can be seen in use at: ../_layouts/default.html +-->{% endcomment %} + +{% if tags_list.first[0] == null %} + {% for tag in tags_list %} + <li><a href="{{ site.var.tags_path }}#{{ tag }}-ref">{{ tag }} <span>{{ site.tags[tag].size }}</span></a></li> + {% endfor %} +{% else %} + {% for tag in tags_list %} + <li><a href="{{ site.var.tags_path }}#{{ tag[0] }}-ref">{{ tag[0] }} <span>{{ tag[1].size }}</span></a></li> + {% endfor %} +{% endif %} + +{% assign tags_list = null %} diff --git a/_includes/production/analytics.html b/_includes/production/analytics.html new file mode 100644 index 0000000..3f12c6a --- /dev/null +++ b/_includes/production/analytics.html @@ -0,0 +1,5 @@ +<!-- + Drop your analytics in here. + This will only be included when published to GitHub. + We use "site.safe" variable which is true on GitHub. +-->
\ No newline at end of file diff --git a/_includes/themes/mark-reid/default.html b/_includes/themes/mark-reid/default.html new file mode 100644 index 0000000..835a4bc --- /dev/null +++ b/_includes/themes/mark-reid/default.html @@ -0,0 +1,75 @@ +<!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-us"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>{{ page.title }} ← {{ page.top }}</title> + <meta name="author" content="{{ site.author.name }}" /> + + <link rel="start" href="/" /> + + {% if page.keywords %} + <meta name="keywords" content="{{ page.keywords }}"> + {% endif %} + + {% if page.feed %} + <link rel="alternate" type="application/atom+xml" href="{{ page.feed }}" title="RSS feed" /> + {% endif %} + + <!-- syntax highlighting CSS --> + <link rel="stylesheet" href="{{ theme_asset_path }}/css/syntax.css" type="text/css" /> + + <!-- Homepage CSS --> + <link rel="stylesheet" href="{{ theme_asset_path }}/css/screen.css" type="text/css" /> + +</head> +<body id="{{ page.section }}"> +<div id="site"> + + <div id="header"> + <h1> + <a href="/" title="{{ site.title }}">{{ site.title }}</a> + <span class="byline">← <a href="/">{{ site.author.name }}</a></span> + </h1> + <ul class="nav"> + <li><a class="home" href="/">Home</a></li> + <li><a href="/archive.html">Archive</a></li> + <li><a href="/pages.html">Pages</a></li> + <li><a href="/categories.html">Categories</a></li> + <li><a href="/tags.html">Tags</a></li> + </ul> + </div> + + {{ content }} + + <div id="footer"> + <address> + <span class="copyright"> + Content by <a href="/info/site.html">{{ site.author.name }}</a>. Design by + <a href="http://mark.reid.name/">Mark Reid</a> + <br/> + (<a rel="licence" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Some rights reserved</a>) + </span> + <span class="engine"> + Powered by <a href="http://github.com/mojombo/jekyll/" title="A static, minimalist CMS">Jekyll</a> + </span> + </address> + </div> + +</div> + +<!--[if IE 6]> +<script type="text/javascript"> + /*Load jQuery if not already loaded*/ if(typeof jQuery == 'undefined'){ document.write("<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></"+"script>"); var __noconflict = true; } + var IE6UPDATE_OPTIONS = { + icons_path: "http://static.ie6update.com/hosted/ie6update/images/" + } +</script> +<script type="text/javascript" src="http://static.ie6update.com/hosted/ie6update/ie6update.js"></script> +<![endif]--> +{% if site.safe %} + {% include production/analytics.html %} +{% endif %} +</body> +</html> diff --git a/_includes/themes/mark-reid/page.html b/_includes/themes/mark-reid/page.html new file mode 100644 index 0000000..05af78e --- /dev/null +++ b/_includes/themes/mark-reid/page.html @@ -0,0 +1,6 @@ +<div id="page"> + +<h1 class="emphnext">{{ page.title }}</h1> +{{ content }} + +</div><!-- End Page --> diff --git a/_includes/themes/mark-reid/post.html b/_includes/themes/mark-reid/post.html new file mode 100644 index 0000000..76dd994 --- /dev/null +++ b/_includes/themes/mark-reid/post.html @@ -0,0 +1,31 @@ +<div id="page"> + + <h1 class="emphnext">{{ page.title }}</h1> + <ul class="tag_box inline"> + {% assign tags_list = page.tags %} + {% include helpers/tags_list.html %} + </ul> + + {{ content }} + + <address class="signature"> + <a class="author" href="/">{{ site.author.name }}</a> + <span class="date">{{ page.date | date_to_long_string }}</span> + <span class="location">{{ page.location }}</span> + </address> + + <div class="prev-next"> + {% if page.next %} + <a href="{{ page.next.url }}" class="next" title="{{ page.next.title }}">Next Post →</a> + {% endif %} + {% if page.previous %} + <a href="{{ page.previous.url }}" class="prev" title="{{ page.previous.title }}">← Earlier Post</a> + {% endif %} + </div> + +</div><!-- End Page --> + +<!-- Discus Comments --> +<div id="disqus_thread"> + <h2>Comment Section</h2> +</div> diff --git a/_includes/themes/tom/default.html b/_includes/themes/tom/default.html new file mode 100644 index 0000000..2c43e6b --- /dev/null +++ b/_includes/themes/tom/default.html @@ -0,0 +1,60 @@ +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>{{ page.title }}</title> + <meta name="author" content="{{ site.author.name }}" /> + <link href="http://feeds.feedburner.com/username" rel="alternate" title="your title" type="application/atom+xml" /> + + <!-- syntax highlighting CSS --> + <link rel="stylesheet" href="{{ theme_asset_path }}/css/syntax.css" type="text/css" /> + + <!-- Homepage CSS --> + <link rel="stylesheet" href="{{ theme_asset_path }}/css/screen.css" type="text/css" media="screen, projection" /> + + <!-- Typekit --> + <script type="text/javascript" src="http://use.typekit.com/jpd0pfm.js"></script> + <script type="text/javascript">try{Typekit.load();}catch(e){}</script> +</head> +<body> + + <div class="site"> + <div class="title"> + <a href="/">{{ site.title }}</a> + <a class="extra" href="/archive.html">Archive</a> + <a class="extra" href="/pages.html">Pages</a> + <a class="extra" href="/categories.html">Categories</a> + <a class="extra" href="/tags.html">Tags</a> + </div> + + {{ content }} + + <div class="footer"> + <div class="contact"> + <p> + {{ site.author.name }}<br /> + tagline<br /> + {{ site.author.email }} + </p> + </div> + <div class="contact"> + <p> + <a href="http://github.com/{{ site.author.github }}/">github.com/{{ site.author.github }}</a><br /> + <a href="http://twitter.com/{{ site.author.twitter }}/">twitter.com/{{ site.author.twitter }}</a><br /> + <a href="http://flickr.com/photos/username/">flickr.com/photos/username</a> + </p> + </div> + <div class="rss"> + <a href="http://feeds.feedburner.com/username"> + <img src="/images/rss.png" alt="Subscribe to RSS Feed" /> + </a> + </div> + </div> + </div> + <a href="http://github.com/{{ site.author.github }}"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a> + +{% if site.safe %} + {% include production/analytics.html %} +{% endif %} +</body> +</html> diff --git a/_includes/themes/tom/page.html b/_includes/themes/tom/page.html new file mode 100644 index 0000000..8c753b9 --- /dev/null +++ b/_includes/themes/tom/page.html @@ -0,0 +1,3 @@ +<div id="post"> +{{ content }} +</div> diff --git a/_includes/themes/tom/post.html b/_includes/themes/tom/post.html new file mode 100644 index 0000000..fc94e5e --- /dev/null +++ b/_includes/themes/tom/post.html @@ -0,0 +1,17 @@ +<div id="post"> + <h1>{{ page.title }}</h1> + <p class="meta"> + {{ page.date | date_to_long_string }} + {% if page.location %}{{ page.location }}{% endif %} + </p> + {{ content }} +</div> + +<div id="related"> + <h2>Related Posts</h2> + <ul class="posts"> + {% for post in site.related_posts limit:3 %} + <li><span>{{ post.date | date_to_string }}</span> » <a href="{{ post.url }}">{{ post.title }}</a></li> + {% endfor %} + </ul> +</div>
\ No newline at end of file |