]> granicus.if.org Git - cgit/commitdiff
ui-shared: Display path limit directly beneath tab bar in relevant pages
authorJohan Herland <johan@herland.net>
Wed, 9 Jun 2010 23:09:28 +0000 (01:09 +0200)
committerLars Hjemli <hjemli@gmail.com>
Sat, 19 Jun 2010 08:40:22 +0000 (10:40 +0200)
Design-wise, the path is shown by "expanding" the grey border between the
tab bar and the content area of the page to house the current path limit.

This is only displayed on pages where the path limit is relevant, and only
when a path limit is in effect.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
cgit.css
ui-shared.c

index 0cb894a6f20950597d0a53cc8c7a2f727ea9e70c..563f8e15c2b6f19d88391e51b13fe3a5519bb225 100644 (file)
--- a/cgit.css
+++ b/cgit.css
@@ -102,6 +102,14 @@ table.tabs td.form select {
        font-size: 90%;
 }
 
+div.path {
+       margin: 0px;
+       padding: 5px 2em 2px 2em;
+       color: #000;
+       background-color: #ccc;
+       font-weight: bold;
+}
+
 div.content {
        margin: 0px;
        padding: 2em;
index 3d5030bc5805e8b50afc10b252edd0a8367544ae..bc14e70f919a793809dd2fdf65ef8e9c47bee872 100644 (file)
@@ -757,6 +757,12 @@ void cgit_print_pageheader(struct cgit_context *ctx)
                html("</form>");
        }
        html("</td></tr></table>\n");
+       if (ctx->qry.vpath) {
+               html("<div class='path'>");
+               html("path: ");
+               html_txt(ctx->qry.vpath);
+               html("</div>");
+       }
        html("<div class='content'>");
 }