mirror of
https://git.zx2c4.com/cgit
synced 2025-08-22 01:50:26 +00:00
Compare commits
10 Commits
962bb0e659
...
23bc4e4563
Author | SHA1 | Date | |
---|---|---|---|
|
23bc4e4563 | ||
|
a4a0015d4d | ||
|
46e0171f42 | ||
|
8a20149eba | ||
|
914d9ec9b2 | ||
|
610f958e12 | ||
|
013c77a020 | ||
|
7bb1dab618 | ||
|
cc6c8de649 | ||
|
d8095e083e |
2
Makefile
2
Makefile
@ -14,7 +14,7 @@ htmldir = $(docdir)
|
||||
pdfdir = $(docdir)
|
||||
mandir = $(prefix)/share/man
|
||||
SHA1_HEADER = <openssl/sha.h>
|
||||
GIT_VER = 2.49.0
|
||||
GIT_VER = 2.50.0
|
||||
GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz
|
||||
INSTALL = install
|
||||
COPYTREE = cp -r
|
||||
|
65
cgit.css
65
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,40 @@ 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;
|
||||
box-shadow: 2px 2px 7px rgba(100,100,100,0.75);
|
||||
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 +720,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 +729,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 +738,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 +747,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,
|
||||
@ -897,3 +934,31 @@ div#cgit table.ssdiff td.space {
|
||||
div#cgit table.ssdiff td.space div {
|
||||
min-height: 3em;
|
||||
}
|
||||
div#cgit span.libravatar img.onhover {
|
||||
display: none;
|
||||
border: 1px solid gray;
|
||||
padding: 0px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
}
|
||||
|
||||
div#cgit span.libravatar img.inline {
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
margin-right: 0.2em;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
div#cgit span.libravatar:hover > img.onhover {
|
||||
display: block;
|
||||
position: absolute;
|
||||
margin-left: 1.5em;
|
||||
background-color: #eeeeee;
|
||||
box-shadow: 2px 2px 7px rgba(100,100,100,0.75);
|
||||
}
|
||||
|
25
filters/email-libravatar-hover.lua
Normal file
25
filters/email-libravatar-hover.lua
Normal file
@ -0,0 +1,25 @@
|
||||
local digest = require("openssl.digest")
|
||||
|
||||
function md5_hex(input)
|
||||
local b = digest.new("md5"):final(input)
|
||||
local x = ""
|
||||
for i = 1, #b do
|
||||
x = x .. string.format("%.2x", string.byte(b, i))
|
||||
end
|
||||
return x
|
||||
end
|
||||
|
||||
function filter_open(email, page)
|
||||
buffer = ""
|
||||
hexdigest = md5_hex(email:sub(2, -2):lower())
|
||||
end
|
||||
|
||||
function filter_close()
|
||||
baseurl = os.getenv("HTTPS") and "https://seccdn.libravatar.org/" or "http://cdn.libravatar.org/"
|
||||
html("<span class='libravatar'><img class='inline' src='" .. baseurl .. "avatar/" .. hexdigest .. "?s=13&d=retro' /><img class='onhover' src='" .. baseurl .. "avatar/" .. hexdigest .. "?s=128&d=retro' /></span>" .. buffer)
|
||||
return 0
|
||||
end
|
||||
|
||||
function filter_write(str)
|
||||
buffer = buffer .. str
|
||||
end
|
2
git
2
git
@ -1 +1 @@
|
||||
Subproject commit 683c54c999c301c2cd6f715c411407c413b1d84e
|
||||
Subproject commit 16bd9f20a403117f2e0d9bcda6c6e621d3763e77
|
@ -54,7 +54,8 @@ static void scan_tree_repo_config(const char *name, const char *value)
|
||||
config_fn(repo, name, value);
|
||||
}
|
||||
|
||||
static int gitconfig_config(const char *key, const char *value, const struct config_context *, void *cb)
|
||||
static int gitconfig_config(const char *key, const char *value,
|
||||
const __attribute__((unused)) struct config_context *ctx, void *cb)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
|
5
ui-log.c
5
ui-log.c
@ -243,6 +243,11 @@ 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 && info->msg && *(info->msg)) {
|
||||
html("<span class='msg-avail'>•••<span class='msg-tooltip'>");
|
||||
html_txt(info->msg);
|
||||
html("</span></span>");
|
||||
}
|
||||
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