##// END OF EJS Templates
gists: updated styling on gists pages according to the design.
marcink -
r4082:e40fd3fa default
parent child Browse files
Show More
@@ -1,1293 +1,1301 b''
1 // Default styles
1 // Default styles
2
2
3 .diff-collapse {
3 .diff-collapse {
4 margin: @padding 0;
4 margin: @padding 0;
5 text-align: right;
5 text-align: right;
6 }
6 }
7
7
8 .diff-container {
8 .diff-container {
9 margin-bottom: @space;
9 margin-bottom: @space;
10
10
11 .diffblock {
11 .diffblock {
12 margin-bottom: @space;
12 margin-bottom: @space;
13 }
13 }
14
14
15 &.hidden {
15 &.hidden {
16 display: none;
16 display: none;
17 overflow: hidden;
17 overflow: hidden;
18 }
18 }
19 }
19 }
20
20
21
21
22 div.diffblock .sidebyside {
22 div.diffblock .sidebyside {
23 background: #ffffff;
23 background: #ffffff;
24 }
24 }
25
25
26 div.diffblock {
26 div.diffblock {
27 overflow-x: auto;
27 overflow-x: auto;
28 overflow-y: hidden;
28 overflow-y: hidden;
29 clear: both;
29 clear: both;
30 padding: 0px;
30 padding: 0px;
31 background: @grey6;
31 background: @grey6;
32 border: @border-thickness solid @grey5;
32 border: @border-thickness solid @grey5;
33 -webkit-border-radius: @border-radius @border-radius 0px 0px;
33 -webkit-border-radius: @border-radius @border-radius 0px 0px;
34 border-radius: @border-radius @border-radius 0px 0px;
34 border-radius: @border-radius @border-radius 0px 0px;
35
35
36
36
37 .comments-number {
37 .comments-number {
38 float: right;
38 float: right;
39 }
39 }
40
40
41 // BEGIN CODE-HEADER STYLES
41 // BEGIN CODE-HEADER STYLES
42
42
43 .code-header {
43 .code-header {
44 background: @grey6;
44 background: @grey6;
45 padding: 10px 0 10px 0;
45 padding: 10px 0 10px 0;
46 height: auto;
46 height: auto;
47 width: 100%;
47 width: 100%;
48
48
49 .hash {
49 .hash {
50 float: left;
50 float: left;
51 padding: 2px 0 0 2px;
51 padding: 2px 0 0 2px;
52 }
52 }
53
53
54 .date {
54 .date {
55 float: left;
55 float: left;
56 text-transform: uppercase;
56 text-transform: uppercase;
57 padding: 4px 0px 0px 2px;
57 padding: 4px 0px 0px 2px;
58 }
58 }
59
59
60 div {
60 div {
61 margin-left: 4px;
61 margin-left: 4px;
62 }
62 }
63
63
64 div.compare_header {
64 div.compare_header {
65 min-height: 40px;
65 min-height: 40px;
66 margin: 0;
66 margin: 0;
67 padding: 0 @padding;
67 padding: 0 @padding;
68
68
69 .drop-menu {
69 .drop-menu {
70 float:left;
70 float:left;
71 display: block;
71 display: block;
72 margin:0 0 @padding 0;
72 margin:0 0 @padding 0;
73 }
73 }
74
74
75 .compare-label {
75 .compare-label {
76 float: left;
76 float: left;
77 clear: both;
77 clear: both;
78 display: inline-block;
78 display: inline-block;
79 min-width: 5em;
79 min-width: 5em;
80 margin: 0;
80 margin: 0;
81 padding: @button-padding @button-padding @button-padding 0;
81 padding: @button-padding @button-padding @button-padding 0;
82 font-weight: @text-semibold-weight;
82 font-weight: @text-semibold-weight;
83 font-family: @text-semibold;
83 font-family: @text-semibold;
84 }
84 }
85
85
86 .compare-buttons {
86 .compare-buttons {
87 float: left;
87 float: left;
88 margin: 0;
88 margin: 0;
89 padding: 0 0 @padding;
89 padding: 0 0 @padding;
90
90
91 .btn {
91 .btn {
92 margin: 0 @padding 0 0;
92 margin: 0 @padding 0 0;
93 }
93 }
94 }
94 }
95 }
95 }
96
96
97 }
97 }
98
98
99 .parents {
99 .parents {
100 float: left;
100 float: left;
101 width: 100px;
101 width: 100px;
102 font-weight: 400;
102 font-weight: 400;
103 vertical-align: middle;
103 vertical-align: middle;
104 padding: 0px 2px 0px 2px;
104 padding: 0px 2px 0px 2px;
105 background-color: @grey6;
105 background-color: @grey6;
106
106
107 #parent_link {
107 #parent_link {
108 margin: 00px 2px;
108 margin: 00px 2px;
109
109
110 &.double {
110 &.double {
111 margin: 0px 2px;
111 margin: 0px 2px;
112 }
112 }
113
113
114 &.disabled{
114 &.disabled{
115 margin-right: @padding;
115 margin-right: @padding;
116 }
116 }
117 }
117 }
118 }
118 }
119
119
120 .children {
120 .children {
121 float: right;
121 float: right;
122 width: 100px;
122 width: 100px;
123 font-weight: 400;
123 font-weight: 400;
124 vertical-align: middle;
124 vertical-align: middle;
125 text-align: right;
125 text-align: right;
126 padding: 0px 2px 0px 2px;
126 padding: 0px 2px 0px 2px;
127 background-color: @grey6;
127 background-color: @grey6;
128
128
129 #child_link {
129 #child_link {
130 margin: 0px 2px;
130 margin: 0px 2px;
131
131
132 &.double {
132 &.double {
133 margin: 0px 2px;
133 margin: 0px 2px;
134 }
134 }
135
135
136 &.disabled{
136 &.disabled{
137 margin-right: @padding;
137 margin-right: @padding;
138 }
138 }
139 }
139 }
140 }
140 }
141
141
142 .changeset_header {
142 .changeset_header {
143 height: 16px;
143 height: 16px;
144
144
145 & > div{
145 & > div{
146 margin-right: @padding;
146 margin-right: @padding;
147 }
147 }
148 }
148 }
149
149
150 .changeset_file {
150 .changeset_file {
151 text-align: left;
151 text-align: left;
152 float: left;
152 float: left;
153 padding: 0;
153 padding: 0;
154
154
155 a{
155 a{
156 display: inline-block;
156 display: inline-block;
157 margin-right: 0.5em;
157 margin-right: 0.5em;
158 }
158 }
159
159
160 #selected_mode{
160 #selected_mode{
161 margin-left: 0;
161 margin-left: 0;
162 }
162 }
163 }
163 }
164
164
165 .diff-menu-wrapper {
165 .diff-menu-wrapper {
166 float: left;
166 float: left;
167 }
167 }
168
168
169 .diff-menu {
169 .diff-menu {
170 position: absolute;
170 position: absolute;
171 background: none repeat scroll 0 0 #FFFFFF;
171 background: none repeat scroll 0 0 #FFFFFF;
172 border-color: #003367 @grey3 @grey3;
172 border-color: #003367 @grey3 @grey3;
173 border-right: 1px solid @grey3;
173 border-right: 1px solid @grey3;
174 border-style: solid solid solid;
174 border-style: solid solid solid;
175 border-width: @border-thickness;
175 border-width: @border-thickness;
176 box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2);
176 box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2);
177 margin-top: 5px;
177 margin-top: 5px;
178 margin-left: 1px;
178 margin-left: 1px;
179 }
179 }
180
180
181 .diff-actions, .editor-actions {
181 .diff-actions, .editor-actions {
182 float: left;
182 float: left;
183
183
184 input{
184 input{
185 margin: 0 0.5em 0 0;
185 margin: 0 0.5em 0 0;
186 }
186 }
187 }
187 }
188
188
189 // END CODE-HEADER STYLES
189 // END CODE-HEADER STYLES
190
190
191 // BEGIN CODE-BODY STYLES
191 // BEGIN CODE-BODY STYLES
192
192
193 .code-body {
193 .code-body {
194 padding: 0;
194 padding: 0;
195 background-color: #ffffff;
195 background-color: #ffffff;
196 position: relative;
196 position: relative;
197 max-width: none;
197 max-width: none;
198 box-sizing: border-box;
198 box-sizing: border-box;
199 // TODO: johbo: Parent has overflow: auto, this forces the child here
199 // TODO: johbo: Parent has overflow: auto, this forces the child here
200 // to have the intended size and to scroll. Should be simplified.
200 // to have the intended size and to scroll. Should be simplified.
201 width: 100%;
201 width: 100%;
202 overflow-x: auto;
202 overflow-x: auto;
203 }
203 }
204
204
205 pre.raw {
205 pre.raw {
206 background: white;
206 background: white;
207 color: @grey1;
207 color: @grey1;
208 }
208 }
209 // END CODE-BODY STYLES
209 // END CODE-BODY STYLES
210
210
211 }
211 }
212
212
213
213
214 table.code-difftable {
214 table.code-difftable {
215 border-collapse: collapse;
215 border-collapse: collapse;
216 width: 99%;
216 width: 99%;
217 border-radius: 0px !important;
217 border-radius: 0px !important;
218
218
219 td {
219 td {
220 padding: 0 !important;
220 padding: 0 !important;
221 background: none !important;
221 background: none !important;
222 border: 0 !important;
222 border: 0 !important;
223 }
223 }
224
224
225 .context {
225 .context {
226 background: none repeat scroll 0 0 #DDE7EF;
226 background: none repeat scroll 0 0 #DDE7EF;
227 }
227 }
228
228
229 .add {
229 .add {
230 background: none repeat scroll 0 0 #DDFFDD;
230 background: none repeat scroll 0 0 #DDFFDD;
231
231
232 ins {
232 ins {
233 background: none repeat scroll 0 0 #AAFFAA;
233 background: none repeat scroll 0 0 #AAFFAA;
234 text-decoration: none;
234 text-decoration: none;
235 }
235 }
236 }
236 }
237
237
238 .del {
238 .del {
239 background: none repeat scroll 0 0 #FFDDDD;
239 background: none repeat scroll 0 0 #FFDDDD;
240
240
241 del {
241 del {
242 background: none repeat scroll 0 0 #FFAAAA;
242 background: none repeat scroll 0 0 #FFAAAA;
243 text-decoration: none;
243 text-decoration: none;
244 }
244 }
245 }
245 }
246
246
247 /** LINE NUMBERS **/
247 /** LINE NUMBERS **/
248 .lineno {
248 .lineno {
249 padding-left: 2px !important;
249 padding-left: 2px !important;
250 padding-right: 2px;
250 padding-right: 2px;
251 text-align: right;
251 text-align: right;
252 width: 32px;
252 width: 32px;
253 -moz-user-select: none;
253 -moz-user-select: none;
254 -webkit-user-select: none;
254 -webkit-user-select: none;
255 border-right: @border-thickness solid @grey5 !important;
255 border-right: @border-thickness solid @grey5 !important;
256 border-left: 0px solid #CCC !important;
256 border-left: 0px solid #CCC !important;
257 border-top: 0px solid #CCC !important;
257 border-top: 0px solid #CCC !important;
258 border-bottom: none !important;
258 border-bottom: none !important;
259
259
260 a {
260 a {
261 &:extend(pre);
261 &:extend(pre);
262 text-align: right;
262 text-align: right;
263 padding-right: 2px;
263 padding-right: 2px;
264 cursor: pointer;
264 cursor: pointer;
265 display: block;
265 display: block;
266 width: 32px;
266 width: 32px;
267 }
267 }
268 }
268 }
269
269
270 .context {
270 .context {
271 cursor: auto;
271 cursor: auto;
272 &:extend(pre);
272 &:extend(pre);
273 }
273 }
274
274
275 .lineno-inline {
275 .lineno-inline {
276 background: none repeat scroll 0 0 #FFF !important;
276 background: none repeat scroll 0 0 #FFF !important;
277 padding-left: 2px;
277 padding-left: 2px;
278 padding-right: 2px;
278 padding-right: 2px;
279 text-align: right;
279 text-align: right;
280 width: 30px;
280 width: 30px;
281 -moz-user-select: none;
281 -moz-user-select: none;
282 -webkit-user-select: none;
282 -webkit-user-select: none;
283 }
283 }
284
284
285 /** CODE **/
285 /** CODE **/
286 .code {
286 .code {
287 display: block;
287 display: block;
288 width: 100%;
288 width: 100%;
289
289
290 td {
290 td {
291 margin: 0;
291 margin: 0;
292 padding: 0;
292 padding: 0;
293 }
293 }
294
294
295 pre {
295 pre {
296 margin: 0;
296 margin: 0;
297 padding: 0;
297 padding: 0;
298 margin-left: .5em;
298 margin-left: .5em;
299 }
299 }
300 }
300 }
301 }
301 }
302
302
303
303
304 // Comments
304 // Comments
305 .comment-selected-hl {
305 .comment-selected-hl {
306 border-left: 6px solid @comment-highlight-color !important;
306 border-left: 6px solid @comment-highlight-color !important;
307 padding-left: 3px !important;
307 padding-left: 3px !important;
308 margin-left: -7px !important;
308 margin-left: -7px !important;
309 }
309 }
310
310
311 div.comment:target,
311 div.comment:target,
312 div.comment-outdated:target {
312 div.comment-outdated:target {
313 .comment-selected-hl;
313 .comment-selected-hl;
314 }
314 }
315
315
316 //TODO: anderson: can't get an absolute number out of anything, so had to put the
316 //TODO: anderson: can't get an absolute number out of anything, so had to put the
317 //current values that might change. But to make it clear I put as a calculation
317 //current values that might change. But to make it clear I put as a calculation
318 @comment-max-width: 1065px;
318 @comment-max-width: 1065px;
319 @pr-extra-margin: 34px;
319 @pr-extra-margin: 34px;
320 @pr-border-spacing: 4px;
320 @pr-border-spacing: 4px;
321 @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing;
321 @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing;
322
322
323 // Pull Request
323 // Pull Request
324 .cs_files .code-difftable {
324 .cs_files .code-difftable {
325 border: @border-thickness solid @grey5; //borders only on PRs
325 border: @border-thickness solid @grey5; //borders only on PRs
326
326
327 .comment-inline-form,
327 .comment-inline-form,
328 div.comment {
328 div.comment {
329 width: @pr-comment-width;
329 width: @pr-comment-width;
330 }
330 }
331 }
331 }
332
332
333 // Changeset
333 // Changeset
334 .code-difftable {
334 .code-difftable {
335 .comment-inline-form,
335 .comment-inline-form,
336 div.comment {
336 div.comment {
337 width: @comment-max-width;
337 width: @comment-max-width;
338 }
338 }
339 }
339 }
340
340
341 //Style page
341 //Style page
342 @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding;
342 @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding;
343 #style-page .code-difftable{
343 #style-page .code-difftable{
344 .comment-inline-form,
344 .comment-inline-form,
345 div.comment {
345 div.comment {
346 width: @comment-max-width - @style-extra-margin;
346 width: @comment-max-width - @style-extra-margin;
347 }
347 }
348 }
348 }
349
349
350 #context-bar > h2 {
350 #context-bar > h2 {
351 font-size: 20px;
351 font-size: 20px;
352 }
352 }
353
353
354 #context-bar > h2> a {
354 #context-bar > h2> a {
355 font-size: 20px;
355 font-size: 20px;
356 }
356 }
357 // end of defaults
357 // end of defaults
358
358
359 .file_diff_buttons {
359 .file_diff_buttons {
360 padding: 0 0 @padding;
360 padding: 0 0 @padding;
361
361
362 .drop-menu {
362 .drop-menu {
363 float: left;
363 float: left;
364 margin: 0 @padding 0 0;
364 margin: 0 @padding 0 0;
365 }
365 }
366 .btn {
366 .btn {
367 margin: 0 @padding 0 0;
367 margin: 0 @padding 0 0;
368 }
368 }
369 }
369 }
370
370
371 .code-body.textarea.editor {
371 .code-body.textarea.editor {
372 max-width: none;
372 max-width: none;
373 padding: 15px;
373 padding: 15px;
374 }
374 }
375
375
376 td.injected_diff{
376 td.injected_diff{
377 max-width: 1178px;
377 max-width: 1178px;
378 overflow-x: auto;
378 overflow-x: auto;
379 overflow-y: hidden;
379 overflow-y: hidden;
380
380
381 div.diff-container,
381 div.diff-container,
382 div.diffblock{
382 div.diffblock{
383 max-width: 100%;
383 max-width: 100%;
384 }
384 }
385
385
386 div.code-body {
386 div.code-body {
387 max-width: 1124px;
387 max-width: 1124px;
388 overflow-x: auto;
388 overflow-x: auto;
389 overflow-y: hidden;
389 overflow-y: hidden;
390 padding: 0;
390 padding: 0;
391 }
391 }
392 div.diffblock {
392 div.diffblock {
393 border: none;
393 border: none;
394 }
394 }
395
395
396 &.inline-form {
396 &.inline-form {
397 width: 99%
397 width: 99%
398 }
398 }
399 }
399 }
400
400
401
401
402 table.code-difftable {
402 table.code-difftable {
403 width: 100%;
403 width: 100%;
404 }
404 }
405
405
406 /** PYGMENTS COLORING **/
406 /** PYGMENTS COLORING **/
407 div.codeblock {
407 div.codeblock {
408
408
409 // TODO: johbo: Added interim to get rid of the margin around
409 // TODO: johbo: Added interim to get rid of the margin around
410 // Select2 widgets. This needs further cleanup.
410 // Select2 widgets. This needs further cleanup.
411 overflow: auto;
411 overflow: auto;
412 padding: 0px;
412 padding: 0px;
413 border: @border-thickness solid @grey6;
413 border: @border-thickness solid @grey6;
414 .border-radius(@border-radius);
414 .border-radius(@border-radius);
415
415
416 #remove_gist {
416 #remove_gist {
417 float: right;
417 float: right;
418 }
418 }
419
419
420 .gist_url {
420 .gist_url {
421 padding: 0px 0px 10px 0px;
421 padding: 0px 0px 35px 0px;
422 }
422 }
423
423
424 .gist-desc {
425 clear: both;
426 margin: 0 0 10px 0;
427 code {
428 white-space: pre-line;
429 line-height: inherit
430 }
431 }
424 .author {
432 .author {
425 clear: both;
433 clear: both;
426 vertical-align: middle;
434 vertical-align: middle;
427 font-weight: @text-bold-weight;
435 font-weight: @text-bold-weight;
428 font-family: @text-bold;
436 font-family: @text-bold;
429 }
437 }
430
438
431 .btn-mini {
439 .btn-mini {
432 float: left;
440 float: left;
433 margin: 0 5px 0 0;
441 margin: 0 5px 0 0;
434 }
442 }
435
443
436 .code-header {
444 .code-header {
437 padding: @padding;
445 padding: @padding;
438 border-bottom: @border-thickness solid @grey5;
446 border-bottom: @border-thickness solid @grey5;
439
447
440 .rc-user {
448 .rc-user {
441 min-width: 0;
449 min-width: 0;
442 margin-right: .5em;
450 margin-right: .5em;
443 }
451 }
444
452
445 .stats {
453 .stats {
446 clear: both;
454 clear: both;
447 margin: 0 0 @padding 0;
455 margin: 0 0 @padding 0;
448 padding: 0;
456 padding: 0;
449 .left {
457 .left {
450 float: left;
458 float: left;
451 clear: left;
459 clear: left;
452 max-width: 75%;
460 max-width: 75%;
453 margin: 0 0 @padding 0;
461 margin: 0 0 @padding 0;
454
462
455 &.item {
463 &.item {
456 margin-right: @padding;
464 margin-right: @padding;
457 &.last { border-right: none; }
465 &.last { border-right: none; }
458 }
466 }
459 }
467 }
460 .buttons { float: right; }
468 .buttons { float: right; }
461 .author {
469 .author {
462 height: 25px; margin-left: 15px; font-weight: bold;
470 height: 25px; margin-left: 15px; font-weight: bold;
463 }
471 }
464 }
472 }
465
473
466 .commit {
474 .commit {
467 margin: 5px 0 0 26px;
475 margin: 5px 0 0 26px;
468 font-weight: normal;
476 font-weight: normal;
469 white-space: pre-wrap;
477 white-space: pre-wrap;
470 }
478 }
471 }
479 }
472
480
473 .message {
481 .message {
474 position: relative;
482 position: relative;
475 margin: @padding;
483 margin: @padding;
476
484
477 .codeblock-label {
485 .codeblock-label {
478 margin: 0 0 1em 0;
486 margin: 0 0 1em 0;
479 }
487 }
480 }
488 }
481
489
482 .code-body {
490 .code-body {
483 padding: 0.8em 1em;
491 padding: 0.8em 1em;
484 background-color: #ffffff;
492 background-color: #ffffff;
485 min-width: 100%;
493 min-width: 100%;
486 box-sizing: border-box;
494 box-sizing: border-box;
487 // TODO: johbo: Parent has overflow: auto, this forces the child here
495 // TODO: johbo: Parent has overflow: auto, this forces the child here
488 // to have the intended size and to scroll. Should be simplified.
496 // to have the intended size and to scroll. Should be simplified.
489 width: 100%;
497 width: 100%;
490 overflow-x: auto;
498 overflow-x: auto;
491
499
492 img.rendered-binary {
500 img.rendered-binary {
493 height: auto;
501 height: auto;
494 width: 100%;
502 width: 100%;
495 }
503 }
496
504
497 .markdown-block {
505 .markdown-block {
498 padding: 1em 0;
506 padding: 1em 0;
499 }
507 }
500 }
508 }
501
509
502 .codeblock-header {
510 .codeblock-header {
503 background: @grey7;
511 background: @grey7;
504 height: 36px;
512 height: 36px;
505 }
513 }
506
514
507 .path {
515 .path {
508 border-bottom: 1px solid @grey6;
516 border-bottom: 1px solid @grey6;
509 padding: .65em 1em;
517 padding: .65em 1em;
510 height: 18px;
518 height: 18px;
511 }
519 }
512 }
520 }
513
521
514 .code-highlighttable,
522 .code-highlighttable,
515 div.codeblock {
523 div.codeblock {
516
524
517 &.readme {
525 &.readme {
518 background-color: white;
526 background-color: white;
519 }
527 }
520
528
521 .markdown-block table {
529 .markdown-block table {
522 border-collapse: collapse;
530 border-collapse: collapse;
523
531
524 th,
532 th,
525 td {
533 td {
526 padding: .5em;
534 padding: .5em;
527 border: @border-thickness solid @border-default-color;
535 border: @border-thickness solid @border-default-color;
528 }
536 }
529 }
537 }
530
538
531 table {
539 table {
532 border: 0px;
540 border: 0px;
533 margin: 0;
541 margin: 0;
534 letter-spacing: normal;
542 letter-spacing: normal;
535
543
536
544
537 td {
545 td {
538 border: 0px;
546 border: 0px;
539 vertical-align: top;
547 vertical-align: top;
540 }
548 }
541 }
549 }
542 }
550 }
543
551
544 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
552 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
545 div.search-code-body {
553 div.search-code-body {
546 background-color: #ffffff; padding: 5px 0 5px 10px;
554 background-color: #ffffff; padding: 5px 0 5px 10px;
547 pre {
555 pre {
548 .match { background-color: #faffa6;}
556 .match { background-color: #faffa6;}
549 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
557 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
550 }
558 }
551 .code-highlighttable {
559 .code-highlighttable {
552 border-collapse: collapse;
560 border-collapse: collapse;
553
561
554 tr:hover {
562 tr:hover {
555 background: #fafafa;
563 background: #fafafa;
556 }
564 }
557 td.code {
565 td.code {
558 padding-left: 10px;
566 padding-left: 10px;
559 }
567 }
560 td.line {
568 td.line {
561 border-right: 1px solid #ccc !important;
569 border-right: 1px solid #ccc !important;
562 padding-right: 10px;
570 padding-right: 10px;
563 text-align: right;
571 text-align: right;
564 font-family: @text-monospace;
572 font-family: @text-monospace;
565 span {
573 span {
566 white-space: pre-wrap;
574 white-space: pre-wrap;
567 color: #666666;
575 color: #666666;
568 }
576 }
569 }
577 }
570 }
578 }
571 }
579 }
572
580
573 div.annotatediv { margin-left: 2px; margin-right: 4px; }
581 div.annotatediv { margin-left: 2px; margin-right: 4px; }
574 .code-highlight {
582 .code-highlight {
575 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
583 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
576 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
584 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
577 pre div:target {background-color: @comment-highlight-color !important;}
585 pre div:target {background-color: @comment-highlight-color !important;}
578 }
586 }
579
587
580 .linenos a { text-decoration: none; }
588 .linenos a { text-decoration: none; }
581
589
582 .CodeMirror-selected { background: @rchighlightblue; }
590 .CodeMirror-selected { background: @rchighlightblue; }
583 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
591 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
584 .CodeMirror ::selection { background: @rchighlightblue; }
592 .CodeMirror ::selection { background: @rchighlightblue; }
585 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
593 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
586
594
587 .code { display: block; border:0px !important; }
595 .code { display: block; border:0px !important; }
588 .code-highlight, /* TODO: dan: merge codehilite into code-highlight */
596 .code-highlight, /* TODO: dan: merge codehilite into code-highlight */
589 /* This can be generated with `pygmentize -S default -f html` */
597 /* This can be generated with `pygmentize -S default -f html` */
590 .codehilite {
598 .codehilite {
591 .c-ElasticMatch { background-color: #faffa6; padding: 0.2em;}
599 .c-ElasticMatch { background-color: #faffa6; padding: 0.2em;}
592 .hll { background-color: #ffffcc }
600 .hll { background-color: #ffffcc }
593 .c { color: #408080; font-style: italic } /* Comment */
601 .c { color: #408080; font-style: italic } /* Comment */
594 .err, .codehilite .err { border: none } /* Error */
602 .err, .codehilite .err { border: none } /* Error */
595 .k { color: #008000; font-weight: bold } /* Keyword */
603 .k { color: #008000; font-weight: bold } /* Keyword */
596 .o { color: #666666 } /* Operator */
604 .o { color: #666666 } /* Operator */
597 .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
605 .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
598 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
606 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
599 .cp { color: #BC7A00 } /* Comment.Preproc */
607 .cp { color: #BC7A00 } /* Comment.Preproc */
600 .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
608 .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
601 .c1 { color: #408080; font-style: italic } /* Comment.Single */
609 .c1 { color: #408080; font-style: italic } /* Comment.Single */
602 .cs { color: #408080; font-style: italic } /* Comment.Special */
610 .cs { color: #408080; font-style: italic } /* Comment.Special */
603 .gd { color: #A00000 } /* Generic.Deleted */
611 .gd { color: #A00000 } /* Generic.Deleted */
604 .ge { font-style: italic } /* Generic.Emph */
612 .ge { font-style: italic } /* Generic.Emph */
605 .gr { color: #FF0000 } /* Generic.Error */
613 .gr { color: #FF0000 } /* Generic.Error */
606 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
614 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
607 .gi { color: #00A000 } /* Generic.Inserted */
615 .gi { color: #00A000 } /* Generic.Inserted */
608 .go { color: #888888 } /* Generic.Output */
616 .go { color: #888888 } /* Generic.Output */
609 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
617 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
610 .gs { font-weight: bold } /* Generic.Strong */
618 .gs { font-weight: bold } /* Generic.Strong */
611 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
619 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
612 .gt { color: #0044DD } /* Generic.Traceback */
620 .gt { color: #0044DD } /* Generic.Traceback */
613 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
621 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
614 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
622 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
615 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
623 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
616 .kp { color: #008000 } /* Keyword.Pseudo */
624 .kp { color: #008000 } /* Keyword.Pseudo */
617 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
625 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
618 .kt { color: #B00040 } /* Keyword.Type */
626 .kt { color: #B00040 } /* Keyword.Type */
619 .m { color: #666666 } /* Literal.Number */
627 .m { color: #666666 } /* Literal.Number */
620 .s { color: #BA2121 } /* Literal.String */
628 .s { color: #BA2121 } /* Literal.String */
621 .na { color: #7D9029 } /* Name.Attribute */
629 .na { color: #7D9029 } /* Name.Attribute */
622 .nb { color: #008000 } /* Name.Builtin */
630 .nb { color: #008000 } /* Name.Builtin */
623 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
631 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
624 .no { color: #880000 } /* Name.Constant */
632 .no { color: #880000 } /* Name.Constant */
625 .nd { color: #AA22FF } /* Name.Decorator */
633 .nd { color: #AA22FF } /* Name.Decorator */
626 .ni { color: #999999; font-weight: bold } /* Name.Entity */
634 .ni { color: #999999; font-weight: bold } /* Name.Entity */
627 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
635 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
628 .nf { color: #0000FF } /* Name.Function */
636 .nf { color: #0000FF } /* Name.Function */
629 .nl { color: #A0A000 } /* Name.Label */
637 .nl { color: #A0A000 } /* Name.Label */
630 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
638 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
631 .nt { color: #008000; font-weight: bold } /* Name.Tag */
639 .nt { color: #008000; font-weight: bold } /* Name.Tag */
632 .nv { color: #19177C } /* Name.Variable */
640 .nv { color: #19177C } /* Name.Variable */
633 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
641 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
634 .w { color: #bbbbbb } /* Text.Whitespace */
642 .w { color: #bbbbbb } /* Text.Whitespace */
635 .mb { color: #666666 } /* Literal.Number.Bin */
643 .mb { color: #666666 } /* Literal.Number.Bin */
636 .mf { color: #666666 } /* Literal.Number.Float */
644 .mf { color: #666666 } /* Literal.Number.Float */
637 .mh { color: #666666 } /* Literal.Number.Hex */
645 .mh { color: #666666 } /* Literal.Number.Hex */
638 .mi { color: #666666 } /* Literal.Number.Integer */
646 .mi { color: #666666 } /* Literal.Number.Integer */
639 .mo { color: #666666 } /* Literal.Number.Oct */
647 .mo { color: #666666 } /* Literal.Number.Oct */
640 .sa { color: #BA2121 } /* Literal.String.Affix */
648 .sa { color: #BA2121 } /* Literal.String.Affix */
641 .sb { color: #BA2121 } /* Literal.String.Backtick */
649 .sb { color: #BA2121 } /* Literal.String.Backtick */
642 .sc { color: #BA2121 } /* Literal.String.Char */
650 .sc { color: #BA2121 } /* Literal.String.Char */
643 .dl { color: #BA2121 } /* Literal.String.Delimiter */
651 .dl { color: #BA2121 } /* Literal.String.Delimiter */
644 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
652 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
645 .s2 { color: #BA2121 } /* Literal.String.Double */
653 .s2 { color: #BA2121 } /* Literal.String.Double */
646 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
654 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
647 .sh { color: #BA2121 } /* Literal.String.Heredoc */
655 .sh { color: #BA2121 } /* Literal.String.Heredoc */
648 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
656 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
649 .sx { color: #008000 } /* Literal.String.Other */
657 .sx { color: #008000 } /* Literal.String.Other */
650 .sr { color: #BB6688 } /* Literal.String.Regex */
658 .sr { color: #BB6688 } /* Literal.String.Regex */
651 .s1 { color: #BA2121 } /* Literal.String.Single */
659 .s1 { color: #BA2121 } /* Literal.String.Single */
652 .ss { color: #19177C } /* Literal.String.Symbol */
660 .ss { color: #19177C } /* Literal.String.Symbol */
653 .bp { color: #008000 } /* Name.Builtin.Pseudo */
661 .bp { color: #008000 } /* Name.Builtin.Pseudo */
654 .fm { color: #0000FF } /* Name.Function.Magic */
662 .fm { color: #0000FF } /* Name.Function.Magic */
655 .vc { color: #19177C } /* Name.Variable.Class */
663 .vc { color: #19177C } /* Name.Variable.Class */
656 .vg { color: #19177C } /* Name.Variable.Global */
664 .vg { color: #19177C } /* Name.Variable.Global */
657 .vi { color: #19177C } /* Name.Variable.Instance */
665 .vi { color: #19177C } /* Name.Variable.Instance */
658 .vm { color: #19177C } /* Name.Variable.Magic */
666 .vm { color: #19177C } /* Name.Variable.Magic */
659 .il { color: #666666 } /* Literal.Number.Integer.Long */
667 .il { color: #666666 } /* Literal.Number.Integer.Long */
660
668
661 }
669 }
662
670
663 /* customized pre blocks for markdown/rst */
671 /* customized pre blocks for markdown/rst */
664 pre.literal-block, .codehilite pre{
672 pre.literal-block, .codehilite pre{
665 padding: @padding;
673 padding: @padding;
666 border: 1px solid @grey6;
674 border: 1px solid @grey6;
667 .border-radius(@border-radius);
675 .border-radius(@border-radius);
668 background-color: @grey7;
676 background-color: @grey7;
669 }
677 }
670
678
671
679
672 /* START NEW CODE BLOCK CSS */
680 /* START NEW CODE BLOCK CSS */
673
681
674 @cb-line-height: 18px;
682 @cb-line-height: 18px;
675 @cb-line-code-padding: 10px;
683 @cb-line-code-padding: 10px;
676 @cb-text-padding: 5px;
684 @cb-text-padding: 5px;
677
685
678 @pill-padding: 2px 7px;
686 @pill-padding: 2px 7px;
679 @pill-padding-small: 2px 2px 1px 2px;
687 @pill-padding-small: 2px 2px 1px 2px;
680
688
681 input.filediff-collapse-state {
689 input.filediff-collapse-state {
682 display: none;
690 display: none;
683
691
684 &:checked + .filediff { /* file diff is collapsed */
692 &:checked + .filediff { /* file diff is collapsed */
685 .cb {
693 .cb {
686 display: none
694 display: none
687 }
695 }
688 .filediff-collapse-indicator {
696 .filediff-collapse-indicator {
689 float: left;
697 float: left;
690 cursor: pointer;
698 cursor: pointer;
691 margin: 1px -5px;
699 margin: 1px -5px;
692 }
700 }
693 .filediff-collapse-indicator:before {
701 .filediff-collapse-indicator:before {
694 content: '\f105';
702 content: '\f105';
695 }
703 }
696
704
697 .filediff-menu {
705 .filediff-menu {
698 display: none;
706 display: none;
699 }
707 }
700
708
701 }
709 }
702
710
703 &+ .filediff { /* file diff is expanded */
711 &+ .filediff { /* file diff is expanded */
704
712
705 .filediff-collapse-indicator {
713 .filediff-collapse-indicator {
706 float: left;
714 float: left;
707 cursor: pointer;
715 cursor: pointer;
708 margin: 1px -5px;
716 margin: 1px -5px;
709 }
717 }
710 .filediff-collapse-indicator:before {
718 .filediff-collapse-indicator:before {
711 content: '\f107';
719 content: '\f107';
712 }
720 }
713
721
714 .filediff-menu {
722 .filediff-menu {
715 display: block;
723 display: block;
716 }
724 }
717
725
718 margin: 10px 0;
726 margin: 10px 0;
719 &:nth-child(2) {
727 &:nth-child(2) {
720 margin: 0;
728 margin: 0;
721 }
729 }
722 }
730 }
723 }
731 }
724
732
725 .filediffs .anchor {
733 .filediffs .anchor {
726 display: block;
734 display: block;
727 height: 40px;
735 height: 40px;
728 margin-top: -40px;
736 margin-top: -40px;
729 visibility: hidden;
737 visibility: hidden;
730 }
738 }
731
739
732 .filediffs .anchor:nth-of-type(1) {
740 .filediffs .anchor:nth-of-type(1) {
733 display: block;
741 display: block;
734 height: 80px;
742 height: 80px;
735 margin-top: -80px;
743 margin-top: -80px;
736 visibility: hidden;
744 visibility: hidden;
737 }
745 }
738
746
739 .cs_files {
747 .cs_files {
740 clear: both;
748 clear: both;
741 }
749 }
742
750
743 #diff-file-sticky{
751 #diff-file-sticky{
744 will-change: min-height;
752 will-change: min-height;
745 height: 80px;
753 height: 80px;
746 }
754 }
747
755
748 .sidebar__inner{
756 .sidebar__inner{
749 transform: translate(0, 0); /* For browsers don't support translate3d. */
757 transform: translate(0, 0); /* For browsers don't support translate3d. */
750 transform: translate3d(0, 0, 0);
758 transform: translate3d(0, 0, 0);
751 will-change: position, transform;
759 will-change: position, transform;
752 height: 65px;
760 height: 65px;
753 background-color: #fff;
761 background-color: #fff;
754 padding: 5px 0px;
762 padding: 5px 0px;
755 }
763 }
756
764
757 .sidebar__bar {
765 .sidebar__bar {
758 padding: 5px 0px 0px 0px
766 padding: 5px 0px 0px 0px
759 }
767 }
760
768
761 .fpath-placeholder {
769 .fpath-placeholder {
762 clear: both;
770 clear: both;
763 visibility: hidden
771 visibility: hidden
764 }
772 }
765
773
766 .is-affixed {
774 .is-affixed {
767
775
768 .sidebar__inner {
776 .sidebar__inner {
769 z-index: 30;
777 z-index: 30;
770 }
778 }
771
779
772 .sidebar_inner_shadow {
780 .sidebar_inner_shadow {
773 position: fixed;
781 position: fixed;
774 top: 75px;
782 top: 75px;
775 right: -100%;
783 right: -100%;
776 left: -100%;
784 left: -100%;
777 z-index: 30;
785 z-index: 30;
778 display: block;
786 display: block;
779 height: 5px;
787 height: 5px;
780 content: "";
788 content: "";
781 background: linear-gradient(rgba(0, 0, 0, 0.075), rgba(0, 0, 0, 0.001)) repeat-x 0 0;
789 background: linear-gradient(rgba(0, 0, 0, 0.075), rgba(0, 0, 0, 0.001)) repeat-x 0 0;
782 border-top: 1px solid rgba(0, 0, 0, 0.15);
790 border-top: 1px solid rgba(0, 0, 0, 0.15);
783 }
791 }
784
792
785 .fpath-placeholder {
793 .fpath-placeholder {
786 visibility: visible !important;
794 visibility: visible !important;
787 }
795 }
788 }
796 }
789
797
790 .diffset-menu {
798 .diffset-menu {
791
799
792 }
800 }
793
801
794 #todo-box {
802 #todo-box {
795 clear:both;
803 clear:both;
796 display: none;
804 display: none;
797 text-align: right
805 text-align: right
798 }
806 }
799
807
800 .diffset {
808 .diffset {
801 margin: 0px auto;
809 margin: 0px auto;
802 .diffset-heading {
810 .diffset-heading {
803 border: 1px solid @grey5;
811 border: 1px solid @grey5;
804 margin-bottom: -1px;
812 margin-bottom: -1px;
805 // margin-top: 20px;
813 // margin-top: 20px;
806 h2 {
814 h2 {
807 margin: 0;
815 margin: 0;
808 line-height: 38px;
816 line-height: 38px;
809 padding-left: 10px;
817 padding-left: 10px;
810 }
818 }
811 .btn {
819 .btn {
812 margin: 0;
820 margin: 0;
813 }
821 }
814 background: @grey6;
822 background: @grey6;
815 display: block;
823 display: block;
816 padding: 5px;
824 padding: 5px;
817 }
825 }
818 .diffset-heading-warning {
826 .diffset-heading-warning {
819 background: @alert3-inner;
827 background: @alert3-inner;
820 border: 1px solid @alert3;
828 border: 1px solid @alert3;
821 }
829 }
822 &.diffset-comments-disabled {
830 &.diffset-comments-disabled {
823 .cb-comment-box-opener, .comment-inline-form, .cb-comment-add-button {
831 .cb-comment-box-opener, .comment-inline-form, .cb-comment-add-button {
824 display: none !important;
832 display: none !important;
825 }
833 }
826 }
834 }
827 }
835 }
828
836
829 .filelist {
837 .filelist {
830 .pill {
838 .pill {
831 display: block;
839 display: block;
832 float: left;
840 float: left;
833 padding: @pill-padding-small;
841 padding: @pill-padding-small;
834 }
842 }
835 }
843 }
836
844
837 .pill {
845 .pill {
838 display: block;
846 display: block;
839 float: left;
847 float: left;
840 padding: @pill-padding;
848 padding: @pill-padding;
841 }
849 }
842
850
843 .pill-group {
851 .pill-group {
844 .pill {
852 .pill {
845 opacity: .8;
853 opacity: .8;
846 margin-right: 3px;
854 margin-right: 3px;
847 font-size: 12px;
855 font-size: 12px;
848 font-weight: normal;
856 font-weight: normal;
849 min-width: 30px;
857 min-width: 30px;
850 text-align: center;
858 text-align: center;
851
859
852 &:first-child {
860 &:first-child {
853 border-radius: @border-radius 0 0 @border-radius;
861 border-radius: @border-radius 0 0 @border-radius;
854 }
862 }
855 &:last-child {
863 &:last-child {
856 border-radius: 0 @border-radius @border-radius 0;
864 border-radius: 0 @border-radius @border-radius 0;
857 }
865 }
858 &:only-child {
866 &:only-child {
859 border-radius: @border-radius;
867 border-radius: @border-radius;
860 margin-right: 0;
868 margin-right: 0;
861 }
869 }
862 }
870 }
863 }
871 }
864
872
865 /* Main comments*/
873 /* Main comments*/
866 #comments {
874 #comments {
867 .comment-selected {
875 .comment-selected {
868 border-left: 6px solid @comment-highlight-color;
876 border-left: 6px solid @comment-highlight-color;
869 padding-left: 3px;
877 padding-left: 3px;
870 margin-left: -9px;
878 margin-left: -9px;
871 }
879 }
872 }
880 }
873
881
874 .filediff {
882 .filediff {
875 border: 1px solid @grey5;
883 border: 1px solid @grey5;
876
884
877 /* START OVERRIDES */
885 /* START OVERRIDES */
878 .code-highlight {
886 .code-highlight {
879 border: none; // TODO: remove this border from the global
887 border: none; // TODO: remove this border from the global
880 // .code-highlight, it doesn't belong there
888 // .code-highlight, it doesn't belong there
881 }
889 }
882 label {
890 label {
883 margin: 0; // TODO: remove this margin definition from global label
891 margin: 0; // TODO: remove this margin definition from global label
884 // it doesn't belong there - if margin on labels
892 // it doesn't belong there - if margin on labels
885 // are needed for a form they should be defined
893 // are needed for a form they should be defined
886 // in the form's class
894 // in the form's class
887 }
895 }
888 /* END OVERRIDES */
896 /* END OVERRIDES */
889
897
890 * {
898 * {
891 box-sizing: border-box;
899 box-sizing: border-box;
892 }
900 }
893 .filediff-anchor {
901 .filediff-anchor {
894 visibility: hidden;
902 visibility: hidden;
895 }
903 }
896 &:hover {
904 &:hover {
897 .filediff-anchor {
905 .filediff-anchor {
898 visibility: visible;
906 visibility: visible;
899 }
907 }
900 }
908 }
901
909
902 .filediff-heading {
910 .filediff-heading {
903 cursor: pointer;
911 cursor: pointer;
904 display: block;
912 display: block;
905 padding: 10px 10px;
913 padding: 10px 10px;
906 }
914 }
907 .filediff-heading:after {
915 .filediff-heading:after {
908 content: "";
916 content: "";
909 display: table;
917 display: table;
910 clear: both;
918 clear: both;
911 }
919 }
912 .filediff-heading:hover {
920 .filediff-heading:hover {
913 background: #e1e9f4 !important;
921 background: #e1e9f4 !important;
914 }
922 }
915
923
916 .filediff-menu {
924 .filediff-menu {
917 text-align: right;
925 text-align: right;
918 padding: 5px 5px 5px 0px;
926 padding: 5px 5px 5px 0px;
919 background: @grey7;
927 background: @grey7;
920
928
921 &> a,
929 &> a,
922 &> span {
930 &> span {
923 padding: 1px;
931 padding: 1px;
924 }
932 }
925 }
933 }
926
934
927 .filediff-collapse-button, .filediff-expand-button {
935 .filediff-collapse-button, .filediff-expand-button {
928 cursor: pointer;
936 cursor: pointer;
929 }
937 }
930 .filediff-collapse-button {
938 .filediff-collapse-button {
931 display: inline;
939 display: inline;
932 }
940 }
933 .filediff-expand-button {
941 .filediff-expand-button {
934 display: none;
942 display: none;
935 }
943 }
936 .filediff-collapsed .filediff-collapse-button {
944 .filediff-collapsed .filediff-collapse-button {
937 display: none;
945 display: none;
938 }
946 }
939 .filediff-collapsed .filediff-expand-button {
947 .filediff-collapsed .filediff-expand-button {
940 display: inline;
948 display: inline;
941 }
949 }
942
950
943 /**** COMMENTS ****/
951 /**** COMMENTS ****/
944
952
945 .filediff-menu {
953 .filediff-menu {
946 .show-comment-button {
954 .show-comment-button {
947 display: none;
955 display: none;
948 }
956 }
949 }
957 }
950 &.hide-comments {
958 &.hide-comments {
951 .inline-comments {
959 .inline-comments {
952 display: none;
960 display: none;
953 }
961 }
954 .filediff-menu {
962 .filediff-menu {
955 .show-comment-button {
963 .show-comment-button {
956 display: inline;
964 display: inline;
957 }
965 }
958 .hide-comment-button {
966 .hide-comment-button {
959 display: none;
967 display: none;
960 }
968 }
961 }
969 }
962 }
970 }
963
971
964 .hide-line-comments {
972 .hide-line-comments {
965 .inline-comments {
973 .inline-comments {
966 display: none;
974 display: none;
967 }
975 }
968 }
976 }
969
977
970 /**** END COMMENTS ****/
978 /**** END COMMENTS ****/
971
979
972 }
980 }
973
981
974
982
975 .op-added {
983 .op-added {
976 color: @alert1;
984 color: @alert1;
977 }
985 }
978
986
979 .op-deleted {
987 .op-deleted {
980 color: @alert2;
988 color: @alert2;
981 }
989 }
982
990
983 .filediff, .filelist {
991 .filediff, .filelist {
984
992
985 .pill {
993 .pill {
986 &[op="name"] {
994 &[op="name"] {
987 background: none;
995 background: none;
988 opacity: 1;
996 opacity: 1;
989 color: white;
997 color: white;
990 }
998 }
991 &[op="limited"] {
999 &[op="limited"] {
992 background: @grey2;
1000 background: @grey2;
993 color: white;
1001 color: white;
994 }
1002 }
995 &[op="binary"] {
1003 &[op="binary"] {
996 background: @color7;
1004 background: @color7;
997 color: white;
1005 color: white;
998 }
1006 }
999 &[op="modified"] {
1007 &[op="modified"] {
1000 background: @alert1;
1008 background: @alert1;
1001 color: white;
1009 color: white;
1002 }
1010 }
1003 &[op="renamed"] {
1011 &[op="renamed"] {
1004 background: @color4;
1012 background: @color4;
1005 color: white;
1013 color: white;
1006 }
1014 }
1007 &[op="copied"] {
1015 &[op="copied"] {
1008 background: @color4;
1016 background: @color4;
1009 color: white;
1017 color: white;
1010 }
1018 }
1011 &[op="mode"] {
1019 &[op="mode"] {
1012 background: @grey3;
1020 background: @grey3;
1013 color: white;
1021 color: white;
1014 }
1022 }
1015 &[op="symlink"] {
1023 &[op="symlink"] {
1016 background: @color8;
1024 background: @color8;
1017 color: white;
1025 color: white;
1018 }
1026 }
1019
1027
1020 &[op="added"] { /* added lines */
1028 &[op="added"] { /* added lines */
1021 background: @alert1;
1029 background: @alert1;
1022 color: white;
1030 color: white;
1023 }
1031 }
1024 &[op="deleted"] { /* deleted lines */
1032 &[op="deleted"] { /* deleted lines */
1025 background: @alert2;
1033 background: @alert2;
1026 color: white;
1034 color: white;
1027 }
1035 }
1028
1036
1029 &[op="created"] { /* created file */
1037 &[op="created"] { /* created file */
1030 background: @alert1;
1038 background: @alert1;
1031 color: white;
1039 color: white;
1032 }
1040 }
1033 &[op="removed"] { /* deleted file */
1041 &[op="removed"] { /* deleted file */
1034 background: @color5;
1042 background: @color5;
1035 color: white;
1043 color: white;
1036 }
1044 }
1037 }
1045 }
1038 }
1046 }
1039
1047
1040
1048
1041 .filediff-outdated {
1049 .filediff-outdated {
1042 padding: 8px 0;
1050 padding: 8px 0;
1043
1051
1044 .filediff-heading {
1052 .filediff-heading {
1045 opacity: .5;
1053 opacity: .5;
1046 }
1054 }
1047 }
1055 }
1048
1056
1049 table.cb {
1057 table.cb {
1050 width: 100%;
1058 width: 100%;
1051 border-collapse: collapse;
1059 border-collapse: collapse;
1052
1060
1053 .cb-text {
1061 .cb-text {
1054 padding: @cb-text-padding;
1062 padding: @cb-text-padding;
1055 }
1063 }
1056 .cb-hunk {
1064 .cb-hunk {
1057 padding: @cb-text-padding;
1065 padding: @cb-text-padding;
1058 }
1066 }
1059 .cb-expand {
1067 .cb-expand {
1060 display: none;
1068 display: none;
1061 }
1069 }
1062 .cb-collapse {
1070 .cb-collapse {
1063 display: inline;
1071 display: inline;
1064 }
1072 }
1065 &.cb-collapsed {
1073 &.cb-collapsed {
1066 .cb-line {
1074 .cb-line {
1067 display: none;
1075 display: none;
1068 }
1076 }
1069 .cb-expand {
1077 .cb-expand {
1070 display: inline;
1078 display: inline;
1071 }
1079 }
1072 .cb-collapse {
1080 .cb-collapse {
1073 display: none;
1081 display: none;
1074 }
1082 }
1075 .cb-hunk {
1083 .cb-hunk {
1076 display: none;
1084 display: none;
1077 }
1085 }
1078 }
1086 }
1079
1087
1080 /* intentionally general selector since .cb-line-selected must override it
1088 /* intentionally general selector since .cb-line-selected must override it
1081 and they both use !important since the td itself may have a random color
1089 and they both use !important since the td itself may have a random color
1082 generated by annotation blocks. TLDR: if you change it, make sure
1090 generated by annotation blocks. TLDR: if you change it, make sure
1083 annotated block selection and line selection in file view still work */
1091 annotated block selection and line selection in file view still work */
1084 .cb-line-fresh .cb-content {
1092 .cb-line-fresh .cb-content {
1085 background: white !important;
1093 background: white !important;
1086 }
1094 }
1087 .cb-warning {
1095 .cb-warning {
1088 background: #fff4dd;
1096 background: #fff4dd;
1089 }
1097 }
1090
1098
1091 &.cb-diff-sideside {
1099 &.cb-diff-sideside {
1092 td {
1100 td {
1093 &.cb-content {
1101 &.cb-content {
1094 width: 50%;
1102 width: 50%;
1095 }
1103 }
1096 }
1104 }
1097 }
1105 }
1098
1106
1099 tr {
1107 tr {
1100 &.cb-annotate {
1108 &.cb-annotate {
1101 border-top: 1px solid #eee;
1109 border-top: 1px solid #eee;
1102 }
1110 }
1103
1111
1104 &.cb-comment-info {
1112 &.cb-comment-info {
1105 border-top: 1px solid #eee;
1113 border-top: 1px solid #eee;
1106 color: rgba(0, 0, 0, 0.3);
1114 color: rgba(0, 0, 0, 0.3);
1107 background: #edf2f9;
1115 background: #edf2f9;
1108
1116
1109 td {
1117 td {
1110
1118
1111 }
1119 }
1112 }
1120 }
1113
1121
1114 &.cb-hunk {
1122 &.cb-hunk {
1115 font-family: @text-monospace;
1123 font-family: @text-monospace;
1116 color: rgba(0, 0, 0, 0.3);
1124 color: rgba(0, 0, 0, 0.3);
1117
1125
1118 td {
1126 td {
1119 &:first-child {
1127 &:first-child {
1120 background: #edf2f9;
1128 background: #edf2f9;
1121 }
1129 }
1122 &:last-child {
1130 &:last-child {
1123 background: #f4f7fb;
1131 background: #f4f7fb;
1124 }
1132 }
1125 }
1133 }
1126 }
1134 }
1127 }
1135 }
1128
1136
1129
1137
1130 td {
1138 td {
1131 vertical-align: top;
1139 vertical-align: top;
1132 padding: 0;
1140 padding: 0;
1133
1141
1134 &.cb-content {
1142 &.cb-content {
1135 font-size: 12.35px;
1143 font-size: 12.35px;
1136
1144
1137 &.cb-line-selected .cb-code {
1145 &.cb-line-selected .cb-code {
1138 background: @comment-highlight-color !important;
1146 background: @comment-highlight-color !important;
1139 }
1147 }
1140
1148
1141 span.cb-code {
1149 span.cb-code {
1142 line-height: @cb-line-height;
1150 line-height: @cb-line-height;
1143 padding-left: @cb-line-code-padding;
1151 padding-left: @cb-line-code-padding;
1144 padding-right: @cb-line-code-padding;
1152 padding-right: @cb-line-code-padding;
1145 display: block;
1153 display: block;
1146 white-space: pre-wrap;
1154 white-space: pre-wrap;
1147 font-family: @text-monospace;
1155 font-family: @text-monospace;
1148 word-break: break-all;
1156 word-break: break-all;
1149 .nonl {
1157 .nonl {
1150 color: @color5;
1158 color: @color5;
1151 }
1159 }
1152 .cb-action {
1160 .cb-action {
1153 &:before {
1161 &:before {
1154 content: " ";
1162 content: " ";
1155 }
1163 }
1156 &.cb-deletion:before {
1164 &.cb-deletion:before {
1157 content: "- ";
1165 content: "- ";
1158 }
1166 }
1159 &.cb-addition:before {
1167 &.cb-addition:before {
1160 content: "+ ";
1168 content: "+ ";
1161 }
1169 }
1162 }
1170 }
1163 }
1171 }
1164
1172
1165 &> button.cb-comment-box-opener {
1173 &> button.cb-comment-box-opener {
1166
1174
1167 padding: 2px 2px 1px 3px;
1175 padding: 2px 2px 1px 3px;
1168 margin-left: -6px;
1176 margin-left: -6px;
1169 margin-top: -1px;
1177 margin-top: -1px;
1170
1178
1171 border-radius: @border-radius;
1179 border-radius: @border-radius;
1172 position: absolute;
1180 position: absolute;
1173 display: none;
1181 display: none;
1174 }
1182 }
1175 .cb-comment {
1183 .cb-comment {
1176 margin-top: 10px;
1184 margin-top: 10px;
1177 white-space: normal;
1185 white-space: normal;
1178 }
1186 }
1179 }
1187 }
1180 &:hover {
1188 &:hover {
1181 button.cb-comment-box-opener {
1189 button.cb-comment-box-opener {
1182 display: block;
1190 display: block;
1183 }
1191 }
1184 &+ td button.cb-comment-box-opener {
1192 &+ td button.cb-comment-box-opener {
1185 display: block
1193 display: block
1186 }
1194 }
1187 }
1195 }
1188
1196
1189 &.cb-data {
1197 &.cb-data {
1190 text-align: right;
1198 text-align: right;
1191 width: 30px;
1199 width: 30px;
1192 font-family: @text-monospace;
1200 font-family: @text-monospace;
1193
1201
1194 .icon-comment {
1202 .icon-comment {
1195 cursor: pointer;
1203 cursor: pointer;
1196 }
1204 }
1197 &.cb-line-selected {
1205 &.cb-line-selected {
1198 background: @comment-highlight-color !important;
1206 background: @comment-highlight-color !important;
1199 }
1207 }
1200 &.cb-line-selected > div {
1208 &.cb-line-selected > div {
1201 display: block;
1209 display: block;
1202 background: @comment-highlight-color !important;
1210 background: @comment-highlight-color !important;
1203 line-height: @cb-line-height;
1211 line-height: @cb-line-height;
1204 color: rgba(0, 0, 0, 0.3);
1212 color: rgba(0, 0, 0, 0.3);
1205 }
1213 }
1206 }
1214 }
1207
1215
1208 &.cb-lineno {
1216 &.cb-lineno {
1209 padding: 0;
1217 padding: 0;
1210 width: 50px;
1218 width: 50px;
1211 color: rgba(0, 0, 0, 0.3);
1219 color: rgba(0, 0, 0, 0.3);
1212 text-align: right;
1220 text-align: right;
1213 border-right: 1px solid #eee;
1221 border-right: 1px solid #eee;
1214 font-family: @text-monospace;
1222 font-family: @text-monospace;
1215 -webkit-user-select: none;
1223 -webkit-user-select: none;
1216 -moz-user-select: none;
1224 -moz-user-select: none;
1217 user-select: none;
1225 user-select: none;
1218
1226
1219 a::before {
1227 a::before {
1220 content: attr(data-line-no);
1228 content: attr(data-line-no);
1221 }
1229 }
1222 &.cb-line-selected {
1230 &.cb-line-selected {
1223 background: @comment-highlight-color !important;
1231 background: @comment-highlight-color !important;
1224 }
1232 }
1225
1233
1226 a {
1234 a {
1227 display: block;
1235 display: block;
1228 padding-right: @cb-line-code-padding;
1236 padding-right: @cb-line-code-padding;
1229 padding-left: @cb-line-code-padding;
1237 padding-left: @cb-line-code-padding;
1230 line-height: @cb-line-height;
1238 line-height: @cb-line-height;
1231 color: rgba(0, 0, 0, 0.3);
1239 color: rgba(0, 0, 0, 0.3);
1232 }
1240 }
1233 }
1241 }
1234
1242
1235 &.cb-empty {
1243 &.cb-empty {
1236 background: @grey7;
1244 background: @grey7;
1237 }
1245 }
1238
1246
1239 ins {
1247 ins {
1240 color: black;
1248 color: black;
1241 background: #a6f3a6;
1249 background: #a6f3a6;
1242 text-decoration: none;
1250 text-decoration: none;
1243 }
1251 }
1244 del {
1252 del {
1245 color: black;
1253 color: black;
1246 background: #f8cbcb;
1254 background: #f8cbcb;
1247 text-decoration: none;
1255 text-decoration: none;
1248 }
1256 }
1249 &.cb-addition {
1257 &.cb-addition {
1250 background: #ecffec;
1258 background: #ecffec;
1251
1259
1252 &.blob-lineno {
1260 &.blob-lineno {
1253 background: #ddffdd;
1261 background: #ddffdd;
1254 }
1262 }
1255 }
1263 }
1256 &.cb-deletion {
1264 &.cb-deletion {
1257 background: #ffecec;
1265 background: #ffecec;
1258
1266
1259 &.blob-lineno {
1267 &.blob-lineno {
1260 background: #ffdddd;
1268 background: #ffdddd;
1261 }
1269 }
1262 }
1270 }
1263 &.cb-annotate-message-spacer {
1271 &.cb-annotate-message-spacer {
1264 width:8px;
1272 width:8px;
1265 padding: 1px 0px 0px 3px;
1273 padding: 1px 0px 0px 3px;
1266 }
1274 }
1267 &.cb-annotate-info {
1275 &.cb-annotate-info {
1268 width: 320px;
1276 width: 320px;
1269 min-width: 320px;
1277 min-width: 320px;
1270 max-width: 320px;
1278 max-width: 320px;
1271 padding: 5px 2px;
1279 padding: 5px 2px;
1272 font-size: 13px;
1280 font-size: 13px;
1273
1281
1274 .cb-annotate-message {
1282 .cb-annotate-message {
1275 padding: 2px 0px 0px 0px;
1283 padding: 2px 0px 0px 0px;
1276 white-space: pre-line;
1284 white-space: pre-line;
1277 overflow: hidden;
1285 overflow: hidden;
1278 }
1286 }
1279 .rc-user {
1287 .rc-user {
1280 float: none;
1288 float: none;
1281 padding: 0 6px 0 17px;
1289 padding: 0 6px 0 17px;
1282 min-width: unset;
1290 min-width: unset;
1283 min-height: unset;
1291 min-height: unset;
1284 }
1292 }
1285 }
1293 }
1286
1294
1287 &.cb-annotate-revision {
1295 &.cb-annotate-revision {
1288 cursor: pointer;
1296 cursor: pointer;
1289 text-align: right;
1297 text-align: right;
1290 padding: 1px 3px 0px 3px;
1298 padding: 1px 3px 0px 3px;
1291 }
1299 }
1292 }
1300 }
1293 }
1301 }
@@ -1,141 +1,154 b''
1 // tags.less
1 // tags.less
2 // For use in RhodeCode applications;
2 // For use in RhodeCode applications;
3 // see style guide documentation for guidelines.
3 // see style guide documentation for guidelines.
4
4
5 // TAGS
5 // TAGS
6 .tag,
6 .tag,
7 .tagtag {
7 .tagtag {
8 display: inline-block;
8 display: inline-block;
9 min-height: 0;
9 min-height: 0;
10 margin: 0 auto;
10 margin: 0 auto;
11 padding: .25em;
11 padding: .25em;
12 text-align: center;
12 text-align: center;
13 font-size: (-1 + @basefontsize); //fit in tables
13 font-size: (-1 + @basefontsize); //fit in tables
14 line-height: 1.1em;
14 line-height: 1.1em;
15 border: none;
15 border: none;
16 box-shadow: @button-shadow;
16 box-shadow: @button-shadow;
17 .border-radius(@border-radius);
17 .border-radius(@border-radius);
18 font-family: @text-regular;
18 font-family: @text-regular;
19 background-image: none;
19 background-image: none;
20 color: @grey4;
20 color: @grey4;
21 .border ( @border-thickness-tags, @grey5 );
21 .border ( @border-thickness-tags, @grey5 );
22 white-space: nowrap;
22 white-space: nowrap;
23 a {
23 a {
24 color: inherit;
24 color: inherit;
25
25
26 &:hover {
26 &:hover {
27 color: @grey2;
27 color: @grey2;
28 }
28 }
29
29
30 i,
30 i,
31 [class^="icon-"]:before,
31 [class^="icon-"]:before,
32 [class*=" icon-"]:before {
32 [class*=" icon-"]:before {
33 text-decoration: none;
33 text-decoration: none;
34 }
34 }
35 }
35 }
36
36
37 &:hover {
37 &:hover {
38 border-color: @grey4;
38 border-color: @grey4;
39 }
39 }
40 }
40 }
41
41
42 .tag0 { .border ( @border-thickness-tags, @grey4 ); color:@grey4; }
42 .tag0 { .border ( @border-thickness-tags, @grey4 ); color:@grey4; }
43 .tag1 { .border ( @border-thickness-tags, @color1 ); color:@color1; }
43 .tag1 { .border ( @border-thickness-tags, @color1 ); color:@color1; }
44 .tag2 { .border ( @border-thickness-tags, @color2 ); color:@color2; }
44 .tag2 { .border ( @border-thickness-tags, @color2 ); color:@color2; }
45 .tag3 { .border ( @border-thickness-tags, @color3 ); color:@color3; }
45 .tag3 { .border ( @border-thickness-tags, @color3 ); color:@color3; }
46 .tag4 { .border ( @border-thickness-tags, @color4 ); color:@color4; }
46 .tag4 { .border ( @border-thickness-tags, @color4 ); color:@color4; }
47 .tag5 { .border ( @border-thickness-tags, @color5 ); color:@color5; }
47 .tag5 { .border ( @border-thickness-tags, @color5 ); color:@color5; }
48 .tag6 { .border ( @border-thickness-tags, @color6 ); color:@color6; }
48 .tag6 { .border ( @border-thickness-tags, @color6 ); color:@color6; }
49 .tag7 { .border ( @border-thickness-tags, @color7 ); color:@color7; }
49 .tag7 { .border ( @border-thickness-tags, @color7 ); color:@color7; }
50 .tag8 { .border ( @border-thickness-tags, @color8 ); color:@color8; }
50 .tag8 { .border ( @border-thickness-tags, @color8 ); color:@color8; }
51
51
52
53 .tag-gist-public {
54 .border (@border-thickness-tags, @color1);
55 color: @color1;
56 }
57
58
59 .tag-gist-private {
60 .border (@border-thickness-tags, @color2);
61 color: @color2;
62 }
63
64
52 .metatag-list {
65 .metatag-list {
53 margin: 0;
66 margin: 0;
54 padding: 0;
67 padding: 0;
55
68
56 li {
69 li {
57 margin: 0 0 @padding;
70 margin: 0 0 @padding;
58 line-height: 1em;
71 line-height: 1em;
59 list-style-type: none;
72 list-style-type: none;
60 }
73 }
61 }
74 }
62
75
63 .branchtag, .booktag {
76 .branchtag, .booktag {
64 &:extend(.tag);
77 &:extend(.tag);
65
78
66
79
67 a {
80 a {
68 color:inherit;
81 color:inherit;
69 }
82 }
70 }
83 }
71
84
72 .metatag {
85 .metatag {
73 &:extend(.tag);
86 &:extend(.tag);
74 a {
87 a {
75 color:inherit;
88 color:inherit;
76 text-decoration: underline;
89 text-decoration: underline;
77 }
90 }
78 }
91 }
79
92
80 [tag="generic"] { &:extend(.tag0); }
93 [tag="generic"] { &:extend(.tag0); }
81 [tag="label"] { &:extend(.tag0); }
94 [tag="label"] { &:extend(.tag0); }
82
95
83 [tag="state featured"] { &:extend(.tag1); }
96 [tag="state featured"] { &:extend(.tag1); }
84 [tag="state dev"] { &:extend(.tag1); }
97 [tag="state dev"] { &:extend(.tag1); }
85 [tag="ref base"] { &:extend(.tag1); }
98 [tag="ref base"] { &:extend(.tag1); }
86
99
87 [tag="state stable"] { &:extend(.tag2); }
100 [tag="state stable"] { &:extend(.tag2); }
88 [tag="state stale"] { &:extend(.tag2); }
101 [tag="state stale"] { &:extend(.tag2); }
89
102
90 [tag="ref requires"] { &:extend(.tag3); }
103 [tag="ref requires"] { &:extend(.tag3); }
91
104
92 [tag="state dead"] { &:extend(.tag4); }
105 [tag="state dead"] { &:extend(.tag4); }
93 [tag="state deprecated"] { &:extend(.tag4); }
106 [tag="state deprecated"] { &:extend(.tag4); }
94
107
95 [tag="ref conflicts"] { &:extend(.tag4); }
108 [tag="ref conflicts"] { &:extend(.tag4); }
96
109
97 [tag="license"] { &:extend(.tag6); }
110 [tag="license"] { &:extend(.tag6); }
98
111
99 [tag="lang"] { &:extend(.tag7); }
112 [tag="lang"] { &:extend(.tag7); }
100 [tag="language"] { &:extend(.tag7); }
113 [tag="language"] { &:extend(.tag7); }
101 [tag="ref recommends"] { &:extend(.tag7); }
114 [tag="ref recommends"] { &:extend(.tag7); }
102
115
103 [tag="see"] { &:extend(.tag8); }
116 [tag="see"] { &:extend(.tag8); }
104 [tag="url"] { &:extend(.tag8); }
117 [tag="url"] { &:extend(.tag8); }
105
118
106
119
107 .perm_overriden {
120 .perm_overriden {
108 text-decoration: line-through;
121 text-decoration: line-through;
109 opacity: 0.6;
122 opacity: 0.6;
110 }
123 }
111
124
112 .perm_tag {
125 .perm_tag {
113 &:extend(.tag);
126 &:extend(.tag);
114
127
115 &.read {
128 &.read {
116 &:extend(.tag1);
129 &:extend(.tag1);
117 }
130 }
118 &.write {
131 &.write {
119 &:extend(.tag4);
132 &:extend(.tag4);
120 }
133 }
121 &.admin {
134 &.admin {
122 &:extend(.tag5);
135 &:extend(.tag5);
123 }
136 }
124 &.merge {
137 &.merge {
125 &:extend(.tag1);
138 &:extend(.tag1);
126 }
139 }
127 &.push {
140 &.push {
128 &:extend(.tag4);
141 &:extend(.tag4);
129 }
142 }
130 &.push_force {
143 &.push_force {
131 &:extend(.tag5);
144 &:extend(.tag5);
132 }
145 }
133 }
146 }
134
147
135 .phase-draft {
148 .phase-draft {
136 color: @color3
149 color: @color3
137 }
150 }
138
151
139 .phase-secret {
152 .phase-secret {
140 color:@grey3
153 color:@grey3
141 }
154 }
@@ -1,111 +1,110 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.mako"/>
2 <%inherit file="/base/base.mako"/>
3 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
3
4
4 <%def name="robots()">
5 <%def name="robots()">
5 %if c.gist.gist_type != 'public':
6 %if c.gist.gist_type != 'public':
6 <meta name="robots" content="noindex, nofollow">
7 <meta name="robots" content="noindex, nofollow">
7 %else:
8 %else:
8 ${parent.robots()}
9 ${parent.robots()}
9 %endif
10 %endif
10 </%def>
11 </%def>
11
12
12 <%def name="title()">
13 <%def name="title()">
13 ${_('Gist')} &middot; ${c.gist.gist_access_id}
14 ${_('Gist')} &middot; ${c.gist.gist_access_id}
14 %if c.rhodecode_name:
15 %if c.rhodecode_name:
15 &middot; ${h.branding(c.rhodecode_name)}
16 &middot; ${h.branding(c.rhodecode_name)}
16 %endif
17 %endif
17 </%def>
18 </%def>
18
19
19 <%def name="breadcrumbs_links()">
20 <%def name="breadcrumbs_links()">
20 ${_('Gist')} &middot; ${c.gist.gist_access_id}
21 ${_('Gist')} &middot; ${c.gist.gist_access_id}
21 </%def>
22 </%def>
22
23
23 <%def name="menu_bar_nav()">
24 <%def name="menu_bar_nav()">
24 ${self.menu_items(active='gists')}
25 ${self.menu_items(active='gists')}
25 </%def>
26 </%def>
26
27
27 <%def name="main()">
28 <%def name="main()">
28 <div class="box">
29 <div class="box">
29 <!-- box / title -->
30 <!-- box / title -->
30 <div class="title">
31 ${self.breadcrumbs()}
32 </div>
33
31
34 <div class="table">
32 <div class="table">
35 <div id="files_data">
33 <div id="files_data">
36 <div id="codeblock" class="codeblock">
34 <div id="codeblock" class="codeblock">
37 <div class="code-header">
35 <div class="code-header">
38 <div class="gist_url">
36 <div class="gist_url">
39 <code>
37 <div class="pull-left">
38 <code>
39 ${dt.gist_type(c.gist.gist_type)}
40 <span class="tag disabled">${c.gist.gist_access_id}</span>
40 ${c.gist.gist_url()} <span class="icon-clipboard clipboard-action" data-clipboard-text="${c.gist.gist_url()}" title="${_('Copy the url')}"></span>
41 ${c.gist.gist_url()} <span class="icon-clipboard clipboard-action" data-clipboard-text="${c.gist.gist_url()}" title="${_('Copy the url')}"></span>
41 </code>
42 </code>
42 </div>
43 <div class="stats">
44 %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id:
45 <div class="remove_gist">
46 ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)}
47 ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")}
48 ${h.end_form()}
49 </div>
43 </div>
50 %endif
44
51 <div class="buttons">
45 <div class="pull-right buttons">
52 ## only owner should see that
46 ## only owner should see that
53 <a href="#copySource" onclick="return false;" class="btn btn-mini icon-clipboard clipboard-action" data-clipboard-text="${c.files[0].content}">${_('Copy content')}</a>
47 <a href="#copySource" onclick="return false;" class="btn btn-mini icon-clipboard clipboard-action" data-clipboard-text="${c.files[0].content}">${_('Copy content')}</a>
54
48
55 %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id:
49 %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id:
56 ${h.link_to(_('Edit'), h.route_path('gist_edit', gist_id=c.gist.gist_access_id), class_="btn btn-mini")}
50 ${h.link_to(_('Edit'), h.route_path('gist_edit', gist_id=c.gist.gist_access_id), class_="btn btn-mini")}
57 %endif
51 %endif
58 ${h.link_to(_('Show as Raw'), h.route_path('gist_show_formatted', gist_id=c.gist.gist_access_id, revision='tip', format='raw'), class_="btn btn-mini")}
52 ${h.link_to(_('Show as Raw'), h.route_path('gist_show_formatted', gist_id=c.gist.gist_access_id, revision='tip', format='raw'), class_="btn btn-mini")}
53
54 %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id:
55 <div class="pull-right remove_gist">
56 ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)}
57 ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")}
58 ${h.end_form()}
59 </div>
60 %endif
59 </div>
61 </div>
60 <div class="left" >
62 </div>
61 %if c.gist.gist_type != 'public':
63
62 <span class="tag tag-ok disabled">${_('Private Gist')}</span>
64 <div class="gist-desc">
63 %endif
65 <code>${c.gist.gist_description}</code>
64 <span> ${c.gist.gist_description}</span>
66 </div>
65 <span>${_('Expires')}:
67
68 <div class="author">
69 <div title="${h.tooltip(c.file_last_commit.author)}">
70 ${self.gravatar_with_user(c.file_last_commit.author, 16, tooltip=True)} - ${_('created')} ${h.age_component(c.file_last_commit.date)},
71 ${_('expires')}:
66 %if c.gist.gist_expires == -1:
72 %if c.gist.gist_expires == -1:
67 ${_('never')}
73 ${_('never')}
68 %else:
74 %else:
69 ${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))}
75 ${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))}
70 %endif
76 %endif
71 </span>
77 </span>
72
73 </div>
74 </div>
75
76 <div class="author">
77 <div title="${h.tooltip(c.file_last_commit.author)}">
78 ${self.gravatar_with_user(c.file_last_commit.author, 16, tooltip=True)} - ${_('created')} ${h.age_component(c.file_last_commit.date)}
79 </div>
78 </div>
80
79
81 </div>
80 </div>
82 <div class="commit">${h.urlify_commit_message(c.file_last_commit.message, None)}</div>
81 <div class="commit">${h.urlify_commit_message(c.file_last_commit.message, None)}</div>
83 </div>
82 </div>
84
83
85 ## iterate over the files
84 ## iterate over the files
86 % for file in c.files:
85 % for gist_file in c.files:
87 <% renderer = c.render and h.renderer_from_filename(file.path, exclude=['.txt', '.TXT'])%>
86 <% renderer = c.render and h.renderer_from_filename(gist_file.path, exclude=['.txt', '.TXT'])%>
88 <!--
87 <!--
89 <div id="${h.FID('G', file.path)}" class="stats" >
88 <div id="${h.FID('G', gist_file.path)}" class="stats" >
90 <a href="${c.gist.gist_url()}">ΒΆ</a>
89 <a href="${c.gist.gist_url()}">ΒΆ</a>
91 <b >${file.path}</b>
90 <b >${gist_file.path}</b>
92 <div>
91 <div>
93 ${h.link_to(_('Show as raw'), h.route_path('gist_show_formatted_path', gist_id=c.gist.gist_access_id, revision=file.commit.raw_id, format='raw', f_path=file.path), class_="btn btn-mini")}
92 ${h.link_to(_('Show as raw'), h.route_path('gist_show_formatted_path', gist_id=c.gist.gist_access_id, revision=gist_file.commit.raw_id, format='raw', f_path=gist_file.path), class_="btn btn-mini")}
94 </div>
93 </div>
95 </div>
94 </div>
96 -->
95 -->
97 <div class="code-body textarea text-area editor">
96 <div class="code-body textarea text-area editor">
98 %if renderer:
97 %if renderer:
99 ${h.render(file.content, renderer=renderer)}
98 ${h.render(gist_file.content, renderer=renderer)}
100 %else:
99 %else:
101 ${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
100 ${h.pygmentize(gist_file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
102 %endif
101 %endif
103 </div>
102 </div>
104 %endfor
103 %endfor
105 </div>
104 </div>
106 </div>
105 </div>
107 </div>
106 </div>
108
107
109
108
110 </div>
109 </div>
111 </%def>
110 </%def>
@@ -1,469 +1,471 b''
1 ## DATA TABLE RE USABLE ELEMENTS
1 ## DATA TABLE RE USABLE ELEMENTS
2 ## usage:
2 ## usage:
3 ## <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
3 ## <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
4 <%namespace name="base" file="/base/base.mako"/>
4 <%namespace name="base" file="/base/base.mako"/>
5
5
6 <%def name="metatags_help()">
6 <%def name="metatags_help()">
7 <table>
7 <table>
8 <%
8 <%
9 example_tags = [
9 example_tags = [
10 ('state','[stable]'),
10 ('state','[stable]'),
11 ('state','[stale]'),
11 ('state','[stale]'),
12 ('state','[featured]'),
12 ('state','[featured]'),
13 ('state','[dev]'),
13 ('state','[dev]'),
14 ('state','[dead]'),
14 ('state','[dead]'),
15 ('state','[deprecated]'),
15 ('state','[deprecated]'),
16
16
17 ('label','[personal]'),
17 ('label','[personal]'),
18 ('generic','[v2.0.0]'),
18 ('generic','[v2.0.0]'),
19
19
20 ('lang','[lang =&gt; JavaScript]'),
20 ('lang','[lang =&gt; JavaScript]'),
21 ('license','[license =&gt; LicenseName]'),
21 ('license','[license =&gt; LicenseName]'),
22
22
23 ('ref','[requires =&gt; RepoName]'),
23 ('ref','[requires =&gt; RepoName]'),
24 ('ref','[recommends =&gt; GroupName]'),
24 ('ref','[recommends =&gt; GroupName]'),
25 ('ref','[conflicts =&gt; SomeName]'),
25 ('ref','[conflicts =&gt; SomeName]'),
26 ('ref','[base =&gt; SomeName]'),
26 ('ref','[base =&gt; SomeName]'),
27 ('url','[url =&gt; [linkName](https://rhodecode.com)]'),
27 ('url','[url =&gt; [linkName](https://rhodecode.com)]'),
28 ('see','[see =&gt; http://rhodecode.com]'),
28 ('see','[see =&gt; http://rhodecode.com]'),
29 ]
29 ]
30 %>
30 %>
31 % for tag_type, tag in example_tags:
31 % for tag_type, tag in example_tags:
32 <tr>
32 <tr>
33 <td>${tag|n}</td>
33 <td>${tag|n}</td>
34 <td>${h.style_metatag(tag_type, tag)|n}</td>
34 <td>${h.style_metatag(tag_type, tag)|n}</td>
35 </tr>
35 </tr>
36 % endfor
36 % endfor
37 </table>
37 </table>
38 </%def>
38 </%def>
39
39
40 <%def name="render_description(description, stylify_metatags)">
40 <%def name="render_description(description, stylify_metatags)">
41 <%
41 <%
42 tags = []
42 tags = []
43 if stylify_metatags:
43 if stylify_metatags:
44 tags, description = h.extract_metatags(description)
44 tags, description = h.extract_metatags(description)
45 %>
45 %>
46 % for tag_type, tag in tags:
46 % for tag_type, tag in tags:
47 ${h.style_metatag(tag_type, tag)|n,trim}
47 ${h.style_metatag(tag_type, tag)|n,trim}
48 % endfor
48 % endfor
49 <code style="white-space: pre-wrap">${description}</code>
49 <code style="white-space: pre-wrap">${description}</code>
50 </%def>
50 </%def>
51
51
52 ## REPOSITORY RENDERERS
52 ## REPOSITORY RENDERERS
53 <%def name="quick_menu(repo_name)">
53 <%def name="quick_menu(repo_name)">
54 <i class="icon-more"></i>
54 <i class="icon-more"></i>
55 <div class="menu_items_container hidden">
55 <div class="menu_items_container hidden">
56 <ul class="menu_items">
56 <ul class="menu_items">
57 <li>
57 <li>
58 <a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}">
58 <a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}">
59 <span>${_('Summary')}</span>
59 <span>${_('Summary')}</span>
60 </a>
60 </a>
61 </li>
61 </li>
62 <li>
62 <li>
63 <a title="${_('Commits')}" href="${h.route_path('repo_commits',repo_name=repo_name)}">
63 <a title="${_('Commits')}" href="${h.route_path('repo_commits',repo_name=repo_name)}">
64 <span>${_('Commits')}</span>
64 <span>${_('Commits')}</span>
65 </a>
65 </a>
66 </li>
66 </li>
67 <li>
67 <li>
68 <a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}">
68 <a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}">
69 <span>${_('Files')}</span>
69 <span>${_('Files')}</span>
70 </a>
70 </a>
71 </li>
71 </li>
72 <li>
72 <li>
73 <a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}">
73 <a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}">
74 <span>${_('Fork')}</span>
74 <span>${_('Fork')}</span>
75 </a>
75 </a>
76 </li>
76 </li>
77 </ul>
77 </ul>
78 </div>
78 </div>
79 </%def>
79 </%def>
80
80
81 <%def name="repo_name(name,rtype,rstate,private,archived,fork_of,short_name=False,admin=False)">
81 <%def name="repo_name(name,rtype,rstate,private,archived,fork_of,short_name=False,admin=False)">
82 <%
82 <%
83 def get_name(name,short_name=short_name):
83 def get_name(name,short_name=short_name):
84 if short_name:
84 if short_name:
85 return name.split('/')[-1]
85 return name.split('/')[-1]
86 else:
86 else:
87 return name
87 return name
88 %>
88 %>
89 <div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate">
89 <div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate">
90 ##NAME
90 ##NAME
91 <a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}">
91 <a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}">
92
92
93 ##TYPE OF REPO
93 ##TYPE OF REPO
94 %if h.is_hg(rtype):
94 %if h.is_hg(rtype):
95 <span title="${_('Mercurial repository')}"><i class="icon-hg" style="font-size: 14px;"></i></span>
95 <span title="${_('Mercurial repository')}"><i class="icon-hg" style="font-size: 14px;"></i></span>
96 %elif h.is_git(rtype):
96 %elif h.is_git(rtype):
97 <span title="${_('Git repository')}"><i class="icon-git" style="font-size: 14px"></i></span>
97 <span title="${_('Git repository')}"><i class="icon-git" style="font-size: 14px"></i></span>
98 %elif h.is_svn(rtype):
98 %elif h.is_svn(rtype):
99 <span title="${_('Subversion repository')}"><i class="icon-svn" style="font-size: 14px"></i></span>
99 <span title="${_('Subversion repository')}"><i class="icon-svn" style="font-size: 14px"></i></span>
100 %endif
100 %endif
101
101
102 ##PRIVATE/PUBLIC
102 ##PRIVATE/PUBLIC
103 %if private is True and c.visual.show_private_icon:
103 %if private is True and c.visual.show_private_icon:
104 <i class="icon-lock" title="${_('Private repository')}"></i>
104 <i class="icon-lock" title="${_('Private repository')}"></i>
105 %elif private is False and c.visual.show_public_icon:
105 %elif private is False and c.visual.show_public_icon:
106 <i class="icon-unlock-alt" title="${_('Public repository')}"></i>
106 <i class="icon-unlock-alt" title="${_('Public repository')}"></i>
107 %else:
107 %else:
108 <span></span>
108 <span></span>
109 %endif
109 %endif
110 ${get_name(name)}
110 ${get_name(name)}
111 </a>
111 </a>
112 %if fork_of:
112 %if fork_of:
113 <a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a>
113 <a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a>
114 %endif
114 %endif
115 %if rstate == 'repo_state_pending':
115 %if rstate == 'repo_state_pending':
116 <span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}">
116 <span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}">
117 (${_('creating...')})
117 (${_('creating...')})
118 </span>
118 </span>
119 %endif
119 %endif
120
120
121 </div>
121 </div>
122 </%def>
122 </%def>
123
123
124 <%def name="repo_desc(description, stylify_metatags)">
124 <%def name="repo_desc(description, stylify_metatags)">
125 <%
125 <%
126 tags, description = h.extract_metatags(description)
126 tags, description = h.extract_metatags(description)
127 %>
127 %>
128
128
129 <div class="truncate-wrap">
129 <div class="truncate-wrap">
130 % if stylify_metatags:
130 % if stylify_metatags:
131 % for tag_type, tag in tags:
131 % for tag_type, tag in tags:
132 ${h.style_metatag(tag_type, tag)|n}
132 ${h.style_metatag(tag_type, tag)|n}
133 % endfor
133 % endfor
134 % endif
134 % endif
135 ${description}
135 ${description}
136 </div>
136 </div>
137
137
138 </%def>
138 </%def>
139
139
140 <%def name="last_change(last_change)">
140 <%def name="last_change(last_change)">
141 ${h.age_component(last_change, time_is_local=True)}
141 ${h.age_component(last_change, time_is_local=True)}
142 </%def>
142 </%def>
143
143
144 <%def name="revision(repo_name, rev, commit_id, author, last_msg, commit_date)">
144 <%def name="revision(repo_name, rev, commit_id, author, last_msg, commit_date)">
145 <div>
145 <div>
146 %if rev >= 0:
146 %if rev >= 0:
147 <code><a class="tooltip-hovercard" data-hovercard-alt=${h.tooltip(last_msg)} data-hovercard-url="${h.route_path('hovercard_repo_commit', repo_name=repo_name, commit_id=commit_id)}" href="${h.route_path('repo_commit',repo_name=repo_name,commit_id=commit_id)}">${'r{}:{}'.format(rev,h.short_id(commit_id))}</a></code>
147 <code><a class="tooltip-hovercard" data-hovercard-alt=${h.tooltip(last_msg)} data-hovercard-url="${h.route_path('hovercard_repo_commit', repo_name=repo_name, commit_id=commit_id)}" href="${h.route_path('repo_commit',repo_name=repo_name,commit_id=commit_id)}">${'r{}:{}'.format(rev,h.short_id(commit_id))}</a></code>
148 %else:
148 %else:
149 ${_('No commits yet')}
149 ${_('No commits yet')}
150 %endif
150 %endif
151 </div>
151 </div>
152 </%def>
152 </%def>
153
153
154 <%def name="rss(name)">
154 <%def name="rss(name)">
155 %if c.rhodecode_user.username != h.DEFAULT_USER:
155 %if c.rhodecode_user.username != h.DEFAULT_USER:
156 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
156 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
157 %else:
157 %else:
158 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
158 <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
159 %endif
159 %endif
160 </%def>
160 </%def>
161
161
162 <%def name="atom(name)">
162 <%def name="atom(name)">
163 %if c.rhodecode_user.username != h.DEFAULT_USER:
163 %if c.rhodecode_user.username != h.DEFAULT_USER:
164 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
164 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a>
165 %else:
165 %else:
166 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
166 <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a>
167 %endif
167 %endif
168 </%def>
168 </%def>
169
169
170 <%def name="repo_actions(repo_name, super_user=True)">
170 <%def name="repo_actions(repo_name, super_user=True)">
171 <div>
171 <div>
172 <div class="grid_edit">
172 <div class="grid_edit">
173 <a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}">
173 <a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}">
174 Edit
174 Edit
175 </a>
175 </a>
176 </div>
176 </div>
177 <div class="grid_delete">
177 <div class="grid_delete">
178 ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), request=request)}
178 ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), request=request)}
179 ${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger",
179 ${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger",
180 onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
180 onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")}
181 ${h.end_form()}
181 ${h.end_form()}
182 </div>
182 </div>
183 </div>
183 </div>
184 </%def>
184 </%def>
185
185
186 <%def name="repo_state(repo_state)">
186 <%def name="repo_state(repo_state)">
187 <div>
187 <div>
188 %if repo_state == 'repo_state_pending':
188 %if repo_state == 'repo_state_pending':
189 <div class="tag tag4">${_('Creating')}</div>
189 <div class="tag tag4">${_('Creating')}</div>
190 %elif repo_state == 'repo_state_created':
190 %elif repo_state == 'repo_state_created':
191 <div class="tag tag1">${_('Created')}</div>
191 <div class="tag tag1">${_('Created')}</div>
192 %else:
192 %else:
193 <div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div>
193 <div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div>
194 %endif
194 %endif
195 </div>
195 </div>
196 </%def>
196 </%def>
197
197
198
198
199 ## REPO GROUP RENDERERS
199 ## REPO GROUP RENDERERS
200 <%def name="quick_repo_group_menu(repo_group_name)">
200 <%def name="quick_repo_group_menu(repo_group_name)">
201 <i class="icon-more"></i>
201 <i class="icon-more"></i>
202 <div class="menu_items_container hidden">
202 <div class="menu_items_container hidden">
203 <ul class="menu_items">
203 <ul class="menu_items">
204 <li>
204 <li>
205 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a>
205 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a>
206 </li>
206 </li>
207
207
208 </ul>
208 </ul>
209 </div>
209 </div>
210 </%def>
210 </%def>
211
211
212 <%def name="repo_group_name(repo_group_name, children_groups=None)">
212 <%def name="repo_group_name(repo_group_name, children_groups=None)">
213 <div>
213 <div>
214 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">
214 <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">
215 <i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i>
215 <i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i>
216 %if children_groups:
216 %if children_groups:
217 ${h.literal(' &raquo; '.join(children_groups))}
217 ${h.literal(' &raquo; '.join(children_groups))}
218 %else:
218 %else:
219 ${repo_group_name}
219 ${repo_group_name}
220 %endif
220 %endif
221 </a>
221 </a>
222 </div>
222 </div>
223 </%def>
223 </%def>
224
224
225 <%def name="repo_group_desc(description, personal, stylify_metatags)">
225 <%def name="repo_group_desc(description, personal, stylify_metatags)">
226
226
227 <%
227 <%
228 if stylify_metatags:
228 if stylify_metatags:
229 tags, description = h.extract_metatags(description)
229 tags, description = h.extract_metatags(description)
230 %>
230 %>
231
231
232 <div class="truncate-wrap">
232 <div class="truncate-wrap">
233 % if personal:
233 % if personal:
234 <div class="metatag" tag="personal">${_('personal')}</div>
234 <div class="metatag" tag="personal">${_('personal')}</div>
235 % endif
235 % endif
236
236
237 % if stylify_metatags:
237 % if stylify_metatags:
238 % for tag_type, tag in tags:
238 % for tag_type, tag in tags:
239 ${h.style_metatag(tag_type, tag)|n}
239 ${h.style_metatag(tag_type, tag)|n}
240 % endfor
240 % endfor
241 % endif
241 % endif
242 ${description}
242 ${description}
243 </div>
243 </div>
244
244
245 </%def>
245 </%def>
246
246
247 <%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)">
247 <%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)">
248 <div class="grid_edit">
248 <div class="grid_edit">
249 <a href="${h.route_path('edit_repo_group',repo_group_name=repo_group_name)}" title="${_('Edit')}">Edit</a>
249 <a href="${h.route_path('edit_repo_group',repo_group_name=repo_group_name)}" title="${_('Edit')}">Edit</a>
250 </div>
250 </div>
251 <div class="grid_delete">
251 <div class="grid_delete">
252 ${h.secure_form(h.route_path('edit_repo_group_advanced_delete', repo_group_name=repo_group_name), request=request)}
252 ${h.secure_form(h.route_path('edit_repo_group_advanced_delete', repo_group_name=repo_group_name), request=request)}
253 ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger",
253 ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger",
254 onclick="return confirm('"+_ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")}
254 onclick="return confirm('"+_ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")}
255 ${h.end_form()}
255 ${h.end_form()}
256 </div>
256 </div>
257 </%def>
257 </%def>
258
258
259
259
260 <%def name="user_actions(user_id, username)">
260 <%def name="user_actions(user_id, username)">
261 <div class="grid_edit">
261 <div class="grid_edit">
262 <a href="${h.route_path('user_edit',user_id=user_id)}" title="${_('Edit')}">
262 <a href="${h.route_path('user_edit',user_id=user_id)}" title="${_('Edit')}">
263 ${_('Edit')}
263 ${_('Edit')}
264 </a>
264 </a>
265 </div>
265 </div>
266 <div class="grid_delete">
266 <div class="grid_delete">
267 ${h.secure_form(h.route_path('user_delete', user_id=user_id), request=request)}
267 ${h.secure_form(h.route_path('user_delete', user_id=user_id), request=request)}
268 ${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger",
268 ${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger",
269 onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")}
269 onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")}
270 ${h.end_form()}
270 ${h.end_form()}
271 </div>
271 </div>
272 </%def>
272 </%def>
273
273
274 <%def name="user_group_actions(user_group_id, user_group_name)">
274 <%def name="user_group_actions(user_group_id, user_group_name)">
275 <div class="grid_edit">
275 <div class="grid_edit">
276 <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a>
276 <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a>
277 </div>
277 </div>
278 <div class="grid_delete">
278 <div class="grid_delete">
279 ${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), request=request)}
279 ${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), request=request)}
280 ${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger",
280 ${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger",
281 onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")}
281 onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")}
282 ${h.end_form()}
282 ${h.end_form()}
283 </div>
283 </div>
284 </%def>
284 </%def>
285
285
286
286
287 <%def name="user_name(user_id, username)">
287 <%def name="user_name(user_id, username)">
288 ${h.link_to(h.person(username, 'username_or_name_or_email'), h.route_path('user_edit', user_id=user_id))}
288 ${h.link_to(h.person(username, 'username_or_name_or_email'), h.route_path('user_edit', user_id=user_id))}
289 </%def>
289 </%def>
290
290
291 <%def name="user_profile(username)">
291 <%def name="user_profile(username)">
292 ${base.gravatar_with_user(username, 16, tooltip=True)}
292 ${base.gravatar_with_user(username, 16, tooltip=True)}
293 </%def>
293 </%def>
294
294
295 <%def name="user_group_name(user_group_name)">
295 <%def name="user_group_name(user_group_name)">
296 <div>
296 <div>
297 <i class="icon-user-group" title="${_('User group')}"></i>
297 <i class="icon-user-group" title="${_('User group')}"></i>
298 ${h.link_to_group(user_group_name)}
298 ${h.link_to_group(user_group_name)}
299 </div>
299 </div>
300 </%def>
300 </%def>
301
301
302
302
303 ## GISTS
303 ## GISTS
304
304
305 <%def name="gist_gravatar(full_contact)">
305 <%def name="gist_gravatar(full_contact)">
306 <div class="gist_gravatar">
306 <div class="gist_gravatar">
307 ${base.gravatar(full_contact, 30)}
307 ${base.gravatar(full_contact, 30)}
308 </div>
308 </div>
309 </%def>
309 </%def>
310
310
311 <%def name="gist_access_id(gist_access_id, full_contact)">
311 <%def name="gist_access_id(gist_access_id, full_contact)">
312 <div>
312 <div>
313 <b>
313 <b>
314 <a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a>
314 <a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a>
315 </b>
315 </b>
316 </div>
316 </div>
317 </%def>
317 </%def>
318
318
319 <%def name="gist_author(full_contact, created_on, expires)">
319 <%def name="gist_author(full_contact, created_on, expires)">
320 ${base.gravatar_with_user(full_contact, 16, tooltip=True)}
320 ${base.gravatar_with_user(full_contact, 16, tooltip=True)}
321 </%def>
321 </%def>
322
322
323
323
324 <%def name="gist_created(created_on)">
324 <%def name="gist_created(created_on)">
325 <div class="created">
325 <div class="created">
326 ${h.age_component(created_on, time_is_local=True)}
326 ${h.age_component(created_on, time_is_local=True)}
327 </div>
327 </div>
328 </%def>
328 </%def>
329
329
330 <%def name="gist_expires(expires)">
330 <%def name="gist_expires(expires)">
331 <div class="created">
331 <div class="created">
332 %if expires == -1:
332 %if expires == -1:
333 ${_('never')}
333 ${_('never')}
334 %else:
334 %else:
335 ${h.age_component(h.time_to_utcdatetime(expires))}
335 ${h.age_component(h.time_to_utcdatetime(expires))}
336 %endif
336 %endif
337 </div>
337 </div>
338 </%def>
338 </%def>
339
339
340 <%def name="gist_type(gist_type)">
340 <%def name="gist_type(gist_type)">
341 %if gist_type != 'public':
341 %if gist_type == 'public':
342 <div class="tag">${_('Private')}</div>
342 <span class="tag tag-gist-public disabled">${_('Public Gist')}</span>
343 %else:
344 <span class="tag tag-gist-private disabled">${_('Private Gist')}</span>
343 %endif
345 %endif
344 </%def>
346 </%def>
345
347
346 <%def name="gist_description(gist_description)">
348 <%def name="gist_description(gist_description)">
347 ${gist_description}
349 ${gist_description}
348 </%def>
350 </%def>
349
351
350
352
351 ## PULL REQUESTS GRID RENDERERS
353 ## PULL REQUESTS GRID RENDERERS
352
354
353 <%def name="pullrequest_target_repo(repo_name)">
355 <%def name="pullrequest_target_repo(repo_name)">
354 <div class="truncate">
356 <div class="truncate">
355 ${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))}
357 ${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))}
356 </div>
358 </div>
357 </%def>
359 </%def>
358
360
359 <%def name="pullrequest_status(status)">
361 <%def name="pullrequest_status(status)">
360 <i class="icon-circle review-status-${status}"></i>
362 <i class="icon-circle review-status-${status}"></i>
361 </%def>
363 </%def>
362
364
363 <%def name="pullrequest_title(title, description)">
365 <%def name="pullrequest_title(title, description)">
364 ${title}
366 ${title}
365 </%def>
367 </%def>
366
368
367 <%def name="pullrequest_comments(comments_nr)">
369 <%def name="pullrequest_comments(comments_nr)">
368 <i class="icon-comment"></i> ${comments_nr}
370 <i class="icon-comment"></i> ${comments_nr}
369 </%def>
371 </%def>
370
372
371 <%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)">
373 <%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)">
372 <a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}">
374 <a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}">
373 % if short:
375 % if short:
374 !${pull_request_id}
376 !${pull_request_id}
375 % else:
377 % else:
376 ${_('Pull request !{}').format(pull_request_id)}
378 ${_('Pull request !{}').format(pull_request_id)}
377 % endif
379 % endif
378 </a>
380 </a>
379 </%def>
381 </%def>
380
382
381 <%def name="pullrequest_updated_on(updated_on)">
383 <%def name="pullrequest_updated_on(updated_on)">
382 ${h.age_component(h.time_to_utcdatetime(updated_on))}
384 ${h.age_component(h.time_to_utcdatetime(updated_on))}
383 </%def>
385 </%def>
384
386
385 <%def name="pullrequest_author(full_contact)">
387 <%def name="pullrequest_author(full_contact)">
386 ${base.gravatar_with_user(full_contact, 16, tooltip=True)}
388 ${base.gravatar_with_user(full_contact, 16, tooltip=True)}
387 </%def>
389 </%def>
388
390
389
391
390 ## ARTIFACT RENDERERS
392 ## ARTIFACT RENDERERS
391 <%def name="repo_artifact_name(repo_name, file_uid, artifact_display_name)">
393 <%def name="repo_artifact_name(repo_name, file_uid, artifact_display_name)">
392 <a href="${h.route_path('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}">
394 <a href="${h.route_path('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}">
393 ${artifact_display_name or '_EMPTY_NAME_'}
395 ${artifact_display_name or '_EMPTY_NAME_'}
394 </a>
396 </a>
395 </%def>
397 </%def>
396
398
397 <%def name="repo_artifact_uid(repo_name, file_uid)">
399 <%def name="repo_artifact_uid(repo_name, file_uid)">
398 <code>${h.shorter(file_uid, size=24, prefix=True)}</code>
400 <code>${h.shorter(file_uid, size=24, prefix=True)}</code>
399 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${h.route_url('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}" title="${_('Copy the full url')}"></i>
401 <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${h.route_url('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}" title="${_('Copy the full url')}"></i>
400 </%def>
402 </%def>
401
403
402 <%def name="repo_artifact_sha256(artifact_sha256)">
404 <%def name="repo_artifact_sha256(artifact_sha256)">
403 <div class="code">${h.shorter(artifact_sha256, 12)}<i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${artifact_sha256}" title="${_('Copy the sha256 ({})').format(artifact_sha256)}"></i></div>
405 <div class="code">${h.shorter(artifact_sha256, 12)}<i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${artifact_sha256}" title="${_('Copy the sha256 ({})').format(artifact_sha256)}"></i></div>
404 </%def>
406 </%def>
405
407
406 <%def name="repo_artifact_actions(repo_name, file_store_id, file_uid)">
408 <%def name="repo_artifact_actions(repo_name, file_store_id, file_uid)">
407 ## <div class="grid_edit">
409 ## <div class="grid_edit">
408 ## <a href="#Edit" title="${_('Edit')}">${_('Edit')}</a>
410 ## <a href="#Edit" title="${_('Edit')}">${_('Edit')}</a>
409 ## </div>
411 ## </div>
410 <div class="grid_edit">
412 <div class="grid_edit">
411 <a href="${h.route_path('repo_artifacts_info', repo_name=repo_name, uid=file_store_id)}" title="${_('Info')}">${_('Info')}</a>
413 <a href="${h.route_path('repo_artifacts_info', repo_name=repo_name, uid=file_store_id)}" title="${_('Info')}">${_('Info')}</a>
412 </div>
414 </div>
413 % if h.HasRepoPermissionAny('repository.admin')(c.repo_name):
415 % if h.HasRepoPermissionAny('repository.admin')(c.repo_name):
414 <div class="grid_delete">
416 <div class="grid_delete">
415 ${h.secure_form(h.route_path('repo_artifacts_delete', repo_name=repo_name, uid=file_store_id), request=request)}
417 ${h.secure_form(h.route_path('repo_artifacts_delete', repo_name=repo_name, uid=file_store_id), request=request)}
416 ${h.submit('remove_',_('Delete'),id="remove_artifact_%s" % file_store_id, class_="btn btn-link btn-danger",
418 ${h.submit('remove_',_('Delete'),id="remove_artifact_%s" % file_store_id, class_="btn btn-link btn-danger",
417 onclick="return confirm('"+_('Confirm to delete this artifact: %s') % file_uid+"');")}
419 onclick="return confirm('"+_('Confirm to delete this artifact: %s') % file_uid+"');")}
418 ${h.end_form()}
420 ${h.end_form()}
419 </div>
421 </div>
420 % endif
422 % endif
421 </%def>
423 </%def>
422
424
423 <%def name="markup_form(form_id, form_text='', help_text=None)">
425 <%def name="markup_form(form_id, form_text='', help_text=None)">
424
426
425 <div class="markup-form">
427 <div class="markup-form">
426 <div class="markup-form-area">
428 <div class="markup-form-area">
427 <div class="markup-form-area-header">
429 <div class="markup-form-area-header">
428 <ul class="nav-links clearfix">
430 <ul class="nav-links clearfix">
429 <li class="active">
431 <li class="active">
430 <a href="#edit-text" tabindex="-1" id="edit-btn_${form_id}">${_('Write')}</a>
432 <a href="#edit-text" tabindex="-1" id="edit-btn_${form_id}">${_('Write')}</a>
431 </li>
433 </li>
432 <li class="">
434 <li class="">
433 <a href="#preview-text" tabindex="-1" id="preview-btn_${form_id}">${_('Preview')}</a>
435 <a href="#preview-text" tabindex="-1" id="preview-btn_${form_id}">${_('Preview')}</a>
434 </li>
436 </li>
435 </ul>
437 </ul>
436 </div>
438 </div>
437
439
438 <div class="markup-form-area-write" style="display: block;">
440 <div class="markup-form-area-write" style="display: block;">
439 <div id="edit-container_${form_id}">
441 <div id="edit-container_${form_id}">
440 <textarea id="${form_id}" name="${form_id}" class="comment-block-ta ac-input">${form_text if form_text else ''}</textarea>
442 <textarea id="${form_id}" name="${form_id}" class="comment-block-ta ac-input">${form_text if form_text else ''}</textarea>
441 </div>
443 </div>
442 <div id="preview-container_${form_id}" class="clearfix" style="display: none;">
444 <div id="preview-container_${form_id}" class="clearfix" style="display: none;">
443 <div id="preview-box_${form_id}" class="preview-box"></div>
445 <div id="preview-box_${form_id}" class="preview-box"></div>
444 </div>
446 </div>
445 </div>
447 </div>
446
448
447 <div class="markup-form-area-footer">
449 <div class="markup-form-area-footer">
448 <div class="toolbar">
450 <div class="toolbar">
449 <div class="toolbar-text">
451 <div class="toolbar-text">
450 ${(_('Parsed using %s syntax') % (
452 ${(_('Parsed using %s syntax') % (
451 ('<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
453 ('<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
452 )
454 )
453 )|n}
455 )|n}
454 </div>
456 </div>
455 </div>
457 </div>
456 </div>
458 </div>
457 </div>
459 </div>
458
460
459 <div class="markup-form-footer">
461 <div class="markup-form-footer">
460 % if help_text:
462 % if help_text:
461 <span class="help-block">${help_text}</span>
463 <span class="help-block">${help_text}</span>
462 % endif
464 % endif
463 </div>
465 </div>
464 </div>
466 </div>
465 <script type="text/javascript">
467 <script type="text/javascript">
466 new MarkupForm('${form_id}');
468 new MarkupForm('${form_id}');
467 </script>
469 </script>
468
470
469 </%def>
471 </%def>
General Comments 0
You need to be logged in to leave comments. Login now