mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Moved logo to theme configuration and made search optional
This commit is contained in:
parent
5fbba74c80
commit
240a7afa8d
File diff suppressed because one or more lines are too long
1
material/assets/stylesheets/application-c7f552852f.css
Normal file
1
material/assets/stylesheets/application-c7f552852f.css
Normal file
File diff suppressed because one or more lines are too long
@ -53,7 +53,7 @@
|
||||
<script src="{{ base_url }}/assets/javascripts/modernizr-e826f8942a.js"></script>
|
||||
{% endblock %}
|
||||
{% block styles %}
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-04ea671600.css">
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-c7f552852f.css">
|
||||
{% if palette.primary or palette.accent %}
|
||||
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-23f75ab9c7.palette.css">
|
||||
{% endif %}
|
||||
|
@ -36,6 +36,10 @@ font:
|
||||
text: Roboto
|
||||
# Fixed-width font for code listings
|
||||
code: Roboto Mono
|
||||
# The logo of the documentation shown in the header and navigation can either
|
||||
# be a Material Icon ligature or an image URL
|
||||
logo:
|
||||
icon: school
|
||||
# Material includes the search in the header as a partial, not as a separate
|
||||
# template, so it's correct that search.html is missing
|
||||
include_search_page: false
|
||||
|
@ -3,14 +3,10 @@
|
||||
<div class="md-flex">
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
<a href="{{ config.site_url | default(nav.homepage.url, true) }}" title="{{ config.site_name }}" class="md-header-nav__button md-logo">
|
||||
{% if config.extra.logo %}
|
||||
{% if config.extra.logo.icon %}
|
||||
<i class="md-icon">{{ config.extra.logo.icon }}</i>
|
||||
{% else %}
|
||||
<img src="{{ base_url }}/{{ config.extra.logo }}" width="24" height="24">
|
||||
{% endif %}
|
||||
{% if config.theme.logo.icon %}
|
||||
<i class="md-icon">{{ config.theme.logo.icon }}</i>
|
||||
{% else %}
|
||||
<i class="md-icon md-icon--home"></i>
|
||||
<img src="{{ base_url }}/{{ config.theme.logo }}" width="24" height="24">
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
@ -33,8 +29,10 @@
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
{% block search_box %}
|
||||
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
|
||||
{% include "partials/search.html" %}
|
||||
{% if "search" in config["plugins"] %}
|
||||
<label class="md-icon md-icon--search md-header-nav__button" for="search"></label>
|
||||
{% include "partials/search.html" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% if config.repo_url %}
|
||||
|
@ -1,14 +1,10 @@
|
||||
<nav class="md-nav md-nav--primary" data-md-level="0">
|
||||
<label class="md-nav__title md-nav__title--site" for="drawer">
|
||||
<span class="md-nav__button md-logo">
|
||||
{% if config.extra.logo %}
|
||||
{% if config.extra.logo.icon %}
|
||||
<i class="md-icon">{{ config.extra.logo.icon }}</i>
|
||||
{% else %}
|
||||
<img src="{{ base_url }}/{{ config.extra.logo }}">
|
||||
{% endif %}
|
||||
{% if config.theme.logo.icon %}
|
||||
<i class="md-icon">{{ config.theme.logo.icon }}</i>
|
||||
{% else %}
|
||||
<i class="md-icon md-icon--home"></i>
|
||||
<img src="{{ base_url }}/{{ config.theme.logo }}" width="24" height="24">
|
||||
{% endif %}
|
||||
</span>
|
||||
{{ config.site_name }}
|
||||
|
@ -36,7 +36,7 @@ theme:
|
||||
name: null
|
||||
custom_dir: material
|
||||
|
||||
# Same values as in mkdocs_theme.yml
|
||||
# Default values, taken from mkdocs_theme.yml
|
||||
language: en
|
||||
feature:
|
||||
tabs: false
|
||||
@ -46,14 +46,11 @@ theme:
|
||||
font:
|
||||
text: Roboto
|
||||
code: Roboto Mono
|
||||
|
||||
#plugins: []
|
||||
logo:
|
||||
icon: school
|
||||
|
||||
# Options
|
||||
extra:
|
||||
language: en
|
||||
search:
|
||||
languages: en, de, fr
|
||||
social:
|
||||
- type: globe
|
||||
link: http://struct.cc
|
||||
|
@ -56,8 +56,7 @@
|
||||
"\E5C4": "arrow-back", // arrow_back
|
||||
"\E5C8": "arrow-forward", // arrow_forward
|
||||
"\E5D2": "menu", // menu
|
||||
"\E8B6": "search", // search
|
||||
"\E80C": "home" // school
|
||||
"\E8B6": "search" // search
|
||||
) {
|
||||
&--#{$name}::before {
|
||||
content: $ligature;
|
||||
|
@ -49,6 +49,11 @@ font:
|
||||
# Fixed-width font for code listings
|
||||
code: Roboto Mono
|
||||
|
||||
# The logo of the documentation shown in the header and navigation can either
|
||||
# be a Material Icon ligature or an image URL
|
||||
logo:
|
||||
icon: school
|
||||
|
||||
# Material includes the search in the header as a partial, not as a separate
|
||||
# template, so it's correct that search.html is missing
|
||||
include_search_page: false
|
||||
|
@ -32,15 +32,11 @@
|
||||
<a href="{{ config.site_url | default(nav.homepage.url, true) }}"
|
||||
title="{{ config.site_name }}"
|
||||
class="md-header-nav__button md-logo">
|
||||
{% if config.extra.logo %}
|
||||
{% if config.extra.logo.icon %}
|
||||
<i class="md-icon">{{ config.extra.logo.icon }}</i>
|
||||
{% else %}
|
||||
<img src="{{ base_url }}/{{ config.extra.logo }}"
|
||||
width="24" height="24" />
|
||||
{% endif %}
|
||||
{% if config.theme.logo.icon %}
|
||||
<i class="md-icon">{{ config.theme.logo.icon }}</i>
|
||||
{% else %}
|
||||
<i class="md-icon md-icon--home"></i>
|
||||
<img src="{{ base_url }}/{{ config.theme.logo }}"
|
||||
width="24" height="24" />
|
||||
{% endif %}
|
||||
</a>
|
||||
</div>
|
||||
@ -70,11 +66,13 @@
|
||||
<!-- Button to open search dialogue -->
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
{% block search_box %}
|
||||
<label class="md-icon md-icon--search md-header-nav__button"
|
||||
for="search"></label>
|
||||
{% if "search" in config["plugins"] %}
|
||||
<label class="md-icon md-icon--search md-header-nav__button"
|
||||
for="search"></label>
|
||||
|
||||
<!-- Search interface -->
|
||||
{% include "partials/search.html" %}
|
||||
<!-- Search interface -->
|
||||
{% include "partials/search.html" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
|
@ -26,14 +26,11 @@
|
||||
<!-- Site title -->
|
||||
<label class="md-nav__title md-nav__title--site" for="drawer">
|
||||
<span class="md-nav__button md-logo">
|
||||
{% if config.extra.logo %}
|
||||
{% if config.extra.logo.icon %}
|
||||
<i class="md-icon">{{ config.extra.logo.icon }}</i>
|
||||
{% else %}
|
||||
<img src="{{ base_url }}/{{ config.extra.logo }}" />
|
||||
{% endif %}
|
||||
{% if config.theme.logo.icon %}
|
||||
<i class="md-icon">{{ config.theme.logo.icon }}</i>
|
||||
{% else %}
|
||||
<i class="md-icon md-icon--home"></i>
|
||||
<img src="{{ base_url }}/{{ config.theme.logo }}"
|
||||
width="24" height="24" />
|
||||
{% endif %}
|
||||
</span>
|
||||
{{ config.site_name }}
|
||||
|
Loading…
Reference in New Issue
Block a user