Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roryg/ghostwriter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRory Gibson <rg.rorygibson@gmail.com>2014-08-13 01:36:25 +0400
committerRory Gibson <rg.rorygibson@gmail.com>2014-08-13 01:36:25 +0400
commitfc1e4b184644b20b2447e60c29083c2e20e85da2 (patch)
tree87f90a9bff52f2bea25812f2d716df70f982514c
parenteb65722ce939adfc0c93c3ea1e2616a31326ddfe (diff)
Added support for author pages
-rw-r--r--assets/css/style.css39
-rw-r--r--assets/js/scripts.js2
-rw-r--r--assets/sass/style.scss43
-rw-r--r--author.hbs44
-rw-r--r--partials/post-content.hbs2
5 files changed, 128 insertions, 2 deletions
diff --git a/assets/css/style.css b/assets/css/style.css
index c2ade71..b646377 100644
--- a/assets/css/style.css
+++ b/assets/css/style.css
@@ -242,6 +242,12 @@ table {
font-weight: 600;
line-height: 1;
margin: 25px 0 0; }
+ .post-date a,
+ .blog-description a {
+ color: #AEADAD; }
+ .post-date a:hover,
+ .blog-description a:hover {
+ color: #f03838; }
.post-date:after,
.blog-description:after {
border-bottom: 1px dotted #303030;
@@ -363,6 +369,39 @@ table {
padding: 8px 11px; }
/* ============================================================ */
+/* Author */
+/* ============================================================ */
+.author-profile:after {
+ border-bottom: 1px dotted #303030;
+ content: "";
+ display: block;
+ margin: 40px auto 0;
+ width: 100px; }
+
+.author-meta {
+ color: #AEADAD;
+ font-size: 14px;
+ font-weight: 600;
+ line-height: 1;
+ margin: 25px 0 0;
+ text-align: center;
+ text-transform: uppercase; }
+ .author-meta span {
+ display: inline-block;
+ margin: 0 10px 8px; }
+ .author-meta i {
+ margin-right: 8px; }
+ .author-meta a {
+ color: #AEADAD; }
+ .author-meta a:hover {
+ color: #f03838; }
+
+.author-bio {
+ margin: 20px auto 0;
+ text-align: center;
+ width: 700px; }
+
+/* ============================================================ */
/* Footer */
/* ============================================================ */
.footer {
diff --git a/assets/js/scripts.js b/assets/js/scripts.js
index 01c2148..a0430b1 100644
--- a/assets/js/scripts.js
+++ b/assets/js/scripts.js
@@ -82,7 +82,7 @@ jQuery(function($) {
});
});
- $('body').on('click', '.js-ajax-link, .pagination a, .post-tags a', function(e) {
+ $('body').on('click', '.js-ajax-link, .pagination a, .post-tags a, .post-header a', function(e) {
e.preventDefault();
if (loading === false) {
diff --git a/assets/sass/style.scss b/assets/sass/style.scss
index b4beab7..2e5980d 100644
--- a/assets/sass/style.scss
+++ b/assets/sass/style.scss
@@ -274,6 +274,9 @@ table {
line-height: 1;
margin: 25px 0 0;
+ a { color: #AEADAD; }
+ a:hover { color: $primary; }
+
&:after {
border-bottom: 1px dotted $secondary;
content: "";
@@ -414,6 +417,46 @@ table {
}
/* ============================================================ */
+/* Author */
+/* ============================================================ */
+
+.author-profile {
+ &:after {
+ border-bottom: 1px dotted $secondary;
+ content: "";
+ display: block;
+ margin: 40px auto 0;
+ width: 100px;
+ }
+}
+
+.author-meta {
+ color: #AEADAD;
+ font-size: 14px;
+ font-weight: 600;
+ line-height: 1;
+ margin: 25px 0 0;
+ text-align: center;
+ text-transform: uppercase;
+
+ span {
+ display: inline-block;
+ margin: 0 10px 8px;
+ }
+
+ i { margin-right: 8px; }
+
+ a { color: #AEADAD; }
+ a:hover { color: $primary; }
+}
+
+.author-bio {
+ margin: 20px auto 0;
+ text-align: center;
+ width: 700px;
+}
+
+/* ============================================================ */
/* Footer */
/* ============================================================ */
diff --git a/author.hbs b/author.hbs
new file mode 100644
index 0000000..0dabd22
--- /dev/null
+++ b/author.hbs
@@ -0,0 +1,44 @@
+{{!< default}}
+
+<div class="container">
+ <section class="author-profile">
+ {{#author}}
+ {{#if image}}
+ <img class="author-avatar" src="{{image}}" width="80" height="80" alt="{{name}}">
+ {{/if}}
+
+ <h1 class="author-name page-title">{{name}}</h1>
+
+ <div class="author-meta">
+ <span><i class="fa fa-bar-chart-o"></i> {{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}}</span>
+ {{#if location}}<span><i class="fa fa-map-marker"></i>{{location}}</span>{{/if}}
+ {{#if website}}<span><i class="fa fa-link"></i><a href="{{website}}">{{website}}</a></span>{{/if}}
+ <span><i class="fa fa-rss-square"></i><a href="{{url}}rss/">{{name}}</a></span>
+ </div>
+
+ {{#if bio}}
+ <p class="author-bio">{{bio}}</p>
+ {{/if}}
+ {{/author}}
+ </section>
+
+ <ol class="post-list">
+ {{#foreach posts}}
+ <li class="post-stub {{post_class}}" >
+ <a class="js-ajax-link" title="{{title}} | {{@blog.title}}" href="{{url}}">
+ <h4 class="post-stub-title">{{title}}</h4>
+
+ <time class="post-stub-date" datetime="{{published_at}}">Published {{date format="MMMM Do YYYY"}}</time>
+
+ {{#if featured}}
+ <span class="post-stub-tag">Featured</span>
+ {{/if}}
+ </a>
+ </li>
+ {{/foreach}}
+ </ol>
+
+ <div class="post-navigation">
+ {{pagination}}
+ </div>
+</div> \ No newline at end of file
diff --git a/partials/post-content.hbs b/partials/post-content.hbs
index 6b4fa08..e6df2ab 100644
--- a/partials/post-content.hbs
+++ b/partials/post-content.hbs
@@ -2,7 +2,7 @@
<header class="post-header">
<h1 class="post-title">{{title}}</h1>
- <p class="post-date"><time datetime="{{published_at}}">Published {{date format="MMMM Do YYYY"}}</time></p>
+ <p class="post-date">Published <time datetime="{{published_at}}">{{date format="MMMM Do YYYY"}}</time> <strong>by {{author}}</strong></p>
</header>
<div class="post-content clearfix">