commit c5e861f80e6500568d2ffb4195ea104236edf3bc
parent 1fdbc7e8ef4025e50678261ca670daca85ac298c
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date: Fri, 31 Jul 2020 17:28:59 +0200
parent 1fdbc7e8ef4025e50678261ca670daca85ac298c
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date: Fri, 31 Jul 2020 17:28:59 +0200
Design changes
2 files changed, 44 insertions(+), 16 deletions(-)
diff --git a/stagit.c b/stagit.c @@ -360,22 +360,22 @@ writeheader(FILE *fp, const char *title) fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed\" href=\"%satom.xml\" />\n", name, relpath); fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"../%sstyle.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>", + fputs("</head>\n<body>\n<div id=\"head\"><table><tr><td>", fp); + fprintf(fp, "<a class=\"logo\" href=\"../%s\"><img src=\"../%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>", relpath, relpath); - fputs("</td><td><h1>", fp); + fputs("</td><td><strong>", fp); xmlencode(fp, strippedname, strlen(strippedname)); - fputs("</h1><span class=\"desc\">", fp); + fputs("</strong><span class=\"desc\"> - ", fp); xmlencode(fp, description, strlen(description)); - fputs("</span></td></tr>", fp); + fputs("</span>\n", fp); if (cloneurl[0]) { - fputs("<tr class=\"url\"><td></td><td>git clone <a href=\"", fp); + fputs("<p class=\"url\">git clone <a href=\"", fp); xmlencode(fp, cloneurl, strlen(cloneurl)); fputs("\">", fp); xmlencode(fp, cloneurl, strlen(cloneurl)); - fputs("</a></td></tr>", fp); + fputs("</a></p>\n", fp); } - fputs("<tr><td></td><td>\n", fp); + fputs("</td></tr></table>\n<p>", fp); if (readme) fprintf(fp, "<a href=\"%sabout.html\">About</a> | ", relpath); fprintf(fp, "<a href=\"%slog.html\">Log</a> | ", relpath); @@ -385,14 +385,12 @@ writeheader(FILE *fp, const char *title) fprintf(fp, " | <a href=\"%sfile/%s.html\">Submodules</a>", relpath, submodules); if (license) - fprintf(fp, " | <a href=\"%sfile/%s.html\">LICENSE</a>", + fprintf(fp, " | <a href=\"%sfile/%s.html\">License</a>", relpath, license); if (contribute) fprintf(fp, " | <a href=\"%sfile/%s.html\">Contribute</a>", relpath, contribute); - else - fprintf(fp, " | <a href=\"../%s#contribute\">Contribute</a>", relpath); - fputs("</td></tr></table>\n<hr/>\n<div id=\"content\">\n", fp); + fputs("</p>\n</div>\n<hr/>\n<div id=\"content\">\n", fp); } void
diff --git a/style.css b/style.css @@ -2,7 +2,7 @@ --diff-green: #181; --diff-red: #e02; --links: #00c; - --code-border: #d2d2d2; + --border: #d2d2d2; --gray: #777; --hover-bg: #eee; } @@ -10,13 +10,22 @@ body { color: #000; background-color: #fff; - font-family: monospace; + font-family: sans-serif; max-width: 900px; margin: 8px auto; padding: 5px; + line-height: 1.5; } -#content, .table-container { +#branches, +#tags, +#index, +#log, +#files { + font-family: monospace; +} + +#head, #content, .table-container { max-width: 800px; overflow-x: auto; margin: auto; @@ -30,7 +39,7 @@ body { pre:not(#about) { overflow-x: auto; - border: 1px solid var(--code-border); + border: 1px solid var(--border); border-radius: 4px; padding: 10px; } @@ -39,6 +48,27 @@ a { color: var(--links); } +#head table { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +#head table td:first-child { + padding: 0 0.4em 0 0; +} + +#head table td:last-child { + padding: 0 0 0 0.4em; +} + +#head p { + margin: 0; +} + +.url { + font-family: monospace; +} + #home h1 { font-size: 1.5em; text-align: center;