2
0

header.html 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {% load navigation_tags %}
  2. <header class="header clearfix">
  3. <a href="#main-content" class="skip-link">Skip to main content</a>
  4. <div class="container">
  5. <div class="navigation" data-navigation>
  6. <a href="/" class="navigation__logo">The Wagtail Bakery</a>
  7. <button
  8. type="button"
  9. class="navigation__mobile-toggle"
  10. aria-label="Toggle mobile menu"
  11. aria-expanded="false"
  12. data-mobile-navigation-toggle
  13. >
  14. <span class="navigation__toggle-icon-bar"></span>
  15. <span class="navigation__toggle-icon-bar"></span>
  16. <span class="navigation__toggle-icon-bar"></span>
  17. </button>
  18. <nav class="navigation__mobile" data-mobile-navigation hidden>
  19. <a href="/" class="navigation__logo">The Wagtail Bakery</a>
  20. <ul class="navigation__items nav-pills">
  21. {# main_menu is defined in base/templatetags/navigation_tags.py #}
  22. {% get_site_root as site_root %}
  23. {% top_menu parent=site_root calling_page=self %}
  24. </ul>
  25. <form action="/search" method="get" class="navigation__mobile-search" role="search">
  26. <label for="mobile-search-input" class="u-sr-only">Search the bakery</label>
  27. <input class="navigation__search-input" id="mobile-search-input" type="text" placeholder="Search" autocomplete="off" name="q">
  28. <div aria-hidden="true" class="navigation__search-icon">
  29. <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
  30. <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" />
  31. </svg>
  32. </div>
  33. </form>
  34. </nav>
  35. <nav class="navigation__desktop" aria-label="Main">
  36. <ul class="navigation__items nav-pills">
  37. {# main_menu is defined in base/templatetags/navigation_tags.py #}
  38. {% get_site_root as site_root %}
  39. {% top_menu parent=site_root calling_page=self %}
  40. </ul>
  41. </nav>
  42. <form action="/search" method="get" class="navigation__search" role="search">
  43. <label for="search-input" class="u-sr-only">Search the bakery</label>
  44. <input class="navigation__search-input" id="search-input" type="text" placeholder="Search" autocomplete="off" name="q">
  45. <div aria-hidden="true" class="navigation__search-icon">
  46. <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
  47. <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" />
  48. </svg>
  49. </div>
  50. </form>
  51. </div>
  52. </div>
  53. </header>