projects
/
GitHub
/
WoltLab
/
woltlab.github.io.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
7867e5ac13ceb518cccf9ff87cff22869456d04a
[GitHub/WoltLab/woltlab.github.io.git]
/
main.py
1
def
define_env
(
env
):
2
@env
.
macro
3
def
codebox
(
language
,
filepath
,
title
=
""
):
4
if
title
is not
""
:
5
return
f
"""
6
<div class="titledCodeBox">
7
<div class="codeBoxTitle"><code>
{title}
</code></div>
8
```
{language}
9
--8<-- "
{filepath}
"
10
```
11
</div>
12
"""
13
else
:
14
return
f
"""
15
```
{language}
16
--8<-- "
{filepath}
"
17
```
18
"""