|
3 | 3 | {% get_solo "configurations.SiteConfiguration" as config %}
|
4 | 4 |
|
5 | 5 | {% accessibility_header request=request %}
|
| 6 | + |
6 | 7 | <header class="header" aria-label="Navigatie header">
|
7 | 8 | <div class="header__container">
|
8 | 9 | <div class="header__menu">
|
|
28 | 29 | <div class="header__submenu">
|
29 | 30 |
|
30 | 31 | {% if cms_apps.products %}
|
31 |
| - <nav class="header__actions" aria-label="Zoek navigatie mobiel"> |
32 |
| - {% url 'search:search' as search_url %} |
33 |
| - {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=False %} |
34 |
| - {% input search_form.query no_label=True %} |
35 |
| - {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
36 |
| - {% endrender_form %} |
37 |
| - </nav> |
| 32 | + {% if request.user.is_authenticated or not config.hide_search_from_anonymous_users %} |
| 33 | + <nav class="header__actions" aria-label="Zoek navigatie mobiel"> |
| 34 | + {% url 'search:search' as search_url %} |
| 35 | + {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=False %} |
| 36 | + {% input search_form.query no_label=True %} |
| 37 | + {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
| 38 | + {% endrender_form %} |
| 39 | + </nav> |
| 40 | + {% endif %} |
38 | 41 | {% endif %}
|
39 | 42 |
|
40 | 43 | <nav class="primary-navigation" aria-label="Hoofd navigatie">
|
|
45 | 48 | {% link text=link_text href="/" icon="grid_view" icon_position="before" %}
|
46 | 49 | </li>
|
47 | 50 |
|
48 |
| - {% if cms_apps.products and categories %} |
49 |
| - <li class="primary-navigation__list-item dropdown-nav__toggle"> |
50 |
| - <a href="#" class="link link--toggle link--icon link--icon-position-before" aria-label="{% trans "Onderwerpen" %}" title="{% trans "Onderwerpen" %}" aria-expanded="false"> |
51 |
| - <span >{% trans "Onderwerpen" %}</span> |
52 |
| - <span aria-hidden="true" class="material-icons-outlined ">description</span> |
53 |
| - {% icon icon="expand_more" icon_position="after" icon_outlined=True %} |
54 |
| - </a> |
55 |
| - |
56 |
| - {% if categories %} |
57 |
| - <ul class="primary-navigation__list subpage-list"> |
58 |
| - {% for category in categories %} |
59 |
| - <li class="primary-navigation__list-item"> |
60 |
| - {% url 'products:category_detail' slug=category.slug as category_href %} |
61 |
| - {% link text=category.name href=category_href %} |
62 |
| - </li> |
63 |
| - {% endfor %} |
64 |
| - </ul> |
| 51 | + {% if cms_apps.products %} |
| 52 | + {% if request.user.is_authenticated or not config.hide_categories_from_anonymous_users %} |
| 53 | + <li class="primary-navigation__list-item dropdown-nav__toggle"> |
| 54 | + <a href="#" class="link link--toggle link--icon link--icon-position-before" aria-label="{% trans "Onderwerpen" %}" title="{% trans "Onderwerpen" %}" aria-expanded="false"> |
| 55 | + <span >{% trans "Onderwerpen" %}</span> |
| 56 | + <span aria-hidden="true" class="material-icons-outlined ">description</span> |
| 57 | + {% icon icon="expand_more" icon_position="after" icon_outlined=True %} |
| 58 | + </a> |
| 59 | + |
| 60 | + {% if menu_categories %} |
| 61 | + <ul class="primary-navigation__list subpage-list"> |
| 62 | + {% for category in menu_categories %} |
| 63 | + <li class="primary-navigation__list-item"> |
| 64 | + {% url 'products:category_detail' slug=category.slug as category_href %} |
| 65 | + {% link text=category.name href=category_href %} |
| 66 | + </li> |
| 67 | + {% endfor %} |
| 68 | + </ul> |
| 69 | + {% endif %} |
| 70 | + </li> |
65 | 71 | {% endif %}
|
66 |
| - </li> |
67 | 72 | {% endif %}
|
68 | 73 |
|
69 | 74 | {% show_menu_below_id "home" 0 100 100 100 "cms/menu/primary.html" %}
|
|
103 | 108 | {% firstof config.logo.default_alt_text config.name as logo_alt_text %}
|
104 | 109 | <div class="logo__desktop">{% logo src=config.logo.file.url alt="Homepage "|add:logo_alt_text svg_height=75 %}</div>
|
105 | 110 |
|
106 |
| - {% primary_navigation categories=categories request=request has_general_faq_questions=has_general_faq_questions cms_apps=cms_apps show_plans=show_plans %} |
| 111 | + {% include "components/Header/PrimaryNavigation.html" %} |
107 | 112 |
|
108 | 113 | {% if cms_apps.products %}
|
109 |
| - <nav class="header__actions" aria-label="Zoek navigatie desktop"> |
110 |
| - {% url 'search:search' as search_url %} |
111 |
| - {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=True %} |
112 |
| - {% input search_form.query no_label=True %} |
113 |
| - {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
114 |
| - {% endrender_form %} |
115 |
| - </nav> |
| 114 | + {% if request.user.is_authenticated or not config.hide_search_from_anonymous_users %} |
| 115 | + <nav class="header__actions" aria-label="Zoek navigatie desktop"> |
| 116 | + {% url 'search:search' as search_url %} |
| 117 | + {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=True %} |
| 118 | + {% input search_form.query no_label=True %} |
| 119 | + {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
| 120 | + {% endrender_form %} |
| 121 | + </nav> |
| 122 | + {% endif %} |
116 | 123 | {% endif %}
|
117 | 124 |
|
118 |
| - {% navigation_authenticated categories=categories request=request has_general_faq_questions=has_general_faq_questions %} |
| 125 | + {% include "components/Header/NavigationAuthenticated.html" %} |
119 | 126 | </div>
|
120 | 127 | </header>
|
121 | 128 |
|
122 | 129 | {% if cms_apps.products %}
|
123 |
| -<section class="search search__mobile"> |
124 |
| - <nav class="search__actions " aria-label="Zoek navigatie mobiel"> |
125 |
| - {% url 'search:search' as search_url %} |
126 |
| - {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=False %} |
127 |
| - {% input search_form.query no_label=True %} |
128 |
| - {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
129 |
| - {% endrender_form %} |
130 |
| - </nav> |
131 |
| -</section> |
| 130 | + {% if request.user.is_authenticated or not config.hide_search_from_anonymous_users %} |
| 131 | + <section class="search search__mobile"> |
| 132 | + <nav class="search__actions " aria-label="Zoek navigatie mobiel"> |
| 133 | + {% url 'search:search' as search_url %} |
| 134 | + {% render_form form=search_form method="GET" form_action=search_url inline=True spaceless=False %} |
| 135 | + {% input search_form.query no_label=True %} |
| 136 | + {% form_actions primary_icon="search" primary_text=_("Zoeken") hide_primary_text=True %} |
| 137 | + {% endrender_form %} |
| 138 | + </nav> |
| 139 | + </section> |
| 140 | + {% endif %} |
132 | 141 | {% endif %}
|
0 commit comments