Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 1 | {% extends "templates/web.html" %} |
| 2 | |
| 3 | {% block content %} |
| 4 | <section class="section section-padding-top section-padding-bottom"> |
| 5 | <div class='container'> |
| 6 | <div class="hero-content"> |
Afshan | ea78b24 | 2020-06-18 09:49:35 +0530 | [diff] [blame] | 7 | <h1 class="hero-title">{{ greeting_title or _("We're here to help!") }}</h1> |
| 8 | {% if greeting_subtitle %} |
| 9 | <p class="hero-subtitle">{{ greeting_subtitle }}</p> |
| 10 | {% endif %} |
Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 11 | </div> |
Shivam Mishra | 42fd231 | 2020-06-22 16:56:09 +0530 | [diff] [blame] | 12 | <div class="search-container"> |
Shivam Mishra | 3bbbd1b | 2020-06-22 16:46:56 +0530 | [diff] [blame] | 13 | <div class="website-search" id="search-container"> |
| 14 | <div class="dropdown"> |
| 15 | <div class="search-icon"> |
| 16 | <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" |
| 17 | fill="none" |
| 18 | stroke="currentColor" stroke-width="2" stroke-linecap="round" |
| 19 | stroke-linejoin="round" |
| 20 | class="feather feather-search"> |
| 21 | <circle cx="11" cy="11" r="8"></circle> |
| 22 | <line x1="21" y1="21" x2="16.65" y2="16.65"></line> |
| 23 | </svg> |
| 24 | </div> |
| 25 | <input type="search" class="form-control" placeholder="Search the docs (Press ? to focus)" /> |
| 26 | <div class="overflow-hidden shadow dropdown-menu w-100"> |
| 27 | </div> |
| 28 | </div> |
| 29 | </div> |
| 30 | <button class="navbar-toggler" type="button" |
| 31 | data-toggle="collapse" |
| 32 | data-target="#navbarSupportedContent" |
| 33 | aria-controls="navbarSupportedContent" |
| 34 | aria-expanded="false" |
| 35 | aria-label="Toggle navigation"> |
| 36 | <span class="navbar-toggler-icon"></span> |
| 37 | </button> |
| 38 | </div> |
Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 39 | </div> |
| 40 | </section> |
| 41 | |
| 42 | {% if favorite_article_list %} |
Shivam Mishra | 7057a80 | 2020-06-17 18:35:38 +0530 | [diff] [blame] | 43 | <section class="section section-padding-top section-padding-bottom bg-light"> |
Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 44 | <div class='container'> |
Shivam Mishra | 2462f07 | 2020-06-17 18:39:49 +0530 | [diff] [blame] | 45 | <h2>{{ _("Frequently Read Articles") }}</h2> |
Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 46 | <div class="row"> |
| 47 | {% for favorite_article in favorite_article_list %} |
Afshan | ea78b24 | 2020-06-18 09:49:35 +0530 | [diff] [blame] | 48 | <div class="mt-4 col-12 col-sm-6 col-lg-4"> |
| 49 | <div class="card card-md h-100 kb-card"> |
| 50 | <div class="card-body"> |
| 51 | <h6 class="card-subtitle mb-2 text-uppercase small text-muted"> |
| 52 | {{ favorite_article['category'] }}</h6> |
| 53 | <h3 class="card-title">{{ favorite_article['title'] }}</h3> |
| 54 | <p class="card-text">{{ favorite_article['description'] }}</p> |
Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 55 | </div> |
Afshan | ea78b24 | 2020-06-18 09:49:35 +0530 | [diff] [blame] | 56 | <a href="{{ favorite_article['route'] }}" class="stretched-link"></a> |
Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 57 | </div> |
Afshan | ea78b24 | 2020-06-18 09:49:35 +0530 | [diff] [blame] | 58 | </div> |
Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 59 | {% endfor %} |
| 60 | </div> |
| 61 | </div> |
| 62 | </section> |
| 63 | {% endif %} |
| 64 | |
| 65 | {% if help_article_list %} |
Shivam Mishra | 7057a80 | 2020-06-17 18:35:38 +0530 | [diff] [blame] | 66 | <section class="section section-padding-top section-padding-bottom"> |
Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 67 | <div class='container'> |
Shivam Mishra | 2462f07 | 2020-06-17 18:39:49 +0530 | [diff] [blame] | 68 | <h2>{{ _("Help Articles") }}</h2> |
Afshan | 8546b71 | 2020-06-17 16:16:59 +0530 | [diff] [blame] | 69 | <div class="row"> |
| 70 | {% for item in help_article_list %} |
| 71 | <div class="mt-5 col-12 col-sm-6 col-lg-4"> |
| 72 | <h5>{{ item['category'].name }}</h5> |
| 73 | <div> |
| 74 | {% for article in item['articles'] %} |
| 75 | <a href="{{ article.route }}" class="mt-2 d-block">{{ article.title }}</a> |
| 76 | {% endfor %} |
| 77 | </div> |
| 78 | </div> |
| 79 | {% endfor %} |
| 80 | </div> |
| 81 | </div> |
| 82 | </section> |
| 83 | {% endif %} |
Shivam Mishra | 3bbbd1b | 2020-06-22 16:46:56 +0530 | [diff] [blame] | 84 | {% endblock %} |
| 85 | |
| 86 | {%- block script -%} |
| 87 | <script> |
| 88 | frappe.ready(() => { |
| 89 | frappe.setup_search('#search-container', 'kb'); |
| 90 | }); |
| 91 | </script> |
| 92 | {%- endblock -%} |
Shivam Mishra | 42fd231 | 2020-06-22 16:56:09 +0530 | [diff] [blame] | 93 | |
| 94 | {%- block style -%} |
| 95 | <style> |
| 96 | .search-container { |
| 97 | margin-top: 1.2rem; |
| 98 | max-width: 500px; |
Ankush Menat | 4551d7d | 2021-08-19 13:41:10 +0530 | [diff] [blame] | 99 | } |
Shivam Mishra | 42fd231 | 2020-06-22 16:56:09 +0530 | [diff] [blame] | 100 | </style> |
| 101 | {%- endblock -%} |