Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roryg/ghostwriter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRory Gibson <rg.rorygibson@gmail.com>2014-08-13 01:39:31 +0400
committerRory Gibson <rg.rorygibson@gmail.com>2014-08-13 01:39:31 +0400
commit46b64ae815f76e51ca2ec480eb5505785d6ba876 (patch)
tree1a2ac37bc3c90f45e6677078e7cae4a0e5a345cc
parentfc1e4b184644b20b2447e60c29083c2e20e85da2 (diff)
Moved posts loop into 'loop' partial
-rw-r--r--author.hbs14
-rw-r--r--index.hbs14
-rw-r--r--partials/loop.hbs13
-rw-r--r--tag.hbs14
4 files changed, 16 insertions, 39 deletions
diff --git a/author.hbs b/author.hbs
index 0dabd22..8f0daac 100644
--- a/author.hbs
+++ b/author.hbs
@@ -23,19 +23,7 @@
</section>
<ol class="post-list">
- {{#foreach posts}}
- <li class="post-stub {{post_class}}" >
- <a class="js-ajax-link" title="{{title}} | {{@blog.title}}" href="{{url}}">
- <h4 class="post-stub-title">{{title}}</h4>
-
- <time class="post-stub-date" datetime="{{published_at}}">Published {{date format="MMMM Do YYYY"}}</time>
-
- {{#if featured}}
- <span class="post-stub-tag">Featured</span>
- {{/if}}
- </a>
- </li>
- {{/foreach}}
+ {{> loop}}
</ol>
<div class="post-navigation">
diff --git a/index.hbs b/index.hbs
index 7b63841..8daaab1 100644
--- a/index.hbs
+++ b/index.hbs
@@ -10,19 +10,7 @@
<div id="post-index" class="container">
<ol class="post-list">
- {{#foreach posts}}
- <li class="post-stub {{post_class}}" >
- <a class="js-ajax-link" title="{{title}} | {{@blog.title}}" href="{{url}}">
- <h4 class="post-stub-title">{{title}}</h4>
-
- <time class="post-stub-date" datetime="{{published_at}}">Published {{date format="MMMM Do YYYY"}}</time>
-
- {{#if featured}}
- <span class="post-stub-tag">Featured</span>
- {{/if}}
- </a>
- </li>
- {{/foreach}}
+ {{> loop}}
</ol>
<div class="post-navigation">
diff --git a/partials/loop.hbs b/partials/loop.hbs
new file mode 100644
index 0000000..cff6e39
--- /dev/null
+++ b/partials/loop.hbs
@@ -0,0 +1,13 @@
+{{#foreach posts}}
+ <li class="post-stub {{post_class}}" >
+ <a class="js-ajax-link" title="{{title}} | {{@blog.title}}" href="{{url}}">
+ <h4 class="post-stub-title">{{title}}</h4>
+
+ <time class="post-stub-date" datetime="{{published_at}}">Published {{date format="MMMM Do YYYY"}}</time>
+
+ {{#if featured}}
+ <span class="post-stub-tag">Featured</span>
+ {{/if}}
+ </a>
+ </li>
+{{/foreach}} \ No newline at end of file
diff --git a/tag.hbs b/tag.hbs
index 254509b..c58d8a2 100644
--- a/tag.hbs
+++ b/tag.hbs
@@ -4,19 +4,7 @@
<h1 class="page-title">Posts tagged: {{tag.name}}</h1>
<ol class="post-list">
- {{#foreach posts}}
- <li class="post-stub {{post_class}}" >
- <a class="js-ajax-link" title="{{title}} | {{@blog.title}}" href="{{url}}">
- <h4 class="post-stub-title">{{title}}</h4>
-
- <time class="post-stub-date" datetime="{{published_at}}">Published {{date format="MMMM Do YYYY"}}</time>
-
- {{#if featured}}
- <span class="post-stub-tag">Featured</span>
- {{/if}}
- </a>
- </li>
- {{/foreach}}
+ {{> loop}}
</ol>
<div class="post-navigation">