diff --git a/.gitignore b/.gitignore index 2338a6c..9be01db 100755 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ out _book* *.html site_libs +branding diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/build.nix b/build.nix index e6ece3c..dda5e66 100755 --- a/build.nix +++ b/build.nix @@ -1,13 +1,14 @@ -{ stdenv, buildenv, ... }: +{ stdenv, buildenv, src, ... }: stdenv.mkDerivation { pname = "BetaNuLBL"; version = "0.0.1"; - src = ./src; + inherit src; nativeBuildInputs = buildenv; buildPhase = '' + cp branding/_brand-color.yml ./_brand.yml export HOME=$(pwd) quarto render --no-cache ''; diff --git a/build.sh b/build.sh old mode 100644 new mode 100755 diff --git a/deploy.nix b/deploy.nix old mode 100644 new mode 100755 diff --git a/flake.lock b/flake.lock index df45477..d6c2092 100755 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "branding": { + "inputs": { + "flake-utils": "flake-utils", + "gitignore": "gitignore", + "nixpkgs": "nixpkgs_2", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1740617758, + "narHash": "sha256-PdomnJeMfW7xaoPdp6PLk5zfBtssmRgZxrhOq1e7Xec=", + "owner": "beta-nu-theta-chi", + "repo": "branding", + "rev": "05dfbc1a45a5b8dcf3fe5bebee1d52d98656c0c7", + "type": "github" + }, + "original": { + "owner": "beta-nu-theta-chi", + "repo": "branding", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -18,6 +39,24 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": "nixpkgs" @@ -36,6 +75,24 @@ "type": "github" } }, + "gitignore_2": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1666603677, @@ -52,11 +109,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1739446958, - "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", + "lastModified": 1739580444, + "narHash": "sha256-+/bSz4EAVbqz8/HsIGLroF8aNaO8bLRL7WfACN+24g4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", + "rev": "8bb37161a0488b89830168b81c48aed11569cb93", "type": "github" }, "original": { @@ -82,12 +139,59 @@ "type": "github" } }, + "nixpkgs_4": { + "locked": { + "lastModified": 1666603677, + "narHash": "sha256-apAEIj+z1iwMaMJ4tB21r/VTetfGDLDzuhXRHJknIAU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "074da18a72269cc5a6cf444dce42daea5649b2fe", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1739446958, + "narHash": "sha256-+/bYK3DbPxMIvSL4zArkMX0LQvS7rzBKXnDXLfKyRVc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "2ff53fe64443980e139eaa286017f53f88336dd0", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1735554305, + "narHash": "sha256-zExSA1i/b+1NMRhGGLtNfFGXgLtgo+dcuzHzaWA6w3Q=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0e82ab234249d8eee3e8c91437802b32c74bb3fd", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { - "flake-utils": "flake-utils", - "gitignore": "gitignore", - "nixpkgs": "nixpkgs_2", - "treefmt-nix": "treefmt-nix" + "branding": "branding", + "flake-utils": "flake-utils_2", + "gitignore": "gitignore_2", + "nixpkgs": "nixpkgs_5", + "treefmt-nix": "treefmt-nix_2" } }, "systems": { @@ -105,6 +209,21 @@ "type": "github" } }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": "nixpkgs_3" @@ -122,6 +241,24 @@ "repo": "treefmt-nix", "type": "github" } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1738953846, + "narHash": "sha256-yrK3Hjcr8F7qS/j2F+r7C7o010eVWWlm4T1PrbKBOxQ=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "4f09b473c936d41582dd744e19f34ec27592c5fd", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 76fecf3..cddc9d9 100755 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; treefmt-nix.url = "github:numtide/treefmt-nix"; gitignore.url = "github:hercules-ci/gitignore.nix"; + branding.url = "github:beta-nu-theta-chi/branding"; }; outputs = {...} @ inputs: inputs.flake-utils.lib.eachDefaultSystem ( @@ -28,9 +29,11 @@ (rWrapper.override { packages = rpkgs; }) + librsvg texliveFull texworks texstudio + ghostscript ]; in { devShells = rec { @@ -58,7 +61,8 @@ apps = rec { }; packages = rec { - book = pkgs.callPackage ./build.nix { buildenv = p; }; + branding = pkgs.callPackage ./source.nix { branding = inputs.branding.packages.${system}.branding-white; }; + book = pkgs.callPackage ./build.nix { buildenv = p; src = branding; }; deploy = pkgs.callPackage ./deploy.nix { src = book; }; default = book; }; diff --git a/source.nix b/source.nix new file mode 100755 index 0000000..cb51dbc --- /dev/null +++ b/source.nix @@ -0,0 +1,13 @@ +{ stdenv, branding, ... }: +stdenv.mkDerivation { + pname = "BetaNuLBL-source"; + version = "0.0.1"; + + src = ./src; + + installPhase = '' + mkdir -p $out/branding + cp -r * .* $out + cp -r ${branding}/* $out/branding + ''; +} \ No newline at end of file diff --git a/src/.gitignore b/src/.gitignore old mode 100644 new mode 100755 index 8e664d9..009d724 --- a/src/.gitignore +++ b/src/.gitignore @@ -1 +1,3 @@ .quarto + +/.quarto/ diff --git a/src/_quarto.yml b/src/_quarto.yml index ff2f8d5..71dac9d 100755 --- a/src/_quarto.yml +++ b/src/_quarto.yml @@ -35,9 +35,12 @@ nocite: | @* format: html: - theme: cosmo + theme: darkly pdf: documentclass: scrreprt -theme: - dark: darkly \ No newline at end of file + template-partials: + - before-body.tex + + keep-tex: true + # use-rsvg-convert: false diff --git a/src/before-body.tex b/src/before-body.tex new file mode 100644 index 0000000..400805b --- /dev/null +++ b/src/before-body.tex @@ -0,0 +1,17 @@ +\centering +\includegraphics[width=2in,clip=false]{branding/logomark-uni-color.png} +$if(has-frontmatter)$ +\frontmatter +$endif$ +$if(title)$ +$if(beamer)$ +\frame{\titlepage} +$else$ +{\let\newpage\relax\maketitle} +$endif$ +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ +$endif$ \ No newline at end of file