site-header.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <header class="gdoc-header">
  2. <div class="container flex align-center justify-between">
  3. {{ if .MenuEnabled }}
  4. <label for="menu-control" class="gdoc-nav__control" tabindex="0">
  5. <svg class="gdoc-icon gdoc_menu">
  6. <title>{{ i18n "button_nav_open" }}</title>
  7. <use xlink:href="#gdoc_menu"></use>
  8. </svg>
  9. <svg class="gdoc-icon gdoc_arrow_back">
  10. <title>{{ i18n "button_nav_close" }}</title>
  11. <use xlink:href="#gdoc_arrow_back"></use>
  12. </svg>
  13. </label>
  14. {{ end }}
  15. <div>
  16. <a class="gdoc-brand gdoc-header__link" href="{{ .Root.Site.Home.Permalink }}">
  17. <span class="flex align-center">
  18. <img
  19. class="gdoc-brand__img"
  20. src="{{ (default "brand.svg" .Root.Site.Params.geekdocLogo) | relURL }}"
  21. alt=""
  22. />
  23. <span class="gdoc-brand__title">{{ .Root.Site.Title }}</span>
  24. </span>
  25. </a>
  26. </div>
  27. <div class="gdoc-menu-header">
  28. <span class="gdoc-menu-header__items">
  29. {{ if .Root.Site.Data.menu.extra.header }}
  30. {{ partial "menu-extra" (dict "current" .Root "source" .Root.Site.Data.menu.extra.header "target" "header") }}
  31. {{ end }}
  32. <span id="gdoc-color-theme">
  33. <svg class="gdoc-icon gdoc_brightness_dark">
  34. <title>{{ i18n "button_toggle_dark" }}</title>
  35. <use xlink:href="#gdoc_brightness_dark"></use>
  36. </svg>
  37. <svg class="gdoc-icon gdoc_brightness_light">
  38. <title>{{ i18n "button_toggle_dark" }}</title>
  39. <use xlink:href="#gdoc_brightness_light"></use>
  40. </svg>
  41. <svg class="gdoc-icon gdoc_brightness_auto">
  42. <title>{{ i18n "button_toggle_dark" }}</title>
  43. <use xlink:href="#gdoc_brightness_auto"></use>
  44. </svg>
  45. </span>
  46. <span class="gdoc-menu-header__home">
  47. <a href="{{ .Root.Site.Home.Permalink }}" class="gdoc-header__link">
  48. <svg class="gdoc-icon gdoc_home">
  49. <title>{{ i18n "button_homepage" }}</title>
  50. <use xlink:href="#gdoc_home"></use>
  51. </svg>
  52. </a>
  53. </span>
  54. {{ partial "language" .Root }}
  55. <span class="gdoc-menu-header__control">
  56. <label for="menu-header-control">
  57. <svg class="gdoc-icon gdoc_keyboard_arrow_right">
  58. <use xlink:href="#gdoc_keyboard_arrow_right"></use>
  59. <title>{{ i18n "button_menu_close" }}</title>
  60. </svg>
  61. </label>
  62. </span>
  63. </span>
  64. <label for="menu-header-control" class="gdoc-menu-header__control">
  65. <svg class="gdoc-icon gdoc_keyboard_arrow_left">
  66. <use xlink:href="#gdoc_keyboard_arrow_left"></use>
  67. <title>{{ i18n "button_menu_open" }}</title>
  68. </svg>
  69. </label>
  70. </div>
  71. </div>
  72. </header>