about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--corp/website/default.nix2
-rw-r--r--web/atward/indexHtml/default.nix2
-rw-r--r--web/tvl/template/default.nix10
3 files changed, 6 insertions, 8 deletions
diff --git a/corp/website/default.nix b/corp/website/default.nix
index 2a44d20991..fac9a7dce3 100644
--- a/corp/website/default.nix
+++ b/corp/website/default.nix
@@ -12,7 +12,7 @@ let
   index = depot.web.tvl.template {
     title = "TVL (The Virus Lounge) - Software consulting";
     content = builtins.readFile ./content.md;
-    useUrls = true; # load resources from tvl.fyi
+    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 adf7c1761a..ebe5168763 100644
--- a/web/atward/indexHtml/default.nix
+++ b/web/atward/indexHtml/default.nix
@@ -1,8 +1,8 @@
 { depot, ... }:
 
 depot.web.tvl.template {
-  useUrls = true;
   title = "atward";
+  staticUrl = "https://tvl.fyi/static";
   content = ''
     atward
     ======
diff --git a/web/tvl/template/default.nix b/web/tvl/template/default.nix
index 7f4aa399a4..fa8b860cff 100644
--- a/web/tvl/template/default.nix
+++ b/web/tvl/template/default.nix
@@ -8,15 +8,13 @@
 , extraHead ? null
   # optional extra html to inject into <footer>
 , extraFooter ? null
-  # whether to use global URLs instead of absolute paths
-, useUrls ? false
+  # URL at which static assets are located
+, staticUrl ? "/static"
 }@args:
 
 let
   inherit (pkgs) runCommandNoCC lib;
   inherit (depot.tools) cheddar;
-
-  baseUrl = lib.optionalString useUrls "https://tvl.fyi";
 in
 
 runCommandNoCC "index.html" {
@@ -26,8 +24,8 @@ runCommandNoCC "index.html" {
       <meta charset="utf-8">
       <meta name="viewport" content="width=device-width, initial-scale=1">
       <meta name="description" content="The Virus Lounge">
-      <link rel="stylesheet" type="text/css" href="${baseUrl}/static/tvl.css" media="all">
-      <link rel="icon" type="image/webp" href="${baseUrl}/static/favicon.webp">
+      <link rel="stylesheet" type="text/css" href="${staticUrl}/tvl.css" media="all">
+      <link rel="icon" type="image/webp" href="${staticUrl}/favicon.webp">
       <title>${title}</title>
   '' + lib.optionalString (args ? extraHead) extraHead + ''
     </head>