Skip to content

Commit

Permalink
Page and post layout improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbc committed Mar 29, 2019
1 parent d51ed7c commit 56b969c
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 68 deletions.
32 changes: 25 additions & 7 deletions page.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
{{!< default}}

{{#post}}
<article class="post-wrapper">
<h2 class="post-title">{{{title}}}</h2>
<article class="post-wrapper">
<div class="row">
<div class="eight columns">
{{#if feature_image}}
<section class="post-media text-center">
<img src="{{img_url feature_image}}" class="cover-image">
</section>
{{/if}}

<header class="entry-header">
<h1 class="entry-title">{{{title}}}</h1>
</header>

<section class="post-full-content">
<div class="post-content">
{{content}}
<section class="post-full-content">
<div class="post-content">
{{content}}
</div>
</section>
</div>
<div class="four columns">
<aside class="sidebar">
{{> "sidebar"}}
</aside>
</div>
</section>
</article>
</div>
</article>
{{/post}}
2 changes: 0 additions & 2 deletions partials/sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
</div>
</section>

{{#post}}
<section class="widget recent-posts">
<h6 class="widget-title">Recent posts</h6>
<div class="widget-content">
Expand All @@ -20,7 +19,6 @@
{{/get}}
</div>
</section>
{{/post}}

{{#if tags}}
<section class="widget tags">
Expand Down
118 changes: 59 additions & 59 deletions post.hbs
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
{{!< default}}
{{#post}}

{{#post}}
{{#if featured}}
<article class="post-wrapper featured-post">
{{else}}
<article class="post-wrapper">
{{/if}}
{{else}}
<article class="post-wrapper">
{{/if}}

<div class="row">
<div class="eight columns">
{{#if feature_image}}
<section class="post-media text-center">
<img src="{{img_url feature_image}}" class="cover-image">
</section>
{{/if}}
<div class="row">
<div class="eight columns">
{{#if feature_image}}
<section class="post-media text-center">
<img src="{{img_url feature_image}}" class="cover-image">
</section>
{{/if}}

<header class="entry-header">
<p class="entry-author">
{{#primary_author}}
By <a href="{{url}}">{{name}}</a>
{{/primary_author}}
</p>
<h1 class="entry-title">{{{title}}}</h1>
<time class="entry-date"
datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time> - <time
class="entry-reading-time">{{reading_time}}</time>
</header>
<header class="entry-header">
<p class="entry-author">
{{#primary_author}}
By <a href="{{url}}">{{name}}</a>
{{/primary_author}}
</p>
<h1 class="entry-title">{{{title}}}</h1>
<time class="entry-date"
datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMMM YYYY"}}</time> - <time
class="entry-reading-time">{{reading_time}}</time>
</header>

<section class="post-full-content">
<div class="post-content">
{{content}}
</div>
</section>
<section class="post-full-content">
<div class="post-content">
{{content}}
</div>
</section>

<div class="post-spacer"></div>
<div class="post-spacer"></div>

<aside class="read-next">
<div class="row">
<div class="one-half column">
{{#next_post}}
<p><em>Next story</em></p>
<a class="read-next-story" href="{{url}}">
<section class="post">
<h3>{{title}}</h3>
</section>
</a>
{{/next_post}}
</div>
<div class="one-half column text-right">
<p><em>Previous story</em></p>
{{#prev_post}}
<a class="read-next-story prev" href="{{url}}">
<section class="post">
<h4>{{title}}</h4>
</section>
</a>
{{/prev_post}}
</div>
<aside class="read-next">
<div class="row">
<div class="one-half column">
{{#next_post}}
<p><em>Next story</em></p>
<a class="read-next-story" href="{{url}}">
<section class="post">
<h3>{{title}}</h3>
</section>
</a>
{{/next_post}}
</div>
</aside>
</div>
<div class="four columns">
<aside class="sidebar">
{{> "sidebar"}}
</aside>
</div>
<div class="one-half column text-right">
<p><em>Previous story</em></p>
{{#prev_post}}
<a class="read-next-story prev" href="{{url}}">
<section class="post">
<h4>{{title}}</h4>
</section>
</a>
{{/prev_post}}
</div>
</div>
</aside>
</div>
<div class="four columns">
<aside class="sidebar">
{{> "sidebar"}}
</aside>
</div>
</article>
{{/post}}
</div>
</article>
{{/post}}

0 comments on commit 56b969c

Please sign in to comment.