From 030d41f8e176077a36932f0818e5c3a4fdb963ff Mon Sep 17 00:00:00 2001
From: Chris Lawton <chris.lawton@torchbox.com>
Date: Mon, 22 Jan 2018 15:35:59 +0000
Subject: [PATCH] adding display date and styling page author in news page
 template

---
 opentech/public/news/templates/news/news_page.html | 14 +++++++++-----
 .../static_src/src/sass/components/_heading.scss   |  4 ++++
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/opentech/public/news/templates/news/news_page.html b/opentech/public/news/templates/news/news_page.html
index 8960f49ec..a61122667 100644
--- a/opentech/public/news/templates/news/news_page.html
+++ b/opentech/public/news/templates/news/news_page.html
@@ -4,12 +4,16 @@
 {% block content %}
 <div class="wrapper wrapper--small">
 
-
-    {% for author in page.authors.all %}
-        <p><a href="{% pageurl author.author %}">{{ author.author }}</a><p>
-    {% endfor %}
-
     <p>{{ page.introduction }}</p>
+    <h5 class="heading heading--author">
+        {{ page.display_date|date:"D, Y-m-d H:i" }}
+        {% if page.authors.all %}
+            | By:
+            {% for author in page.authors.all %}
+                <a href="{% pageurl author.author %}">{{ author.author }}</a>
+            {% endfor %}
+        {% endif %}
+    </h5>
 
     <section class="main-body">
         {% include_block page.body %}
diff --git a/opentech/static_src/src/sass/components/_heading.scss b/opentech/static_src/src/sass/components/_heading.scss
index 7c3fa5fc4..8ee3e8895 100644
--- a/opentech/static_src/src/sass/components/_heading.scss
+++ b/opentech/static_src/src/sass/components/_heading.scss
@@ -5,4 +5,8 @@
         font-weight: $weight--light;
         border-bottom: 1px solid $color--mid-grey;
     }
+
+    &--author {
+        margin: 2rem 0 0;
+    }
 }
-- 
GitLab