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": {
"lastModified": 1659180517,
"narHash": "sha256-JHgu5lnXDPjYDbxxbYTZtUMtg0HMF3j8ZmryEw1Iw+A=",
"owner": "yusdacra",
"repo": "html.nix",
"rev": "54b5c7f003c31a171da27f37c7ba1fbb0f38381d",
"type": "github"
"narHash": "sha256-lQtjjkKu6EOqkT6jJRvzCBBWmOdtLACL//ETRAAxRQI=",
"type": "tarball",
"url": "https://git.gaze.systems/dusk/html.nix/archive/master.zip"
},
"original": {
"owner": "yusdacra",
"repo": "html.nix",
"type": "github"
"type": "tarball",
"url": "https://git.gaze.systems/dusk/html.nix/archive/master.zip"
}
},
"nixpkgs": {

View File

@ -1,7 +1,7 @@
{
inputs = {
htmlNix = {
url = "github:yusdacra/html.nix";
url = "https://git.gaze.systems/dusk/html.nix/archive/master.zip";
inputs.flakeUtils.follows = "flakeUtils";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -23,21 +23,51 @@
ssgLib = htmlNix.lib.${system}.pkgsLib;
htmlLib = htmlNix.lib;
aboutContent =
builtins.readFile
(
ssgLib.parseMarkdown
"about.html"
(builtins.readFile ./about.md)
);
site = local:
ssgLib.mkSiteFrom {
inherit local;
src = ./.;
templater = ctx:
htmlLib.templaters.basic
(
ctx
// {
indexContent = builtins.readFile ./main-content.html;
resources = {
"gaze-office.webp" = ./resources/GazeOfficeIcon.webp;
templater = ctx: let
out =
htmlLib.templaters.basic
(
ctx
// {
indexContent = ''
${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 {
apps = {

View File

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