nixwebr.ing/site/index.nix

89 lines
3.2 KiB
Nix
Raw Normal View History

2024-09-13 21:38:59 +02:00
{
h2,
pkgs,
webringMembers,
...
2024-09-14 00:04:03 +02:00
}: let
inherit (pkgs) lib;
inherit (lib.attrsets) hasAttr;
inherit (lib.lists) map;
inherit (lib.strings) concatStrings optionalString;
in {
2024-09-13 20:08:41 +02:00
template = "passthrough";
format = "html";
output = /*html*/''
2024-09-13 23:16:30 +02:00
<!DOCTYPE html>
2024-09-13 20:08:41 +02:00
<html lang="en">
<head>
<title>nix webring</title>
<link rel="icon" type="image/svg" href="/nix-webring.svg">
<link rel="stylesheet" href="/index.css">
<meta property="og:title" content="nix webring">
<meta property="og:image" content="https://jacekpoz.pl/nix-webring.svg">
<meta property="og:type" content="website">
<meta property="og:url" content="https://nixwebr.ing">
<script defer data-domain="nixwebr.ing" src="https://plausible.jacekpoz.pl/js/script.js"></script>
2024-09-13 20:08:41 +02:00
</head>
<body>
<p>work in progress</p>
2024-09-13 22:20:50 +02:00
<div id="logo-and-name-and-shit">
<h1>nix webring</h1>
2024-09-13 23:16:35 +02:00
<img src="/nix-webring.svg" alt="nix webring logo">
2024-09-13 22:20:50 +02:00
</div>
2024-09-13 21:38:59 +02:00
${h2 "webring members"}
<ul>
2024-09-14 00:04:03 +02:00
${concatStrings (map (member: let
hasConfig = hasAttr "config" member;
in /*html*/''
2024-09-13 21:38:59 +02:00
<li>
2024-09-14 00:04:03 +02:00
<div class="webring-member">
2024-09-16 14:12:01 +02:00
<a href="${member.site}">${member.name}</a>
2024-09-14 00:04:03 +02:00
${optionalString hasConfig /*html*/''
2024-09-16 14:12:01 +02:00
<a href="${member.config}"><img class="config-image" src="/nix.svg" alt="their nixos config"></a>
2024-09-14 00:04:03 +02:00
''}
</div>
2024-09-13 21:38:59 +02:00
</li>
'') webringMembers)}
</ul>
2024-09-13 22:05:29 +02:00
${h2 "about"}
<p>
this is a webring for people passionate about <a href="https://nix.dev/">nix</a>/<a href="https://nixos.org/">os</a>
</p>
${h2 "joining"}
<p>
to join, have a personal website (bonus points if it uses nix!) and add the following links to it (they have to be on the main page):
2024-09-13 23:16:18 +02:00
</p>
<ul>
<li>webring site: <code>https://nixwebr.ing</code></li>
<li>next site: <code>https://nixwebr.ing/next/&lt;name&gt;</code></li>
<li>previous site: <code>https://nixwebr.ing/prev/&lt;name&gt;</code></li>
<li>random site (optional): <code>https://nixwebr.ing/rand</code></li>
</ul>
<p>
2024-09-13 22:35:27 +02:00
and make a PR to one of <a href="https://codeberg.org/jacekpoz/nixwebr.ing">the</a> <a href="https://github.com/jacekpoz/nixwebr.ing">repos</a> adding yourself to the <code>webring.nix</code> file:
<br>
2024-09-16 14:12:36 +02:00
<code>{ name = "name"; site = "https://mysite.tld"; config = "https://gitforge.tld/name/nixos"; }</code>
2024-09-13 22:05:29 +02:00
<br>
2024-09-14 00:04:03 +02:00
linking your nixos config is entirely optional! (you'll be way cooler though)
2024-09-13 23:19:38 +02:00
</p>
2024-09-14 22:53:32 +02:00
${h2 "does it work?"}
<p>
if you misspell your name in the links or the PR hasn't been merged yet, the next and prev links will lead to <code>https://nixwebr.ing/</code>
</p>
2024-09-13 23:19:38 +02:00
${h2 "support"}
<p>
2024-09-13 22:05:29 +02:00
if you don't know how to / can't make a PR for some reason feel free to <a href="https://jacekpoz.pl">contact me</a>, I can add you to the webring myself
</p>
2024-09-13 20:08:41 +02:00
</body>
</html>
'';
}