7eeb813f19
This is a big commit that involves drastic changes to how static assets (.sql and template files, the whole frontend bundle) are handled. listmonk distribution should be a self-contained single binary distribution, hence all static assets should be bundled. After evaluating several solutions, srtkkou/zgok seemed like the best bet but it lacked several fundamental features, namely the ability to fall back to the local filesystem in the absence of embedded assets (for instance, in the dev mode). Moreover, there was a lot of room for cleanup. After a PR went unanswered, github.com/knadh/stuffbin was created. Just like zgok, this enables arbitrary files and assets to be embedded into a compiled Go binary that can be read during runtime. These changes followed: - Compress and embed all static files into the binary during the build (Makefile) to make it standalone and distributable - Refactor static paths (/public/* for public facing assets, /frontend/* for the frontend app's assets) - Add 'logo_url' to config - Remove 'assets_path' from config - Tweak yarn build to not produce symbol maps and override the default /static (%PUBLIC_URL%) path to /frontend
83 lines
2.1 KiB
HTML
83 lines
2.1 KiB
HTML
{{ define "header" }}
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
|
|
<base target="_blank">
|
|
|
|
<style>
|
|
body {
|
|
background-color: #F0F1F3;
|
|
font-family: 'Helvetica Neue', 'Segoe UI', Helvetica, sans-serif;
|
|
font-size: 15px;
|
|
line-height: 26px;
|
|
margin: 0;
|
|
color: #444;
|
|
}
|
|
|
|
.wrap {
|
|
background-color: #fff;
|
|
padding: 30px;
|
|
max-width: 525px;
|
|
margin: 0 auto;
|
|
border-radius: 5px;
|
|
}
|
|
|
|
.header {
|
|
border-bottom: 1px solid #eee;
|
|
padding-bottom: 15px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.footer {
|
|
text-align: center;
|
|
font-size: 12px;
|
|
color: #888;
|
|
}
|
|
.footer a {
|
|
color: #888;
|
|
}
|
|
|
|
.gutter {
|
|
padding: 30px;
|
|
}
|
|
|
|
img {
|
|
max-width: 100%;
|
|
}
|
|
|
|
a {
|
|
color: #7f2aff;
|
|
}
|
|
a:hover {
|
|
color: #111;
|
|
}
|
|
@media screen and (max-width: 600px) {
|
|
.wrap {
|
|
max-width: auto;
|
|
}
|
|
.gutter {
|
|
padding: 10px;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body style="background-color: #F0F1F3;">
|
|
<div class="gutter"> </div>
|
|
<div class="wrap">
|
|
<div class="header">
|
|
<a href="{{ index . "RootURL" }}"><img src="{{ index . "RootURL" }}/public/static/logo.svg" alt="listmonk" /></a>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ define "footer" }}
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>Powered by <a href="https://listmonk.app" target="_blank">listmonk</a></p>
|
|
</div>
|
|
<div class="gutter"> </div>
|
|
</body>
|
|
</html>
|
|
{{ end }}
|