diff options
author | Jason A. Donenfeld | 2016-02-22 16:04:15 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2016-02-22 18:40:13 +0100 |
commit | 5f2664f13c90f083b827d8fafa6cfc01c0c4f513 (patch) | |
tree | 76fff0ba1df2d97bc6e814311ed6494724c47101 /cgit.c | |
parent | 75298209bf8386656b82f185e2901690ac5b671c (diff) | |
download | cgit-5f2664f13c90f083b827d8fafa6cfc01c0c4f513.tar.gz |
ui-shared: add homepage to tabs
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | cgit.c | 4 | ||||
-rw-r--r-- | cgit.css | 5 |
2 files changed, 9 insertions, 0 deletions
@@ -41,6 +41,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va repo->desc = xstrdup(value); else if (!strcmp(name, "owner")) repo->owner = xstrdup(value); + else if (!strcmp(name, "homepage")) + repo->homepage = xstrdup(value); else if (!strcmp(name, "defbranch")) repo->defbranch = xstrdup(value); else if (!strcmp(name, "snapshots")) @@ -793,6 +795,8 @@ static void print_repo(FILE *f, struct cgit_repo *repo) fprintf(f, "repo.module-link=%s\n", repo->module_link); if (repo->section) fprintf(f, "repo.section=%s\n", repo->section); + if (repo->homepage) + fprintf(f, "repo.homepage=%s\n", repo->homepage); if (repo->clone_url) fprintf(f, "repo.clone-url=%s\n", repo->clone_url); fprintf(f, "repo.enable-commit-graph=%d\n", @@ -85,6 +85,11 @@ div#cgit table.tabs td a.active { background-color: #ccc; } +div#cgit table.tabs a[href^="http://"]:after, div#cgit table.tabs a[href^="https://"]:after { + content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAAnNCSVQICFXsRgQAAAAJcEhZcwAAABQAAAAUAVyMgXwAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAeklEQVQI12NoYCu3q3ABwXL98vTy/0D4jaF8XXldRRoYejAwlu8BCTOU72SAg4q08j/le0GC22BC5anlfyrSGBiBGCZYllz+pywLJg8WLOMtf1GeCjRgI5IgSBhMboUIHq40r1CCQrfyDRAV6uXdZTMhsKKlVIIBFwAAVeg4KFYK95cAAAAASUVORK5CYII=); + margin: 0 0 0 5px; +} + div#cgit table.tabs td.form { text-align: right; } |