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 <sternenseemann@systemli.org>
This commit is contained in:
parent
8696726244
commit
26f0ba5464
6 changed files with 8 additions and 11 deletions
|
@ -3,7 +3,7 @@ The Virus Lounge
|
||||||
|
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
<img class="tvl-logo" src="https://tvl.fyi/static/tvl-animated.svg"
|
<img class="tvl-logo" src="https://static.tvl.su/latest/logo-animated.svg"
|
||||||
alt="Virus with lambda-shaped spike proteins sitting on an armchair">
|
alt="Virus with lambda-shaped spike proteins sitting on an armchair">
|
||||||
|
|
||||||
Welcome to the corporate face of [The Virus Lounge][tvl-fyi].
|
Welcome to the corporate face of [The Virus Lounge][tvl-fyi].
|
||||||
|
|
|
@ -7,12 +7,11 @@ let
|
||||||
"@context" = "https://schema.org";
|
"@context" = "https://schema.org";
|
||||||
"@type" = "Organisation";
|
"@type" = "Organisation";
|
||||||
url = "https://tvl.su";
|
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 {
|
index = depot.web.tvl.template {
|
||||||
title = "TVL (The Virus Lounge) - Software consulting";
|
title = "TVL (The Virus Lounge) - Software consulting";
|
||||||
content = builtins.readFile ./content.md;
|
content = builtins.readFile ./content.md;
|
||||||
staticUrl = "https://tvl.fyi/static";
|
|
||||||
extraFooter = "\n|\n © ООО ТВЛ";
|
extraFooter = "\n|\n © ООО ТВЛ";
|
||||||
|
|
||||||
# TODO(tazjin): The `.tvl-logo` thing can probably go in the shared CSS.
|
# TODO(tazjin): The `.tvl-logo` thing can probably go in the shared CSS.
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
depot.web.tvl.template {
|
depot.web.tvl.template {
|
||||||
title = "atward";
|
title = "atward";
|
||||||
staticUrl = "https://tvl.fyi/static";
|
|
||||||
content = ''
|
content = ''
|
||||||
atward
|
atward
|
||||||
======
|
======
|
||||||
|
|
|
@ -25,7 +25,7 @@ let
|
||||||
enable-follow-links=1
|
enable-follow-links=1
|
||||||
enable-blame=1
|
enable-blame=1
|
||||||
mimetype-file=${mime-types}/etc/mime.types
|
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
|
# Repository configuration
|
||||||
repo.url=depot
|
repo.url=depot
|
||||||
|
|
|
@ -66,14 +66,16 @@ let
|
||||||
<hr>
|
<hr>
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
staticUrl = "https://static.tvl.fyi/${depot.web.static.drvHash}";
|
||||||
|
|
||||||
todoPage = writeText "index.html" ''
|
todoPage = writeText "index.html" ''
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="description" content="TVL's todo-list">
|
<meta name="description" content="TVL's todo-list">
|
||||||
<link rel="stylesheet" type="text/css" href="static/tvl.css" media="all">
|
<link rel="stylesheet" type="text/css" media="all" href="${staticUrl}/tvl.css">
|
||||||
<link rel="icon" type="image/webp" href="static/favicon.webp">
|
<link rel="icon" type="image/webp" href="${staticUrl}/favicon.webp">
|
||||||
<title>TVL's todo-list</title>
|
<title>TVL's todo-list</title>
|
||||||
<style>
|
<style>
|
||||||
svg {
|
svg {
|
||||||
|
@ -106,5 +108,4 @@ let
|
||||||
in runCommandNoCC "tvl-todos" {} ''
|
in runCommandNoCC "tvl-todos" {} ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp ${todoPage} $out/index.html
|
cp ${todoPage} $out/index.html
|
||||||
ln -s ${depot.web.tvl}/static $out/static
|
|
||||||
''
|
''
|
||||||
|
|
|
@ -17,7 +17,7 @@ let
|
||||||
|
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
<img class="tvl-logo" src="/static/tvl-animated.svg"
|
<img class="tvl-logo" src="https://static.tvl.fyi/${depot.web.static.drvHash}/logo-animated.svg"
|
||||||
alt="Virus with lambda-shaped spike proteins sitting on an armchair">
|
alt="Virus with lambda-shaped spike proteins sitting on an armchair">
|
||||||
|
|
||||||
Welcome to **The Virus Lounge**. We're a group of people who got
|
Welcome to **The Virus Lounge**. We're a group of people who got
|
||||||
|
@ -80,6 +80,4 @@ let
|
||||||
in runCommandNoCC "website" {} ''
|
in runCommandNoCC "website" {} ''
|
||||||
mkdir -p $out/static
|
mkdir -p $out/static
|
||||||
cp ${homepage} $out/index.html
|
cp ${homepage} $out/index.html
|
||||||
cp ${depot.web.static}/* $out/static
|
|
||||||
cp ${depot.web.tvl.logo.pastelRainbow} $out/static/tvl-animated.svg
|
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue