List for cgit developers and users
 help / color / mirror / Atom feed
* Enhancement request : ui-blob: Make the target line of a link, visually identifiable.
@ 2024-02-03 17:20 Loïc
  2024-02-03 20:20 ` Christian Hesse
  2024-04-10 13:29 ` Christian Hesse
  0 siblings, 2 replies; 5+ messages in thread
From: Loïc @ 2024-02-03 17:20 UTC (permalink / raw)
  To: cgit

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]

Hi all,

When I create a reference to a precise line in a file (for instance a 
hyperlink to "https://git.zx2c4.com/cgit/tree/cgit.css#n321" ), I miss a 
visual feedback, on the line I want to highlight.

To implement this feature, I suggest to add a curved arrow ahead of the 
line number.
That could be done by adding the following stylesheet to cgit.css

    div#cgit table.blob td.linenumbers a:target:before {color: 
red;content: "\2BA9";}

(patch attached)

Thank you for your attention
Regards
Loïc

[-- Attachment #2: 0001-Add-a-curved-arrow-ahead-of-the-line-number.patch --]
[-- Type: text/x-patch, Size: 855 bytes --]

From 8dd54834a1fec71b4b278fe137bc1856ea6b41cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc?= <lagiraudiere+cgit@free.fr>
Date: Sat, 3 Feb 2024 15:59:57 +0100
Subject: [PATCH] Add a curved arrow ahead of the line number, to highlight the
 line specified in the URL.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Loïc <lagiraudiere+cgit@free.fr>
---
 cgit.css | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cgit.css b/cgit.css
index 1b848cf..f5b41ba 100644
--- a/cgit.css
+++ b/cgit.css
@@ -330,6 +330,11 @@ div#cgit table.ssdiff td.lineno a:hover {
 	color: black;
 }
 
+div#cgit table.blob td.linenumbers a:target:before {
+	color: red;
+	content: "\2BA9";
+}
+
 div#cgit table.blame td.hashes,
 div#cgit table.blame td.lines,
 div#cgit table.blame td.linenumbers {
-- 
2.40.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-15  8:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-03 17:20 Enhancement request : ui-blob: Make the target line of a link, visually identifiable Loïc
2024-02-03 20:20 ` Christian Hesse
2024-04-10 13:29 ` Christian Hesse
2024-04-14 21:56   ` Loïc
2024-04-15  8:45     ` Christian Hesse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).