about summary refs log tree commit diff
path: root/corp/website/default.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-01-27T12·37+0300
committertazjin <tazjin@tvl.su>2023-01-29T10·48+0000
commitb1e4d66f8330223515275888d0dc056259250a34 (patch)
treeafda298f5b7f29e362b708495fd20114b18851bd /corp/website/default.nix
parente3c2b3650aff8fbd4a5109cdb3406d92e9806d08 (diff)
docs(corp/website): update website content r/5774
Adds a multi-lingual version of the page, with the standard English
page being served at `/` and `/en`, and the new Russian version at
`/ru`.

Change-Id: I54ceea91d1442ee7b8717b59083e5d07c36ca8b0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7940
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'corp/website/default.nix')
-rw-r--r--corp/website/default.nix38
1 files changed, 30 insertions, 8 deletions
diff --git a/corp/website/default.nix b/corp/website/default.nix
index f226c19f7443..a8ac132cb217 100644
--- a/corp/website/default.nix
+++ b/corp/website/default.nix
@@ -7,16 +7,15 @@ let
     "@context" = "https://schema.org";
     "@type" = "Organisation";
     url = "https://tvl.su";
-    logo = "https://static.tvl.fyi/${depot.web.static.drvHash}/logo-animated.svg";
+    logo = "https://static.tvl.fyi/latest/logo-animated.svg";
   };
-  index = depot.web.tvl.template {
-    title = "TVL (The Virus Lounge) - Software consulting";
-    content = builtins.readFile ./content.md;
+
+  common = description: {
     extraFooter = "\n|\n © ООО ТВЛ";
+    staticUrl = "https://static.tvl.su/latest";
 
-    # TODO(tazjin): The `.tvl-logo` thing can probably go in the shared CSS.
     extraHead = ''
-      <meta name="description" content="TVL provides technology consulting for monorepos, Nix, and other SRE/DevOps/Software Engineering topics.">
+      <meta name="description" content="${description}">
       <script type="application/ld+json">
         ${builtins.toJSON structuredData}
       </script>
@@ -27,11 +26,34 @@ let
           margin-left: auto;
           margin-right: auto;
         }
+
+        .active-lang {
+          color: black;
+          font-weight: bold;
+        }
+
+        .inactive-lang {
+          color: inherit;
+        }
       </style>
     '';
   };
+
+  descEn = "TVL provides technology consulting for monorepos, Nix, and other SRE/DevOps/Software Engineering topics.";
+  indexEn = depot.web.tvl.template ({
+    title = "TVL (The Virus Lounge) - Software consulting";
+    content = builtins.readFile ./content-en.md;
+  } // common descEn);
+
+  descRu = "TVL предоставляет технологическое консультирование по монорепозиториям, Nix и другим темам SRE/DevOps/Software Engineering.";
+  indexRu = depot.web.tvl.template ({
+    title = "ТВЛ - Монорепозитории, SRE, Nix, программное обеспечение";
+    content = builtins.readFile ./content-ru.md;
+  } // common descRu);
 in
 pkgs.runCommand "corp-website" { } ''
-  mkdir $out
-  cp ${index} $out/index.html
+  mkdir -p $out/{en,ru}
+  cp ${indexEn} $out/index.html
+  cp ${indexEn} $out/en/index.html
+  cp ${indexRu} $out/ru/index.html
 ''