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> <!DOCTYPE html>
<html class="no-js"> <html class="no-js">
<head> <head>
@@ -36,7 +37,7 @@
{% include "partials/fonts.html" %} {% include "partials/fonts.html" %}
{% endblock %} {% endblock %}
{% block styles %} {% 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 %} {% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02ce7adcc2.palette.css"> <link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02ce7adcc2.palette.css">
{% endif %} {% endif %}
@@ -87,7 +88,7 @@
<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 %} {% 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 %} {% endif %}
{% block content %} {% block content %}
{% if not "\x3ch1 id=" in page.content %} {% if not "\x3ch1 id=" in page.content %}
@@ -100,7 +101,7 @@
</div> </div>
</main> </main>
{% block footer %} {% block footer %}
{% include "partials/footer.html" with context %} {% include "partials/footer.html" %}
{% endblock %} {% endblock %}
</div> </div>
{% block scripts %} {% block scripts %}

View File

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

View File

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

View File

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

View File

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