-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathmain.html
69 lines (62 loc) · 2.56 KB
/
main.html
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
{#
MkDocs template for builds with Material theme to customize docs layout
by adding marketing-requested elements
#}
{# Import the theme's layout. #}
{% extends "base.html" %}
{% block site_nav %}
{% if nav %}
{% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "navigation" in page.meta.hide %}
{% endif %}
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" {{ hidden }}>
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/nav.html" %}
<br>
<label class="md-nav__title" for="__drawer">
<a href="https://learn.percona.com/download-manual-percona-distribution-for-postgresql-13" onclick="_gaq.push(['b._trackEvent', 'Percona Distribution for PostgreSQL', 'Download', 'Download Manual Distribution for PostgreSQL']);" class="md-nav__link md-nav__link--active" style="font-size: .7rem;">
Download PDF
</a>
</label>
</div>
</div>
</div>
{% endif %}
{% if "toc.integrate" not in features %}
{% if page.meta and page.meta.hide %}
{% set hidden = "hidden" if "toc" in page.meta.hide %}
{% endif %}
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" {{ hidden }}>
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
{% include "partials/toc.html" %}
</div>
<div class="md-sidebar__inner">
{% include "partials/banner.html" %}
</div>
</div>
</div>
{% endif %}
{% endblock %}
{% block content%}
{{ super() }}
<script>
window.addEventListener('beforeprint', (event) => {
for (const detailEl of document.querySelectorAll('details')) {
if (detailEl.getAttribute('open') == null) {
detailEl.setAttribute('data-was-closed', 'true')
}
detailEl.setAttribute('open', '')
}
})
window.addEventListener('afterprint', (event) => {
for (const detailEl of document.querySelectorAll('details')) {
if (detailEl.getAttribute('data-was-closed') != null) {
detailEl.removeAttribute('data-was-closed')
detailEl.removeAttribute('open')
}
}
})
</script>
{% endblock %}