1
0
This commit is contained in:
dusk 2022-07-31 09:30:23 +03:00
parent 1a906c28c9
commit 8eafd7ec5c
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA
4 changed files with 46 additions and 21 deletions

View File

@ -25,17 +25,13 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1659180517, "narHash": "sha256-lQtjjkKu6EOqkT6jJRvzCBBWmOdtLACL//ETRAAxRQI=",
"narHash": "sha256-JHgu5lnXDPjYDbxxbYTZtUMtg0HMF3j8ZmryEw1Iw+A=", "type": "tarball",
"owner": "yusdacra", "url": "https://git.gaze.systems/dusk/html.nix/archive/master.zip"
"repo": "html.nix",
"rev": "54b5c7f003c31a171da27f37c7ba1fbb0f38381d",
"type": "github"
}, },
"original": { "original": {
"owner": "yusdacra", "type": "tarball",
"repo": "html.nix", "url": "https://git.gaze.systems/dusk/html.nix/archive/master.zip"
"type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {

View File

@ -1,7 +1,7 @@
{ {
inputs = { inputs = {
htmlNix = { htmlNix = {
url = "github:yusdacra/html.nix"; url = "https://git.gaze.systems/dusk/html.nix/archive/master.zip";
inputs.flakeUtils.follows = "flakeUtils"; inputs.flakeUtils.follows = "flakeUtils";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -23,21 +23,51 @@
ssgLib = htmlNix.lib.${system}.pkgsLib; ssgLib = htmlNix.lib.${system}.pkgsLib;
htmlLib = htmlNix.lib; htmlLib = htmlNix.lib;
aboutContent =
builtins.readFile
(
ssgLib.parseMarkdown
"about.html"
(builtins.readFile ./about.md)
);
site = local: site = local:
ssgLib.mkSiteFrom { ssgLib.mkSiteFrom {
inherit local; inherit local;
src = ./.; src = ./.;
templater = ctx: templater = ctx: let
htmlLib.templaters.basic out =
( htmlLib.templaters.basic
ctx (
// { ctx
indexContent = builtins.readFile ./main-content.html; // {
resources = { indexContent = ''
"gaze-office.webp" = ./resources/GazeOfficeIcon.webp; ${aboutContent}
<img class="logo" src="resources/gaze-office.webp" style="position: fixed; left: 87%; top: 9%;">
'';
}
);
in
out
// {
site =
out.site
// {
resources."gaze-office.webp" =
./resources/GazeOfficeIcon.webp;
"site.css" = ''
${out.site."site.css"}
${
htmlLib.css.media "max-width: 48em"
{
"img.logo" = {
display = "none";
};
}
}
'';
}; };
} };
);
}; };
in rec { in rec {
apps = { apps = {

View File

@ -1 +0,0 @@
<img src="resources/gaze-office.webp" style="position: relative; display: block; margin: auto;">