some modifications to stagit
This commit is contained in:
parent
c4d5fecc40
commit
f9161674fe
BIN
favicon.png
BIN
favicon.png
Binary file not shown.
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 520 KiB |
BIN
logo.png
BIN
logo.png
Binary file not shown.
Before Width: | Height: | Size: 505 B After Width: | Height: | Size: 520 KiB |
8
stagit.c
8
stagit.c
|
@ -459,14 +459,14 @@ writeheader(FILE *fp, const char *title)
|
||||||
if (description[0])
|
if (description[0])
|
||||||
fputs(" - ", fp);
|
fputs(" - ", fp);
|
||||||
xmlencode(fp, description, strlen(description));
|
xmlencode(fp, description, strlen(description));
|
||||||
fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath);
|
fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%s../favicon.png\" />\n", relpath);
|
||||||
fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed\" href=\"%satom.xml\" />\n",
|
fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed\" href=\"%satom.xml\" />\n",
|
||||||
name, relpath);
|
name, relpath);
|
||||||
fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed (tags)\" href=\"%stags.xml\" />\n",
|
fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed (tags)\" href=\"%stags.xml\" />\n",
|
||||||
name, relpath);
|
name, relpath);
|
||||||
fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath);
|
fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%s../style.css\" />\n", relpath);
|
||||||
fputs("</head>\n<body>\n<table><tr><td>", fp);
|
fputs("</head>\n<body>\n<table><tr><td>", fp);
|
||||||
fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>",
|
fprintf(fp, "<a href=\"../%s\"><img src=\"%s../logo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>",
|
||||||
relpath, relpath);
|
relpath, relpath);
|
||||||
fputs("</td><td><h1>", fp);
|
fputs("</td><td><h1>", fp);
|
||||||
xmlencode(fp, strippedname, strlen(strippedname));
|
xmlencode(fp, strippedname, strlen(strippedname));
|
||||||
|
@ -506,7 +506,7 @@ size_t
|
||||||
writeblobhtml(FILE *fp, const git_blob *blob)
|
writeblobhtml(FILE *fp, const git_blob *blob)
|
||||||
{
|
{
|
||||||
size_t n = 0, i, len, prev;
|
size_t n = 0, i, len, prev;
|
||||||
const char *nfmt = "<a href=\"#l%zu\" class=\"line\" id=\"l%zu\">%7zu</a> ";
|
const char *nfmt = "<a href=\"#L%zu\" class=\"line\" id=\"L%zu\">%7zu</a> ";
|
||||||
const char *s = git_blob_rawcontent(blob);
|
const char *s = git_blob_rawcontent(blob);
|
||||||
|
|
||||||
len = git_blob_rawsize(blob);
|
len = git_blob_rawsize(blob);
|
||||||
|
|
36
style.css
36
style.css
|
@ -1,7 +1,21 @@
|
||||||
body {
|
body {
|
||||||
color: #000;
|
color: #cdcdcd;
|
||||||
background-color: #fff;
|
background-color: #141415;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
|
width: -webkit-fit-content;
|
||||||
|
width: -moz-fit-content;
|
||||||
|
width: fit-content;
|
||||||
|
margin: 10px auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: #acc;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6 {
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
@ -45,9 +59,14 @@ table td {
|
||||||
padding: 0 0.4em;
|
padding: 0 0.4em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#content {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
#content table td {
|
#content table td {
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#branches tr:hover td,
|
#branches tr:hover td,
|
||||||
|
@ -55,14 +74,16 @@ table td {
|
||||||
#index tr:hover td,
|
#index tr:hover td,
|
||||||
#log tr:hover td,
|
#log tr:hover td,
|
||||||
#files tr:hover td {
|
#files tr:hover td {
|
||||||
background-color: #eee;
|
background-color: #222;
|
||||||
}
|
}
|
||||||
|
|
||||||
#index tr td:nth-child(2),
|
#index tr td:nth-child(2),
|
||||||
|
#files tr td:nth-child(2),
|
||||||
#tags tr td:nth-child(3),
|
#tags tr td:nth-child(3),
|
||||||
#branches tr td:nth-child(3),
|
#branches tr td:nth-child(3),
|
||||||
#log tr td:nth-child(2) {
|
#log tr td:nth-child(2) {
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
|
min-width: 50vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.num {
|
td.num {
|
||||||
|
@ -70,7 +91,7 @@ td.num {
|
||||||
}
|
}
|
||||||
|
|
||||||
.desc {
|
.desc {
|
||||||
color: #555;
|
color: #aaa;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
|
@ -84,19 +105,19 @@ pre {
|
||||||
}
|
}
|
||||||
|
|
||||||
pre a.h {
|
pre a.h {
|
||||||
color: #00a;
|
color: #77a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.A,
|
.A,
|
||||||
span.i,
|
span.i,
|
||||||
pre a.i {
|
pre a.i {
|
||||||
color: #070;
|
color: #5c5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.D,
|
.D,
|
||||||
span.d,
|
span.d,
|
||||||
pre a.d {
|
pre a.d {
|
||||||
color: #e00;
|
color: #e77;
|
||||||
}
|
}
|
||||||
|
|
||||||
pre a.h:hover,
|
pre a.h:hover,
|
||||||
|
@ -104,3 +125,4 @@ pre a.i:hover,
|
||||||
pre a.d:hover {
|
pre a.d:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue