Skip to content

Commit

Permalink
Added Multi-User-Support for Ghost 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Read committed Aug 18, 2014
1 parent 0da4ccf commit 8e0901e
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 3 deletions.
6 changes: 6 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@ body {
padding-bottom: 32px; } }
.post .bottom-teaser .isLeft .index-headline {
padding-bottom: 32px; }
.post .bottom-teaser .isLeft a {
color: black;
text-decoration: none; }
.post .bottom-teaser .isLeft a:hover {
color: #333333;
text-decoration: underline; }
.post .bottom-teaser .isLeft .author-image {
display: block;
width: 80px;
Expand Down
6 changes: 6 additions & 0 deletions assets/css/main.sass
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,12 @@ body
padding-bottom: $rs*2
.index-headline
padding-bottom: 32px
a
color: #000
text-decoration: none
&:hover
color: #333
text-decoration: underline
.author-image
display: block
width: 80px
Expand Down
76 changes: 76 additions & 0 deletions author.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{{!< default}}

{{! The comment above "< default" means - insert everything in this file into
the {body} of the default.hbs template, which contains our header/footer. }}

{{! The big featured header on the homepage, with the site logo and description }}

<script>
(function ($) {
"use strict";
$(document).ready(function(){
var $window = $(window),
$image = $('.teaserimage-image');
$window.on('scroll', function() {
var top = $window.scrollTop();
if (top < 0 || top > 1500) { return; }
$image
.css('transform', 'translate3d(0px, '+top/3+'px, 0px)')
.css('opacity', 1-Math.max(top/700, 0));
});
$window.trigger('scroll');
});
}(jQuery));
</script>


{{#author}}
<div class="teaserimage">
<div class="teaserimage-image" style="background-image: url({{cover}})">
Teaser Image
</div>
</div>

<header class="blog-header">
{{#if image}}<a class="blog-logo" href="#" style="background-image: url({{image}})">{{name}}</a>{{/if}}
<h1 class="blog-title">{{name}}</h1>
<h2 class="blog-description">{{bio}}</h2>
<div class="custom-links">
<a href="https://twitter.com/MarkReadM" target="_blank"><i class="fa fa-twitter"></i></a>&nbsp;&nbsp;
<a href="https://plus.google.com/113570202169808481097/posts" target="_blank"><i class="fa fa-google-plus"></i></a>&nbsp;&nbsp;
<a href="https://www.pinterest.com/markreadM/" target="_blank"><i class="fa fa-pinterest"></i></a>
</div>
</header>


{{! The main content area on the homepage }}

<main class="content tag-list" role="main">


{{/author}}
{{! Each post will be output using this markup }}
{{#foreach posts}}

<article class="{{post_class}}">
<header class="post-header">
<h2 class="post-title"><a href="{{url}}">{{{title}}}</a></h2>
<span class="post-meta"><time datetime="{{date format='YYYY-MM-DD'}}">{{date format="DD MMM YYYY"}}</time> {{tags prefix="on "}}</span>
</header>
<section class="post-excerpt">
<p>{{excerpt}}&hellip;</p>
</section>
</article>

{{/foreach}}

{{!! After all the posts, we have the previous/next pagination links }}

<h5 class="index-headline bottom"><span>{{pagination}}</span></h5>

</main>
6 changes: 3 additions & 3 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<h1 class="post-title">{{{title}}}</h1>
<div class="cf post-meta-text">
<div class="author-image" style="background-image: url({{author.image}})">Blog Logo</div>
<h4 class="author-name" itemprop="author" itemscope itemtype="http://schema.org/Person">{{author.name}}</h4> on
<h4 class="author-name" itemprop="author" itemscope itemtype="http://schema.org/Person">{{author}}</h4> on
<time datetime="{{date format="YYYY-MM-DD"}}">{{date format='DD MMM YYYY'}}</time>
{{tags prefix=", tagged on " separator=", "}}
</div>
Expand Down Expand Up @@ -90,7 +90,7 @@
<h1 class="post-title">{{{title}}}</h1>
<div class="cf post-meta-text">
<div class="author-image" style="background-image: url({{author.image}})">Blog Logo</div>
<h4 class="author-name" itemprop="author" itemscope itemtype="http://schema.org/Person">{{author.name}}</h4> on
<h4 class="author-name" itemprop="author" itemscope itemtype="http://schema.org/Person">{{author}}</h4> on
<time datetime="{{date format="YYYY-MM-DD"}}">{{date format='DD MMM YYYY'}}</time>
{{tags prefix=", tagged on " separator=", "}}
</div>
Expand Down Expand Up @@ -135,7 +135,7 @@
<h5 class="index-headline featured"><span>Written by</span></h5>
<section class="author">
<div class="author-image" style="background-image: url({{author.image}})">Blog Logo</div>
<h4>{{author.name}}</h4>
<h4>{{author}}</h4>
<p class="bio">{{author.bio}}</p>
<hr>
<p class="published">Published <time datetime="{{date format="YYYY-MM-DD"}}">{{date format='DD MMM YYYY'}}</time></p>
Expand Down

0 comments on commit 8e0901e

Please sign in to comment.