diff options
Diffstat (limited to 'theme')
-rw-r--r-- | theme/i18n/de.json | 1 | ||||
-rw-r--r-- | theme/i18n/fr.json | 1 | ||||
-rw-r--r-- | theme/templates/ebook/summary.html | 6 | ||||
-rw-r--r-- | theme/templates/website/includes/summary.html | 6 |
4 files changed, 8 insertions, 6 deletions
diff --git a/theme/i18n/de.json b/theme/i18n/de.json index e45bec7..c5cde18 100644 --- a/theme/i18n/de.json +++ b/theme/i18n/de.json @@ -5,6 +5,7 @@ "GLOSSARY_OPEN": "Glossar", "GITBOOK_LINK": "Veröffentlicht mit GitBook", "SUMMARY": "Inhaltsverzeichnis", + "SUMMARY_INTRODUCTION": "Einführung", "SUMMARY_TOGGLE": "Inhaltsverzeichnis", "SEARCH_TOGGLE": "Suche", "SEARCH_PLACEHOLDER": "Suchbegriff eingeben", diff --git a/theme/i18n/fr.json b/theme/i18n/fr.json index eedc8ab..8692174 100644 --- a/theme/i18n/fr.json +++ b/theme/i18n/fr.json @@ -5,6 +5,7 @@ "GLOSSARY_OPEN": "Glossaire", "GITBOOK_LINK": "Publié avec GitBook", "SUMMARY": "Table des matières", + "SUMMARY_INTRODUCTION": "Introduction", "SUMMARY_TOGGLE": "Table des matières", "SEARCH_TOGGLE": "Recherche", "SEARCH_PLACEHOLDER": "Tapez pour rechercher", diff --git a/theme/templates/ebook/summary.html b/theme/templates/ebook/summary.html index 16de1e8..c0d6d1e 100644 --- a/theme/templates/ebook/summary.html +++ b/theme/templates/ebook/summary.html @@ -5,9 +5,9 @@ {% macro articles(_articles) %} {% for item in _articles %} <li> - {% if item.path %} - {% if item.external %} - <a href="{{ basePath }}/{{ item.path|contentLink }}">{{ item.title }}</a> + {% if item.path and item.exists %} + {% if not item.external %} + <a href="{{ basePath }}/{{ item.path|contentLink }}">{% if item.introduction %}{% i18n "SUMMARY_INTRODUCTION" %}Introduction{% endi18n %}{% else %}{{ item.title }}{% endif %}</a> {% else %} <a target="_blank" href="{{ item.path }}">{{ item.title }}</a> {% endif %} diff --git a/theme/templates/website/includes/summary.html b/theme/templates/website/includes/summary.html index 235b81f..5f09e13 100644 --- a/theme/templates/website/includes/summary.html +++ b/theme/templates/website/includes/summary.html @@ -1,14 +1,14 @@ {% macro articles(_articles) %} {% for item in _articles %} <li class="chapter {% if item.path == _input %}active{% endif %}" data-level="{{ item.level }}" {% if item.path and not item.external %}data-path="{{ item.path|contentLink }}"{% endif %}> - {% if item.path %} + {% if item.path and item.exists %} {% if not item.external %} <a href="{{ basePath }}/{{ item.path|contentLink }}"> <i class="fa fa-check"></i> {% if item.level != "0" %} <b>{{ item.level }}.</b> {% endif %} - {{ item.title }} + {% if item.introduction %}{% i18n "SUMMARY_INTRODUCTION" %}Introduction{% endi18n %}{% else %}{{ item.title }}{% endif %} </a> {% else %} <a target="_blank" href="{{ item.path }}"> @@ -16,7 +16,7 @@ {% if item.level != "0" %} <b>{{ item.level }}.</b> {% endif %} - {{ item.title }} + {{ item.title }} </a> {% endif %} {% else %} |