diff options
author | codeandmedia <roma@codeandmedia.com> | 2021-03-14 14:36:06 +0300 |
---|---|---|
committer | codeandmedia <roma@codeandmedia.com> | 2021-03-14 14:36:06 +0300 |
commit | cd1c3c0e5f0ef566b21a7ed4b56be1c56d117ac6 (patch) | |
tree | 3952e1b69c724f94d587127f4abf8608c8f16e70 /templates | |
parent | a2667356f1640124dc5d6d297da919a8c77268d7 (diff) |
readme and minor fixes
Diffstat (limited to 'templates')
-rw-r--r-- | templates/index.html | 58 | ||||
-rw-r--r-- | templates/page.html | 1 |
2 files changed, 30 insertions, 29 deletions
diff --git a/templates/index.html b/templates/index.html index 63ea8b6..5d5350e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,9 +3,15 @@ <head> <meta charset="UTF-8"> <link rel="stylesheet" href="{{ get_url(path="main.css") | safe }}"> + {% if config.extra.favicon %} + <link rel="icon" href="{{ config.extra.favicon | safe }}"> + {% endif %} + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1"> + <title>{% block title %}{{ config.title }}{% endblock title %}</title> </head> <body> + {% if config.extra.release %} <script> fetch('{{ config.extra.release | safe }}') .then((response) => { @@ -17,7 +23,7 @@ release.innerHTML = `<a href='${html_url}'>${release_name}</a>`; }); </script> - + {% endif %} <main> {% block nav %} @@ -53,8 +59,8 @@ <ul class="subtree"> {% for page in subsection.pages %} - <li class="{% if current_path == page.path %}active{% endif %}"> - <a href="{{page.permalink}}">{{page.title}}</a> + <li {% if current_path == page.path %}class="active"{% endif %}> + <a href="{{page.permalink | safe }}">{{page.title}}</a> </li> {% if current_path == page.path %} @@ -80,20 +86,19 @@ <li><a href="{{ h3.permalink | safe }}">{{ h3.title }}</a></li> {% endfor %} </ul> - {% endif %} + {% endif %} </li> - {% endfor %} + {% endfor %} </ul> - {% endif %} + {% endif %} -{% endif %} - - - {% endfor %} - </ul> - {% endfor %} - </div> </nav> + {% endif %} + {% endfor %} + </ul> + {% endfor %} + </div> + </nav> {% endblock nav %} <article> @@ -111,25 +116,20 @@ </div> {% endif %} -<div id="wrap"> -{% block content %} - - - {{ section.content | safe }} - -{% endblock content %} -</div> + <div id="wrap"> + {% block content %} + {{ section.content | safe }} + {% endblock content %} + </div> </article> +</main> - -</main> - -{% if config.build_search_index %} -<script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js") | safe }}"></script> -<script type="text/javascript" src="{{ get_url(path="search_index.en.js") | safe }}"></script> -<script type="text/javascript" src="{{ get_url(path="js.js") | safe }}" defer></script> -{% endif %} + {% if config.build_search_index %} + <script type="text/javascript" src="{{ get_url(path="elasticlunr.min.js") | safe }}" defer></script> + <script type="text/javascript" src="{{ get_url(path="search_index.en.js") | safe }}" defer></script> + <script type="text/javascript" src="{{ get_url(path="js.js") | safe }}" defer></script> + {% endif %} </body> </html>
\ No newline at end of file diff --git a/templates/page.html b/templates/page.html index f1f2c04..c836720 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,4 +1,5 @@ {% extends "index.html" %} +{% block title %} {{ config.title }} | {{ page.title }} {% endblock title %} {% block content %} {{ page.content | safe }} {% endblock content %}
\ No newline at end of file |