From: john at keeping.me.uk (John Keeping)
Subject: Reverse Paths in Title
Date: Mon, 18 Jan 2016 15:45:05 +0000 [thread overview]
Message-ID: <20160118154505.GS14056@serenity.lan> (raw)
In-Reply-To: <CAHmME9ryyeZLRXVRgZDkR83aA_NA_0NXVR9vuWtABup-waepAg@mail.gmail.com>
On Mon, Jan 18, 2016 at 04:16:03PM +0100, Jason A. Donenfeld wrote:
> With lots of tabs open containing many files from /tree, it's useful
> to see which file is open. For this I'm reversing the components of
> the path name, flipping the slash around, and pre-pending it to the
> document title.
>
> http://git.zx2c4.com/linux/tree/arch/x86/boot/copy.S
>
> Take a look at the document <title> on that page.
I find the reversed path really confusing when I look at it as a whole,
which makes it harder to find tabs in a list such as the tab dropdown
Firefox presents when you have a lot of tabs.
I was surprised we don't already show the file path in the header, which
I agree is a good idea.
Personally, I'd prefer something like this which has the advantage that
it still leaves the project name at the front of the title.
-- >8 --
diff --git a/cgit.c b/cgit.c
index 28a2f14..6c85465 100644
--- a/cgit.c
+++ b/cgit.c
@@ -586,7 +586,8 @@ static int prepare_repo_cmd(void)
cgit_print_docend();
return 1;
}
- ctx.page.title = fmtalloc("%s - %s", ctx.repo->name, ctx.repo->desc);
+ ctx.page.title = fmtalloc("%s%s%s - %s", ctx.repo->name,
+ ctx.qry.page ? "/" : "", ctx.qry.page, ctx.repo->desc);
if (!ctx.repo->defbranch)
ctx.repo->defbranch = guess_defbranch();
prev parent reply other threads:[~2016-01-18 15:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-18 15:16 Jason
2016-01-18 15:45 ` john [this message]
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=20160118154505.GS14056@serenity.lan \
--to=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).