]> Sergey Matveev's repositories - public-inbox.git/commitdiff
www_coderepo: start a top nav bar in summary view
authorEric Wong <e@80x24.org>
Tue, 4 Oct 2022 19:12:40 +0000 (19:12 +0000)
committerEric Wong <e@80x24.org>
Wed, 5 Oct 2022 21:15:50 +0000 (21:15 +0000)
This needs to be expanded, but quick links to heads/tags/README
shouldn't hurt...

lib/PublicInbox/WwwCoderepo.pm

index fb510b2848b6fc4351dfd1d217421cf99614a7db..6c119b2829d569ac06dafb21c473c3cb592d8da4 100644 (file)
@@ -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;