Kanchan Chauhan | e0818f8 | 2016-04-22 14:39:02 +0530 | [diff] [blame] | 1 | {% extends "templates/web.html" %} |
| 2 | |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 3 | {% from "erpnext/templates/includes/macros.html" import render_homepage_section %} |
Kanchan Chauhan | e0818f8 | 2016-04-22 14:39:02 +0530 | [diff] [blame] | 4 | |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 5 | {% block content %} |
| 6 | <main> |
| 7 | {% if homepage.hero_section_based_on == 'Default' %} |
mergify[bot] | 5b7b583 | 2022-07-26 13:46:03 +0530 | [diff] [blame^] | 8 | <section class="hero-section border-bottom {%if homepage.hero_image%}hero-image{%endif%}" |
| 9 | {% if homepage.hero_image %} |
| 10 | style="background-image: url('{{ homepage.hero_image }}');" |
| 11 | {%- endif %} |
| 12 | > |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 13 | <div class="container py-5"> |
| 14 | <h1 class="d-none d-sm-block display-4">{{ homepage.tag_line }}</h1> |
| 15 | <h1 class="d-block d-sm-none">{{ homepage.tag_line }}</h1> |
| 16 | <h2 class="d-none d-sm-block">{{ homepage.description }}</h2> |
| 17 | <h3 class="d-block d-sm-none">{{ homepage.description }}</h3> |
Rushabh Mehta | ac123c5 | 2016-05-20 16:36:56 +0530 | [diff] [blame] | 18 | </div> |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 19 | |
| 20 | <div class="container"> |
| 21 | <a href="{{ explore_link }}" class="mb-5 btn btn-primary">{{ _('Explore') }}</a> |
| 22 | </div> |
| 23 | </section> |
| 24 | {% elif homepage.hero_section_based_on == 'Slideshow' and slideshow %} |
| 25 | <section class="hero-section"> |
| 26 | {% include "templates/includes/slideshow.html" %} |
| 27 | </section> |
| 28 | {% elif homepage.hero_section_based_on == 'Homepage Section' %} |
| 29 | {{ render_homepage_section(homepage.hero_section_doc) }} |
| 30 | {% endif %} |
| 31 | |
| 32 | {% if homepage.products %} |
| 33 | <section class="container section-products my-5"> |
| 34 | <h3>{{ _('Products') }}</h3> |
| 35 | |
| 36 | <div class="row"> |
| 37 | {% for item in homepage.products %} |
| 38 | <div class="col-md-4 mb-4"> |
| 39 | <div class="card h-100 justify-content-between"> |
Faris Ansari | 22642a5 | 2019-06-14 18:15:40 +0530 | [diff] [blame] | 40 | <div class="website-image-lazy" data-class="card-img-top website-image-extra-large" data-src="{{ item.image }}" data-alt="{{ item.item_name }}"></div> |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 41 | <div class="card-body flex-grow-0"> |
| 42 | <h5 class="card-title">{{ item.item_name }}</h5> |
| 43 | <a href="{{ item.route }}" class="card-link">{{ _('More details') }}</a> |
| 44 | </div> |
Anand Doshi | e3bd78e | 2016-04-22 18:53:21 +0530 | [diff] [blame] | 45 | </div> |
| 46 | </div> |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 47 | {% endfor %} |
Kanchan Chauhan | e0818f8 | 2016-04-22 14:39:02 +0530 | [diff] [blame] | 48 | </div> |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 49 | </section> |
| 50 | {% endif %} |
Anand Doshi | e3bd78e | 2016-04-22 18:53:21 +0530 | [diff] [blame] | 51 | |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 52 | {% if blogs %} |
| 53 | <section class="container my-5"> |
| 54 | <h3>{{ _('Publications') }}</h3> |
Rushabh Mehta | ac123c5 | 2016-05-20 16:36:56 +0530 | [diff] [blame] | 55 | |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 56 | <div class="row"> |
| 57 | {% for blog in blogs %} |
| 58 | <div class="col-md-4 mb-4"> |
| 59 | <div class="card h-100"> |
| 60 | <div class="card-body"> |
| 61 | <h5 class="card-title">{{ blog.title }}</h5> |
| 62 | <p class="card-subtitle mb-2 text-muted">{{ _('By {0}').format(blog.blogger) }}</p> |
| 63 | <p class="card-text">{{ blog.blog_intro }}</p> |
| 64 | </div> |
| 65 | <div class="card-body flex-grow-0"> |
| 66 | <a href="{{ blog.route }}" class="card-link">{{ _('Read blog') }}</a> |
| 67 | </div> |
| 68 | </div> |
| 69 | </div> |
| 70 | {% endfor %} |
| 71 | </div> |
| 72 | </section> |
| 73 | {% endif %} |
Kanchan Chauhan | 239b351 | 2016-05-02 11:43:44 +0530 | [diff] [blame] | 74 | |
Faris Ansari | 5f8b358 | 2019-03-19 11:48:32 +0530 | [diff] [blame] | 75 | {% for section in homepage_sections %} |
| 76 | {{ render_homepage_section(section) }} |
| 77 | {% endfor %} |
| 78 | </main> |
Ankush Menat | 4551d7d | 2021-08-19 13:41:10 +0530 | [diff] [blame] | 79 | {% endblock %} |