From db80c2d368c8ffae3e9d802245c505d5ca58e73f Mon Sep 17 00:00:00 2001 From: sterni Date: Fri, 2 Apr 2021 01:09:55 +0200 Subject: feat(3p/cgit): limit width of div#summary, i. e. /about/** Decreased text width for the /about pages should increase readability considerably as jumping back to the beginning is hard for longer lines. The result is still not perfect as the font size for the /about pages is rather small and many lines thus get broken somewhat awkwardly. We could probably migitate that using a larger font size. The implementation choice of adding a tvl-extra.css which we inject into cgit.css in preBuild is for simplicity: We don't need to worry about routing an extra CSS file and loading it from the right location via extra cgit head entries and serving it at the correct location using either nginx or thttpd. A drawback of this is however that iteration is slowed down by cgit's compilation time. Additionally, this should be the basis for implementing a bubblegum themed cgit for Profpatsch. Change-Id: I18060f735167acd623cef7a17c83408978461249 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2756 Tested-by: BuildkiteCI Reviewed-by: tazjin --- third_party/cgit/default.nix | 1 + third_party/cgit/tvl-extra.css | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 third_party/cgit/tvl-extra.css (limited to 'third_party/cgit') diff --git a/third_party/cgit/default.nix b/third_party/cgit/default.nix index b566e41c332f..e108bb1d7d80 100644 --- a/third_party/cgit/default.nix +++ b/third_party/cgit/default.nix @@ -27,6 +27,7 @@ stdenv.mkDerivation rec { rm -rf git # remove submodule dir ... cp -r --no-preserve=ownership,mode ${depot.third_party.git.src} git makeFlagsArray+=(prefix="$out" CGIT_SCRIPT_PATH="$out/cgit/") + cat tvl-extra.css >> cgit.css ''; meta = { diff --git a/third_party/cgit/tvl-extra.css b/third_party/cgit/tvl-extra.css new file mode 100644 index 000000000000..f174b2c03fd3 --- /dev/null +++ b/third_party/cgit/tvl-extra.css @@ -0,0 +1,4 @@ +/* limit the width of /about/** to help readability */ +.content #summary { + max-width: 800 px; +} -- cgit 1.4.1