mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Removed blocks in partials - Jinja doesn't support them
This commit is contained in:
parent
9d46c27a9e
commit
a27372eee3
@ -155,14 +155,10 @@ The Material theme provides the following template blocks:
|
||||
| `hero` | Wraps the hero teaser |
|
||||
| `htmltitle` | Wraps the `<title>` tag |
|
||||
| `libs` | Wraps the JavaScript libraries, e.g. Modernizr |
|
||||
| `repo` | Wraps the repository link in the header bar |
|
||||
| `scripts` | Wraps the JavaScript application logic |
|
||||
| `source` | Wraps the linked source files |
|
||||
| `search_box` | Wraps the search form in the header bar |
|
||||
| `site_meta` | Wraps the meta tags in the document head |
|
||||
| `site_name` | Wraps the site name in the header bar |
|
||||
| `site_nav` | Wraps the site navigation and table of contents |
|
||||
| `social` | Wraps the social links in the footer |
|
||||
| `styles` | Wraps the stylesheets (also extra sources) |
|
||||
|
||||
For more on this topic refer to the [MkDocs documentation][4]
|
||||
|
@ -50,9 +50,7 @@
|
||||
<a href="https://squidfunk.github.io/mkdocs-material/">
|
||||
Material for MkDocs</a>
|
||||
</div>
|
||||
{% block social %}
|
||||
{% include "partials/social.html" %}
|
||||
{% endblock %}
|
||||
{% include "partials/social.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -15,27 +15,23 @@
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--stretch">
|
||||
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
|
||||
{% block site_name %}
|
||||
{% if config.site_name == page.title %}
|
||||
{% if config.site_name == page.title %}
|
||||
{{ config.site_name }}
|
||||
{% else %}
|
||||
<span class="md-header-nav__topic">
|
||||
{{ config.site_name }}
|
||||
{% else %}
|
||||
<span class="md-header-nav__topic">
|
||||
{{ config.site_name }}
|
||||
</span>
|
||||
<span class="md-header-nav__topic">
|
||||
{{ page.title }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</span>
|
||||
<span class="md-header-nav__topic">
|
||||
{{ page.title }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
{% block search_box %}
|
||||
{% 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 %}
|
||||
{% if "search" in config["plugins"] %}
|
||||
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
|
||||
{% include "partials/search.html" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if config.repo_url %}
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
|
@ -9,17 +9,15 @@
|
||||
{% else %}
|
||||
{% set repo_type = "" %}
|
||||
{% endif %}
|
||||
{% block repo %}
|
||||
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
|
||||
{% if repo_type %}
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
<use xlink:href="#__{{ repo_type }}" width="24" height="24"></use>
|
||||
</svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="md-source__repository">
|
||||
{{ config.repo_name }}
|
||||
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}" class="md-source" data-md-source="{{ repo_type }}">
|
||||
{% if repo_type %}
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
<use xlink:href="#__{{ repo_type }}" width="24" height="24"></use>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
<div class="md-source__repository">
|
||||
{{ config.repo_name }}
|
||||
</div>
|
||||
</a>
|
||||
|
@ -96,9 +96,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Social links -->
|
||||
{% block social %}
|
||||
{% include "partials/social.html" %}
|
||||
{% endblock %}
|
||||
{% include "partials/social.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -50,32 +50,28 @@
|
||||
<div class="md-flex__cell md-flex__cell--stretch">
|
||||
<div class="md-flex__ellipsis md-header-nav__title"
|
||||
data-md-component="title">
|
||||
{% block site_name %}
|
||||
{% if config.site_name == page.title %}
|
||||
{% if config.site_name == page.title %}
|
||||
{{ config.site_name }}
|
||||
{% else %}
|
||||
<span class="md-header-nav__topic">
|
||||
{{ config.site_name }}
|
||||
{% else %}
|
||||
<span class="md-header-nav__topic">
|
||||
{{ config.site_name }}
|
||||
</span>
|
||||
<span class="md-header-nav__topic">
|
||||
{{ page.title }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
</span>
|
||||
<span class="md-header-nav__topic">
|
||||
{{ page.title }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Button to open search dialogue -->
|
||||
<div class="md-flex__cell md-flex__cell--shrink">
|
||||
{% block search_box %}
|
||||
{% if "search" in config["plugins"] %}
|
||||
<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" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
<!-- Search interface -->
|
||||
{% include "partials/search.html" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!-- Repository containing source -->
|
||||
|
@ -38,18 +38,16 @@
|
||||
{% endif %}
|
||||
|
||||
<!-- Repository containing source -->
|
||||
{% block repo %}
|
||||
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}"
|
||||
class="md-source" data-md-source="{{ repo_type }}">
|
||||
{% if repo_type %}
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
<use xlink:href="#__{{ repo_type }}" width="24" height="24"></use>
|
||||
</svg>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="md-source__repository">
|
||||
{{ config.repo_name }}
|
||||
<a href="{{ config.repo_url }}" title="{{ lang.t('source.link.title') }}"
|
||||
class="md-source" data-md-source="{{ repo_type }}">
|
||||
{% if repo_type %}
|
||||
<div class="md-source__icon">
|
||||
<svg viewBox="0 0 24 24" width="24" height="24">
|
||||
<use xlink:href="#__{{ repo_type }}" width="24" height="24"></use>
|
||||
</svg>
|
||||
</div>
|
||||
</a>
|
||||
{% endblock %}
|
||||
{% endif %}
|
||||
<div class="md-source__repository">
|
||||
{{ config.repo_name }}
|
||||
</div>
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user