Removed blocks in partials - Jinja doesn't support them

This commit is contained in:
squidfunk 2019-02-09 18:02:46 +01:00
parent 9d46c27a9e
commit a27372eee3
7 changed files with 53 additions and 73 deletions

View File

@ -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]

View File

@ -50,9 +50,7 @@
<a href="https://squidfunk.github.io/mkdocs-material/">
Material for MkDocs</a>
</div>
{% block social %}
{% include "partials/social.html" %}
{% endblock %}
</div>
</div>
</footer>

View File

@ -15,7 +15,6 @@
</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 %}
{{ config.site_name }}
{% else %}
@ -26,16 +25,13 @@
{{ page.title }}
</span>
{% endif %}
{% endblock %}
</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 %}
</div>
{% if config.repo_url %}
<div class="md-flex__cell md-flex__cell--shrink">

View File

@ -9,7 +9,6 @@
{% 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">
@ -22,4 +21,3 @@
{{ config.repo_name }}
</div>
</a>
{% endblock %}

View File

@ -96,9 +96,7 @@
</div>
<!-- Social links -->
{% block social %}
{% include "partials/social.html" %}
{% endblock %}
</div>
</div>
</footer>

View File

@ -50,7 +50,6 @@
<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 %}
{{ config.site_name }}
{% else %}
@ -61,13 +60,11 @@
{{ page.title }}
</span>
{% endif %}
{% endblock %}
</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>
@ -75,7 +72,6 @@
<!-- Search interface -->
{% include "partials/search.html" %}
{% endif %}
{% endblock %}
</div>
<!-- Repository containing source -->

View File

@ -38,7 +38,6 @@
{% 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 %}
@ -52,4 +51,3 @@
{{ config.repo_name }}
</div>
</a>
{% endblock %}