diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..6d4643e --- /dev/null +++ b/flake.nix @@ -0,0 +1,80 @@ +{ + description = "Invoiceplane invoice template development shell"; + + inputs.nixpkgs.url = "nixpkgs/master"; + + outputs = { self, nixpkgs, ... }@inputs: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + start = + pkgs.writeShellScriptBin "start" '' + set -e + export NIXPKGS_ALLOW_INSECURE=1 + export QEMU_NET_OPTS="hostfwd=tcp::8080-:80" + ${pkgs.nixos-shell}/bin/nixos-shell --flake . + ''; + in { + nixosConfigurations.vm = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs.inputs = inputs; + pkgs = import nixpkgs { + overlays = [ + (self: super: { + froide-govplan = super.froide-govplan.overrideAttrs (oldAttrs: rec { + src = ./.; + #pkgs.fetchFromGitHub { + # owner = "onny"; + # repo = "froide-govplan"; + # rev = "81697ce37cfdee7b5d0f667c50b13062ed9786c3"; + # hash = "sha256-ooHGlCKgZL+TMh6OtopKtbkV0MhT4udLCOIC+C3Ytdw="; + #}; + postInstall = oldAttrs.postInstall + '' + rm -r $out/${pkgs.python3.sitePackages}/froide_govplan/templates + ln -sf /var/lib/froide-govplan/templates $out/${pkgs.python3.sitePackages}/froide_govplan/templates + cp -r froide_govplan/static $out/${pkgs.python3.sitePackages}/froide_govplan/ + ''; + }); + }) + ]; + }; + modules = [ + ({ lib, config, pkgs, ... }: { + + virtualisation = { + memorySize = 8000; + diskSize = 4096; + cores = 4; + }; + + disabledModules = [ "services/web-apps/froide-govplan.nix" ]; + + imports = [ ./froide-govplan.nix ]; + + services.froide-govplan = { + enable = true; + package = pkgs.froide-govplan; + settings = { + DEBUG = lib.mkForce true; + CSRF_TRUSTED_ORIGINS = [ "http://localhost:8080" ]; + }; + }; + + nixos-shell.mounts.extraMounts = { + "/var/lib/froide-govplan/templates" = { + target = /home/onny/projects/froide-govplan/froide_govplan/templates; + cache = "none"; + }; + }; + + system.stateVersion = "25.05"; + services.getty.autologinUser = "root"; + }) + ]; + }; + + packages = { inherit start; }; + defaultPackage.x86_64-linux = start; + + }; +} + diff --git a/froide_govplan/templates/cms/mypage.html b/froide_govplan/templates/cms/mypage.html index fb96eda..f707432 100644 --- a/froide_govplan/templates/cms/mypage.html +++ b/froide_govplan/templates/cms/mypage.html @@ -30,6 +30,10 @@ + + + + @@ -153,12 +157,13 @@ .ellipsis { display: -webkit-box; - -webkit-line-clamp: 1; + -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; } + /* Mobile: nur 1 Slide sichtbar */ @media (max-width: 768px) { .carousel-inner .carousel-item > div { @@ -212,7 +217,14 @@ } } - +@media (max-width: 768px) { + .search { + display: none; + } + header { + justify-content: center; + } +} {% block extra_css %} diff --git a/froide_govplan/templates/froide_govplan/base.html b/froide_govplan/templates/froide_govplan/base.html index ce263cb..e7149ed 100644 --- a/froide_govplan/templates/froide_govplan/base.html +++ b/froide_govplan/templates/froide_govplan/base.html @@ -71,9 +71,52 @@