blob: 12b4c2c08197761c952aa7c43de8017ca2a152bb [file] [log] [blame]
Afshan8546b712020-06-17 16:16:59 +05301{% 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">
Afshanea78b242020-06-18 09:49:35 +05307 <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 %}
Afshan8546b712020-06-17 16:16:59 +053011 </div>
Shivam Mishra42fd2312020-06-22 16:56:09 +053012 <div class="search-container">
Shivam Mishra3bbbd1b2020-06-22 16:46:56 +053013 <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>
Afshan8546b712020-06-17 16:16:59 +053039 </div>
40</section>
41
42{% if favorite_article_list %}
Shivam Mishra7057a802020-06-17 18:35:38 +053043<section class="section section-padding-top section-padding-bottom bg-light">
Afshan8546b712020-06-17 16:16:59 +053044 <div class='container'>
Shivam Mishra2462f072020-06-17 18:39:49 +053045 <h2>{{ _("Frequently Read Articles") }}</h2>
Afshan8546b712020-06-17 16:16:59 +053046 <div class="row">
47 {% for favorite_article in favorite_article_list %}
Afshanea78b242020-06-18 09:49:35 +053048 <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>
Afshan8546b712020-06-17 16:16:59 +053055 </div>
Afshanea78b242020-06-18 09:49:35 +053056 <a href="{{ favorite_article['route'] }}" class="stretched-link"></a>
Afshan8546b712020-06-17 16:16:59 +053057 </div>
Afshanea78b242020-06-18 09:49:35 +053058 </div>
Afshan8546b712020-06-17 16:16:59 +053059 {% endfor %}
60 </div>
61 </div>
62</section>
63{% endif %}
64
65{% if help_article_list %}
Shivam Mishra7057a802020-06-17 18:35:38 +053066<section class="section section-padding-top section-padding-bottom">
Afshan8546b712020-06-17 16:16:59 +053067 <div class='container'>
Shivam Mishra2462f072020-06-17 18:39:49 +053068 <h2>{{ _("Help Articles") }}</h2>
Afshan8546b712020-06-17 16:16:59 +053069 <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 Mishra3bbbd1b2020-06-22 16:46:56 +053084{% endblock %}
85
86{%- block script -%}
87<script>
88 frappe.ready(() => {
89 frappe.setup_search('#search-container', 'kb');
90 });
91</script>
92{%- endblock -%}
Shivam Mishra42fd2312020-06-22 16:56:09 +053093
94{%- block style -%}
95<style>
96 .search-container {
97 margin-top: 1.2rem;
98 max-width: 500px;
99 }
100</style>
101{%- endblock -%}