diff options
author | Bradley Taunt <bt@btxx.org> | 2024-01-19 14:50:51 -0500 |
---|---|---|
committer | Bradley Taunt <bt@btxx.org> | 2024-01-19 14:50:51 -0500 |
commit | abb454475ff9f113d94a569456d0b4e2cea15695 (patch) | |
tree | 0d44a64d83b63aa1ebba54c10d3b0ec168247d61 | |
parent | 514cb2b2d928610652f1e9dbcce8b057324063e3 (diff) |
Cleanup changes
-rw-r--r-- | ssgit.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -26,11 +26,11 @@ const char header[] = " </head>\n" " <body>\n" " <header>\n" -" <a id='title' href='/'>git.btxx.org</a></span>\n" -" </header>\n"; +" <a id='title' href='/'>git.btxx.org</a>\n" +" </header><br>\n"; const char footer[] = -" <footer><hr>\n" +" <footer style='font-size:13px;text-align:right;'><hr>\n" " built with <a href='https://git.btxx.org/ssgit'>ssgit</a>\n" " </footer>\n" " </body>\n" @@ -79,8 +79,7 @@ int html_encode(FILE *f, const char *s) { } void intro(FILE *f, const char *repo_name, const char *desc) { - fprintf(f, "<table style='padding-bottom:16px'><tbody><tr><td><img src='/icons/image.png' style='width:32px;height:32px;image-rendering: pixelated'></td>"); - fprintf(f, "<td><div><b>%s</b> - %s</div><div>git clone %s/%s.git</div></td></tr></tbody></table>\n", repo_name, desc, DOMAIN, repo_name); + fprintf(f, "<td><div><b>%s</b> - %s</div><div><code>git clone %s/%s.git</code></div></td></tr></tbody></table><hr>\n", repo_name, desc, DOMAIN, repo_name); } void print_file(FILE *f, git_blob* blob, bool lines_number) { @@ -172,7 +171,7 @@ int process_tree(const git_tree* tree, const char* tree_path, const struct Confi char child_path[PATH_MAX]; join_paths(child_path, tree_path, child_name); - fprintf(f, "<div><img src='/icons/dir.png' class='icon'><a class='link' href='/%s/%s.html'>%s</a></div>", conf->files_path, child_path, child_name); + fprintf(f, "<div><img style='margin-right:4px;position:relative;top:3px;' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADGSURBVDhPY6AUMEJpMGhoaPgPZcIBUAxFDTpggtJgzckmbAwOgk8ZkGlshiIDsOkwzXfv3mdQVlbEoOee+QVWjA5AroMbUBzrw/DvP9AyEALSIDaIC6GRMUyMgUFG34aBBWwUEAD5DJ9u7IZwiAD7jpwB0/AwAJlOCIC8hEyDANwAsBMIAORwgQGEC/CYgGwzzBAYQPIClIEFINuM2wVYTMBmM24XQGl8mtA1gwA8GkF+gEXNw+dv8dLIADmdExEPgw8wMAAAVp+S1orT4D0AAAAASUVORK5CYII='><a class='link' href='/%s/%s.html'>%s</a></div>", conf->files_path, child_path, child_name); git_tree *child_tree = NULL; if (git_tree_lookup(&child_tree, repo, git_tree_entry_id(child))) { printf("couldnt find tree for %s\n", child_path); @@ -191,7 +190,7 @@ int process_tree(const git_tree* tree, const char* tree_path, const struct Confi char child_path[PATH_MAX]; join_paths(child_path, tree_path, child_name); - fprintf(f, "<div><img src='/icons/text.png' class='icon'><a class='link' href='/%s/%s.html'>%s</a></div>", conf->files_path, child_path, child_name); + fprintf(f, "<div><img style='margin-right:4px;position:relative;top:3px;' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAPUExURQAAAP/4/394f7+4vwAAAG/lXY8AAAAFdFJOU/////8A+7YOUwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAEFJREFUKFOFjdEKACAIA1fu/785XRr0YN2C8hgGOhiZeGueGZ/8+F0pUVgrgKjj3YjKq6HOZ8ctilbYYQvqC0FyAfWEAdaXmWjhAAAAAElFTkSuQmCC'><a class='link' href='/%s/%s.html'>%s</a></div>", conf->files_path, child_path, child_name); process_file(child, tree_path, child_name, conf); continue; } |