From 5e1742a3be5afae155fb37f1c469945d2ee0dffc Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sat, 7 Mar 2026 23:39:24 -0800 Subject: fix latex block overflow mobile --- .pre-commit-config.yaml | 2 +- flake.nix | 12 +++++++++++- nix | 2 +- style.css | 20 +++++++++++++++----- 4 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ced6b79..b3352a7 120000 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1 +1 @@ -/nix/store/0c2jj36d8x29xq9010x4j4qyl6bx4m7c-pre-commit-config.json \ No newline at end of file +/nix/store/zlqkxn1ybpxqhdyh99xp5a2ri8sj77va-pre-commit-config.json \ No newline at end of file diff --git a/flake.nix b/flake.nix index ff8bc14..9d73f82 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,12 @@ fi RESULT_PATH=$(nix build .#website --no-link --print-out-paths) if [ -d "$RESULT_PATH" ]; then echo "Running lychee link check..." + ${pkgs.lychee}/bin/lychee --root-dir "$RESULT_PATH" \ + --offline \ + --verbose \ + --no-progress \ + --exclude-mail \ + "$RESULT_PATH/**/*.html" else echo "Website build failed, skipping lychee." exit 1 @@ -203,10 +209,13 @@ emacs -q --batch \ --eval '(setq default-directory (expand-file-name "~/monorepo"))' \ --eval '(setq org-html-link-use-abs-url nil)' \ --eval '(setq org-html-link-org-files-as-html t)' \ + --eval '(setq vc-handled-backends nil)' \ --eval '(require (quote htmlize))' \ --eval '(require (quote nix-mode))' \ + --eval '(setq gc-cons-threshold 100000000)' \ + --eval '(setq make-backup-files nil auto-save-default nil create-lockfiles nil)' \ --eval '(setq org-html-htmlize-output-type (quote css))' \ - --eval '(setq org-html-head-extra "")' \ + --eval '(setq org-html-head-extra "\n")' \ --eval '(org-publish-all t)' \ --eval '(org-publish-all nil)' || (echo "FAIL:" && cat /build/*.log && exit 1) echo "Setting up Graph View..." @@ -254,6 +263,7 @@ sha256sum installer.iso > installer.iso.sha256 ${pre-commit-check.shellHook} git config branch.main.mergeoptions "--no-ff" alias gprune='git branch --merged | grep -v -E "^\*|main|master|dev" | xargs -r git branch -d' +alias serve='cd result; python3 -m http.server 10005' ''; buildInputs = [ deadnix diff --git a/nix b/nix index 589f94a..3563f25 160000 --- a/nix +++ b/nix @@ -1 +1 @@ -Subproject commit 589f94a13d2ef53ec56c3f29df4fd988e290fdaa +Subproject commit 3563f2560116ad3d8345f34edf11ac7921c1d023 diff --git a/style.css b/style.css index bda5c63..88760b4 100644 --- a/style.css +++ b/style.css @@ -337,9 +337,13 @@ li { margin: 0.3rem 0; } mjx-container[jax="CHTML"] { &[display="true"] { + display: block !important; + min-width: 0 !important; + overflow-y: hidden !important; + overflow-x: auto !important; + background: rgba(212, 163, 115, 0.05); padding: 1.5rem; - text-align: left !important; border-left: 2px solid var(--accent); margin: 2rem 0 !important; @@ -347,10 +351,16 @@ mjx-container[jax="CHTML"] { } &:not([display="true"]) { - padding: 0; - margin: 0; - background: transparent; - border: none; + padding: 0; margin: 0; background: transparent; border: none; + } + + & mjx-mtable { + margin-left: 0 !important; + text-align: left !important; + } + + & mjx-mtd { + text-align: left !important; } } -- cgit v1.3