From 7254119788ae1aeb0ff4c4fbe3188c04008a7cc7 Mon Sep 17 00:00:00 2001 From: Raghavendra Kamath Date: Fri, 30 Mar 2018 15:10:01 +0530 Subject: [PATCH] Update navbar & blog list * Add sitename in the navbar conditionally * Add subtitle block * Add blog list layout --- .../templates/includes/navbar/navbar.html | 4 +- foundation/templates/web.html | 5 ++- .../blog_post/templates/blog_post.html | 20 ++++++--- .../blog_post/templates/blog_post_row.html | 44 ++++++------------- 4 files changed, 34 insertions(+), 39 deletions(-) diff --git a/foundation/templates/includes/navbar/navbar.html b/foundation/templates/includes/navbar/navbar.html index ac52c7ff..607ef5e3 100644 --- a/foundation/templates/includes/navbar/navbar.html +++ b/foundation/templates/includes/navbar/navbar.html @@ -3,7 +3,9 @@
{% if parents and parents|length > 0 %} diff --git a/foundation/templates/web.html b/foundation/templates/web.html index 597a520a..07393357 100644 --- a/foundation/templates/web.html +++ b/foundation/templates/web.html @@ -8,7 +8,10 @@ {% include "foundation/templates/includes/sidebar/sidebar.html" %}
- {% include "foundation/templates/includes/page-head.html" %} +
+ {% include "foundation/templates/includes/page-head.html" %} + {% block page_subtitle %}{% endblock %} +
{%- block page_content -%}{%- endblock -%}
diff --git a/foundation/website/doctype/blog_post/templates/blog_post.html b/foundation/website/doctype/blog_post/templates/blog_post.html index c1e0f700..dde310e8 100644 --- a/foundation/website/doctype/blog_post/templates/blog_post.html +++ b/foundation/website/doctype/blog_post/templates/blog_post.html @@ -2,14 +2,20 @@ {% block meta_block %} {% include "templates/includes/meta_block.html" %} {% endblock %} + + + {% block page_subtitle %} +
+

+ {{ _("By") }} {{ blogger_info and blogger_info.full_name or full_name }} + Posted on {{ frappe.format_date(published_on) }} in {{ category.title }} .{{ comment_text }} +

+
+ {% endblock %} + + {% block page_content %}
{% endblock %} diff --git a/foundation/website/doctype/blog_post/templates/blog_post_row.html b/foundation/website/doctype/blog_post/templates/blog_post_row.html index aed72897..cd1d4afb 100644 --- a/foundation/website/doctype/blog_post/templates/blog_post_row.html +++ b/foundation/website/doctype/blog_post/templates/blog_post_row.html @@ -1,35 +1,19 @@ {%- set post = doc -%} -
-
-
-

{{ post.title }}

- {% if post.cover_image %} -

- {{post.title}} - Cover Image +

+
+
+ {{ post.full_name }}'s profile picture +
+
+

{{ post.title }}

+

By {{ post.full_name }}. Posted on + {{ frappe.format_date(post.published_on) }} + {% if post.comments %} + + {{ post.comments }} + + {% endif %}

- {% endif %} -

{{ post.intro }}

- -
-
-
- -
-
-
- -
- {{ frappe.format_date(post.published_on) }} - {% if post.comments %} - - {{ post.comments }} - - {% endif %} -
-
-