blob: cbe1080df98de44b80d3362a68591aa48892ca2e (
plain) (
blame)
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
|
#!/bin/bash
source "$WEBSITE_ROOT/common"
process_article() {
source "$1";
echo """
<span class='article'>
<a id='$NAME' href='/#$NAME' class='title'>
<span class='text'>$TITLE</span>
<span class='line'>
<span class='author'>$AUTHOR</span>
<span class='line'></span>
<span class='date'>$DATE</span>
</span>
</a>
$ARTICLE
</span>""";
}
echo """HTTP/1.1 200 OK
Content-type: text/html
""";
cat "$WEBSITE_ROOT/static/head.html";
#readarray -td ',' data < <(get_prop 'VERSION,GUILDS');
#$WEBSITE_ROOT/support/sidebar 1;
sidebar;
echo "<span class='content'>";
if [ -z $UNPUBLISHED ]; then
articles="$WEBSITE_ROOT/articles/published/"*'.meta'
else
articles="$WEBSITE_ROOT/articles/incoming/"*'.meta'
fi;
for article in $articles; do
process_article "$article";
done;
echo "</span>";
cat "$WEBSITE_ROOT/static/tail.html";
|