some modifications to stagit

This commit is contained in:
xfnw 2021-03-10 20:51:30 -05:00
parent c4d5fecc40
commit f9161674fe
4 changed files with 33 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 520 KiB

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 520 KiB

View File

@ -459,14 +459,14 @@ writeheader(FILE *fp, const char *title)
if (description[0])
fputs(" - ", fp);
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",
name, relpath);
fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed (tags)\" href=\"%stags.xml\" />\n",
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);
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);
fputs("</td><td><h1>", fp);
xmlencode(fp, strippedname, strlen(strippedname));
@ -506,7 +506,7 @@ size_t
writeblobhtml(FILE *fp, const git_blob *blob)
{
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);
len = git_blob_rawsize(blob);

View File

@ -1,7 +1,21 @@
body {
color: #000;
background-color: #fff;
color: #cdcdcd;
background-color: #141415;
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 {
@ -45,9 +59,14 @@ table td {
padding: 0 0.4em;
}
#content {
display: inline-block;
}
#content table td {
vertical-align: top;
white-space: nowrap;
margin: auto;
}
#branches tr:hover td,
@ -55,14 +74,16 @@ table td {
#index tr:hover td,
#log tr:hover td,
#files tr:hover td {
background-color: #eee;
background-color: #222;
}
#index tr td:nth-child(2),
#files tr td:nth-child(2),
#tags tr td:nth-child(3),
#branches tr td:nth-child(3),
#log tr td:nth-child(2) {
white-space: normal;
min-width: 50vh;
}
td.num {
@ -70,7 +91,7 @@ td.num {
}
.desc {
color: #555;
color: #aaa;
}
hr {
@ -84,19 +105,19 @@ pre {
}
pre a.h {
color: #00a;
color: #77a;
}
.A,
span.i,
pre a.i {
color: #070;
color: #5c5;
}
.D,
span.d,
pre a.d {
color: #e00;
color: #e77;
}
pre a.h:hover,
@ -104,3 +125,4 @@ pre a.i:hover,
pre a.d:hover {
text-decoration: none;
}