diff options
| author | quentin@aristote.fr <quentin@aristote.fr> | 2023-09-30 21:25:03 +0200 |
|---|---|---|
| committer | quentin@aristote.fr <quentin@aristote.fr> | 2023-09-30 21:25:03 +0200 |
| commit | 1036c49e9e3c3ff311a713cccf0054c8c16a9857 (patch) | |
| tree | 8a9495eb0181cef35f690879267120bc3de3defe /html/default.nix | |
| parent | add6bcd3c1984068e7122fa07a8f3e35ebaf58a9 (diff) | |
format
Diffstat (limited to 'html/default.nix')
| -rw-r--r-- | html/default.nix | 123 |
1 files changed, 64 insertions, 59 deletions
diff --git a/html/default.nix b/html/default.nix index 0d4f19a..22686bc 100644 --- a/html/default.nix +++ b/html/default.nix @@ -1,7 +1,10 @@ -{ html, make, data, ... }: - -let - sections = html.sort.byKey "priority" (make ./sections.nix { }); +{ + html, + make, + data, + ... +}: let + sections = html.sort.byKey "priority" (make ./sections.nix {}); preloadFont = href: html.linkWith { inherit href; @@ -9,58 +12,60 @@ let as = "font"; }; fullname = with data.basics.name; "${first} ${last}"; -in with html; -doctype "html" + html.html { lang = "en"; } [ - (head [ - # Basic page needs - (metaWith { charset = "utf-8"; }) - (title fullname) - (metaWith { - name = "description"; - content = "Personal webpage of ${fullname}"; - }) - (metaWith { - name = "author"; - content = "Quentin Aristote"; - }) - (metaWith { - http-equiv = "x-ua-compatible"; - content = "ie=edge"; - }) - # Mobile specific needs - (metaWith { - name = "viewport"; - content = "width=device-width, initial-scale=1"; - }) - # Font - (linkWith { - rel = "stylesheet"; - href = "/static/css/fonts/line-awesome/line-awesome.min.css"; - }) - (preloadFont "/static/css/fonts/line-awesome/webfonts/la-solid-900.woff2") - (preloadFont "/static/css/fonts/line-awesome/webfonts/la-brands-400.woff2") - # CSS - (linkWith { - rel = "stylesheet"; - href = "/static/css/classless.min.css"; - }) - # Favicon - (linkWith { - rel = "icon"; - type = "image/png"; - href = "/static/icon.png"; - }) - ]) - (body [ - (main { role = "main"; } (for sections (section: section.body))) - (footer "Webpage ${ - href "#Software#aristoteWebpage" "generated" - } with the help of ${href "https://nixos.org/" "Nix"} and ${ - href "https://classless.de/" "Classless CSS" - }, and compressed with the help of ${ - href "https://github.com/uncss/uncss" "uncss" - }, ${href "https://yui.github.io/yuicompressor/" "YUI Compressor"} and ${ - href "https://imagemagick.org/" "ImageMagick" - }.") - ]) -] +in + with html; + doctype "html" + + html.html {lang = "en";} [ + (head [ + # Basic page needs + (metaWith {charset = "utf-8";}) + (title fullname) + (metaWith { + name = "description"; + content = "Personal webpage of ${fullname}"; + }) + (metaWith { + name = "author"; + content = "Quentin Aristote"; + }) + (metaWith { + http-equiv = "x-ua-compatible"; + content = "ie=edge"; + }) + # Mobile specific needs + (metaWith { + name = "viewport"; + content = "width=device-width, initial-scale=1"; + }) + # Font + (linkWith { + rel = "stylesheet"; + href = "/static/css/fonts/line-awesome/line-awesome.min.css"; + }) + (preloadFont "/static/css/fonts/line-awesome/webfonts/la-solid-900.woff2") + (preloadFont "/static/css/fonts/line-awesome/webfonts/la-brands-400.woff2") + # CSS + (linkWith { + rel = "stylesheet"; + href = "/static/css/classless.min.css"; + }) + # Favicon + (linkWith { + rel = "icon"; + type = "image/png"; + href = "/static/icon.png"; + }) + ]) + (body [ + (main {role = "main";} (for sections (section: section.body))) + (footer "Webpage ${ + href "#Software#aristoteWebpage" "generated" + } with the help of ${href "https://nixos.org/" "Nix"} and ${ + href "https://classless.de/" "Classless CSS" + }, and compressed with the help of ${ + href "https://github.com/uncss/uncss" "uncss" + }, ${href "https://yui.github.io/yuicompressor/" "YUI Compressor"} and ${ + href "https://imagemagick.org/" "ImageMagick" + }.") + ]) + ] |
