aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/self_doc/doc_base.html.jinja
blob: 71842f24314280f378a0a2ea4dcfc636b90d096f (plain)
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
{#
SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0

Base template for documentation pages when outputting HTML.

This file is part of Hydrilla&Haketilo.

Copyright (C) 2022 Wojtek Kosior

Dual licensed under
* GNU General Public License v3.0 or later and
* Creative Commons Attribution Share Alike 4.0 International.

You can choose to use either of these licenses or both.


I, Wojtek Kosior, thereby promise not to sue for violation of this
file's licenses. Although I request that you do not make use of this
code in a proprietary work, I am not going to enforce this in court.
#}
{% if doc_output == 'html_hkt_mitm_it' %}
  {% set doc_base_filename = 'hkt_mitm_it_base.html.jinja' %}
{% else %}
  {% set doc_base_filename = 'base.html.jinja' %}
{% endif %}
{% extends doc_base_filename %}

{% set sections = namespace(count=0) %}

{% macro section() %}
  {% if sections.count > 0 %}
    <div class="horizontal-separator"></div>
  {% endif %}
  {% set sections.count = sections.count + 1 %}

  {{ caller()|safe }}
{% endmacro %}

{% macro doc_page_link(text, page_name) -%}
  {% if doc_output == 'html_hkt_mitm_it' -%}
    <a href="{{ url_for('.home_doc', page=page_name) }}">{{ text }}</a>
  {%- else -%}
    <a href="{{ page_name ~ '.html' }}">{{ text }}</a>
  {%- endif %}
{%- endmacro %}

{% macro hkt_link(text, endpoint_name) -%}
  {% if doc_output == 'html_hkt_mitm_it' -%}
    <a href="{{ url_for(endpoint_name, **kwargs) }}">{{ text }}</a>
  {%- else -%}
    {{ text }}
  {%- endif %}
{%- endmacro %}

{% macro paragraph() %}
  <p class="has-colored-links">
    {{ caller()|safe }}
  </p>
{% endmacro %}

{% macro big_heading(text) %}
  <h3>
    {{ text }}
  </h3>
{% endmacro %}

{% macro medium_heading(text) %}
  <h4>
    {{ text }}
  </h4>
{% endmacro %}

{% macro small_heading(text) %}
  {{ label(text) }}
{% endmacro %}