Localize edit button and hide on print

This commit is contained in:
squidfunk 2017-01-06 19:18:17 +01:00
parent f37bb76d18
commit 60624bfa82
6 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,4 @@
{% import "partials/i18n.html" as i18n %}
<!DOCTYPE html>
<html class="no-js">
<head>
@ -36,7 +37,7 @@
{% include "partials/fonts.html" %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-9307c0da9f.css">
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-d8a9749564.css">
{% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02ce7adcc2.palette.css">
{% endif %}
@ -87,7 +88,7 @@
<div class="md-content">
<article class="md-content__inner md-typeset">
{% if config.edit_uri %}
<a href="{{ page.edit_url }}" title="Edit this page" class="md-icon md-content__edit">edit</a>
<a href="{{ page.edit_url }}" title="{{ i18n.t('edit.link.title') }}" class="md-icon md-content__edit">edit</a>
{% endif %}
{% block content %}
{% if not "\x3ch1 id=" in page.content %}
@ -100,7 +101,7 @@
</div>
</main>
{% block footer %}
{% include "partials/footer.html" with context %}
{% include "partials/footer.html" %}
{% endblock %}
</div>
{% block scripts %}

View File

@ -1,4 +1,5 @@
{% macro t(key) %}{{ {
"edit.link.title": "Edit this page",
"footer.previous": "Previous",
"footer.next": "Next",
"search.placeholder": "Search",

View File

@ -57,5 +57,10 @@
@include break-to-device(tablet portrait) {
margin-right: -0.8rem;
}
// Hide for print
@media print {
display: none;
}
}
}

View File

@ -20,6 +20,8 @@
IN THE SOFTWARE.
-->
{% import "partials/i18n.html" as i18n %}
<!DOCTYPE html>
<html class="no-js">
<head>
@ -170,7 +172,8 @@
<!-- Edit button, if URL was defined -->
{% if config.edit_uri %}
<a href="{{ page.edit_url }}" title="Edit this page"
<a href="{{ page.edit_url }}"
title="{{ i18n.t('edit.link.title') }}"
class="md-icon md-content__edit">edit</a>
{% endif %}
@ -196,7 +199,7 @@
<!-- Application footer -->
{% block footer %}
{% include "partials/footer.html" with context %}
{% include "partials/footer.html" %}
{% endblock %}
</div>

View File

@ -22,6 +22,7 @@
<!-- Translations -->
{% macro t(key) %}{{ {
"edit.link.title": "Edit this page",
"footer.previous": "Previous",
"footer.next": "Next",
"search.placeholder": "Search",