Building a new theme for the Ghost CMS for use on https://chrg.nl
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

post.hbs 4.2KB

  1. {{!< default}}
  2. {{!-- The comment above "< default" means - insert everything in this file into
  3. the {{{body}}} of the default.hbs template, containing the blog header/footer. --}}
  4. {{> "header" }}
  5. {{!-- Everything inside the #post tags pulls data from the post --}}
  6. {{#post}}
  7. <header class="main-header post-head {{#if feature_image}}" style="background-image: url({{feature_image}}){{else}}no-cover{{/if}}">
  8. </header>
  9. <main class="content" role="main">
  10. <article class="container {{post_class}}">
  11. <header class="post-header">
  12. <h1 class="post-title">{{title}}</h1>
  13. <section class="post-meta">
  14. <time class="post-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMMM YYYY"}}</time> {{tags prefix=" on "}}
  15. </section>
  16. </header>
  17. <section class="post-content">
  18. {{content}}
  19. </section>
  20. <footer class="post-footer">
  21. {{!-- Everything inside the #author tags pulls data from the author --}}
  22. {{#author}}
  23. {{#if profile_image}}
  24. <figure class="author-image">
  25. <a class="img" href="{{url}}" style="background-image: url({{profile_image}})"><span class="hidden">{{name}}'s Picture</span></a>
  26. </figure>
  27. {{/if}}
  28. <section class="author">
  29. <h4><a href="{{url}}">{{name}}</a></h4>
  30. {{#if bio}}
  31. <p>{{bio}}</p>
  32. {{else}}
  33. <p>Read <a href="{{url}}">more posts</a> by this author.</p>
  34. {{/if}}
  35. <div class="author-meta">
  36. {{#if location}}<span class="author-location icon-location">{{location}}</span>{{/if}}
  37. {{#if website}}<span class="author-link icon-link"><a href="{{website}}">{{website}}</a></span>{{/if}}
  38. </div>
  39. </section>
  40. {{/author}}
  41. <section class="share">
  42. <h4>Share this post</h4>
  43. <a class="icon-twitter" href="https://twitter.com/intent/tweet?text={{encode title}}&amp;url={{url absolute="true"}}"
  44. onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
  45. <span class="hidden">Twitter</span>
  46. </a>
  47. <a class="icon-facebook" href="https://www.facebook.com/sharer/sharer.php?u={{url absolute="true"}}"
  48. onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
  49. <span class="hidden">Facebook</span>
  50. </a>
  51. <a class="icon-google-plus" href="https://plus.google.com/share?url={{url absolute="true"}}"
  52. onclick="window.open(this.href, 'google-plus-share', 'width=490,height=530');return false;">
  53. <span class="hidden">Google+</span>
  54. </a>
  55. </section>
  56. {{!-- Email subscribe form at the bottom of the page --}}
  57. {{#if @labs.subscribers}}
  58. <section class="gh-subscribe">
  59. <h3 class="gh-subscribe-title">Subscribe to {{@blog.title}}</h3>
  60. <p>Get the latest posts delivered right to your inbox.</p>
  61. {{subscribe_form placeholder="Your email address"}}
  62. <span class="gh-subscribe-rss">or subscribe <a href="http://cloud.feedly.com/#subscription/feed/{{@blog.url}}/rss/">via RSS</a> with Feedly!</span>
  63. </section>
  64. {{/if}}
  65. </footer>
  66. </article>
  67. </main>
  68. {{!-- Links to Previous/Next posts --}}
  69. <aside class="read-next">
  70. {{#next_post}}
  71. <a class="read-next-story {{#if feature_image}}" style="background-image: url({{feature_image}}){{else}}color-cover{{/if}}" href="{{url}}">
  72. <section class="post">
  73. <h2>{{title}}</h2>
  74. <p>{{excerpt words="19"}}&hellip;</p>
  75. </section>
  76. </a>
  77. {{/next_post}}
  78. {{#prev_post}}
  79. <a class="read-next-story prev {{#if feature_image}}" style="background-image: url({{feature_image}}){{else}}color-cover{{/if}}" href="{{url}}">
  80. <section class="post">
  81. <h2>{{title}}</h2>
  82. <p>{{excerpt words="19"}}&hellip;</p>
  83. </section>
  84. </a>
  85. {{/prev_post}}
  86. </aside>
  87. {{/post}}