diff --git a/flake.nix b/flake.nix index ae7f475..e50b8f5 100644 --- a/flake.nix +++ b/flake.nix @@ -5,9 +5,35 @@ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; }; - outputs = {self, ...} @ inputs: let - pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; + outputs = { + self, + nixpkgs, + ... + }: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; in { - packages.x86_64-linux.website = pkgs.callPackage ./package.nix {}; + packages.${system} = { + website = pkgs.callPackage ./package.nix {}; + serve = pkgs.writeShellScriptBin "serveSite" '' + echo "Running server: visit http://localhost:8000/index.html" + exec ${pkgs.webfs}/bin/webfsd -F -p 8000 -r ${self.packages.${system}.website} + ''; + }; + + devShells.${system}.default = pkgs.mkShell { + packages = [ + pkgs.watchexec + pkgs.nix + ]; + + shellHook = '' + echo "Starting auto-reload dev shell..." + echo "Watching for file changes in $(pwd)" + echo "When something changes, we'll restart: nix run .#serve" + + watchexec -r -e nix,html,css,js,org -- nix run .#serve + ''; + }; }; } diff --git a/package.nix b/package.nix index 55bbd74..2dd7dc6 100644 --- a/package.nix +++ b/package.nix @@ -5,40 +5,40 @@ }: let src = ./.; buildScript = writeText "build-site.el" '' - ;; Load the publishing system - (require 'ox-publish) - ;; Define the publishing project - (setq org-publish-project-alist - (list - (list "kylekrein's website" - :recursive t - :base-directory "${src}" - :exclude "webarchive" - :publishing-directory "./public" - :publishing-function 'org-html-publish-to-html - :with-author nil ;; Don't include author name - :with-creator t ;; Include Emacs and Org versions in footer - :with-toc nil ;; Include a table of contents - :section-numbers nil ;; Don't include section numbers - :time-stamp-file nil) - (list "attachments" - :recursive t - :base-directory "${src}" - :base-extension "jpg\\|gif\\|png\\|css\\|webp" - :exclude "webarchive" - :publishing-directory "./public" - :publishing-function 'org-publish-attachment))) + ;; Load the publishing system + (require 'ox-publish) + ;; Define the publishing project + (setq org-publish-project-alist + (list + (list "kylekrein's website" + :recursive t + :base-directory "${src}" + :exclude "webarchive" + :publishing-directory "./public" + :publishing-function 'org-html-publish-to-html + :with-author nil ;; Don't include author name + :with-creator t ;; Include Emacs and Org versions in footer + :with-toc nil ;; Include a table of contents + :section-numbers nil ;; Don't include section numbers + :time-stamp-file nil) + (list "attachments" + :recursive t + :base-directory "${src}" + :base-extension "jpg\\|gif\\|png\\|css\\|webp\\|pdf" + :exclude "webarchive" + :publishing-directory "./public" + :publishing-function 'org-publish-attachment))) - ;; Customize the HTML output - (setq org-html-validation-link nil ;; Don't show validation link - org-html-head-include-scripts nil ;; Use our own scripts - org-html-head-include-default-style nil ;; Use our own styles - org-html-head " ") + ;; Customize the HTML output + (setq org-html-validation-link nil ;; Don't show validation link + org-html-head-include-scripts nil ;; Use our own scripts + org-html-head-include-default-style nil ;; Use our own styles + org-html-head " ") - ;; Generate the site output - (org-publish-all t) - (copy-directory "${src}/webarchive" "./public/") - (message "Build complete!") + ;; Generate the site output + (org-publish-all t) + (copy-directory "${src}/webarchive" "./public/") + (message "Build complete!") ''; in stdenvNoCC.mkDerivation { diff --git a/projects/health-for-warch.org b/projects/health-for-warch.org index 9491cea..a79fb58 100644 --- a/projects/health-for-warch.org +++ b/projects/health-for-warch.org @@ -4,9 +4,10 @@ *Health for Watch* is an app for Apple Watch that allows user to easilly log health data such as weight, weight, blood preassure, body temperature and symptoms directly to the Health app on he's iPhone. -This app was originally created in 2021, but in 2022 was taken down and completely deleted by Apple with [[./health-for-watch-assets/Apple Developer Account suspension.pdf][the deletion of my Apple Developer account]]. -#+ATTR_HTML: :class flexcontainer +This app was originally created in 2021, but in 2022 was taken down and completely deleted by Apple with [[./health-for-watch-assets/Apple-Developer-Account-suspension.pdf][the deletion of my Apple Developer account]]. + * Screenshots +#+attr_html: :class flexcontainer [[./health-for-watch-assets/mainscreen.webp]] [[./health-for-watch-assets/enterdata.webp]] [[./health-for-watch-assets/symptomsscreen.webp]] diff --git a/projects/health-for-watch-assets/Apple Developer Account suspension.pdf b/projects/health-for-watch-assets/Apple-Developer-Account-suspension.pdf similarity index 100% rename from projects/health-for-watch-assets/Apple Developer Account suspension.pdf rename to projects/health-for-watch-assets/Apple-Developer-Account-suspension.pdf diff --git a/style.css b/style.css index bbaedd0..247c67e 100644 --- a/style.css +++ b/style.css @@ -1,3 +1,12 @@ +* { + position: relative; +} + .flexcontainer { display: flex; + overflow-x: auto; + scroll-behavior: smooth; + position: relative; + mask-image: linear-gradient(to right, black 80%, transparent); + -webkit-mask-image: linear-gradient(to right, black 80%, transparent); }