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:
authorroryg <rg.rorygibson@gmail.com>2014-04-09 18:20:29 +0400
committerroryg <rg.rorygibson@gmail.com>2014-04-09 18:20:29 +0400
commit74729592661e94c8c269c178313ea8a14dfda4bb (patch)
tree15184fbca792eb8e24ebe683478e02df5c3c5fbc
parent8d127019ff7ad3d5e016835a206f2026f3d563e2 (diff)
parenta186e7b03b5c8f5dc496db1debf0296dedba97d0 (diff)
Merge pull request #35 from halloffame/master
Extracted post content into a partial
-rw-r--r--index.hbs38
-rw-r--r--partials/post-content.hbs37
-rw-r--r--post.hbs38
3 files changed, 39 insertions, 74 deletions
diff --git a/index.hbs b/index.hbs
index 19847dc..1935fcb 100644
--- a/index.hbs
+++ b/index.hbs
@@ -3,43 +3,7 @@
<div id="latest-post" class="container">
{{#foreach posts}}
{{#if @first}}
- <article class="post-container {{post_class}}">
- <header class="post-header">
- <h1 class="post-title">{{title}}</h1>
-
- <p class="post-date"><time datetime="{{published_at}}">Published {{date format="MMMM Do YYYY"}}</time></p>
- </header>
-
- <div class="post-content clearfix">
- {{{content}}}
- </div>
-
- <footer class="post-footer clearfix">
- {{#if tags}}
- <p class="post-tags"><span>Tagged:</span> {{tags}}</p>
- {{/if}}
-
- <div class="share">
- <a class="icon-twitter" href="http://twitter.com/share?text={{encode title}}&url={{url absolute="true"}}"
- onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
- <i class="fa fa-twitter"></i>
- <span class="hidden">Twitter</span>
- </a>
-
- <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}"
- onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
- <i class="fa fa-facebook"></i>
- <span class="hidden">Facebook</span>
- </a>
-
- <a class="icon-google-plus" href="https://plus.google.com/share?url={{url absolute="true"}}"
- onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
- <i class="fa fa-google-plus"></i>
- <span class="hidden">Google+</span>
- </a>
- </div>
- </footer>
- </article>
+ {{> post-content}}
{{/if}}
{{/foreach}}
</div>
diff --git a/partials/post-content.hbs b/partials/post-content.hbs
new file mode 100644
index 0000000..6b4fa08
--- /dev/null
+++ b/partials/post-content.hbs
@@ -0,0 +1,37 @@
+<article class="post-container {{post_class}}">
+ <header class="post-header">
+ <h1 class="post-title">{{title}}</h1>
+
+ <p class="post-date"><time datetime="{{published_at}}">Published {{date format="MMMM Do YYYY"}}</time></p>
+ </header>
+
+ <div class="post-content clearfix">
+ {{{content}}}
+ </div>
+
+ <footer class="post-footer clearfix">
+ {{#if tags}}
+ <p class="post-tags"><span>Tagged:</span> {{tags}}</p>
+ {{/if}}
+
+ <div class="share">
+ <a class="icon-twitter" href="http://twitter.com/share?text={{encode title}}&url={{url absolute="true"}}"
+ onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
+ <i class="fa fa-twitter"></i>
+ <span class="hidden">Twitter</span>
+ </a>
+
+ <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}"
+ onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
+ <i class="fa fa-facebook"></i>
+ <span class="hidden">Facebook</span>
+ </a>
+
+ <a class="icon-google-plus" href="https://plus.google.com/share?url={{url absolute="true"}}"
+ onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
+ <i class="fa fa-google-plus"></i>
+ <span class="hidden">Google+</span>
+ </a>
+ </div>
+ </footer>
+</article> \ No newline at end of file
diff --git a/post.hbs b/post.hbs
index 9e92403..4331107 100644
--- a/post.hbs
+++ b/post.hbs
@@ -2,42 +2,6 @@
<div class="container">
{{#post}}
- <article class="post-container {{post_class}}">
- <header class="post-header">
- <h1 class="post-title">{{title}}</h1>
-
- <p class="post-date"><time datetime="{{published_at}}">Published {{date format="MMMM Do YYYY"}}</time></p>
- </header>
-
- <div class="post-content clearfix">
- {{{content}}}
- </div>
-
- <footer class="post-footer clearfix">
- {{#if tags}}
- <p class="post-tags"><span>Tagged:</span> {{tags}}</p>
- {{/if}}
-
- <div class="share">
- <a class="icon-twitter" href="http://twitter.com/share?text={{encode title}}&url={{url absolute="true"}}"
- onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
- <i class="fa fa-twitter"></i>
- <span class="hidden">Twitter</span>
- </a>
-
- <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}"
- onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
- <i class="fa fa-facebook"></i>
- <span class="hidden">Facebook</span>
- </a>
-
- <a class="icon-google-plus" href="https://plus.google.com/share?url={{url absolute="true"}}"
- onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
- <i class="fa fa-google-plus"></i>
- <span class="hidden">Google+</span>
- </a>
- </div>
- </footer>
- </article>
+ {{> post-content}}
{{/post}}
</div> \ No newline at end of file