Permalink
Browse files

Add suport for authors. close #19

  • Loading branch information...
zutrinken committed May 11, 2018
1 parent a47c075 commit c91b1ea23f69b8dc32a1725219c62a6a9aca242a
Showing with 83 additions and 44 deletions.
  1. +2 −2 assets/css/style.css
  2. +6 −1 assets/js/script.js
  3. +2 −1 locales/de.json
  4. +2 −1 locales/en.json
  5. +1 −1 partials/loop.hbs
  6. +36 −29 post.hbs
  7. +34 −9 src/sass/style.scss

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -20,5 +20,6 @@
"on ": "in ",
"No Posts": "Keine Beiträge",
"% Post": "% Beitrag",
"% Posts": "% Beiträge"
"% Posts": "% Beiträge",
"This post was a collaboration between:": "Dieser Beitrag war eine Zusammenarbeit von:"
}
@@ -20,5 +20,6 @@
"on ": "on ",
"No Posts": "No Posts",
"% Post": "% Post",
"% Posts": "% Posts"
"% Posts": "% Posts",
"This post was a collaboration between:": "This post was a collaboration between:"
}
@@ -8,7 +8,7 @@
<div class="inner">
<header class="post-header">
<h2 class="post-title"><a href="{{url}}">{{{title}}}</a></h2>
<span class="post-meta">{{author}} {{tags prefix=(t "on ") separator=", "}} | <time datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMM YYYY"}}</time></span>
<span class="post-meta">{{authors separator=", "}} {{tags prefix=(t "on ") separator=", "}} | <time datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMM YYYY"}}</time></span>
<div class="clear"></div>
</header>
@@ -25,7 +25,7 @@
{{/if}}
</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>
<span class="post-meta">{{authors separator=", "}} | <time datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMM YYYY"}}</time></span>
{{#if feature_image}}<div class="post-cover cover" style="background-image: url('{{feature_image}}');"></div>{{/if}}
</div>
</header>
@@ -59,34 +59,41 @@
<div class="clear"></div>
{{#author}}
<aside class="post-author">
<figure class="post-author-avatar avatar">
{{#if profile_image}}
<img src="{{profile_image}}" alt="{{name}}" />
{{/if}}
</figure>
<div class="post-author-bio">
<h4 class="post-author-name"><a href="{{url}}">{{name}}</a></h4>
{{#if bio}}
<p class="post-author-about">{{{bio}}}</p>
{{/if}}
{{#if location}}
<span class="post-author-location"><i class="ic ic-location"></i> {{location}}</span>
{{/if}}
{{#if website}}
<span class="post-author-website"><i class="ic ic-link"></i> <a href="{{website}}">{{t "Website"}}</a></span>
{{/if}}
{{#if twitter}}
<span class="post-author-twitter"><i class="ic ic-twitter"></i> <a target="_blank" href="https://twitter.com/{{twitter}}">Twitter</a></span>
{{/if}}
{{#if facebook}}
<span class="post-author-facebook"><i class="ic ic-facebook"></i> <a target="_blank" href="https://facebook.com/{{facebook}}">Facebook</a></span>
{{/if}}
</div>
<div class="clear"></div>
</aside>
{{/author}}
{{#has author="count:>1"}}
<aside class="post-authors">
<p class="post-authors-info">{{t "This post was a collaboration between:"}}</p>
<p class="post-authors-authors">{{authors separator=", "}}</p>
</aside>
{{else}}
{{#author}}
<aside class="post-author">
<figure class="post-author-avatar avatar">
{{#if profile_image}}
<img src="{{profile_image}}" alt="{{name}}" />
{{/if}}
</figure>
<div class="post-author-bio">
<h4 class="post-author-name"><a href="{{url}}">{{name}}</a></h4>
{{#if bio}}
<p class="post-author-about">{{{bio}}}</p>
{{/if}}
{{#if location}}
<span class="post-author-location"><i class="ic ic-location"></i> {{location}}</span>
{{/if}}
{{#if website}}
<span class="post-author-website"><i class="ic ic-link"></i> <a href="{{website}}">{{t "Website"}}</a></span>
{{/if}}
{{#if twitter}}
<span class="post-author-twitter"><i class="ic ic-twitter"></i> <a target="_blank" href="https://twitter.com/{{twitter}}">Twitter</a></span>
{{/if}}
{{#if facebook}}
<span class="post-author-facebook"><i class="ic ic-facebook"></i> <a target="_blank" href="https://facebook.com/{{facebook}}">Facebook</a></span>
{{/if}}
</div>
<div class="clear"></div>
</aside>
{{/author}}
{{/has}}
</section>
@@ -1074,7 +1074,7 @@ img {
width: 4em;
height: 4em;
margin: 0 1em 1em 0
}
}
}
.post-author-avatar img {
width: 100%;
@@ -1085,19 +1085,19 @@ img {
.post-author-bio {
padding-left: 10em;
font-family: 'Fira Sans', sans-serif;
font-size: 0.75em;
line-height: 1.334em;
font-size: 0.75em;
line-height: 1.334em;
@media only screen and (max-width: 480px) {
padding-left: 0;
}
@media only screen and (max-width: 480px) {
padding-left: 0;
}
}
.post-author-name {
margin: 0;
padding: 0;
font-size: 1.334em;
line-height: 1em;
text-indent: inherit;
font-size: 1.334em;
line-height: 1em;
text-indent: inherit;
}
.post-author-about {
margin: 0.667em 0 0.334em;
@@ -1125,6 +1125,31 @@ img {
text-decoration: underline;
}
/* ==========================================================================
Post Authors
========================================================================== */
.post-authors {
position: relative;
margin: 2em 0 0;
padding: 2em 0;
z-index: 10;
border-top: 1px solid $color-gray-90;
border-bottom: 1px solid $color-gray-90;
clear: both;
text-align: center;
}
.post-authors-info {
margin: 0 0 1em;
}
.post-authors-authors {
margin: 0;
padding: 0;
font-size: 1.334em;
line-height: 1em;
text-indent: inherit;
}
/* ==========================================================================
Post Comments
========================================================================== */

0 comments on commit c91b1ea

Please sign in to comment.