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 %}
<div class="md-content">
<article class="md-content__inner md-typeset">
{% block content %}
{% if config.edit_uri %}
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">edit</a>
{% endif %}
{% block content %}
{% if page.meta.source %}
<a href="{{ page.edit_url }}" title="{{ lang.t('source.link.title') }}" class="md-icon md-content__icon">folder_open</a>
{% endif %}

View File

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

View File

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