From 26f0ba5464131630db06dcbba5b445516b95c2ff Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 1 Oct 2021 19:57:43 +0300 Subject: refactor(web): use static.tvl.{fyi|su} for static assets Replaces all uses of relative static paths in TVL pages with the static.tvl.fyi domain. Where possible, the drv hash is directly embedded in the content. Change-Id: Ia882dd37ceae9d047cd81cf1eb37a856b339643a Reviewed-on: https://cl.tvl.fyi/c/depot/+/3682 Tested-by: BuildkiteCI Reviewed-by: sterni --- corp/website/content.md | 2 +- corp/website/default.nix | 3 +-- web/atward/indexHtml/default.nix | 1 - web/cgit-taz/default.nix | 2 +- web/todolist/default.nix | 7 ++++--- web/tvl/default.nix | 4 +--- 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/corp/website/content.md b/corp/website/content.md index 6dba8dfdad..f7ca9786fb 100644 --- a/corp/website/content.md +++ b/corp/website/content.md @@ -3,7 +3,7 @@ The Virus Lounge ---------------- - Welcome to the corporate face of [The Virus Lounge][tvl-fyi]. diff --git a/corp/website/default.nix b/corp/website/default.nix index fac9a7dce3..8740041d9b 100644 --- a/corp/website/default.nix +++ b/corp/website/default.nix @@ -7,12 +7,11 @@ let "@context" = "https://schema.org"; "@type" = "Organisation"; url = "https://tvl.su"; - logo = "https://tvl.fyi/static/tvl-animated.svg"; + logo = "https://static.tvl.fyi/${depot.web.static.drvHash}/logo-animated.svg"; }; index = depot.web.tvl.template { title = "TVL (The Virus Lounge) - Software consulting"; content = builtins.readFile ./content.md; - staticUrl = "https://tvl.fyi/static"; extraFooter = "\n|\n © ООО ТВЛ"; # TODO(tazjin): The `.tvl-logo` thing can probably go in the shared CSS. diff --git a/web/atward/indexHtml/default.nix b/web/atward/indexHtml/default.nix index ebe5168763..31ced80096 100644 --- a/web/atward/indexHtml/default.nix +++ b/web/atward/indexHtml/default.nix @@ -2,7 +2,6 @@ depot.web.tvl.template { title = "atward"; - staticUrl = "https://tvl.fyi/static"; content = '' atward ====== diff --git a/web/cgit-taz/default.nix b/web/cgit-taz/default.nix index 105e141e4d..a89b96fd92 100644 --- a/web/cgit-taz/default.nix +++ b/web/cgit-taz/default.nix @@ -25,7 +25,7 @@ let enable-follow-links=1 enable-blame=1 mimetype-file=${mime-types}/etc/mime.types - logo=https://tvl.fyi/static/tvl-animated.svg + logo=https://static.tvl.fyi/${depot.web.static.drvHash}/logo-animated.svg # Repository configuration repo.url=depot diff --git a/web/todolist/default.nix b/web/todolist/default.nix index e7be6e30c7..938902f315 100644 --- a/web/todolist/default.nix +++ b/web/todolist/default.nix @@ -66,14 +66,16 @@ let
''; + staticUrl = "https://static.tvl.fyi/${depot.web.static.drvHash}"; + todoPage = writeText "index.html" '' - - + + TVL's todo-list