author | Johan Herland <johan@herland.net> | 2010-11-15 17:39:50 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-11-16 07:18:36 (UTC) |
commit | 9a8d39c668b98464bac97d4e5442966de63f97b2 (patch) (unidiff) | |
tree | ee1a7766d6d9365ae45f694939c20cab811abd84 /cgit.css | |
parent | 5a36c2a291a00b59b8ec2f112453e117797c2fe5 (diff) | |
download | cgit-9a8d39c668b98464bac97d4e5442966de63f97b2.zip cgit-9a8d39c668b98464bac97d4e5442966de63f97b2.tar.gz cgit-9a8d39c668b98464bac97d4e5442966de63f97b2.tar.bz2 |
ui-log: Implement support for commit graphs
Teach CGit to print an ASCII art commit graph to the left of the commit
message, similar to 'git log --graph'. The graph adds extra lines (table
rows) to the log when needed to add/remove/shuffle edges in the graph.
When 'showmsg' is enabled, the graph is automatically padded to account
for the extra lines added by the commit message/notes.
This feature is controlled by a new config variable: "enable-commit-graph"
(disabled by default), and individual repos can control it by setting
"repo.enable-commit-graph".
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | cgit.css | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -108,96 +108,101 @@ div.path { | |||
108 | color: #000; | 108 | color: #000; |
109 | background-color: #eee; | 109 | background-color: #eee; |
110 | } | 110 | } |
111 | 111 | ||
112 | div.content { | 112 | div.content { |
113 | margin: 0px; | 113 | margin: 0px; |
114 | padding: 2em; | 114 | padding: 2em; |
115 | border-bottom: solid 3px #ccc; | 115 | border-bottom: solid 3px #ccc; |
116 | } | 116 | } |
117 | 117 | ||
118 | 118 | ||
119 | table.list { | 119 | table.list { |
120 | width: 100%; | 120 | width: 100%; |
121 | border: none; | 121 | border: none; |
122 | border-collapse: collapse; | 122 | border-collapse: collapse; |
123 | } | 123 | } |
124 | 124 | ||
125 | table.list tr { | 125 | table.list tr { |
126 | background: white; | 126 | background: white; |
127 | } | 127 | } |
128 | 128 | ||
129 | table.list tr.logheader { | 129 | table.list tr.logheader { |
130 | background: #eee; | 130 | background: #eee; |
131 | } | 131 | } |
132 | 132 | ||
133 | table.list tr:hover { | 133 | table.list tr:hover { |
134 | background: #eee; | 134 | background: #eee; |
135 | } | 135 | } |
136 | 136 | ||
137 | table.list tr.nohover:hover { | 137 | table.list tr.nohover:hover { |
138 | background: white; | 138 | background: white; |
139 | } | 139 | } |
140 | 140 | ||
141 | table.list th { | 141 | table.list th { |
142 | font-weight: bold; | 142 | font-weight: bold; |
143 | /* color: #888; | 143 | /* color: #888; |
144 | border-top: dashed 1px #888; | 144 | border-top: dashed 1px #888; |
145 | border-bottom: dashed 1px #888; | 145 | border-bottom: dashed 1px #888; |
146 | */ | 146 | */ |
147 | padding: 0.1em 0.5em 0.05em 0.5em; | 147 | padding: 0.1em 0.5em 0.05em 0.5em; |
148 | vertical-align: baseline; | 148 | vertical-align: baseline; |
149 | } | 149 | } |
150 | 150 | ||
151 | table.list td { | 151 | table.list td { |
152 | border: none; | 152 | border: none; |
153 | padding: 0.1em 0.5em 0.1em 0.5em; | 153 | padding: 0.1em 0.5em 0.1em 0.5em; |
154 | } | 154 | } |
155 | 155 | ||
156 | table.list td.commitgraph { | ||
157 | font-family: monospace; | ||
158 | white-space: pre; | ||
159 | } | ||
160 | |||
156 | table.list td.logsubject { | 161 | table.list td.logsubject { |
157 | font-family: monospace; | 162 | font-family: monospace; |
158 | font-weight: bold; | 163 | font-weight: bold; |
159 | } | 164 | } |
160 | 165 | ||
161 | table.list td.logmsg { | 166 | table.list td.logmsg { |
162 | font-family: monospace; | 167 | font-family: monospace; |
163 | white-space: pre; | 168 | white-space: pre; |
164 | padding: 0 0.5em; | 169 | padding: 0 0.5em; |
165 | } | 170 | } |
166 | 171 | ||
167 | table.list td a { | 172 | table.list td a { |
168 | color: black; | 173 | color: black; |
169 | } | 174 | } |
170 | 175 | ||
171 | table.list td a.ls-dir { | 176 | table.list td a.ls-dir { |
172 | font-weight: bold; | 177 | font-weight: bold; |
173 | color: #00f; | 178 | color: #00f; |
174 | } | 179 | } |
175 | 180 | ||
176 | table.list td a:hover { | 181 | table.list td a:hover { |
177 | color: #00f; | 182 | color: #00f; |
178 | } | 183 | } |
179 | 184 | ||
180 | img { | 185 | img { |
181 | border: none; | 186 | border: none; |
182 | } | 187 | } |
183 | 188 | ||
184 | input#switch-btn { | 189 | input#switch-btn { |
185 | margin: 2px 0px 0px 0px; | 190 | margin: 2px 0px 0px 0px; |
186 | } | 191 | } |
187 | 192 | ||
188 | td#sidebar input.txt { | 193 | td#sidebar input.txt { |
189 | width: 100%; | 194 | width: 100%; |
190 | margin: 2px 0px 0px 0px; | 195 | margin: 2px 0px 0px 0px; |
191 | } | 196 | } |
192 | 197 | ||
193 | table#grid { | 198 | table#grid { |
194 | margin: 0px; | 199 | margin: 0px; |
195 | } | 200 | } |
196 | 201 | ||
197 | td#content { | 202 | td#content { |
198 | vertical-align: top; | 203 | vertical-align: top; |
199 | padding: 1em 2em 1em 1em; | 204 | padding: 1em 2em 1em 1em; |
200 | border: none; | 205 | border: none; |
201 | } | 206 | } |
202 | 207 | ||
203 | div#summary { | 208 | div#summary { |
@@ -686,49 +691,49 @@ table.ssdiff td.changed { | |||
686 | background: #ffc; | 691 | background: #ffc; |
687 | min-width: 50%; | 692 | min-width: 50%; |
688 | } | 693 | } |
689 | 694 | ||
690 | table.ssdiff td.changed_dark { | 695 | table.ssdiff td.changed_dark { |
691 | color: black; | 696 | color: black; |
692 | background: #cca; | 697 | background: #cca; |
693 | min-width: 50%; | 698 | min-width: 50%; |
694 | } | 699 | } |
695 | 700 | ||
696 | table.ssdiff td.lineno { | 701 | table.ssdiff td.lineno { |
697 | color: black; | 702 | color: black; |
698 | background: #eee; | 703 | background: #eee; |
699 | text-align: right; | 704 | text-align: right; |
700 | width: 3em; | 705 | width: 3em; |
701 | min-width: 3em; | 706 | min-width: 3em; |
702 | } | 707 | } |
703 | 708 | ||
704 | table.ssdiff td.hunk { | 709 | table.ssdiff td.hunk { |
705 | color: #black; | 710 | color: #black; |
706 | background: #ccf; | 711 | background: #ccf; |
707 | border-top: solid 1px #aaa; | 712 | border-top: solid 1px #aaa; |
708 | border-bottom: solid 1px #aaa; | 713 | border-bottom: solid 1px #aaa; |
709 | } | 714 | } |
710 | 715 | ||
711 | table.ssdiff td.head { | 716 | table.ssdiff td.head { |
712 | border-top: solid 1px #aaa; | 717 | border-top: solid 1px #aaa; |
713 | border-bottom: solid 1px #aaa; | 718 | border-bottom: solid 1px #aaa; |
714 | } | 719 | } |
715 | 720 | ||
716 | table.ssdiff td.head div.head { | 721 | table.ssdiff td.head div.head { |
717 | font-weight: bold; | 722 | font-weight: bold; |
718 | color: black; | 723 | color: black; |
719 | } | 724 | } |
720 | 725 | ||
721 | table.ssdiff td.foot { | 726 | table.ssdiff td.foot { |
722 | border-top: solid 1px #aaa; | 727 | border-top: solid 1px #aaa; |
723 | border-left: none; | 728 | border-left: none; |
724 | border-right: none; | 729 | border-right: none; |
725 | border-bottom: none; | 730 | border-bottom: none; |
726 | } | 731 | } |
727 | 732 | ||
728 | table.ssdiff td.space { | 733 | table.ssdiff td.space { |
729 | border: none; | 734 | border: none; |
730 | } | 735 | } |
731 | 736 | ||
732 | table.ssdiff td.space div { | 737 | table.ssdiff td.space div { |
733 | min-height: 3em; | 738 | min-height: 3em; |
734 | } \ No newline at end of file | 739 | } |