| 1 | <!-- |
| 2 | Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com> |
| 3 | |
| 4 | Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 | of this software and associated documentation files (the "Software"), to |
| 6 | deal in the Software without restriction, including without limitation the |
| 7 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 8 | sell copies of the Software, and to permit persons to whom the Software is |
| 9 | furnished to do so, subject to the following conditions: |
| 10 | |
| 11 | The above copyright notice and this permission notice shall be included in |
| 12 | all copies or substantial portions of the Software. |
| 13 | |
| 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 | FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE |
| 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 19 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS |
| 20 | IN THE SOFTWARE. |
| 21 | --> |
| 22 | |
| 23 | {% set class = "md-header" %} |
| 24 | {% if "navigation.tabs.sticky" in features %} |
| 25 | {% set class = class ~ " md-header--shadow md-header--lifted" %} |
| 26 | {% elif "navigation.tabs" not in features %} |
| 27 | {% set class = class ~ " md-header--shadow" %} |
| 28 | {% endif %} |
| 29 | |
| 30 | <!-- Header --> |
| 31 | <header class="{{ class }}" data-md-component="header"> |
| 32 | <nav |
| 33 | class="md-header__inner md-grid" |
| 34 | aria-label="{{ lang.t('header') }}" |
| 35 | > |
| 36 | |
| 37 | <!-- Link to home --> |
| 38 | <a |
| 39 | href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" |
| 40 | title="{{ config.site_name | e }}" |
| 41 | class="md-header__button md-logo" |
| 42 | aria-label="{{ config.site_name }}" |
| 43 | data-md-component="logo" |
| 44 | > |
| 45 | {% include "partials/logo.html" %} |
| 46 | </a> |
| 47 | |
| 48 | <!-- Button to open drawer --> |
| 49 | <label class="md-header__button md-icon" for="__drawer"> |
| 50 | {% include ".icons/material/menu" ~ ".svg" %} |
| 51 | </label> |
| 52 | |
| 53 | <!-- Header title --> |
| 54 | <div class="md-header__title" style="width: auto !important;" data-md-component="header-title"> |
| 55 | <div class="md-header__ellipsis"> |
| 56 | <div class="md-header__topic"> |
| 57 | <span class="md-ellipsis"> |
| 58 | {{ config.site_name }} |
| 59 | </span> |
| 60 | </div> |
| 61 | <div class="md-header__topic" data-md-component="header-topic"> |
| 62 | <span class="md-ellipsis"> |
| 63 | {% if page.meta and page.meta.title %} |
| 64 | {{ page.meta.title }} |
| 65 | {% else %} |
| 66 | {{ page.title }} |
| 67 | {% endif %} |
| 68 | </span> |
| 69 | </div> |
| 70 | </div> |
| 71 | </div> |
| 72 | |
| 73 | <!-- Color palette --> |
| 74 | {% if config.theme.palette %} |
| 75 | {% if not config.theme.palette is mapping %} |
| 76 | <form class="md-header__option" data-md-component="palette"> |
| 77 | {% for option in config.theme.palette %} |
| 78 | {% set scheme = option.scheme | d("default", true) %} |
| 79 | {% set primary = option.primary | d("indigo", true) %} |
| 80 | {% set accent = option.accent | d("indigo", true) %} |
| 81 | <input |
| 82 | class="md-option" |
| 83 | data-md-color-media="{{ option.media }}" |
| 84 | data-md-color-scheme="{{ scheme | replace(' ', '-') }}" |
| 85 | data-md-color-primary="{{ primary | replace(' ', '-') }}" |
| 86 | data-md-color-accent="{{ accent | replace(' ', '-') }}" |
| 87 | {% if option.toggle %} |
| 88 | aria-label="{{ option.toggle.name }}" |
| 89 | {% else %} |
| 90 | aria-hidden="true" |
| 91 | {% endif %} |
| 92 | type="radio" |
| 93 | name="__palette" |
| 94 | id="__palette_{{ loop.index }}" |
| 95 | /> |
| 96 | {% if option.toggle %} |
| 97 | <label |
| 98 | class="md-header__button md-icon" |
| 99 | title="{{ option.toggle.name }}" |
| 100 | for="__palette_{{ loop.index0 or loop.length }}" |
| 101 | hidden |
| 102 | > |
| 103 | {% include ".icons/" ~ option.toggle.icon ~ ".svg" %} |
| 104 | </label> |
| 105 | {% endif %} |
| 106 | {% endfor %} |
| 107 | </form> |
| 108 | {% endif %} |
| 109 | {% endif %} |
| 110 | |
| 111 | <!-- Site language selector --> |
| 112 | {% if config.extra.alternate %} |
| 113 | <div class="md-header__option"> |
| 114 | <div class="md-select"> |
| 115 | {% set icon = config.theme.icon.alternate or "material/translate" %} |
| 116 | <button |
| 117 | class="md-header__button md-icon" |
| 118 | aria-label="{{ lang.t('select.language') }}" |
| 119 | > |
| 120 | {% include ".icons/" ~ icon ~ ".svg" %} |
| 121 | </button> |
| 122 | <div class="md-select__inner"> |
| 123 | <ul class="md-select__list"> |
| 124 | {% for alt in config.extra.alternate %} |
| 125 | <li class="md-select__item"> |
| 126 | <a |
| 127 | href="{{ alt.link | url }}" |
| 128 | hreflang="{{ alt.lang }}" |
| 129 | class="md-select__link" |
| 130 | > |
| 131 | {{ alt.name }} |
| 132 | </a> |
| 133 | </li> |
| 134 | {% endfor %} |
| 135 | </ul> |
| 136 | </div> |
| 137 | </div> |
| 138 | </div> |
| 139 | {% endif %} |
| 140 | |
| 141 | <!-- Button to open search modal --> |
| 142 | {% if "material/search" in config.plugins %} |
| 143 | <label class="md-header__button md-icon" for="__search"> |
| 144 | {% include ".icons/material/magnify.svg" %} |
| 145 | </label> |
| 146 | |
| 147 | <!-- Search interface --> |
| 148 | {% include "partials/search.html" %} |
| 149 | {% endif %} |
| 150 | |
| 151 | <div style="margin-left: 10px; margin-right: 5px;"> |
| 152 | <a href="https://discord.com/invite/zMM32dvNtd" target="_blank" rel="noopener noreferrer"> |
| 153 | <svg fill="#FFFFFF" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="25px" height="25px"><path d="M 41.625 10.769531 C 37.644531 7.566406 31.347656 7.023438 31.078125 7.003906 C 30.660156 6.96875 30.261719 7.203125 30.089844 7.589844 C 30.074219 7.613281 29.9375 7.929688 29.785156 8.421875 C 32.417969 8.867188 35.652344 9.761719 38.578125 11.578125 C 39.046875 11.867188 39.191406 12.484375 38.902344 12.953125 C 38.710938 13.261719 38.386719 13.429688 38.050781 13.429688 C 37.871094 13.429688 37.6875 13.378906 37.523438 13.277344 C 32.492188 10.15625 26.210938 10 25 10 C 23.789063 10 17.503906 10.15625 12.476563 13.277344 C 12.007813 13.570313 11.390625 13.425781 11.101563 12.957031 C 10.808594 12.484375 10.953125 11.871094 11.421875 11.578125 C 14.347656 9.765625 17.582031 8.867188 20.214844 8.425781 C 20.0625 7.929688 19.925781 7.617188 19.914063 7.589844 C 19.738281 7.203125 19.34375 6.960938 18.921875 7.003906 C 18.652344 7.023438 12.355469 7.566406 8.320313 10.8125 C 6.214844 12.761719 2 24.152344 2 34 C 2 34.175781 2.046875 34.34375 2.132813 34.496094 C 5.039063 39.605469 12.972656 40.941406 14.78125 41 C 14.789063 41 14.800781 41 14.8125 41 C 15.132813 41 15.433594 40.847656 15.621094 40.589844 L 17.449219 38.074219 C 12.515625 36.800781 9.996094 34.636719 9.851563 34.507813 C 9.4375 34.144531 9.398438 33.511719 9.765625 33.097656 C 10.128906 32.683594 10.761719 32.644531 11.175781 33.007813 C 11.234375 33.0625 15.875 37 25 37 C 34.140625 37 38.78125 33.046875 38.828125 33.007813 C 39.242188 32.648438 39.871094 32.683594 40.238281 33.101563 C 40.601563 33.515625 40.5625 34.144531 40.148438 34.507813 C 40.003906 34.636719 37.484375 36.800781 32.550781 38.074219 L 34.378906 40.589844 C 34.566406 40.847656 34.867188 41 35.1875 41 C 35.199219 41 35.210938 41 35.21875 41 C 37.027344 40.941406 44.960938 39.605469 47.867188 34.496094 C 47.953125 34.34375 48 34.175781 48 34 C 48 24.152344 43.785156 12.761719 41.625 10.769531 Z M 18.5 30 C 16.566406 30 15 28.210938 15 26 C 15 23.789063 16.566406 22 18.5 22 C 20.433594 22 22 23.789063 22 26 C 22 28.210938 20.433594 30 18.5 30 Z M 31.5 30 C 29.566406 30 28 28.210938 28 26 C 28 23.789063 29.566406 22 31.5 22 C 33.433594 22 35 23.789063 35 26 C 35 28.210938 33.433594 30 31.5 30 Z"/></svg> |
| 154 | </a> |
| 155 | </div> |
| 156 | <div style="margin-left: 5px; margin-right: 5px;"> |
| 157 | <a href="https://twitter.com/lancedb" target="_blank" rel="noopener noreferrer"> |
| 158 | <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0,0,256,256" width="25px" height="25px" fill-rule="nonzero"><g fill-opacity="0" fill="#ffffff" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,256v-256h256v256z" id="bgRectangle"></path></g><g fill="#ffffff" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><g transform="scale(4,4)"><path d="M57,17.114c-1.32,1.973 -2.991,3.707 -4.916,5.097c0.018,0.423 0.028,0.847 0.028,1.274c0,13.013 -9.902,28.018 -28.016,28.018c-5.562,0 -12.81,-1.948 -15.095,-4.423c0.772,0.092 1.556,0.138 2.35,0.138c4.615,0 8.861,-1.575 12.23,-4.216c-4.309,-0.079 -7.946,-2.928 -9.199,-6.84c1.96,0.308 4.447,-0.17 4.447,-0.17c0,0 -7.7,-1.322 -7.899,-9.779c2.226,1.291 4.46,1.231 4.46,1.231c0,0 -4.441,-2.734 -4.379,-8.195c0.037,-3.221 1.331,-4.953 1.331,-4.953c8.414,10.361 20.298,10.29 20.298,10.29c0,0 -0.255,-1.471 -0.255,-2.243c0,-5.437 4.408,-9.847 9.847,-9.847c2.832,0 5.391,1.196 7.187,3.111c2.245,-0.443 4.353,-1.263 6.255,-2.391c-0.859,3.44 -4.329,5.448 -4.329,5.448c0,0 2.969,-0.329 5.655,-1.55z"></path></g></g></svg> |
| 159 | </a> |
| 160 | </div> |
| 161 | |
| 162 | <!-- Repository information --> |
| 163 | {% if config.repo_url %} |
| 164 | <div class="md-header__source" style="margin-left: -5px !important;"> |
| 165 | {% include "partials/source.html" %} |
| 166 | </div> |
| 167 | {% endif %} |
| 168 | </nav> |
| 169 | |
| 170 | <!-- Navigation tabs (sticky) --> |
| 171 | {% if "navigation.tabs.sticky" in features %} |
| 172 | {% if "navigation.tabs" in features %} |
| 173 | {% include "partials/tabs.html" %} |
| 174 | {% endif %} |
| 175 | {% endif %} |
| 176 | </header> |