From 83c26eb01d806b6afb2b812f052a46cb5996aafa Mon Sep 17 00:00:00 2001 From: Raghavendra Kamath Date: Wed, 4 Apr 2018 20:00:13 +0530 Subject: [PATCH] Add list macro --- foundation/public/css/erpnext-org-theme.css | 11 +++--- foundation/templates/includes/macros.html | 34 ++++++++++++------- .../blog_post/templates/blog_post_row.html | 16 +++------ 3 files changed, 32 insertions(+), 29 deletions(-) diff --git a/foundation/public/css/erpnext-org-theme.css b/foundation/public/css/erpnext-org-theme.css index 66901422..4add50bd 100644 --- a/foundation/public/css/erpnext-org-theme.css +++ b/foundation/public/css/erpnext-org-theme.css @@ -1,3 +1,4 @@ +/* palette colors*/ @import "reset.css"; @import "/assets/css/frappe-css.css"; .indicator, @@ -24,7 +25,7 @@ } .indicator.grey::before, .indicator-right.grey::after { - background: #F0F4F7; + background: #f0f4f7; } .indicator.blue::before, .indicator-right.blue::after { @@ -52,19 +53,19 @@ } .indicator.black::before, .indicator-right.black::after { - background: #36414C; + background: #36414c; } .indicator.yellow::before, .indicator-right.yellow::after { - background: #FEEF72; + background: #feef72; } .indicator.light-blue::before, .indicator-right.light-blue::after { - background: #7CD6FD; + background: #7cd6fd; } .indicator.lightblue::before, .indicator-right.lightblue::after { - background: #7CD6FD; + background: #7cd6fd; } .modal-header .indicator { float: left; diff --git a/foundation/templates/includes/macros.html b/foundation/templates/includes/macros.html index 9d22e4b7..d6dba41b 100644 --- a/foundation/templates/includes/macros.html +++ b/foundation/templates/includes/macros.html @@ -16,18 +16,26 @@ {% endmacro %} -{% macro list(link, image, title, subtitle) %} -
-
-
- - -
-
- {% if title %}

{{ title }}

{% endif %} - {{ content }} -
-
+{% macro list_item(link, image, title, subtitle) %} + {% endmacro %} 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 745c1464..7170ca77 100644 --- a/foundation/website/doctype/blog_post/templates/blog_post_row.html +++ b/foundation/website/doctype/blog_post/templates/blog_post_row.html @@ -1,12 +1,6 @@ {%- set post = doc -%} -
-
-
- {{ post.full_name }}'s profile picture -
-
-

{{ post.title }}

-

By {{ post.full_name }}. Posted on +{% macro meta() %} +

By {{ post.full_name }}. Posted on {{ frappe.format_date(post.published_on) }} {% if post.comments %} @@ -14,6 +8,6 @@ {% endif %}

-
-
-
+{% endmacro %} +{% from "foundation/templates/includes/macros.html" import list_item%} +{{list_item(post.route, post.avatar, post.title, meta())}}