List for cgit developers and users
 help / color / mirror / Atom feed
From: Loïc <lagiraudiere+cgit@free.fr>
To: cgit@lists.zx2c4.com
Subject: Enhancement request : ui-blob: Make the target line of a link, visually identifiable.
Date: Sat, 3 Feb 2024 18:20:47 +0100	[thread overview]
Message-ID: <5e2ed4ad-256b-40cf-bf40-68bf67336b8c@free.fr> (raw)

[-- 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


             reply	other threads:[~2024-02-03 17:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03 17:20 Loïc [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5e2ed4ad-256b-40cf-bf40-68bf67336b8c@free.fr \
    --to=lagiraudiere+cgit@free.fr \
    --cc=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).