-
Notifications
You must be signed in to change notification settings - Fork 1
/
titleTemplate.html
100 lines (100 loc) · 4.49 KB
/
titleTemplate.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<html>
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script>
<title>{{tier}} {% if tier|length != 0 %} of {%endif%} {{name}}</title>
</head>
<body>
<header class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 mb-3 bg-body border-bottom shadow-sm">
<p class="h1 my-0 me-md-auto fw-normal">{{tier}} {% if tier|length != 0 %} of {%endif%} {{name}}</p>
<a class="btn btn-outline-primary btn-sm" href="../index.html">Home</a>
</header>
<main class="m-2">
<div class="row">
<div class="col w-50">
{%if capital is defined and capital.id != id%}
Capital: {{capital|render_ref}}
<br>
{%endif%}
{%if de_jure is defined%}
De jure title liege:
{{de_jure|render_ref}}
<br>
{%endif%}
{%if de_facto is defined and de_facto != de_jure%}
De facto title liege:
{{de_facto|render_ref}}
<br>
{%endif%}
{%if de_jure_vassals|length != 0%}
De jure vassals:
<ul>
{%for vassal in de_jure_vassals%}
{{vassal|render_ref}}
{%endfor%}
</ul>
{%endif%}
{%if de_facto_vassals|length != 0 and de_facto_vassals != de_jure_vassals%}
De facto vassals:
<ul>
{%for vassal in de_facto_vassals%}
{{vassal|render_ref}}
{%endfor%}
</ul>
{%endif%}
{%if claims|length != 0%}
Claimants:
<ul>
{%for claimant in claims%}
{{claimant|render_ref}}
{%endfor%}
</ul>
{%endif%}
{%if faith is defined %}
Faith: {{faith|render_ref}}
<br>
{%endif%}
{%if culture is defined %}
Culture: {{culture|render_ref}}
<br>
{%endif%}
{%if map_present and de_facto_vassals|length != 0%}
<div class="card">
<div class="card-header">
De facto title map
</div>
<div class="card-body">
<a href="./{{id}}.png" target="_blank"><img src="./{{id}}.png" class="img-fluid" alt="Map of {{name}}"></a>
</div>
</div>
{%endif%}
</div>
<div class="col w-50">
<div class="card">
<div class="card-header">
Title History
</div>
{%if history|length != 0%}
<ul class="list-group list-group-flush">
{%for item in history%}
{%if item[1] != none%}
<li class="list-group-item">{{item[0]}}:{{item[1]|render_ref}} {{item[2]}}</li>
{%else%}
<li class="list-group-item">{{item[0]}}:{{item[2]}}</li>
{%endif%}
{%endfor%}
</ul>
{%else%}
<div class="card-body">
There is no history to display
</div>
{%endif%}
</div>
</div>
</div>
</main>
</body>
<script>
document.querySelector("html").setAttribute("data-bs-theme", window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light")
</script>
</html>