-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html.jinja2
75 lines (73 loc) · 2.45 KB
/
index.html.jinja2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{# this template is used to render the top-level index.html. #}
{% if root_module_name %}
{#
If there is one common parent module for all documented modules, redirect there immediately.
This makes a package's `__init__.py` the main entrypoint by default.
A custom template could override this by setting root_module_name to false before `{% extend ... %}`.
#}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=./{{ root_module_name.replace(".","/") }}.html"/>
</head>
</html>
{% else %}
{% extends "frame.html.jinja2" %}
{% block title %}Module List – pdoc {{ __version__ }}{% endblock %}
{% block style %}
{{ super() | safe }}
<style>
header.pdoc {
display: flex;
align-items: center;
flex-wrap: wrap;
}
header.pdoc img {
max-width: 200px;
max-height: 75px;
padding-right: 2rem;
}
header.pdoc input[type=search] {
outline-offset: 0;
font-size: 1.5rem;
min-width: 60%;
flex-grow: 1;
padding-left: .5rem;
margin: 1.75rem 0;
}
</style>
{% endblock %}
{% block nav %}
<h2>Available Modules</h2>
<ul>
{% for submodule in all_modules if "._" not in submodule and not submodule.startswith("_") %}
<li><a href="{{ submodule.replace(".","/") }}.html">{{ submodule }}</a></li>
{% endfor %}
</ul>
{% endblock %}
{% block content %}
<header class="pdoc">
{% block logo %}
{% if logo %}
{% set logo_link = "https://github.com/thierrymoudiki/thierrymoudiki.github.io/blob/master/images/t-logo2.png" %}
{% if logo_link %}<a href="{{ logo_link }}">{% endif %}
<img src="{{ logo }}" alt="project logo"/>
{% if logo_link %}</a>{% endif %}
{% else %}
<a href="https://pdoc.dev">
<img src="data:image/svg+xml,{% filter urlencode %}{% include "resources/pdoc-logo.svg" %}{% endfilter %}"
alt="pdoc"/>
</a>
{% endif %}
{% endblock %}
{% if search %}
<input type="search" placeholder="Search API Documentation..." aria-label="search box">
{% endif %}
</header>
<main class="pdoc"></main>
{% if search %}
{% include "search.html.jinja2" %}
{% endif %}
{% endblock %}
{% endif %}