github.com/ddev/ddev@v1.23.2-0.20240519125000-d824ffe36ff3/docs/overrides/partials/header.html (about) 1 <!-- This is a copy of https://github.com/squidfunk/mkdocs-material/blob/master/src/templates/partials/header.html with a warning banner added. --> 2 <!-- 3 Copyright (c) 2016-2024 Martin Donath <martin.donath@squidfunk.com> 4 5 Permission is hereby granted, free of charge, to any person obtaining a copy 6 of this software and associated documentation files (the "Software"), to 7 deal in the Software without restriction, including without limitation the 8 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 9 sell copies of the Software, and to permit persons to whom the Software is 10 furnished to do so, subject to the following conditions: 11 12 The above copyright notice and this permission notice shall be included in 13 all copies or substantial portions of the Software. 14 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE 18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 21 IN THE SOFTWARE. 22 --> 23 24 <!-- Determine classes --> 25 {% set class = "md-header" %} 26 {% if "navigation.tabs.sticky" in features %} 27 {% set class = class ~ " md-header--shadow md-header--lifted" %} 28 {% elif "navigation.tabs" not in features %} 29 {% set class = class ~ " md-header--shadow" %} 30 {% endif %} 31 32 <!-- Header --> 33 <header class="{{ class }}" data-md-component="header"> 34 35 <!-- Warning banner --> 36 {% if config.extra.version != "stable" %} 37 <style> 38 /* remove the shadow, as it looks strange with a warning banner next to it */ 39 .md-header--shadow { 40 box-shadow: unset; 41 } 42 /* fix the scroll margin for links with anchors */ 43 /* see https://github.com/squidfunk/mkdocs-material/blob/master/src/templates/assets/stylesheets/main/extensions/markdown/_toc.scss */ 44 .md-typeset { 45 :target { 46 --md-scroll-margin: 6rem; 47 } 48 } 49 </style> 50 <div data-md-color-scheme="default" data-md-component="outdated"> 51 <aside class="md-banner md-banner--warning"> 52 <div class="md-banner__inner md-grid md-typeset"> 53 You're viewing documentation for an unreleased version of DDEV. 54 <a id="stable-docs-link" href="https://ddev.readthedocs.io/en/stable/"> 55 <strong>Click here to see the stable documentation.</strong> 56 </a> 57 <script> 58 document.getElementById('stable-docs-link').href = `https://ddev.readthedocs.io/${new URL(window.location.href).pathname.replace(/\/en\/[^/]+/, 'en/stable')}${window.location.hash}`; 59 </script> 60 </div> 61 </aside> 62 </div> 63 {% endif %} 64 65 <nav 66 class="md-header__inner md-grid" 67 aria-label="{{ lang.t('header') }}" 68 > 69 70 <!-- Link to home --> 71 <a 72 href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}" 73 title="{{ config.site_name | e }}" 74 class="md-header__button md-logo" 75 aria-label="{{ config.site_name }}" 76 data-md-component="logo" 77 > 78 {% include "partials/logo.html" %} 79 </a> 80 81 <!-- Button to open drawer --> 82 <label class="md-header__button md-icon" for="__drawer"> 83 {% set icon = config.theme.icon.menu or "material/menu" %} 84 {% include ".icons/" ~ icon ~ ".svg" %} 85 </label> 86 87 <!-- Header title --> 88 <div class="md-header__title" data-md-component="header-title"> 89 <div class="md-header__ellipsis"> 90 <div class="md-header__topic"> 91 <span class="md-ellipsis"> 92 {{ config.site_name }} 93 </span> 94 </div> 95 <div class="md-header__topic" data-md-component="header-topic"> 96 <span class="md-ellipsis"> 97 {% if page.meta and page.meta.title %} 98 {{ page.meta.title }} 99 {% else %} 100 {{ page.title }} 101 {% endif %} 102 </span> 103 </div> 104 </div> 105 </div> 106 107 <!-- Color palette toggle --> 108 {% if config.theme.palette %} 109 {% if not config.theme.palette is mapping %} 110 {% include "partials/palette.html" %} 111 {% endif %} 112 {% endif %} 113 114 <!-- User preference: color palette --> 115 {% if not config.theme.palette is mapping %} 116 {% include "partials/javascripts/palette.html" %} 117 {% endif %} 118 119 <!-- Site language selector --> 120 {% if config.extra.alternate %} 121 {% include "partials/alternate.html" %} 122 {% endif %} 123 124 <!-- Button to open search modal --> 125 {% if "material/search" in config.plugins %} 126 <label class="md-header__button md-icon" for="__search"> 127 {% set icon = config.theme.icon.search or "material/magnify" %} 128 {% include ".icons/" ~ icon ~ ".svg" %} 129 </label> 130 131 <!-- Search interface --> 132 {% include "partials/search.html" %} 133 {% endif %} 134 135 <!-- Repository information --> 136 {% if config.repo_url %} 137 <div class="md-header__source"> 138 {% include "partials/source.html" %} 139 </div> 140 {% endif %} 141 </nav> 142 143 <!-- Navigation tabs (sticky) --> 144 {% if "navigation.tabs.sticky" in features %} 145 {% if "navigation.tabs" in features %} 146 {% include "partials/tabs.html" %} 147 {% endif %} 148 {% endif %} 149 </header>