2
0

header.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {% load navigation_tags %}
  2. <div class="header clearfix">
  3. <div class="container">
  4. <div class="navigation" data-navigation>
  5. <a href="/" class="navigation__logo">The Wagtail Bakery</a>
  6. <button
  7. type="button"
  8. class="navigation__mobile-toggle"
  9. aria-label="Toggle mobile menu"
  10. aria-expanded="false"
  11. data-mobile-navigation-toggle
  12. >
  13. <span class="navigation__toggle-icon-bar"></span>
  14. <span class="navigation__toggle-icon-bar"></span>
  15. <span class="navigation__toggle-icon-bar"></span>
  16. </button>
  17. <nav class="navigation__mobile" data-mobile-navigation hidden>
  18. <a href="/" class="navigation__logo">The Wagtail Bakery</a>
  19. <ul class="navigation__items nav-pills">
  20. {# main_menu is defined in base/templatetags/navigation_tags.py #}
  21. {% get_site_root as site_root %}
  22. {% top_menu parent=site_root calling_page=self %}
  23. </ul>
  24. <form action="/search" method="get" class="navigation__mobile-search" role="search">
  25. <label for="mobile-search-input" class="u-sr-only">Search the bakery</label>
  26. <input class="navigation__search-input" id="mobile-search-input" type="text" placeholder="Search" autocomplete="off" name="q">
  27. <div aria-hidden="true" class="navigation__search-icon">
  28. <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
  29. <path d="M12.5 11H11.71L11.43 10.73C12.41 9.59 13 8.11 13 6.5C13 2.91 10.09 0 6.5 0C2.91 0 0 2.91 0 6.5C0 10.09 2.91 13 6.5 13C8.11 13 9.59 12.41 10.73 11.43L11 11.71V12.5L16 17.49L17.49 16L12.5 11ZM6.5 11C4.01 11 2 8.99 2 6.5C2 4.01 4.01 2 6.5 2C8.99 2 11 4.01 11 6.5C11 8.99 8.99 11 6.5 11Z" fill="#333" />
  30. </svg>
  31. </div>
  32. </form>
  33. </nav>
  34. <nav class="navigation__desktop" aria-label="Main">
  35. <ul class="navigation__items nav-pills">
  36. {# main_menu is defined in base/templatetags/navigation_tags.py #}
  37. {% get_site_root as site_root %}
  38. {% top_menu parent=site_root calling_page=self %}
  39. </ul>
  40. </nav>
  41. <form action="/search" method="get" class="navigation__search" role="search">
  42. <label for="search-input" class="u-sr-only">Search the bakery</label>
  43. <input class="navigation__search-input" id="search-input" type="text" placeholder="Search" autocomplete="off" name="q">
  44. <div aria-hidden="true" class="navigation__search-icon">
  45. <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
  46. <path d="M12.5 11H11.71L11.43 10.73C12.41 9.59 13 8.11 13 6.5C13 2.91 10.09 0 6.5 0C2.91 0 0 2.91 0 6.5C0 10.09 2.91 13 6.5 13C8.11 13 9.59 12.41 10.73 11.43L11 11.71V12.5L16 17.49L17.49 16L12.5 11ZM6.5 11C4.01 11 2 8.99 2 6.5C2 4.01 4.01 2 6.5 2C8.99 2 11 4.01 11 6.5C11 8.99 8.99 11 6.5 11Z" fill="#333" />
  47. </svg>
  48. </div>
  49. </form>
  50. </div>
  51. </div>
  52. </div>