summaryrefslogtreecommitdiffstatshomepage
path: root/cgit.h
Commit message (Expand)AuthorAge
* cgit_print_snapshot_links: use url to specify snapshot nameLars Hjemli2007-07-23
* Merge branch 'master' of git://git.klever.net/patchwork/cgitLars Hjemli2007-07-22
|\
| * allow selective enabling of snapshotsMichael Krelin2007-07-21
| * introduce cgit_repobasenameMichael Krelin2007-07-21
| * added snapshot filename to the linkMichael Krelin2007-07-21
| * added a chk_non_negative checkMichael Krelin2007-07-20
| * add support for snapshot tarballsMichael Krelin2007-07-18
* | Add ui-tag.cLars Hjemli2007-07-22
|/
* Merge branch 'lh/menu'Lars Hjemli2007-06-29
|\
| * Add ofs argument to cgit_log_link and use it in ui-log.cLars Hjemli2007-06-29
| * Add trim_end() and use it to remove trailing slashes from repo pathsLars Hjemli2007-06-26
| * Add setting to enable/disable extra links on index pageLars Hjemli2007-06-19
* | Add version info from git-describeLars Hjemli2007-06-18
|pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color2007-05-23
* Show time since last change on index pageLars Hjemli2007-05-22
* Add cgit_print_age() functionLars Hjemli2007-05-22
* Merge branch 'repogroups'Lars Hjemli2007-05-20
|\
| * Teach cgit how to group repositories by categoryLars Hjemli2007-05-18
* | Merge branch 'virtual-url'Lars Hjemli2007-05-20
|\ \
| * | Enable url=value querystring parameterLars Hjemli2007-05-18
| * | Add lookup-function for valid repo commandsLars Hjemli2007-05-18
| * | Move cgit_get_repoinfo into shared.cLars Hjemli2007-05-18
| |/
* | Teach cgit howto include an external file on index page.Lars Hjemli2007-05-19
* | Add html_include()Lars Hjemli2007-05-18
|/
* Remove unused extern declarations from cgit.hLars Hjemli2007-05-18
* Add knobs to enable/disable files/lines changed in log viewLars Hjemli2007-05-18
* Restrict length of repo description on repolist pageLars Hjemli2007-05-16
* Add support for commitdiff via h parameterLars Hjemli2007-05-16
* Enable default value for head parameterLars Hjemli2007-05-16
* Don't hardcode urls when SCRIPT_NAME is availableLars Hjemli2007-05-15
* Add log filtering by path and link to it from tree viewLars Hjemli2007-05-14
* Add commitdiff between commit and each of it's parentLars Hjemli2007-05-13
* Add max-commit-count parameter to cgitrcLars Hjemli2007-05-13
* Add standard interface for file diff functionsLars Hjemli2007-05-13
* Add shared diff-handling functionsLars Hjemli2007-05-13
* Add submodule links in tree listingLars Hjemli2007-05-11
* Add support for downloading single blobsLars Hjemli2007-05-09
* ui-view: show pathname if specified in querystringLars Hjemli2007-05-08
* Update to libgit 1.5.2-rc2Lars Hjemli2007-05-08
* Make snapshot feature configurableLars Hjemli2007-02-08
* Add support for snapshotsLars Hjemli2007-02-08
* Read repo-info from /etc/cgitrcLars Hjemli2007-02-04
* Add parameter to adjust max message length in log listingsLars Hjemli2007-01-28
class="o">* 60; } void cgit_print_error(char *msg) { html("<div class='error'>"); html_txt(msg); html("</div>\n"); } char *cgit_repourl(const char *reponame) { if (cgit_virtual_root) { return fmt("%s/%s/", cgit_virtual_root, reponame); } else { return fmt("?r=%s", reponame); } } char *cgit_pageurl(const char *reponame, const char *pagename, const char *query) { if (cgit_virtual_root) { return fmt("%s/%s/%s/?%s", cgit_virtual_root, reponame, pagename, query); } else { return fmt("?r=%s&p=%s&%s", reponame, pagename, query); } } char *cgit_currurl() { if (!cgit_virtual_root) return "./cgit.cgi"; else if (cgit_query_page) return fmt("%s/%s/%s/", cgit_virtual_root, cgit_query_repo, cgit_query_page); else if (cgit_query_repo) return fmt("%s/%s/", cgit_virtual_root, cgit_query_repo); else return fmt("%s/", cgit_virtual_root); } void cgit_print_date(unsigned long secs) { char buf[32]; struct tm *time; time = gmtime(&secs); strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", time); html_txt(buf); } void cgit_print_docstart(char *title, struct cacheitem *item) { html("Content-Type: text/html; charset=utf-8\n"); htmlf("Last-Modified: %s\n", http_date(item->st.st_mtime)); htmlf("Expires: %s\n", http_date(item->st.st_mtime + ttl_seconds(item->ttl))); html("\n"); html(cgit_doctype); html("<html>\n"); html("<head>\n"); html("<title>"); html_txt(title); html("</title>\n"); htmlf("<meta name='generator' content='cgit v%s'/>\n", cgit_version); html("<link rel='stylesheet' type='text/css' href='"); html_attr(cgit_css); html("'/>\n"); html("</head>\n"); html("<body>\n"); } void cgit_print_docend() { html("</td></tr></table>"); html("</body>\n</html>\n"); } void cgit_print_pageheader(char *title, int show_search) { html("<table id='layout'><tr><td id='header'>"); htmlf("<a href='%s'>", cgit_logo_link); htmlf("<img id='logo' src='%s'/>\n", cgit_logo); htmlf("</a>"); if (show_search) { html("<form method='get' href='"); html_attr(cgit_currurl()); html("'>"); if (cgit_query_head) html_hidden("h", cgit_query_head); if (cgit_query_sha1) html_hidden("id", cgit_query_sha1); if (cgit_query_sha2) html_hidden("id2", cgit_query_sha2); html("<input type='text' name='q' value='"); html_attr(cgit_query_search); html("'/></form>"); } if (cgit_query_repo) htmlf("<a href='%s'>", cgit_repourl(cgit_query_repo)); html_txt(title); if (cgit_query_repo) html("</a>"); html("</td></tr><tr><td id='content'>"); }