Skip to content

Commit

Permalink
update iamge helper
Browse files Browse the repository at this point in the history
  • Loading branch information
zutrinken committed Jul 31, 2017
1 parent e5013ea commit 981c0ec
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
17 changes: 8 additions & 9 deletions author.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{!< default}}

{{#author}}

<header id="blog-header"{{#if cover}} class="has-cover"{{else}}{{#if @blog.cover}} class="has-cover"{{/if}}{{/if}}>
<header id="blog-header"{{#if cover_image}} class="has-cover"{{else}}{{#if @blog.cover_image}} class="has-cover"{{/if}}{{/if}}>
<div class="inner">
<nav id="navigation">
{{#if @blog.logo}}
Expand All @@ -20,23 +19,23 @@
</span>
{{/if}}
</nav>
{{#if cover}}
<div class="blog-cover cover" style="background-image: url('{{cover}}');"></div>
{{#if cover_image}}
<div class="blog-cover cover" style="background-image: url('{{cover_image}}');"></div>
{{else}}
{{#if @blog.cover}}
<div class="blog-cover cover" style="background-image: url('{{@blog.cover}}');"></div>
{{#if @blog.cover_image}}
<div class="blog-cover cover" style="background-image: url('{{img_url @blog.cover}}');"></div>
{{/if}}
{{/if}}
</div>
</header>

<section id="blog-author"{{#if cover}} class="has-cover"{{else}}{{#if @blog.cover}} class="has-cover"{{/if}}{{/if}}>
<section id="blog-author"{{#if cover_image}} class="has-cover"{{else}}{{#if @blog.cover_image}} class="has-cover"{{/if}}{{/if}}>
<div class="inner">

<aside class="post-author">
{{#if image}}
{{#if profile_image}}
<figure class="post-author-avatar">
<img src="{{image}}" alt="{{name}}" />
<img src="{{profile_image}}" alt="{{name}}" />
</figure>
{{/if}}
<div class="post-author-bio">
Expand Down
7 changes: 3 additions & 4 deletions index.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{!< default}}

<header id="blog-header"{{#if @blog.cover}} class="has-cover"{{/if}}>
<header id="blog-header"{{#if @blog.cover_image}} class="has-cover"{{/if}}>
<div class="inner">
<nav id="navigation">
{{#if @blog.logo}}
Expand All @@ -18,8 +17,8 @@
{{#if @blog.description}}
<span class="blog-description">{{@blog.description}}</span>
{{/if}}
{{#if @blog.cover}}
<div class="blog-cover cover" style="background-image: url('{{@blog.cover}}');"></div>
{{#if @blog.cover_image}}
<div class="blog-cover cover" style="background-image: url('{{img_url @blog.cover_image}}');"></div>
{{/if}}
</div>
</header>
Expand Down
4 changes: 2 additions & 2 deletions page.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{{#post}}

<header id="post-header"{{#if image}} class="has-cover" {{/if}}>
<header id="post-header"{{#if cover_image}} class="has-cover" {{/if}}>
<div class="inner">
<nav id="navigation">
{{#if @blog.logo}}
Expand All @@ -21,7 +21,7 @@
{{/if}}
</nav>
<h1 class="post-title">{{{title}}}</h1>
{{#if image}}<div class="post-cover cover" style="background-image: url('{{image}}');"></div>{{/if}}
{{#if cover_image}}<div class="post-cover cover" style="background-image: url('{{img_url cover_image}}');"></div>{{/if}}
</div>
</header>

Expand Down
8 changes: 4 additions & 4 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<span class="progress-bar"></span>
</div>

<header id="post-header"{{#if image}} class="has-cover" {{/if}}>
<header id="post-header"{{#if feature_image}} class="has-cover" {{/if}}>
<div class="inner">
<nav id="navigation">
{{#if @blog.logo}}
Expand All @@ -26,7 +26,7 @@
</nav>
<h1 class="post-title">{{{title}}}</h1>
<span class="post-meta">{{author}} | <time datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMM YYYY"}}</time></span>
{{#if image}}<div class="post-cover cover" style="background-image: url('{{image}}');"></div>{{/if}}
{{#if feature_image}}<div class="post-cover cover" style="background-image: url('{{feature_image}}');"></div>{{/if}}
</div>
</header>

Expand Down Expand Up @@ -61,9 +61,9 @@

{{#author}}
<aside class="post-author">
{{#if image}}
{{#if profile_image}}
<figure class="post-author-avatar">
<img src="{{image}}" alt="{{name}}" />
<img src="{{profile_image}}" alt="{{name}}" />
</figure>
{{/if}}
<div class="post-author-bio">
Expand Down
10 changes: 5 additions & 5 deletions tag.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{!< default}}

<header id="blog-header"{{#if tag.image}} class="has-cover"{{else}}{{#if @blog.cover}} class="has-cover"{{/if}}{{/if}}>
<header id="blog-header"{{#if tag.feature_image}} class="has-cover"{{else}}{{#if @blog.cover_image}} class="has-cover"{{/if}}{{/if}}>
<div class="inner">
<nav id="navigation">
{{#if @blog.logo}}
Expand All @@ -26,11 +26,11 @@
Posts: {{pagination.total}}
{{/if}}
</span>
{{#if tag.image}}
<div class="blog-cover cover" style="background-image: url('{{tag.image}}');"></div>
{{#if tag.feature_image}}
<div class="blog-cover cover" style="background-image: url('{{img_url tag.feature_image}}');"></div>
{{else}}
{{#if @blog.cover}}
<div class="blog-cover cover" style="background-image: url('{{@blog.cover}}');"></div>
{{#if @blog.cover_image}}
<div class="blog-cover cover" style="background-image: url('{{img_url @blog.cover_image}}');"></div>
{{/if}}
{{/if}}
</div>
Expand Down

0 comments on commit 981c0ec

Please sign in to comment.