feat: remove annoying bottom header
This commit is contained in:
parent
181d93f018
commit
2007160b00
30
flake.nix
30
flake.nix
@ -17,33 +17,11 @@
|
||||
inherit (pkgs.lib) mapAttrsRecursive hasSuffix last pipe;
|
||||
|
||||
lib = htmlNix.lib.${system};
|
||||
ownTemplater = context: context // {
|
||||
site =
|
||||
let
|
||||
headerStyle = with lib.css; css {
|
||||
"div.botheader" = {
|
||||
position = "fixed";
|
||||
padding-bottom = "0.5%";
|
||||
bottom = 0;
|
||||
left = 0;
|
||||
right = 0;
|
||||
margin-left = "auto";
|
||||
margin-right = "auto";
|
||||
text-align = "center";
|
||||
background = "#111111";
|
||||
};
|
||||
};
|
||||
header = with lib.tags; div { class = "botheader"; }
|
||||
(a { href = "https://github.com/yusdacra/html.nix"; } "❄ written in Nix + html.nix");
|
||||
in
|
||||
(
|
||||
mapAttrsRecursive
|
||||
(path: value:
|
||||
if hasSuffix ".html" (last path) then "${value}\n${header}" else value)
|
||||
context.site
|
||||
) // { "site.css" = "${context.site."site.css"}\n${headerStyle}"; };
|
||||
site = local: lib.pkgsLib.mkSiteFrom {
|
||||
inherit local;
|
||||
src = ./.;
|
||||
templater = lib.templaters.basic;
|
||||
};
|
||||
site = local: lib.pkgsLib.mkSiteFrom { inherit local; src = ./.; templater = context: pipe context [ lib.templaters.basic ownTemplater ]; };
|
||||
in
|
||||
rec {
|
||||
apps = {
|
||||
|
Loading…
Reference in New Issue
Block a user