|
| 1 | +<!-- Custom header with gradient banner --> |
| 2 | +<header class="md-header" data-md-component="header"> |
| 3 | + <nav class="md-header__inner md-grid" aria-label="{{ lang.t('header.title') }}"> |
| 4 | + <div class="custom-gradient-banner"></div> |
| 5 | + <a href="{{ config.site_url | default(nav.homepage.url, true) | url }}" title="{{ config.site_name | e }}" class="md-header__button md-logo" aria-label="{{ config.site_name }}"> |
| 6 | + {% include "partials/logo.html" %} |
| 7 | + </a> |
| 8 | + <label class="md-header__button md-icon" for="__drawer"> |
| 9 | + {% include ".icons/material/menu" ~ ".svg" %} |
| 10 | + </label> |
| 11 | + <div class="md-header__title" data-md-component="header-title"> |
| 12 | + <div class="md-header__ellipsis"> |
| 13 | + <div class="md-header__topic"> |
| 14 | + <span class="md-ellipsis"> |
| 15 | + {{ config.site_name }} |
| 16 | + </span> |
| 17 | + </div> |
| 18 | + <div class="md-header__topic" data-md-component="header-topic"> |
| 19 | + <span class="md-ellipsis"> |
| 20 | + {% if page.meta and page.meta.title %} |
| 21 | + {{ page.meta.title }} |
| 22 | + {% else %} |
| 23 | + {{ page.title }} |
| 24 | + {% endif %} |
| 25 | + </span> |
| 26 | + </div> |
| 27 | + </div> |
| 28 | + </div> |
| 29 | + {% if config.theme.palette %} |
| 30 | + {% if not config.theme.palette is mapping %} |
| 31 | + <form class="md-header__option" data-md-component="palette"> |
| 32 | + {% for option in config.theme.palette %} |
| 33 | + {% set scheme = option.scheme | d("default", true) %} |
| 34 | + <input class="md-option" data-md-color-media="{{ option.media }}" data-md-color-scheme="{{ scheme | replace(' ', '-') }}" data-md-color-primary="{{ option.primary | d('indigo', true) }}" data-md-color-accent="{{ option.accent | d('indigo', true) }}" {% if option.toggle %} aria-label="{{ option.toggle.name }}" {% else %} aria-hidden="true" {% endif %} type="radio" name="__palette" id="__palette_{{ loop.index }}"> |
| 35 | + {% if option.toggle %} |
| 36 | + <label class="md-header__button md-icon" title="{{ option.toggle.name }}" for="__palette_{{ loop.index0 or loop.length }}" hidden> |
| 37 | + {% include ".icons/" ~ option.toggle.icon ~ ".svg" %} |
| 38 | + </label> |
| 39 | + {% endif %} |
| 40 | + {% endfor %} |
| 41 | + </form> |
| 42 | + {% endif %} |
| 43 | + {% endif %} |
| 44 | + {% if "search" in config.plugins %} |
| 45 | + <label class="md-header__button md-icon" for="__search"> |
| 46 | + {% include ".icons/material/magnify.svg" %} |
| 47 | + </label> |
| 48 | + {% include "partials/search.html" %} |
| 49 | + {% endif %} |
| 50 | + {% if config.repo_url %} |
| 51 | + <div class="md-header__source"> |
| 52 | + {% include "partials/source.html" %} |
| 53 | + </div> |
| 54 | + {% endif %} |
| 55 | + </nav> |
| 56 | +</header> |
| 57 | + |
| 58 | +<style> |
| 59 | + /* Custom gradient banner at the top of the page */ |
| 60 | + .custom-gradient-banner { |
| 61 | + position: absolute; |
| 62 | + top: 0; |
| 63 | + left: 0; |
| 64 | + right: 0; |
| 65 | + height: 4px; /* Height of the gradient banner */ |
| 66 | + background: linear-gradient(90deg, |
| 67 | + #30216F 0%, /* Deep Purple */ |
| 68 | + #7C4ACD 20%, /* Medium Purple */ |
| 69 | + #E94BBF 40%, /* Vibrant Magenta/Pink */ |
| 70 | + #F2A1E6 60%, /* Light Pink */ |
| 71 | + #2B76E5 100% /* Electric Blue */ |
| 72 | + ); |
| 73 | + z-index: 10; |
| 74 | + } |
| 75 | +</style> |
0 commit comments