* [PATCH 10/10] www_coderepo: start a top nav bar in summary view
2022-10-04 19:12 5% [PATCH 00/10] www_coderepo: git viewer w/ search planned Eric Wong
@ 2022-10-04 19:12 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-10-04 19:12 UTC (permalink / raw)
To: meta
This needs to be expanded, but quick links to heads/tags/README
shouldn't hurt...
---
lib/PublicInbox/WwwCoderepo.pm | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/WwwCoderepo.pm b/lib/PublicInbox/WwwCoderepo.pm
index fb510b28..6c119b28 100644
--- a/lib/PublicInbox/WwwCoderepo.pm
+++ b/lib/PublicInbox/WwwCoderepo.pm
@@ -55,8 +55,16 @@ sub summary_finish {
# git log
my @r = split(/\n/s, pop(@x) // '');
my $last = pop(@r) if scalar(@r) > $ctx->{wcr}->{summary_log};
- print $zfh '<pre><a id=log>$</a> '.
- "git log --pretty=format:'%h %s (%cs)%d'\n";
+ print $zfh <<EOM;
+<pre>
+<a
+href='#readme'>about</a> <a
+href='#heads'>heads</a> <a
+href='#tags'>tags</a>
+
+<a
+id=log>\$</a> git log --pretty=format:'%h %s (%cs)%d'
+EOM
for (@r) {
my $d; # decorations
s/^ \(([^\)]+)\)// and $d = $1;
^ permalink raw reply related [relevance 7%]
* [PATCH 00/10] www_coderepo: git viewer w/ search planned
@ 2022-10-04 19:12 5% Eric Wong
2022-10-04 19:12 7% ` [PATCH 10/10] www_coderepo: start a top nav bar in summary view Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-10-04 19:12 UTC (permalink / raw)
To: meta
This is to eventually support M:N inbox:coderepo search via
-extindex. For now, it's a JS-free and CSS-optional
cgit-like UI, but perhaps more brutalist :>
It's mainly for wiring /$INBOX/$OID/s/ into /$CODEREPO/$OID/s/,
but Atom feeds and such will be supported.
It'll work better with coderepos with a ".git" name suffix
to avoid conflicts with the inbox name. So [coderepo "git"]
becomes [coderepo "git.git"] in my config file. cgitrc usage
should continue working, I think...
It looks better out-of-the-box on w3m since cgit relies too
much on CSS :>
Example here: https://80x24.org/lore/git.git
Eric Wong (10):
tests: use test_httpd consistently
cgit: use Perl 5.10-isms, optimize, and golf
git: hoist out description
git: move cloneurl + description reading here
www_coderepo: an alternative to cgit
www_coderepo: wire up /$CODEREPO/$OID/s/ endpoint
git: allow ->local_nick to return undef
www_coderepo: wire up snapshot support
www_stream: use git->pub_urls for coderepo links
www_coderepo: start a top nav bar in summary view
MANIFEST | 2 +
lib/PublicInbox/Cgit.pm | 33 ++---
lib/PublicInbox/Config.pm | 2 +-
lib/PublicInbox/ExtSearch.pm | 2 +-
lib/PublicInbox/Git.pm | 53 +++++++--
lib/PublicInbox/GitAsyncCat.pm | 66 ++++++++--
lib/PublicInbox/Inbox.pm | 23 +---
lib/PublicInbox/RepoSnapshot.pm | 95 +++++++++++++++
lib/PublicInbox/SolverGit.pm | 8 +-
lib/PublicInbox/TestCommon.pm | 14 ++-
lib/PublicInbox/ViewVCS.pm | 1 +
lib/PublicInbox/WWW.pm | 12 +-
lib/PublicInbox/WwwCoderepo.pm | 205 ++++++++++++++++++++++++++++++++
lib/PublicInbox/WwwStream.pm | 33 ++---
t/init.t | 2 +-
t/lei-mirror.t | 10 +-
t/psgi_attach.t | 13 +-
t/solver_git.t | 70 ++++++++---
t/www_altid.t | 13 +-
xt/solver.t | 18 +--
20 files changed, 533 insertions(+), 142 deletions(-)
create mode 100644 lib/PublicInbox/RepoSnapshot.pm
create mode 100644 lib/PublicInbox/WwwCoderepo.pm
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-10-04 19:12 5% [PATCH 00/10] www_coderepo: git viewer w/ search planned Eric Wong
2022-10-04 19:12 7% ` [PATCH 10/10] www_coderepo: start a top nav bar in summary view Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).