From c52b0aa7aaef62ae3a0a42ef213050c5be0176a7 Mon Sep 17 00:00:00 2001 From: Raghavendra Kamath Date: Mon, 23 Apr 2018 11:52:41 +0530 Subject: [PATCH] Add breadcrumbs, navbar and blog listing for bs4 --- .../templates/includes/breadcrumbs.html | 12 +++++ .../includes/navbar/dropdown_items.html | 17 +++++++ .../includes/navbar/dropdown_login.html | 17 +++++++ .../templates/includes/navbar/navbar.html | 12 +++++ .../includes/navbar/navbar_items.html | 21 +++++++++ .../includes/navbar/navbar_link.html | 13 ++++++ .../includes/navbar/navbar_login.html | 25 +++++++++++ .../includes/navbar/navbar_search.html | 9 ++++ .../blog_post/templates/blog_post.html | 44 +++++++++++++++++++ .../blog_post/templates/blog_post_row.html | 18 ++++++++ 10 files changed, 188 insertions(+) create mode 100644 foundation/templates/includes/breadcrumbs.html create mode 100644 foundation/templates/includes/navbar/dropdown_items.html create mode 100644 foundation/templates/includes/navbar/dropdown_login.html create mode 100644 foundation/templates/includes/navbar/navbar.html create mode 100644 foundation/templates/includes/navbar/navbar_items.html create mode 100644 foundation/templates/includes/navbar/navbar_link.html create mode 100644 foundation/templates/includes/navbar/navbar_login.html create mode 100644 foundation/templates/includes/navbar/navbar_search.html create mode 100644 foundation/website/doctype/blog_post/templates/blog_post.html create mode 100644 foundation/website/doctype/blog_post/templates/blog_post_row.html diff --git a/foundation/templates/includes/breadcrumbs.html b/foundation/templates/includes/breadcrumbs.html new file mode 100644 index 00000000..b47ab880 --- /dev/null +++ b/foundation/templates/includes/breadcrumbs.html @@ -0,0 +1,12 @@ +{% if parents and parents|length > 0 %} + +{% endif %} diff --git a/foundation/templates/includes/navbar/dropdown_items.html b/foundation/templates/includes/navbar/dropdown_items.html new file mode 100644 index 00000000..e1eec7b1 --- /dev/null +++ b/foundation/templates/includes/navbar/dropdown_items.html @@ -0,0 +1,17 @@ + diff --git a/foundation/templates/includes/navbar/dropdown_login.html b/foundation/templates/includes/navbar/dropdown_login.html new file mode 100644 index 00000000..9bd687a1 --- /dev/null +++ b/foundation/templates/includes/navbar/dropdown_login.html @@ -0,0 +1,17 @@ + +{% if not only_static %} +{%- for child in post_login -%} +
  • + {%- if child.url -%} + + {{ child.label }} + + {%- endif -%} +
  • +{%- endfor -%} +{% if not hide_login %} +
  • {{ _("Login") }}
  • +{% endif %} +{% endif %} diff --git a/foundation/templates/includes/navbar/navbar.html b/foundation/templates/includes/navbar/navbar.html new file mode 100644 index 00000000..f23ac49e --- /dev/null +++ b/foundation/templates/includes/navbar/navbar.html @@ -0,0 +1,12 @@ + diff --git a/foundation/templates/includes/navbar/navbar_items.html b/foundation/templates/includes/navbar/navbar_items.html new file mode 100644 index 00000000..531d603f --- /dev/null +++ b/foundation/templates/includes/navbar/navbar_items.html @@ -0,0 +1,21 @@ +{% if top_bar_items -%} + +{%- endif %} + diff --git a/foundation/templates/includes/navbar/navbar_link.html b/foundation/templates/includes/navbar/navbar_link.html new file mode 100644 index 00000000..92510bef --- /dev/null +++ b/foundation/templates/includes/navbar/navbar_link.html @@ -0,0 +1,13 @@ + diff --git a/foundation/templates/includes/navbar/navbar_login.html b/foundation/templates/includes/navbar/navbar_login.html new file mode 100644 index 00000000..b012889a --- /dev/null +++ b/foundation/templates/includes/navbar/navbar_login.html @@ -0,0 +1,25 @@ + +{% if not only_static %} + +{% if not hide_login %} + +{% endif %} +{% endif %} diff --git a/foundation/templates/includes/navbar/navbar_search.html b/foundation/templates/includes/navbar/navbar_search.html new file mode 100644 index 00000000..67b4d650 --- /dev/null +++ b/foundation/templates/includes/navbar/navbar_search.html @@ -0,0 +1,9 @@ +{% if navbar_search %} +
  • +
    + +
    +
  • +{% endif %} \ No newline at end of file diff --git a/foundation/website/doctype/blog_post/templates/blog_post.html b/foundation/website/doctype/blog_post/templates/blog_post.html new file mode 100644 index 00000000..99f4c1e3 --- /dev/null +++ b/foundation/website/doctype/blog_post/templates/blog_post.html @@ -0,0 +1,44 @@ +{% extends "templates/web.html" %} +{% block meta_block %} + {% include "templates/includes/meta_block.html" %} +{% endblock %} +{% block page_content %} +
    + +{% if blogger_info %} +{% include "templates/includes/blog/blogger.html" %} +{% endif %} +
    + {% include 'templates/includes/comments/comments.html' %} +
    +
    + +{% 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 new file mode 100644 index 00000000..d9a44628 --- /dev/null +++ b/foundation/website/doctype/blog_post/templates/blog_post_row.html @@ -0,0 +1,18 @@ +{%- set post = doc -%} +
    +
    +
    + +

    {{ post.title }}

    +

    {{ post.intro }}

    + +
    +

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

    +
    + +
    +
    +