Move button into content block

This commit is contained in:
squidfunk 2017-03-01 15:43:49 +01:00 committed by Martin Donath
parent a911dd31b3
commit 12e12135c1
3 changed files with 13 additions and 13 deletions

View File

@ -108,10 +108,10 @@
{% endblock %} {% endblock %}
<div class="md-content"> <div class="md-content">
<article class="md-content__inner md-typeset"> <article class="md-content__inner md-typeset">
{% block content %}
{% if config.edit_uri %} {% if config.edit_uri %}
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">edit</a> <a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">edit</a>
{% endif %} {% endif %}
{% block content %}
{% if page.meta.source %} {% if page.meta.source %}
<a href="{{ page.edit_url }}" title="{{ lang.t('source.link.title') }}" class="md-icon md-content__icon">folder_open</a> <a href="{{ page.edit_url }}" title="{{ lang.t('source.link.title') }}" class="md-icon md-content__icon">folder_open</a>
{% endif %} {% endif %}

View File

@ -27,7 +27,7 @@ site_url: http://squidfunk.github.io/mkdocs-material/
# Repository # Repository
repo_name: squidfunk/mkdocs-material repo_name: squidfunk/mkdocs-material
repo_url: https://github.com/squidfunk/mkdocs-material repo_url: https://github.com/squidfunk/mkdocs-material
edit_uri: tree/master/docs #edit_uri: tree/master/docs
# Copyright # Copyright
copyright: 'Copyright &copy; 2016 - 2017 Martin Donath' copyright: 'Copyright &copy; 2016 - 2017 Martin Donath'
@ -37,8 +37,8 @@ theme_dir: material
# Options # Options
extra: extra:
feature: #feature:
tabs: true # tabs: true
palette: palette:
primary: indigo primary: indigo
accent: indigo accent: indigo

View File

@ -210,6 +210,9 @@
<div class="md-content"> <div class="md-content">
<article class="md-content__inner md-typeset"> <article class="md-content__inner md-typeset">
<!-- Block: content -->
{% block content %}
<!-- Edit button, if URL was defined --> <!-- Edit button, if URL was defined -->
{% if config.edit_uri %} {% if config.edit_uri %}
<a href="{{ page.edit_url }}" <a href="{{ page.edit_url }}"
@ -217,9 +220,6 @@
class="md-icon md-content__icon">edit</a> class="md-icon md-content__icon">edit</a>
{% endif %} {% endif %}
<!-- Block: content -->
{% block content %}
<!-- Linked source files --> <!-- Linked source files -->
{% if page.meta.source %} {% if page.meta.source %}
<a href="{{ page.edit_url }}" <a href="{{ page.edit_url }}"