author | Lars Hjemli <hjemli@gmail.com> | 2007-10-30 09:47:38 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-10-30 12:38:34 (UTC) |
commit | 0c8e184e9cbf4d3a1e907de9125f6d8210c169d6 (patch) (unidiff) | |
tree | 2e82baf582b7ba0b34f498e1e7494800070067f9 /cgitrc | |
parent | 10ac7ad1f30f914dc5ff36ba3651ef6dca11aaf7 (diff) | |
download | cgit-0c8e184e9cbf4d3a1e907de9125f6d8210c169d6.zip cgit-0c8e184e9cbf4d3a1e907de9125f6d8210c169d6.tar.gz cgit-0c8e184e9cbf4d3a1e907de9125f6d8210c169d6.tar.bz2 |
Change the cgit layout
This modifies and hopefully improves the layout of all cgit pages:
* Remove the header from all pages and replace it with a sidebar;
most pages have sufficient width but many needs more height.
* Add a dropdown-box to switch between branches, using a one-liner
javascript to reload the current page in context of the selected branch.
* Include refs found below refs/archives in the sidebar, appearing as a
set of menuitems below a 'download' heading.
* Include the brand new cgit logo
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgitrc | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -40,98 +40,103 @@ | |||
40 | #summary-tags=0 | 40 | #summary-tags=0 |
41 | 41 | ||
42 | 42 | ||
43 | ## The "Idle" column on the repository index page can read a timestamp | 43 | ## The "Idle" column on the repository index page can read a timestamp |
44 | ## from the specified agefile (if this file cannot be found, the mtime | 44 | ## from the specified agefile (if this file cannot be found, the mtime |
45 | ## of HEAD is used). | 45 | ## of HEAD is used). |
46 | ## The cgit repo on hjemli.net uses the the following command in it's | 46 | ## The cgit repo on hjemli.net uses the the following command in it's |
47 | ## post-receive hook to update the age-file: | 47 | ## post-receive hook to update the age-file: |
48 | ## git-for-each-ref --format="%(committerdate)" --sort=-committerdate \ | 48 | ## git-for-each-ref --format="%(committerdate)" --sort=-committerdate \ |
49 | ## --count=1 > $GIT_DIR/info/web/last-modifie | 49 | ## --count=1 > $GIT_DIR/info/web/last-modifie |
50 | ## | 50 | ## |
51 | #agefile=info/web/last-modified | 51 | #agefile=info/web/last-modified |
52 | 52 | ||
53 | 53 | ||
54 | ## Git detects renames, but with a limit on the number of files to | 54 | ## Git detects renames, but with a limit on the number of files to |
55 | ## consider. This option can be used to specify another limit (or -1 to | 55 | ## consider. This option can be used to specify another limit (or -1 to |
56 | ## use the default limit). | 56 | ## use the default limit). |
57 | ## | 57 | ## |
58 | #renamelimit=-1 | 58 | #renamelimit=-1 |
59 | 59 | ||
60 | 60 | ||
61 | ## Specify a root for virtual urls. This makes cgit generate urls like | 61 | ## Specify a root for virtual urls. This makes cgit generate urls like |
62 | ## | 62 | ## |
63 | ## http://localhost/git/repo/log/?h=branch | 63 | ## http://localhost/git/repo/log/?h=branch |
64 | ## | 64 | ## |
65 | ## instead of | 65 | ## instead of |
66 | ## | 66 | ## |
67 | ## http://localhost/cgit/cgit.cgi?url=repo/log&h=branch | 67 | ## http://localhost/cgit/cgit.cgi?url=repo/log&h=branch |
68 | ## | 68 | ## |
69 | ## For this to work with apache, a rewrite rule must be added to httpd.conf, | 69 | ## For this to work with apache, a rewrite rule must be added to httpd.conf, |
70 | ## possibly looking something like this: | 70 | ## possibly looking something like this: |
71 | ## | 71 | ## |
72 | ## RewriteRule ^/git/(.*)$ /cgit/cgit.cgi?url=$1 [L,QSA] | 72 | ## RewriteRule ^/git/(.*)$ /cgit/cgit.cgi?url=$1 [L,QSA] |
73 | ## | 73 | ## |
74 | ## For this to work with lighttpd, the rewrite rule should look more like this: | 74 | ## For this to work with lighttpd, the rewrite rule should look more like this: |
75 | ## | 75 | ## |
76 | ## url.rewrite = ( | 76 | ## url.rewrite = ( |
77 | ## "^/git/([^?/]+/[^?]*)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&$2" | 77 | ## "^/git/([^?/]+/[^?]*)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&$2" |
78 | ## ) | 78 | ## ) |
79 | ## | 79 | ## |
80 | ## This setting is disabled by default. | 80 | ## This setting is disabled by default. |
81 | #virtual-root=/git | 81 | #virtual-root=/git |
82 | 82 | ||
83 | 83 | ||
84 | ## Set the title printed on the root page | 84 | ## Set the title printed on the root page |
85 | #root-title=Git repository browser | 85 | #root-title=Git repository browser |
86 | 86 | ||
87 | 87 | ||
88 | ## If specified, the file at this path will be included as HTML in the index | 88 | ## If specified, the file at this path will be included as HTML in the |
89 | ## of repositories | 89 | ## sidebar on the repository index page |
90 | #index-info= | ||
91 | |||
92 | |||
93 | ## If specified, the file at this path will be included as HTML above | ||
94 | ## the repository index | ||
90 | #index-header= | 95 | #index-header= |
91 | 96 | ||
92 | 97 | ||
93 | ## Link to css file | 98 | ## Link to css file |
94 | #css=/cgit/cgit.css | 99 | #css=/cgit/cgit.css |
95 | 100 | ||
96 | 101 | ||
97 | ## Link to logo file | 102 | ## Link to logo file |
98 | #logo=/cgit/git-logo.png | 103 | #logo=/cgit/git-logo.png |
99 | 104 | ||
100 | 105 | ||
101 | ## Url loaded when clicking the logo | 106 | ## Url loaded when clicking the logo |
102 | #logo-link=http://www.kernel.org/pub/software/scm/git/docs/ | 107 | #logo-link=http://www.kernel.org/pub/software/scm/git/docs/ |
103 | 108 | ||
104 | 109 | ||
105 | ## Url loaded when clicking a submodule link | 110 | ## Url loaded when clicking a submodule link |
106 | #module-link=./?repo=%s&page=commit&id=%s | 111 | #module-link=./?repo=%s&page=commit&id=%s |
107 | 112 | ||
108 | 113 | ||
109 | ## Number of chars shown of repo description (in repolist view) | 114 | ## Number of chars shown of repo description (in repolist view) |
110 | #max-repodesc-length=60 | 115 | #max-repodesc-length=60 |
111 | 116 | ||
112 | 117 | ||
113 | ## Number of chars shown of commit subject message (in log view) | 118 | ## Number of chars shown of commit subject message (in log view) |
114 | #max-message-length=60 | 119 | #max-message-length=60 |
115 | 120 | ||
116 | 121 | ||
117 | ## Number of commits per page in log view | 122 | ## Number of commits per page in log view |
118 | #max-commit-count=50 | 123 | #max-commit-count=50 |
119 | 124 | ||
120 | 125 | ||
121 | ## Root of cached output | 126 | ## Root of cached output |
122 | #cache-root=/var/cache/cgit | 127 | #cache-root=/var/cache/cgit |
123 | 128 | ||
124 | 129 | ||
125 | ## Include another config-file | 130 | ## Include another config-file |
126 | #include=/var/cgit/repolist | 131 | #include=/var/cgit/repolist |
127 | 132 | ||
128 | ## | 133 | ## |
129 | ## Time-To-Live settings: specifies how long (in minutes) different pages | 134 | ## Time-To-Live settings: specifies how long (in minutes) different pages |
130 | ## should be cached (0 for instant expiration, -1 for immortal pages) | 135 | ## should be cached (0 for instant expiration, -1 for immortal pages) |
131 | ## | 136 | ## |
132 | 137 | ||
133 | ## ttl for root page | 138 | ## ttl for root page |
134 | #cache-root-ttl=5 | 139 | #cache-root-ttl=5 |
135 | 140 | ||
136 | ## ttl for repo summary page | 141 | ## ttl for repo summary page |
137 | #cache-repo-ttl=5 | 142 | #cache-repo-ttl=5 |