refactor(web/tvl/template): Move footer into a separate target

This makes it possible for the footer to be reused in other places,
e.g. when templating blog posts (which do not go through
//web/tvl/template (yet)).

Change-Id: Ia8ab0e1c6db4f76b4de49239e11a4474038f60ae
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3773
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
Vincent Ambo 2021-11-05 13:41:10 +01:00 committed by tazjin
parent 10e279ac13
commit 4baf633622
2 changed files with 22 additions and 15 deletions

View file

@ -0,0 +1,21 @@
# Footer fragment for TVL homepages, used by //web/tvl/template for
# our static pages and also via //web/blog for blog posts.
{ lib, ... }:
args: ''
<p class="footer">
<a class="uncoloured-link" href="https://at.tvl.fyi/?q=%2F%2FREADME.md">code</a>
|
<a class="uncoloured-link" href="https://cl.tvl.fyi/">reviews</a>
|
<a class="uncoloured-link" href="https://tvl.fyi/builds">ci</a>
|
<a class="uncoloured-link" href="https://b.tvl.fyi/">bugs</a>
|
<a class="uncoloured-link" href="https://todo.tvl.fyi/">todos</a>
|
<a class="uncoloured-link" href="https://atward.tvl.fyi/">search</a>
'' + lib.optionalString (args ? extraFooter) args.extraFooter + ''
</p>
<p class="lod">_</p>
''

View file

@ -37,21 +37,7 @@ runCommandNoCC "index.html" {
footerPart = ''
<hr>
<footer>
<p class="footer">
<a class="uncoloured-link" href="https://at.tvl.fyi/?q=%2F%2FREADME.md">code</a>
|
<a class="uncoloured-link" href="https://cl.tvl.fyi/">reviews</a>
|
<a class="uncoloured-link" href="https://tvl.fyi/builds">ci</a>
|
<a class="uncoloured-link" href="https://b.tvl.fyi/">bugs</a>
|
<a class="uncoloured-link" href="https://todo.tvl.fyi/">todos</a>
|
<a class="uncoloured-link" href="https://atward.tvl.fyi/">search</a>
'' + lib.optionalString (args ? extraFooter) extraFooter + ''
</p>
<p class="lod">_</p>
${depot.web.tvl.footer args}
</footer>
</body>
'';