mirror of
https://github.com/Wolvan/poll.horse.git
synced 2024-11-25 06:07:58 +01:00
Serverside render footer
This way it's easy to add new links or a changed copyright to the footer on all pages.
This commit is contained in:
parent
3e06f08e42
commit
5b5dc9d922
2 changed files with 7 additions and 3 deletions
|
@ -51,9 +51,9 @@
|
|||
</main>
|
||||
<footer>
|
||||
<ul>
|
||||
<li><a href="https://github.com/Wolvan/poll.horse" target="_blank">Github Repo</a></li>
|
||||
{{ FOOTER_LINKS }}
|
||||
</ul>
|
||||
<div class="copyright">© 2021 Wolvan</div>
|
||||
<div class="copyright">{{ FOOTER_COPYRIGHT }}</div>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
|
@ -55,7 +55,11 @@ class MinificationTransform extends RenderTransform {
|
|||
|
||||
const defaultReplacements = {
|
||||
"TITLE": "Poll Horse",
|
||||
"DEVELOPER_CONTACT_INFO": "developer@poll.horse"
|
||||
"DEVELOPER_CONTACT_INFO": "developer@poll.horse",
|
||||
"FOOTER_COPYRIGHT": `© ${ (new Date()).getFullYear() } Wolvan`,
|
||||
"FOOTER_LINKS": `
|
||||
<li><a href="https://github.com/Wolvan/poll.horse" target="_blank">Github Repo</a></li>
|
||||
`
|
||||
};
|
||||
class Defaults2RenderTransform extends MinificationTransform {
|
||||
constructor(replacements = {}) {
|
||||
|
|
Loading…
Reference in a new issue