-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.tt
More file actions
143 lines (135 loc) · 4.97 KB
/
main.tt
File metadata and controls
143 lines (135 loc) · 4.97 KB
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
[% BLOCK print %]
[% FOREACH p IN block.children %]
[% IF p.title %]
<h2>[% p.title %]</h2>
[% PROCESS print block=p %]
[% ELSE %]
<p>[% p %]</p>
[% END %]
[% END %]
[% END %]
[% BLOCK string %]
[% IF config.lang == 'en' %]
[% s %]
[% ELSE %]
[% IF config.strings.exists(s) %]
[% config.strings.item(s) %]
[% ELSE %]
[% PERL %]warn 'Missing translation for string "[% s %]"';[% END %]
[% END %]
[% END %]
[%- END %]
[% BLOCK rel_href %]
[% IF href.substr(0, 1) != '/' %][% page.basedir %][% END %][% href %]
[%- END %]
[% BLOCK page %]
<!DOCTYPE html>
<html lang="[% config.lang %]">
<head>
<title>[% title %][% IF page.title != 'Home' %]: [% page.title %][% END %]</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Waiting+for+the+Sunrise">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="[% page.basedir %]style.css">
[% FOREACH href IN styles %]
<link rel="stylesheet" href="[% href %]">
[% END %]
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1D7F39GLWE"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-1D7F39GLWE');
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
[% FOREACH src IN scripts %]
<script src="[% src %]"></script>
[% END %]
</head>
<body class="page d-flex flex-column min-vh-100">
<span id="forkongithub"><a href="https://github.com/pupitetris/Exploratorium">Fork me on GitHub</a></span>
<div class="content">
<nav class="navbar navbar-expand-lg bg-body-tertiary sticky-top">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggler" aria-controls="navbarToggler" aria-expanded="false" aria-label="[% PROCESS string s='Toggle navigation' %]">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarToggler">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
[% FOREACH link IN navigation.children %]
[% IF link.href == 'navlang' %]
[% href = page.config.navlang %]
[% ELSE %]
[% href = link.href %]
[% END %]
[% IF link.href.substr(0, 4) == 'nav_' %]
<li class="nav-item dropdown diagrams">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
[% link.text %]
</a>
<ul class="dropdown-menu">
[% menu_name = link.href.substr(4).replace('_', '-') %]
[% FOREACH menulink IN $menu_name.children %]
<li><a class="dropdown-item" href="[% PROCESS rel_href href=menulink.href %]">[% menulink.text %]</a></li>
[% END %]
</ul>
</li>
[% ELSE %]
<li class="nav-item">
<a class="nav-link[% IF href == page.config.output %] active[% END %]"[% IF href == page.config.output %] aria-current="page"[% END %] href="[% PROCESS rel_href href=href %]">
[% link.text %]
</a>
</li>
[% END %]
[% END %]
</ul>
</div>
</div>
</nav>
<header class="intro-header">
<div class="container" id="info">
<div class="row">
[% IF logos == 1 %]
<div class="col-lg-9">
[% END %]
<div class="title">
<h1>[% (page.title == 'Home')? title : page.title %]</h1>
</div>
[% IF page.title == 'Home' %]
<div class="author">
[% PROCESS print block=author %]
</div>
[% END %]
[% IF logos == 1 %]
</div>
<div class="col-lg-3 logos">
<img src="[% page.basedir %]images/logo_uam.jpg" alt="UAM">
<img src="[% page.basedir %]images/REMO.png" alt="REMO">
</div>
[% END %]
</div>
</div>
</header>
[% content %]
</div>
<footer class="footer-pasto mt-auto">
<div class="container">
[% IF page.title != 'Home' %]
<div class="author">
[% PROCESS print block=author %]
</div>
[% END %]
[% FOREACH heading IN footer.children %]
<div class="[% heading.id %]">
[% FOREACH p IN heading.children %]
<p>[% p %]</p>
[% END %]
</div>
[% END %]
</div>
</footer>
</body>
</html>
[% END %]