-
+
+
{% block site_nav %} {% if nav %}
@@ -160,41 +141,25 @@
{% block content %} {% if page.edit_url %} - + + {% include ".icons/material/pencil.svg" %} + {% endif %} + {% block source %} + {% if page and page.meta and page.meta.source %} + {% include "partials/source-link.html" %} + {% endif %} + {% endblock %} {% if not "\x3ch1" in page.content %}

{{ page.title | default(config.site_name, true)}}

{% endif %} {{ page.content }} - {% block source %} - {% if page and page.meta and page.meta.source %} -

{{ lang.t("meta.source") }}

- {% set repo = config.repo_url %} - {% if repo | last == "/" %} - {% set repo = repo[:-1] %} - {% endif %} - {% set path = page.meta.path | default([""]) %} - {% set file = page.meta.source %} - - {{ file }} - - {% endif %} - {% endblock %} + {% if page and page.meta %} + {% if page.meta.git_revision_date_localized or + page.meta.revision_date + %} + {% include "partials/source-date.html" %} - {% if page and page.meta and ( - page.meta.git_revision_date_localized or - page.meta.revision_date - ) %} - {% set label = lang.t("source.revision.date") %} -
-
- - {% if page.meta.git_revision_date_localized %} - {{ label }}: {{ page.meta.git_revision_date_localized }} - {% elif page.meta.revision_date %} - {{ label }}: {{ page.meta.revision_date }} - {% endif %} - -
{% endif %} {% endblock %} {% block disqus %} @@ -208,29 +174,35 @@ {% include "partials/footer.html" %} {% endblock %}
{% block scripts %} - - {% if lang.t("search.language") != "en" %} - {% set languages = lang.t("search.language").split(",") %} - {% if languages | length and languages[0] != "" %} - {% set path = "assets/javascripts/lunr/" %} - - {% for language in languages | map("trim") %} - {% if language != "en" %} - {% if language == "ja" %} - - {% endif %} - {% if language in ("ar", "da", "de", "es", "fi", "fr", "hu", "it", "ja", "nl", "no", "pt", "ro", "ru", "sv", "th", "tr", "vi") %} - - {% endif %} - {% endif %} - {% endfor %} - {% if languages | length > 1 %} - - {% endif %} - {% endif %} - {% endif %} - + + + {%- set translations = {} -%} + {%- for key in [ + "clipboard.copy", + "clipboard.copied", + "search.config.lang", + "search.config.pipeline", + "search.config.separator", + "search.result.placeholder", + "search.result.none", + "search.result.one", + "search.result.other" + ] -%} + {%- set _ = translations.update({ key: lang.t(key) }) -%} + {%- endfor -%} + + {% block config %}{% endblock %} + {% for path in config["extra_javascript"] %} {% endfor %} ``` #### `partials/footer.html` ``` diff @@ -5,34 +5,34 @@