2020-04-21 04:16:17 +02:00
|
|
|
{ depot, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2020-04-21 04:38:30 +02:00
|
|
|
inherit (pkgs) graphviz runCommandNoCC writeText;
|
|
|
|
|
2020-04-21 05:03:33 +02:00
|
|
|
tvlGraph = runCommandNoCC "tvl.svg" {
|
2020-04-21 04:38:30 +02:00
|
|
|
nativeBuildInputs = with pkgs; [ fontconfig freetype cairo jetbrains-mono ];
|
|
|
|
} ''
|
2020-04-21 05:03:33 +02:00
|
|
|
${graphviz}/bin/neato -Tsvg ${./tvl.dot} > $out
|
2020-04-21 04:38:30 +02:00
|
|
|
'';
|
2020-04-21 04:16:17 +02:00
|
|
|
|
2021-05-12 16:00:39 +02:00
|
|
|
homepage = depot.web.tvl.template {
|
|
|
|
title = "The Virus Lounge";
|
|
|
|
content = ''
|
2021-09-22 14:19:43 +02:00
|
|
|
The Virus Lounge
|
|
|
|
================
|
|
|
|
|
|
|
|
-------
|
|
|
|
|
2021-05-12 16:57:07 +02:00
|
|
|
![The Virus Lounge](/static/virus_lounge.webp)
|
2020-04-21 04:16:17 +02:00
|
|
|
|
2021-05-12 16:57:07 +02:00
|
|
|
Welcome to **The Virus Lounge**. We're a random group of
|
|
|
|
people who feel undersocialised in these trying times, and
|
|
|
|
we've decided that there isn't enough spontaneous socialising
|
|
|
|
on the internet.
|
2020-04-21 04:26:04 +02:00
|
|
|
|
2020-04-21 04:38:30 +02:00
|
|
|
<hr>
|
|
|
|
|
2021-05-12 16:57:07 +02:00
|
|
|
## Where did all these people come from?
|
|
|
|
|
|
|
|
It's pretty straightforward. Feel free to click on people, too.
|
|
|
|
|
|
|
|
<div class="tvl-graph-container">
|
|
|
|
<!--
|
|
|
|
cheddar leaves HTML inside of HTML alone,
|
|
|
|
so wrapping the SVG prevents it from messing it up
|
|
|
|
-->
|
|
|
|
${builtins.readFile tvlGraph}
|
|
|
|
</div>
|
2021-05-12 16:00:39 +02:00
|
|
|
'';
|
|
|
|
extraHead = ''
|
|
|
|
<style>
|
2021-05-12 16:57:07 +02:00
|
|
|
.tvl-graph-container {
|
|
|
|
max-width: inherit;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tvl-graph-container svg {
|
2021-05-12 16:00:39 +02:00
|
|
|
max-width: inherit;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
'';
|
|
|
|
};
|
2020-04-21 04:16:17 +02:00
|
|
|
in runCommandNoCC "website" {} ''
|
2021-08-26 19:28:06 +02:00
|
|
|
mkdir $out
|
2020-04-21 04:16:17 +02:00
|
|
|
cp ${homepage} $out/index.html
|
2021-08-26 19:28:06 +02:00
|
|
|
cp -r ${depot.web.static} $out/static
|
2020-04-21 04:16:17 +02:00
|
|
|
''
|