diff --git a/publichealth/home/templates/puput/blog_page.html b/publichealth/home/templates/puput/blog_page.html index a7cfd8a..2966d1a 100644 --- a/publichealth/home/templates/puput/blog_page.html +++ b/publichealth/home/templates/puput/blog_page.html @@ -24,9 +24,17 @@ + + + {% endblock social_share %} {% block blog_content %} +
+
+
+ {% with per_page=blog_page.num_entries_page %} {# 'paginate' tag cannot render dotted variables, so we need to create a context var #} {% paginate per_page entries %} @@ -44,44 +52,39 @@ {% endif %} {% endfor %} {% endif %} -
-
- {% if entry.header_image %} - - {% image entry.header_image fill-800x240 as header_image %} - {{ entry.header_image.title }} - - {% endif %} - -
-
-

{{ entry.title }}

- {% if entry.excerpt %} - {{ entry.excerpt|richtext }} - {% else %} - {{ entry.body|richtext|truncatewords_html:70 }} - {% endif %} -
- - -
-
-
+ {% if forloop.counter0|divisibleby:3 %} +
+
+
{% endblock blog_content %} diff --git a/publichealth/home/templates/puput/entry_page.html b/publichealth/home/templates/puput/entry_page.html index a55e172..9c8c111 100644 --- a/publichealth/home/templates/puput/entry_page.html +++ b/publichealth/home/templates/puput/entry_page.html @@ -1,5 +1,5 @@ {% extends "puput/base.html" %} -{% load i18n wagtailcore_tags wagtailimages_tags puput_tags social_share %} +{% load i18n wagtailcore_tags wagtailimages_tags puput_tags wagtailroutablepage_tags social_share %} {% block title %} {{ self.title }} | {{ blog_page.title }} @@ -43,47 +43,70 @@ {% block blog_content %} +
+ {% categories_list self.categories %} +
+ +

{{ self.title }}

+ + + +

+{{ self.excerpt|safe }} +

+ {% if self.header_image %}
{% image self.header_image fill-940x400 class="img-responsive" %}
{% endif %} -

{{ self.title }}

- -
- {% include 'puput/entry_links.html' with entry=self %} -
- {{ self.body|richtext}} -
- - {% entry_url self blog_page as post_url %} - +
+
+ {{ self.body|richtext}} +
+ + {% entry_url self blog_page as post_url %} + +
-
- {% show_comments %} -
+
+ {% show_comments %} +
{% endblock blog_content %} {% block extra_content %} diff --git a/publichealth/static/css/main.scss b/publichealth/static/css/main.scss index 990689d..c1bb80d 100644 --- a/publichealth/static/css/main.scss +++ b/publichealth/static/css/main.scss @@ -56,35 +56,74 @@ $slider-nav: 200px; .language-nav a[lang='en'] { display: none; } // Disable metas and override blog styles -.blog-page .sidebar .meta { display: none; } -.blog-page section { padding: 0; } -.blog-page .blog-tags ul { padding: 0; } -.blog-page ul.sidebar { background: transparent; } -.blog-page .searchTerm { +.blog-page { + padding-top: 1em; + + .sidebar .meta { display: none; } + ul.sidebar { background: transparent; } + + section { padding: 0; } + .blog-tags ul { padding: 0; } + + .searchTerm { + text-transform: uppercase; + font-weight: bold; + // background: #fff; + margin-bottom: 0px; + } + .searchDescription { + // background: #fff; + margin-bottom: 20px; + padding: 0 20px 20px; + line-height: normal; + color: #555; + } + .social-item { + font-size: 70%; + background: #2643A9 !important; + } + + h1.title { + margin-bottom: 0; + } + ul.links { + margin: 0; padding: 0; + display: block; + text-align: center; + } + + .blog-entry { + a { + text-decoration: none; + color: black; + } + .panel img { + width: 100%; height: auto; + } + .entry-category, .entry-meta { + font-size: 80%; + color: #777; + text-transform: uppercase; + } + } +} +.blog-header { + a { + color: white !important; + text-shadow: 1px 1px 2px black; + text-decoration: none; + } + .lead { + color: white; + font-size: 100%; + } +} +.blog .entry-categories { + text-align: center; text-transform: uppercase; - font-weight: bold; - background: #fff; - margin-bottom: 0px; -} -.blog-page .searchDescription { - background: #fff; - margin-bottom: 20px; - padding: 0 20px 20px; - line-height: normal; - color: #555; -} -.blog-page .social-item { - font-size: 70%; - background: #2643A9 !important; -} -.blog-header a { - color: white !important; - text-shadow: 1px 1px 2px black; - text-decoration: none; -} -.blog-header .lead { - color: white; - font-size: 100%; + a { color: #555; font-weight: bold; } + li { list-style: none; margin: 0; padding: 0; } + ul { list-style: none; margin: 0; padding: 1em 0 0; } } @import "subsites"; diff --git a/publichealth/static/css/modules/_news.scss b/publichealth/static/css/modules/_news.scss index 33a54f6..56bc53b 100644 --- a/publichealth/static/css/modules/_news.scss +++ b/publichealth/static/css/modules/_news.scss @@ -149,7 +149,5 @@ padding: 1em; margin: 0em; list-style-type: none; - - li:first-child { display: none; } } }