mirror of
https://git.zx2c4.com/cgit
synced 2025-08-22 01:50:26 +00:00
Compare commits
6 Commits
d19915e8e3
...
e3519ef68c
Author | SHA1 | Date | |
---|---|---|---|
|
e3519ef68c | ||
|
1d7d66e5ef | ||
|
96156baf8d | ||
|
e3060bbb14 | ||
|
a030759d3f | ||
|
f450324526 |
36
cgit.css
36
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 {
|
||||
@ -673,12 +678,39 @@ div#cgit div.footer a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div#cgit span.msg-avail {
|
||||
color: #000;
|
||||
margin: 0px 0.5em;
|
||||
padding: 0px 0.25em;
|
||||
background-color: #f0f0f0;
|
||||
border: solid 1px #777777;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
div#cgit span.msg-avail span.msg-tooltip {
|
||||
color: #000;
|
||||
margin: 0px 0.5em;
|
||||
padding: 0px 0.25em;
|
||||
background-color: #f0f0f0;
|
||||
border: solid 1px #777777;
|
||||
border-radius: 5px;
|
||||
visibility: hidden;
|
||||
position: absolute;
|
||||
white-space: pre;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
div#cgit span.msg-avail:hover span.msg-tooltip {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
div#cgit a.branch-deco {
|
||||
color: #000;
|
||||
margin: 0px 0.5em;
|
||||
padding: 0px 0.25em;
|
||||
background-color: #88ff88;
|
||||
border: solid 1px #007700;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
div#cgit a.tag-deco {
|
||||
@ -687,6 +719,7 @@ div#cgit a.tag-deco {
|
||||
padding: 0px 0.25em;
|
||||
background-color: #ffff88;
|
||||
border: solid 1px #777700;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
div#cgit a.tag-annotated-deco {
|
||||
@ -695,6 +728,7 @@ div#cgit a.tag-annotated-deco {
|
||||
padding: 0px 0.25em;
|
||||
background-color: #ffcc88;
|
||||
border: solid 1px #777700;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
div#cgit a.remote-deco {
|
||||
@ -703,6 +737,7 @@ div#cgit a.remote-deco {
|
||||
padding: 0px 0.25em;
|
||||
background-color: #ccccff;
|
||||
border: solid 1px #000077;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
div#cgit a.deco {
|
||||
@ -711,6 +746,7 @@ div#cgit a.deco {
|
||||
padding: 0px 0.25em;
|
||||
background-color: #ff8888;
|
||||
border: solid 1px #770000;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
div#cgit div.commit-subject a.branch-deco,
|
||||
|
3
ui-log.c
3
ui-log.c
@ -243,6 +243,9 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
|
||||
}
|
||||
cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head,
|
||||
oid_to_hex(&commit->object.oid), ctx.qry.vpath);
|
||||
if (!ctx.qry.showmsg && strlen(info->msg) > 0)
|
||||
htmlf("<span class='msg-avail'>...<span class='msg-tooltip'>%s</span></span>",
|
||||
info->msg);
|
||||
show_commit_decorations(commit);
|
||||
html("</td><td>");
|
||||
cgit_open_filter(ctx.repo->email_filter, info->author_email, "log");
|
||||
|
@ -348,6 +348,12 @@ void cgit_tree_link(const char *name, const char *title, const char *class,
|
||||
reporevlink("tree", name, title, class, head, rev, path);
|
||||
}
|
||||
|
||||
void cgit_about_link(const char *name, const char *title, const char *class,
|
||||
const char *head, const char *rev, const char *path)
|
||||
{
|
||||
reporevlink("about", name, title, class, head, rev, path);
|
||||
}
|
||||
|
||||
void cgit_plain_link(const char *name, const char *title, const char *class,
|
||||
const char *head, const char *rev, const char *path)
|
||||
{
|
||||
|
@ -24,6 +24,9 @@ extern void cgit_tag_link(const char *name, const char *title,
|
||||
extern void cgit_tree_link(const char *name, const char *title,
|
||||
const char *class, const char *head,
|
||||
const char *rev, const char *path);
|
||||
extern void cgit_about_link(const char *name, const char *title,
|
||||
const char *class, const char *head,
|
||||
const char *rev, const char *path);
|
||||
extern void cgit_plain_link(const char *name, const char *title,
|
||||
const char *class, const char *head,
|
||||
const char *rev, const char *path);
|
||||
|
@ -112,6 +112,9 @@ static void print_object(const struct object_id *oid, const char *path, const ch
|
||||
|
||||
cgit_print_layout_start();
|
||||
htmlf("blob: %s (", oid_to_hex(oid));
|
||||
cgit_about_link("about", NULL, NULL, ctx.qry.head,
|
||||
rev, path);
|
||||
html(") (");
|
||||
cgit_plain_link("plain", NULL, NULL, ctx.qry.head,
|
||||
rev, path);
|
||||
if (ctx.repo->enable_blame && !is_binary) {
|
||||
@ -269,6 +272,9 @@ static int ls_item(const struct object_id *oid, struct strbuf *base,
|
||||
if (!S_ISGITLINK(mode))
|
||||
cgit_plain_link("plain", NULL, "button", ctx.qry.head,
|
||||
walk_tree_ctx->curr_rev, fullpath.buf);
|
||||
if (!S_ISDIR(mode))
|
||||
cgit_about_link("about", NULL, "button", ctx.qry.head,
|
||||
walk_tree_ctx->curr_rev, fullpath.buf);
|
||||
if (!S_ISDIR(mode) && ctx.repo->enable_blame)
|
||||
cgit_blame_link("blame", NULL, "button", ctx.qry.head,
|
||||
walk_tree_ctx->curr_rev, fullpath.buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user