From f19bdb0f011de0ea45eeed5d074bf9872d884bdb Mon Sep 17 00:00:00 2001 From: Max Yakovenko Date: Thu, 12 Jul 2018 23:55:11 +0300 Subject: [PATCH] rewrite base template --- templates/base.html | 67 +++++++++++++++++++++++++++++++++++++++++++ templates/common.html | 40 ++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 templates/base.html create mode 100644 templates/common.html diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..eeaefd9 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,67 @@ +{% load static %} +{% load crispy_forms_tags %} + + + + + + + + {{ title }} + + + + + + + + + + + + + + + + + + + {% block extra_head_content %} + {% endblock extra_head_content %} + + + + +{% include 'components/header.html' %} +{% include 'components/navbar.html' %} +{% block pre_content %} +{% endblock pre_content %} +
+
+
+ {% block content %} + {% endblock content %} +
+
+
+{% block post_content %} +{% endblock post_content %} +{% include 'components/footer.html' %} +{% block extra_post_content %} +{% endblock extra_post_content %} + + + + + + + + + + +{% block extra_body_js %} +{% endblock extra_body_js %} + + diff --git a/templates/common.html b/templates/common.html new file mode 100644 index 0000000..4c415dc --- /dev/null +++ b/templates/common.html @@ -0,0 +1,40 @@ +{% extends 'base.html' %} +{% load static %} +{% load crispy_forms_tags %} + +{% block content %} +
+
+ {% if product_search_form %} + + {% endif %} + + {% block extra_left_menu_items %}{% endblock extra_left_menu_items %} + {% if product_root_categories %} +
+ {% for category in product_root_categories %} + + + {{ category.alt }} + + {{ category.name }} + + {% endfor %} +
+ {% endif %} + {% if contact_us_form %} +
+ {% crispy contact_us_form %} +
+ {% endif %} + +
+
+
+ {% block right_common_content %} + {% endblock right_common_content %} +
+{% endblock content %}