http: Add static file support

Static files are configured using a handful of config values. Static
files can be handled remotely or locally for prod or dev environments,
respectively.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2023-08-02 20:16:47 -07:00
parent d3e3d99b12
commit d79899ea87
5 changed files with 71 additions and 17 deletions

View File

@@ -22,8 +22,10 @@ body {
}
nav {
/*
position: fixed;
top: 0;
*/
width: 100%;
margin: 5px 0;
text-align: left;
@@ -155,6 +157,9 @@ table tr {
{% endblock style %}
</head>
<body>
<nav>
[ <a href="{{route_url("/")}}">Home</a> / <a href="{{route_url("/news")}}">News</a> / <a href="{{route_url("/faq")}}">FAQ</a> ]
</nav>
{% block body %}
<header>
{% block header %}
@@ -172,9 +177,6 @@ table tr {
</div>
{% endblock header %}
</header>
<nav>
[ <a href="{{route_url("/")}}">Home</a> / <a href="{{route_url("/news")}}">News</a> / <a href="{{route_url("/faq")}}">FAQ</a> ]
</nav>
<main>
{% block main %}
{% endblock main %}

View File

@@ -50,7 +50,7 @@
</span>
</div>
<span class="file-thumb">
<img src="{{post['thumb_path']}}" data-md5="{{post['md5']}}" loading="lazy">
<img src="{{static_url(post['thumb_path'])}}" data-md5="{{post['md5']}}" loading="lazy">
</span>
</div>
{% endif %}