PyCharm Format
Clean up indentation and whitespace
This commit is contained in:
parent
74717fe8dc
commit
c35d1050e0
1 changed files with 113 additions and 110 deletions
|
@ -1,137 +1,140 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="{{ get_url(path="main.css") | safe }}">
|
||||
{% if config.extra.favicon %}
|
||||
<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>
|
||||
{% 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 %}
|
||||
{% if config.extra.release %}
|
||||
<script>
|
||||
fetch('{{ config.extra.release | safe }}')
|
||||
.then((response) => {
|
||||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
let release_name = data.name;
|
||||
let html_url = data.html_url;
|
||||
release.innerHTML = `<a href='${html_url}'>${release_name}</a>`;
|
||||
});
|
||||
fetch('{{ config.extra.release | safe }}')
|
||||
.then((response) => {
|
||||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
let release_name = data.name;
|
||||
let html_url = data.html_url;
|
||||
release.innerHTML = `<a href='${html_url}'>${release_name}</a>`;
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
<main>
|
||||
{% endif %}
|
||||
<main>
|
||||
|
||||
{% block nav %}
|
||||
{% block nav %}
|
||||
|
||||
<nav>
|
||||
{% if config.extra.logo %}
|
||||
{% if current_path == "/" %}
|
||||
<img src="{{ config.extra.logo | safe }}" alt="" />
|
||||
{% if config.extra.logo %}
|
||||
{% if current_path == "/" %}
|
||||
<img src="{{ config.extra.logo | safe }}" alt=""/>
|
||||
|
||||
{% else %}<a href="{{ config.base_url }}">
|
||||
<img src="{{ config.extra.logo | safe }}" alt="" />
|
||||
{% else %}<a href="{{ config.base_url }}">
|
||||
<img src="{{ config.extra.logo | safe }}" alt=""/>
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<h1><a href="{{ config.base_url }}">{{ config.title }}</a></h1>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<h1><a href="{{ config.base_url }}">{{ config.title }}</a></h1>
|
||||
{% endif %}
|
||||
{% if config.extra.release %}
|
||||
<div id="release"></div>
|
||||
{% endif %}
|
||||
|
||||
{% if config.extra.release %}
|
||||
<div id="release"></div>
|
||||
{% endif %}
|
||||
|
||||
<a href="javascript:void(0);" onclick="burger()" id="mobile" class="ms-Icon--GlobalNavButton"></a>
|
||||
<div id="trees">
|
||||
{% set section = get_section(path="_index.md") %}
|
||||
{% for p in section.subsections %}
|
||||
{% set subsection = get_section(path=p) %}
|
||||
<a href="javascript:void(0);" onclick="burger()" id="mobile" class="ms-Icon--GlobalNavButton"></a>
|
||||
<div id="trees">
|
||||
{% set section = get_section(path="_index.md") %}
|
||||
{% for p in section.subsections %}
|
||||
{% set subsection = get_section(path=p) %}
|
||||
|
||||
|
||||
<input class="tree-toggle" type="checkbox" id="{{ subsection.title | slugify }}"
|
||||
{% if current_path is starting_with(subsection.path) %}checked{% endif %} />
|
||||
<label class="tree-toggle-label" for="{{ subsection.title | slugify }}">{{ subsection.title }}</label>
|
||||
<input class="tree-toggle" type="checkbox" id="{{ subsection.title | slugify }}"
|
||||
{% if current_path is starting_with(subsection.path) %}checked{% endif %}/>
|
||||
<label class="tree-toggle-label"
|
||||
for="{{ subsection.title | slugify }}">{{ subsection.title }}</label>
|
||||
|
||||
<ul class="subtree">
|
||||
{% for page in subsection.pages %}
|
||||
<li {% if current_path == page.path %}class="active"{% endif %}>
|
||||
<a href="{{page.permalink | safe }}">{{page.title}}</a>
|
||||
</li>
|
||||
<ul class="subtree">
|
||||
{% for page in subsection.pages %}
|
||||
<li {% if current_path == page.path %}class="active"{% endif %}>
|
||||
<a href="{{ page.permalink | safe }}">{{ page.title }}</a>
|
||||
</li>
|
||||
|
||||
{% if page.toc %}
|
||||
{% if page.toc %}
|
||||
|
||||
{% if current_path == page.path %}
|
||||
{% if current_path == page.path %}
|
||||
|
||||
{% set_global header_count = 0 %}
|
||||
{% for h2 in page.toc %}
|
||||
{% set_global header_count = header_count + 1 %}
|
||||
{% for h3 in h2.children %}
|
||||
{% set_global header_count = header_count + 1 %}
|
||||
{% for h4 in h3.children %}
|
||||
{% set_global header_count = header_count + 1 %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% set_global header_count = 0 %}
|
||||
{% for h2 in page.toc %}
|
||||
{% set_global header_count = header_count + 1 %}
|
||||
{% for h3 in h2.children %}
|
||||
{% set_global header_count = header_count + 1 %}
|
||||
{% for h4 in h3.children %}
|
||||
{% set_global header_count = header_count + 1 %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
{% if header_count > 4 %}
|
||||
<ul id="toc">
|
||||
{% for h2 in page.toc %}
|
||||
<li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
|
||||
{% if h2.children %}
|
||||
<ul>
|
||||
{% for h3 in h2.children %}
|
||||
<li><a href="{{ h3.permalink | safe }}">{{ h3.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if header_count > 4 %}
|
||||
<ul id="toc">
|
||||
{% for h2 in page.toc %}
|
||||
<li><a href="{{ h2.permalink | safe }}">{{ h2.title }}</a>
|
||||
{% if h2.children %}
|
||||
<ul>
|
||||
{% for h3 in h2.children %}
|
||||
<li>
|
||||
<a href="{{ h3.permalink | safe }}">{{ h3.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
{% endblock nav %}
|
||||
|
||||
<article>
|
||||
<article>
|
||||
|
||||
{% if config.build_search_index %}
|
||||
<div id="on_right">
|
||||
<span id="search-ico" class="ms-Icon--Search"></span>
|
||||
</div>
|
||||
<div class="search-container">
|
||||
<input id="search" type="search" placeholder="Search as you type...">
|
||||
<div class="search-results">
|
||||
<div class="search-results__header"></div>
|
||||
<ul class="search-results__items"></ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if config.build_search_index %}
|
||||
<div id="on_right">
|
||||
<span id="search-ico" class="ms-Icon--Search"></span>
|
||||
</div>
|
||||
<div class="search-container">
|
||||
<input id="search" type="search" placeholder="Search as you type...">
|
||||
<div class="search-results">
|
||||
<div class="search-results__header"></div>
|
||||
<ul class="search-results__items"></ul>
|
||||
</div>
|
||||
</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>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
{% 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 %}
|
||||
{% 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>
|
||||
|
|
Loading…
Reference in a new issue