home » zplus/clif.git
Author zPlus <zplus@peers.community> 2022-08-09 12:06:37
Committer zPlus <zplus@peers.community> 2022-08-09 12:06:37
Commit 357fac4 (patch)
Tree 7e5ce32
Parent(s)

Change commit view colors. Small changes to make diffed files more clearly distinguishable.


commits diff: 854a2c4..357fac4
2 files changed, 49 insertions, 35 deletionsdownload


Diffstat
-rw-r--r-- static/css/clif.css 23
-rw-r--r-- templates/repository/commit.html 61

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+15/-8 M   static/css/clif.css
index c716ca0..2833fba
old size: 10K - new size: 10K
@@ -349,6 +349,7 @@ div.commit {
349 349
350 350 div.commit details.diffstat table .histogram {
351 351 max-width: 20%;
352 + min-width: 10%;
352 353 }
353 354
354 355 div.commit details.diffstat table .histogram span {
@@ -377,28 +378,29 @@ div.commit {
377 378 color: darkred;
378 379 }
379 380
381 + div.commit details.diff_options {
382 + margin-bottom: 2rem;
383 + }
384 +
380 385 div.commit details.diff_options input[type=submit] {
381 386 margin-top: .5rem;
382 387 }
383 388
384 389 div.commit .raw_diff {
385 - margin-top: 1rem;
386 390 white-space: pre-wrap;
387 391 }
388 392
389 393 div.commit details.diff_view {
390 - border: 1px solid black;
391 - border: 1px solid #d4d4d4;
392 - box-shadow: 0 .5rem 1rem -.5rem #ccc;
393 - margin-top: 1rem;
394 394 position: relative;
395 395 }
396 396
397 + div.commit details.diff_view[open] summary {
398 + border-bottom: 1px solid #d0d0d0;
399 + }
400 +
397 401 div.commit details.diff_view summary {
398 - background-color: #f7f7f7;
399 - border-bottom: 1px solid #d4d4d4;
400 402 list-style: none;
401 - padding: .2rem;
403 + padding: .5rem;
402 404 }
403 405
404 406 div.commit details.diff_view summary:after {
@@ -467,6 +469,11 @@ div.commit {
467 469 div.commit details.diff_view .diff .ssdiff .content {
468 470 width: 50%;
469 471 }
472 +
473 + div.commit hr {
474 + border:1px dashed black;
475 + margin: 2rem 0;
476 + }
470 477
471 478 /* Alternate background color used when displaying table data */
472 479 .striped > *:nth-child(even) {

+34/-27 M   templates/repository/commit.html
index 4d15658..3e8224e
old size: 17K - new size: 18K
@@ -27,10 +27,10 @@
27 27 </tr>
28 28 <tr>
29 29 <td>
30 - <b>Commit ID</b>
30 + <b>Commit</b>
31 31 </td>
32 32 <td>
33 - {{ commit.id }}
33 + <a href="{{ url('commit', repository=repository[:-4], commit_id=commit.id) }}">{{ commit.id }}</a>
34 34 </td>
35 35 </tr>
36 36 <tr>
@@ -180,46 +180,51 @@
180 180 </span>
181 181
182 182 {% if patch.delta.status == 1 %}
183 - <b title="Added">A</b> {{ patch.delta.new_file.path }}
183 + <b title="Added">A</b> &nbsp; {{ patch.delta.new_file.path }}
184 184 {% endif %}
185 185
186 186 {% if patch.delta.status == 2 %}
187 - <b title="Deleted">D</b> {{ patch.delta.old_file.path }}
187 + <b title="Deleted">D</b> &nbsp; {{ patch.delta.old_file.path }}
188 188 {% endif %}
189 189
190 190 {% if patch.delta.status == 3 %}
191 - <b title="Modified">M</b> {{ patch.delta.new_file.path }}
191 + <b title="Modified">M</b> &nbsp; {{ patch.delta.new_file.path }}
192 192 {% endif %}
193 193
194 194 {% if patch.delta.status == 4 %}
195 - <b title="Renamed">R</b> {{ patch.delta.old_file.path }} -> {{ patch.delta.new_file.path }}
195 + <b title="Renamed">R</b> &nbsp; {{ patch.delta.old_file.path }} -> {{ patch.delta.new_file.path }}
196 196 {% endif %}
197 197
198 198 {% if patch.delta.status == 5 %}
199 - <b title="Copied">C</b> {{ patch.delta.old_file.path }} {{ patch.delta.new_file.path }}
199 + <b title="Copied">C</b> &nbsp; {{ patch.delta.old_file.path }} {{ patch.delta.new_file.path }}
200 200 {% endif %}
201 201
202 202 <table>
203 - <tr>
204 - <td colspan="4">
205 - old size: {{ patch.delta.old_file.size|human_size(B=true) }}
206 - -
207 - new size: {{ patch.delta.new_file.size|human_size(B=true) }}
208 - </td>
209 - </tr>
210 - <tr>
211 - <td colspan="4">
212 - {% if patch.delta.status == 1 %}
213 - new file mode: {{ patch.delta.new_file.mode|filemode }}
214 - {% elif patch.delta.status == 2 %}
215 - deleted file mode: {{ patch.delta.old_file.mode|filemode }}
216 - {% elif patch.delta.old_file.mode != patch.delta.new_file.mode %}
217 - old mode: {{ patch.delta.old_file.mode|filemode }}
218 - <br />
219 - new mode: {{ patch.delta.new_file.mode|filemode }}
220 - {% endif %}
221 - </td>
222 - </tr>
203 + <tr>
204 + <td>
205 + index {{ (patch.delta.old_file.id|string)[:7] }}..{{ (patch.delta.new_file.id|string)[:7] }}
206 + </td>
207 + </tr>
208 + <tr>
209 + <td colspan="4">
210 + old size: {{ patch.delta.old_file.size|human_size(B=true) }}
211 + -
212 + new size: {{ patch.delta.new_file.size|human_size(B=true) }}
213 + </td>
214 + </tr>
215 + <tr>
216 + <td colspan="4">
217 + {% if patch.delta.status == 1 %}
218 + new file mode: {{ patch.delta.new_file.mode|filemode }}
219 + {% elif patch.delta.status == 2 %}
220 + deleted file mode: {{ patch.delta.old_file.mode|filemode }}
221 + {% elif patch.delta.old_file.mode != patch.delta.new_file.mode %}
222 + old mode: {{ patch.delta.old_file.mode|filemode }}
223 + <br />
224 + new mode: {{ patch.delta.new_file.mode|filemode }}
225 + {% endif %}
226 + </td>
227 + </tr>
223 228 </table>
224 229 </summary>
225 230
@@ -352,6 +357,8 @@
352 357
353 358 </table>
354 359 </details>
360 +
361 + <hr/>
355 362
356 363 {% endfor %}
357 364