From 68e306c9ab4f277c7e7fda091df5b7c677d00a3c Mon Sep 17 00:00:00 2001 From: Naomi Roberts Date: Wed, 10 Sep 2025 22:59:13 +0100 Subject: [PATCH] appview: Support selecting multiple lines in blob Change-Id: rmumunwruwpnrvqmwzvyxmyrvzsuxuqp Signed-off-by: Naomi Roberts --- .../templates/fragments/multiline-select.html | 90 +++++++++++++++++++ appview/pages/templates/repo/blob.html | 1 + appview/pages/templates/strings/string.html | 5 +- input.css | 7 +- 4 files changed, 96 insertions(+), 7 deletions(-) create mode 100644 appview/pages/templates/fragments/multiline-select.html diff --git a/appview/pages/templates/fragments/multiline-select.html b/appview/pages/templates/fragments/multiline-select.html new file mode 100644 index 0000000..7c34d48 --- /dev/null +++ b/appview/pages/templates/fragments/multiline-select.html @@ -0,0 +1,90 @@ +{{ define "fragments/multiline-select" }} + +{{ end }} diff --git a/appview/pages/templates/repo/blob.html b/appview/pages/templates/repo/blob.html index 89280c3..33a2c52 100644 --- a/appview/pages/templates/repo/blob.html +++ b/appview/pages/templates/repo/blob.html @@ -78,4 +78,5 @@ {{ end }} {{ end }} + {{ template "fragments/multiline-select" }} {{ end }} diff --git a/appview/pages/templates/strings/string.html b/appview/pages/templates/strings/string.html index 0e8a48e..09b9320 100644 --- a/appview/pages/templates/strings/string.html +++ b/appview/pages/templates/strings/string.html @@ -23,7 +23,7 @@ hx-boost="true" href="/strings/{{ .String.Did }}/{{ .String.Rkey }}/edit"> {{ i "pencil" "size-4" }} - + {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} @@ -80,5 +80,6 @@
{{ .String.Contents | escapeHtml }}
{{ end }} + {{ template "fragments/multiline-select" }} {{ end }} diff --git a/input.css b/input.css index 50baa0d..25bcef1 100644 --- a/input.css +++ b/input.css @@ -228,8 +228,9 @@ } /* LineHighlight */ .chroma .hl { - background-color: #bcc0cc; + @apply bg-amber-400/30 dark:bg-amber-500/20; } + /* LineNumbersTable */ .chroma .lnt { white-space: pre; @@ -864,7 +865,3 @@ text-decoration: underline; } } - -.chroma .line:has(.ln:target) { - @apply bg-amber-400/30 dark:bg-amber-500/20; -} -- 2.43.0