From eed2444093f2529b4fff115f8f6998f857b144c6 Mon Sep 17 00:00:00 2001 From: Raghavendra Kamath Date: Mon, 23 Apr 2018 17:53:35 +0530 Subject: [PATCH] Update inner pages - Fellow page if now cards based - update blog detail page - over ride chapters list page - add avatar css - update breadcrumb - remove unecessary paddings from pages - fix type in bootstrap js include - over ride list template - update about page and service providers page - update jobs page - add spacing to footer copyright section - temporarily remove webform templates (TODO - needs fix) --- .../foundation_fellowship.py | 1 - .../templates/foundation_fellowship_row.html | 21 +-- .../portal_job/templates/portal_job_row.html | 8 +- .../doctype/chapter/templates/chapter.html | 69 ++++++++++ .../chapter/templates/chapter_row.html | 23 ++++ foundation/public/css/style.css | 123 +++++++++++++++++- foundation/templates/base.html | 2 +- foundation/templates/includes/blog/blog.html | 19 +++ .../templates/includes/blog/blogger.html | 13 ++ foundation/templates/includes/blog/hero.html | 12 ++ .../templates/includes/breadcrumbs.html | 2 +- .../templates/includes/footer/footer.html | 2 +- foundation/templates/includes/list/list.html | 26 ++++ .../templates/includes/navbar/navbar.html | 2 +- foundation/templates/web.html | 96 +++++++------- .../blog_post/templates/blog_post.html | 36 ++--- .../blog_post/templates/blog_post_row.html | 24 ++-- .../{web_form.html => web_form-bak.html} | 2 - ...eb_form_row.html => web_form_row-bak.html} | 0 foundation/www/about.html | 2 +- foundation/www/service-providers.html | 2 +- 21 files changed, 374 insertions(+), 111 deletions(-) create mode 100644 foundation/non_profit/doctype/chapter/templates/chapter.html create mode 100644 foundation/non_profit/doctype/chapter/templates/chapter_row.html create mode 100644 foundation/templates/includes/blog/blog.html create mode 100644 foundation/templates/includes/blog/blogger.html create mode 100644 foundation/templates/includes/blog/hero.html create mode 100644 foundation/templates/includes/list/list.html rename foundation/website/doctype/web_form/templates/{web_form.html => web_form-bak.html} (98%) rename foundation/website/doctype/web_form/templates/{web_form_row.html => web_form_row-bak.html} (100%) diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.py b/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.py index c15540d8..a25df24d 100644 --- a/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.py +++ b/foundation/erpnext_foundation/doctype/foundation_fellowship/foundation_fellowship.py @@ -27,4 +27,3 @@ def get_list_context(context): context.no_cache = True context.no_breadcrumbs = True context.order_by = 'creation desc' - context.introduction = '

Following are the Foundation Fellows

' diff --git a/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship_row.html b/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship_row.html index e6d0d98b..7f65baac 100644 --- a/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship_row.html +++ b/foundation/erpnext_foundation/doctype/foundation_fellowship/templates/foundation_fellowship_row.html @@ -1,14 +1,15 @@ -
- - +
+ + - -
- {% if title %}

{{ doc.title }}

{% endif %} + +
+ {% if title %}
{{ doc.title }}
{% endif %}

- {{ frappe.format_date(doc.creation) }} - {{ doc.country }} + {{ frappe.format_date(doc.creation) }}
+ {{ doc.country }}

-
+
+
diff --git a/foundation/erpnext_foundation/doctype/portal_job/templates/portal_job_row.html b/foundation/erpnext_foundation/doctype/portal_job/templates/portal_job_row.html index 42be8c1c..e606b575 100644 --- a/foundation/erpnext_foundation/doctype/portal_job/templates/portal_job_row.html +++ b/foundation/erpnext_foundation/doctype/portal_job/templates/portal_job_row.html @@ -1,7 +1,5 @@ -
- -

{{ doc.title }}

+
diff --git a/foundation/non_profit/doctype/chapter/templates/chapter.html b/foundation/non_profit/doctype/chapter/templates/chapter.html new file mode 100644 index 00000000..0110950c --- /dev/null +++ b/foundation/non_profit/doctype/chapter/templates/chapter.html @@ -0,0 +1,69 @@ +{% extends "templates/web.html" %} + +{% block page_content %} +

{{ title }}

+

Details

+

{{ introduction }}

+{% if meetup_embed_html %} + {{ meetup_embed_html }} +{% endif %} +

List of Members

+ +{% if members %} + + + + + + {% set index = [1] %} + {% for user in members %} + {% if user.enabled == 1 %} + + + + + {% set __ = index.append(1) %} + {% endif %} + {% endfor %} +
Member Details
{{ index|length }} +
+
{{ frappe.db.get_value('User', user.user, 'full_name') }}
+
+ {% if user.website_url %} + {{ user.website_url or '' }} + {% endif %} +
+
+ {% if user.introduction %} + {{ user.introduction }} + {% endif %} +
+
+
+{% else %} +

No member yet.

+{% endif %} + +

Chapter Head

+ + {% set doc = frappe.get_doc('Member',chapter_head) %} + + + + + + + + + + + + +
Name{{ doc.member_name }}
Email{{ frappe.db.get_value('User', doc.email, 'email') or '' }}
Phone{{ frappe.db.get_value('User', doc.email, 'phone') or '' }}
+

Address

+

{{ address }}

+ +

Join this Chapter

+

Leave this Chapter

+ +{% endblock %} diff --git a/foundation/non_profit/doctype/chapter/templates/chapter_row.html b/foundation/non_profit/doctype/chapter/templates/chapter_row.html new file mode 100644 index 00000000..d1a818a1 --- /dev/null +++ b/foundation/non_profit/doctype/chapter/templates/chapter_row.html @@ -0,0 +1,23 @@ +{% if doc.published %} +
+

{{ doc.name | capitalize }}

+

Chapter Head : {{ frappe.db.get_value('User', chapter_head, 'full_name') }} + + {% if members %} + {% set index = [] %} + {% for user in members %} + {% if user.enabled == 1 %} + {% set __ = index.append(1) %} + {% endif %} + {% endfor %} + Members: {{ index|length }} + {% else %} + Members: 0 + {% endif %} + + +

+

{{ html2text(doc.introduction) | truncate (200) }}

+ Read More Details +
+{% endif %} diff --git a/foundation/public/css/style.css b/foundation/public/css/style.css index 1ce220c7..e7744c25 100644 --- a/foundation/public/css/style.css +++ b/foundation/public/css/style.css @@ -1,3 +1,7 @@ +.navbar { + padding: 0.5rem 0; +} + .media-img { max-width: 150px; } @@ -7,6 +11,121 @@ } .breadcrumb { - background-color: #ffffff; - margin: 0 -2rem; + background-color: #fff; + margin: 0 -1rem; +} + +img, +.img { + max-width: 100%; +} + +/* avatar */ + +.avatar { + display: inline-block; + vertical-align: middle; + width: 50px; + height: 50px; +} + +.avatar-frame { + display: inline-block; + width: 100%; + height: 0; + padding: 50% 0; + background-size: cover; + background-repeat: no-repeat; + background-position: center center; + border-radius: 4px; +} + +.avatar img { + max-width: 100%; + max-height: 100%; + border-radius: 4px; +} + +.avatar-empty { + border: 1px dashed #d1d8dd; + border-radius: 4px; +} + +.avatar-small { + margin-right: 5px; + width: 24px; + height: 24px; +} + +.avatar-small .standard-image { + font-size: 14px; +} + +.avatar-small .avatar-frame { + border-radius: 3px; +} + +.avatar-medium { + margin-right: 5px; + width: 36px; + height: 36px; +} + +.avatar-medium .standard-image { + font-size: 18px; +} + +.avatar-large { + margin-right: 10px; + width: 72px; + height: 72px; +} + +.avatar-large .standard-image { + font-size: 36px; +} + +.avatar-xl { + margin-right: 10px; + width: 108px; + height: 108px; +} + +.avatar-xl .standard-image { + font-size: 72px; +} + +.avatar-xs { + margin-right: 3px; + margin-top: -2px; + width: 17px; + height: 17px; + border: none; + border-radius: 3px; +} + +.avatar-xs .standard-image { + font-size: 9px; +} + +.avatar-text { + display: inline; + width: 100%; + height: 0; + padding-bottom: 100%; +} + +.standard-image { + width: 100%; + height: 0; + padding: 50% 0; + display: inline-block; + text-align: center; + border-radius: 4px; + font-size: 14px; + line-height: 0; + color: #d1d8dd; + border: 1px solid #d1d8dd; + font-weight: normal; + margin-top: -1px; } diff --git a/foundation/templates/base.html b/foundation/templates/base.html index b92583d2..a28fe3fd 100644 --- a/foundation/templates/base.html +++ b/foundation/templates/base.html @@ -45,7 +45,7 @@ - + {% endblock %} {%- if js_globals is defined %} +{% endblock %} diff --git a/foundation/templates/includes/blog/blogger.html b/foundation/templates/includes/blog/blogger.html new file mode 100644 index 00000000..41f89609 --- /dev/null +++ b/foundation/templates/includes/blog/blogger.html @@ -0,0 +1,13 @@ +
+
+
+ +
+
+
+

+ {{ blogger_info.full_name }} +

+

{%if blogger_info.bio %}{{ blogger_info.bio }}{% endif %}

+
+
diff --git a/foundation/templates/includes/blog/hero.html b/foundation/templates/includes/blog/hero.html new file mode 100644 index 00000000..8ec47f3a --- /dev/null +++ b/foundation/templates/includes/blog/hero.html @@ -0,0 +1,12 @@ +{% if blog_title and not (frappe.local.form_dict.txt or frappe.local.form_dict.by) %} +
+
+

+ {{ blog_title }} +

+ {% if blog_introduction -%} +

{{ blog_introduction }}

+ {%- endif %} +
+
+{% endif %} diff --git a/foundation/templates/includes/breadcrumbs.html b/foundation/templates/includes/breadcrumbs.html index b47ab880..5bf97077 100644 --- a/foundation/templates/includes/breadcrumbs.html +++ b/foundation/templates/includes/breadcrumbs.html @@ -3,7 +3,7 @@ {% for parent in parents %} {% endfor %} diff --git a/foundation/templates/includes/footer/footer.html b/foundation/templates/includes/footer/footer.html index 5ead52d9..4a33b64f 100644 --- a/foundation/templates/includes/footer/footer.html +++ b/foundation/templates/includes/footer/footer.html @@ -114,7 +114,7 @@
-
+
© ERPNext Open Source Software Foundation. Content licensed under CC-BY-SA 3.0 Read the Terms of use.
{% endblock %} {% block style %} - {% 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 d9a44628..a917509e 100644 --- a/foundation/website/doctype/blog_post/templates/blog_post_row.html +++ b/foundation/website/doctype/blog_post/templates/blog_post_row.html @@ -1,18 +1,16 @@ {%- set post = doc -%} -
-
-
+
-

{{ post.title }}

-

{{ post.intro }}

+

{{ post.title }}

+

{{ post.intro }}

-
-

- {{ post.full_name }} - {{ frappe.format_date(post.published_on) }} -

-
- -
+
+

+ {{ post.full_name }} + {{ frappe.format_date(post.published_on) }} +

+
+ + diff --git a/foundation/website/doctype/web_form/templates/web_form.html b/foundation/website/doctype/web_form/templates/web_form-bak.html similarity index 98% rename from foundation/website/doctype/web_form/templates/web_form.html rename to foundation/website/doctype/web_form/templates/web_form-bak.html index 90e15c61..4ab075e3 100644 --- a/foundation/website/doctype/web_form/templates/web_form.html +++ b/foundation/website/doctype/web_form/templates/web_form-bak.html @@ -375,8 +375,6 @@ window.web_form_settings = { {% endblock %} {% block style %} - - diff --git a/foundation/website/doctype/web_form/templates/web_form_row.html b/foundation/website/doctype/web_form/templates/web_form_row-bak.html similarity index 100% rename from foundation/website/doctype/web_form/templates/web_form_row.html rename to foundation/website/doctype/web_form/templates/web_form_row-bak.html diff --git a/foundation/www/about.html b/foundation/www/about.html index 4484ad69..a38ac0aa 100644 --- a/foundation/www/about.html +++ b/foundation/www/about.html @@ -6,7 +6,7 @@ {% block content%}
-
+

ERPNext Foundation

We are a Non Profit diff --git a/foundation/www/service-providers.html b/foundation/www/service-providers.html index fe95f323..33bc7058 100644 --- a/foundation/www/service-providers.html +++ b/foundation/www/service-providers.html @@ -34,7 +34,7 @@ {% endmacro %} {% block page_content %} -

+

Gold Members

{% for m in gold_members %} {{ gold_member(m) }}