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">
{% 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 %} {% 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 %}
{% 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,16 +210,16 @@
<div class="md-content"> <div class="md-content">
<article class="md-content__inner md-typeset"> <article class="md-content__inner md-typeset">
<!-- Edit button, if URL was defined -->
{% 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 --> <!-- Block: content -->
{% block content %} {% block content %}
<!-- Edit button, if URL was defined -->
{% if config.edit_uri %}
<a href="{{ page.edit_url }}"
title="{{ lang.t('edit.link.title') }}"
class="md-icon md-content__icon">edit</a>
{% endif %}
<!-- Linked source files --> <!-- Linked source files -->
{% if page.meta.source %} {% if page.meta.source %}
<a href="{{ page.edit_url }}" <a href="{{ page.edit_url }}"