From 5cf8725e014c6c999b269c61a6473252bdb90d84 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Tue, 31 May 2022 20:17:47 +0200 Subject: [PATCH] feat: Make more use of the shared assets --- Makefile | 35 ++++++++++++++++ assets/css/index.css | 78 ----------------------------------- flake.lock | 8 ++-- flake.nix | 9 ++++ layout/page.html | 13 +++++- layout/templates/project.html | 4 +- 6 files changed, 61 insertions(+), 86 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..38567db --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +BUILD_DATE := $(shell date '+%H:%M %d.%m.%Y') + +serve: + python ../shared-assets/makesite.py \ + -p params.json \ + -v page_assets=/assets \ + -v build_time="${BUILD_DATE}" \ + --assets ../shared-assets/assets \ + --assets ./assets \ + --copy-assets \ + --ignore ../shared-assets/assets/img \ + --include robots.txt + # A workaround to making the fonts load without the CDN + mv _site/assets/fonts _site/fonts + cd _site/ && python -m http.server 8080 + +build: + python ../shared-assets/makesite.py \ + -p params.json \ + -v page_assets=https://cdn.polynom.me \ + -v build_time="${BUILD_DATE}" \ + --assets ./assets \ + --copy-assets \ + --ignore assets/img/raw \ + --include robots.txt \ + --blog \ + --rss + python ../shared-assets/pgp-sign.py $(wildcard _site/*.html) + gpg \ + --armor \ + --output _site/assets/files/verify.sh.sig \ + --local-user papatutuwawa@polynom.me \ + --detach-sign \ + assets/files/verify.sh + tar -czf blog.tar.gz _site diff --git a/assets/css/index.css b/assets/css/index.css index 74bd241..f6cbf30 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -1,74 +1,13 @@ -.vertical-flex { - display: flex; - flex-direction: column; -} - -.horizontal-flex { - display: flex; - flex-direction: row; -} - -.horizontal-center { - display: flex; - flex-direction: row; - justify-content: center; -} - -.vertical-center { - display: flex; - flex-direction: column; - justify-content: center; - - height: 100%; -} - -.avatar { - width: 200px; - height: 200px; - border-radius: 10px; - margin-right: 30px; -} - -.name-title { - font-size: xxx-large; -} - .clickable { cursor: pointer; } -.header { - width: 42%; -} - -#header-links ul { - list-style: none; - padding-left: 0px; - margin-bottom: 0px; - margin-top: 0px; -} -#header-links li { - display: inline; - - font-size: large; - margin-left: 20px; -} - -#header-links li:first-child { - margin-left: 0px; -} - h1, h2 { margin-top: 0px; margin-bottom: 0px; } -html { - background-color: #f6f6f6; -} - body { - padding: 5px; font-size: large; } @@ -77,8 +16,6 @@ body { box-sizing: border-box; } -.agressive-word-breaking {} - /* Screenshots */ .screenshot { width: 270px; @@ -101,12 +38,6 @@ body { } @media screen and (max-width: 720px) { - .avatar { - width: 100px; - height: 100px; - margin-right: 10px; - } - .screenshot { width: 100px; } @@ -120,18 +51,9 @@ body { font-size: 43px; } - .name-title { - font-size: x-large; - } - - .header { - width: 100%; - } - #social-links td:nth-child(2) { word-break: break-word; } - #social-links td { padding-top: 5px; padding-bottom: 5px; diff --git a/flake.lock b/flake.lock index 5528cc0..07cc22b 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1652540787, - "narHash": "sha256-VU598G+6sAPkmHRIOoZohduMMjwXv/zRf2BYlgIcChA=", + "lastModified": 1654021036, + "narHash": "sha256-O2RlvhV4jOtCJTEVNSeZYDJEE0xh4rTPxXLqHKrKVSo=", "ref": "refs/heads/master", - "rev": "de5a0ba39fb9da7eec81f1f59d07af67ec4a9233", - "revCount": 17, + "rev": "31dee4654f6b0577345a6d0a4bbbf1b795d5b7bc", + "revCount": 19, "type": "git", "url": "https://git.polynom.me/polynom.me/shared-assets.git" }, diff --git a/flake.nix b/flake.nix index 54402fa..9514b4d 100644 --- a/flake.nix +++ b/flake.nix @@ -21,5 +21,14 @@ shared-assets = assets.packages.${system}.default; }; }); + + devShell = forAllSystems (system: let + pkgs = import nixpkgs { inherit system; }; + pythonEnv = pkgs.python3.withPackages (ps: with ps; [ markdown ]); + in pkgs.mkShell { + buildInputs = with pkgs; [ + pythonEnv + ]; + }); }; } diff --git a/layout/page.html b/layout/page.html index f3a5af6..41bc2a2 100644 --- a/layout/page.html +++ b/layout/page.html @@ -17,8 +17,8 @@
-
-