##// END OF EJS Templates
gists: add copy url to clipboard helper icon.
marcink -
r2126:a8550f9e default
parent child Browse files
Show More
@@ -1,1146 +1,1150 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 .compare_view_files {
21 .compare_view_files {
22
22
23 .diff-container {
23 .diff-container {
24
24
25 .diffblock {
25 .diffblock {
26 margin-bottom: 0;
26 margin-bottom: 0;
27 }
27 }
28 }
28 }
29 }
29 }
30
30
31 div.diffblock .sidebyside {
31 div.diffblock .sidebyside {
32 background: #ffffff;
32 background: #ffffff;
33 }
33 }
34
34
35 div.diffblock {
35 div.diffblock {
36 overflow-x: auto;
36 overflow-x: auto;
37 overflow-y: hidden;
37 overflow-y: hidden;
38 clear: both;
38 clear: both;
39 padding: 0px;
39 padding: 0px;
40 background: @grey6;
40 background: @grey6;
41 border: @border-thickness solid @grey5;
41 border: @border-thickness solid @grey5;
42 -webkit-border-radius: @border-radius @border-radius 0px 0px;
42 -webkit-border-radius: @border-radius @border-radius 0px 0px;
43 border-radius: @border-radius @border-radius 0px 0px;
43 border-radius: @border-radius @border-radius 0px 0px;
44
44
45
45
46 .comments-number {
46 .comments-number {
47 float: right;
47 float: right;
48 }
48 }
49
49
50 // BEGIN CODE-HEADER STYLES
50 // BEGIN CODE-HEADER STYLES
51
51
52 .code-header {
52 .code-header {
53 background: @grey6;
53 background: @grey6;
54 padding: 10px 0 10px 0;
54 padding: 10px 0 10px 0;
55 height: auto;
55 height: auto;
56 width: 100%;
56 width: 100%;
57
57
58 .hash {
58 .hash {
59 float: left;
59 float: left;
60 padding: 2px 0 0 2px;
60 padding: 2px 0 0 2px;
61 }
61 }
62
62
63 .date {
63 .date {
64 float: left;
64 float: left;
65 text-transform: uppercase;
65 text-transform: uppercase;
66 padding: 4px 0px 0px 2px;
66 padding: 4px 0px 0px 2px;
67 }
67 }
68
68
69 div {
69 div {
70 margin-left: 4px;
70 margin-left: 4px;
71 }
71 }
72
72
73 div.compare_header {
73 div.compare_header {
74 min-height: 40px;
74 min-height: 40px;
75 margin: 0;
75 margin: 0;
76 padding: 0 @padding;
76 padding: 0 @padding;
77
77
78 .drop-menu {
78 .drop-menu {
79 float:left;
79 float:left;
80 display: block;
80 display: block;
81 margin:0 0 @padding 0;
81 margin:0 0 @padding 0;
82 }
82 }
83
83
84 .compare-label {
84 .compare-label {
85 float: left;
85 float: left;
86 clear: both;
86 clear: both;
87 display: inline-block;
87 display: inline-block;
88 min-width: 5em;
88 min-width: 5em;
89 margin: 0;
89 margin: 0;
90 padding: @button-padding @button-padding @button-padding 0;
90 padding: @button-padding @button-padding @button-padding 0;
91 font-family: @text-semibold;
91 font-family: @text-semibold;
92 }
92 }
93
93
94 .compare-buttons {
94 .compare-buttons {
95 float: left;
95 float: left;
96 margin: 0;
96 margin: 0;
97 padding: 0 0 @padding;
97 padding: 0 0 @padding;
98
98
99 .btn {
99 .btn {
100 margin: 0 @padding 0 0;
100 margin: 0 @padding 0 0;
101 }
101 }
102 }
102 }
103 }
103 }
104
104
105 }
105 }
106
106
107 .parents {
107 .parents {
108 float: left;
108 float: left;
109 width: 100px;
109 width: 100px;
110 font-weight: 400;
110 font-weight: 400;
111 vertical-align: middle;
111 vertical-align: middle;
112 padding: 0px 2px 0px 2px;
112 padding: 0px 2px 0px 2px;
113 background-color: @grey6;
113 background-color: @grey6;
114
114
115 #parent_link {
115 #parent_link {
116 margin: 00px 2px;
116 margin: 00px 2px;
117
117
118 &.double {
118 &.double {
119 margin: 0px 2px;
119 margin: 0px 2px;
120 }
120 }
121
121
122 &.disabled{
122 &.disabled{
123 margin-right: @padding;
123 margin-right: @padding;
124 }
124 }
125 }
125 }
126 }
126 }
127
127
128 .children {
128 .children {
129 float: right;
129 float: right;
130 width: 100px;
130 width: 100px;
131 font-weight: 400;
131 font-weight: 400;
132 vertical-align: middle;
132 vertical-align: middle;
133 text-align: right;
133 text-align: right;
134 padding: 0px 2px 0px 2px;
134 padding: 0px 2px 0px 2px;
135 background-color: @grey6;
135 background-color: @grey6;
136
136
137 #child_link {
137 #child_link {
138 margin: 0px 2px;
138 margin: 0px 2px;
139
139
140 &.double {
140 &.double {
141 margin: 0px 2px;
141 margin: 0px 2px;
142 }
142 }
143
143
144 &.disabled{
144 &.disabled{
145 margin-right: @padding;
145 margin-right: @padding;
146 }
146 }
147 }
147 }
148 }
148 }
149
149
150 .changeset_header {
150 .changeset_header {
151 height: 16px;
151 height: 16px;
152
152
153 & > div{
153 & > div{
154 margin-right: @padding;
154 margin-right: @padding;
155 }
155 }
156 }
156 }
157
157
158 .changeset_file {
158 .changeset_file {
159 text-align: left;
159 text-align: left;
160 float: left;
160 float: left;
161 padding: 0;
161 padding: 0;
162
162
163 a{
163 a{
164 display: inline-block;
164 display: inline-block;
165 margin-right: 0.5em;
165 margin-right: 0.5em;
166 }
166 }
167
167
168 #selected_mode{
168 #selected_mode{
169 margin-left: 0;
169 margin-left: 0;
170 }
170 }
171 }
171 }
172
172
173 .diff-menu-wrapper {
173 .diff-menu-wrapper {
174 float: left;
174 float: left;
175 }
175 }
176
176
177 .diff-menu {
177 .diff-menu {
178 position: absolute;
178 position: absolute;
179 background: none repeat scroll 0 0 #FFFFFF;
179 background: none repeat scroll 0 0 #FFFFFF;
180 border-color: #003367 @grey3 @grey3;
180 border-color: #003367 @grey3 @grey3;
181 border-right: 1px solid @grey3;
181 border-right: 1px solid @grey3;
182 border-style: solid solid solid;
182 border-style: solid solid solid;
183 border-width: @border-thickness;
183 border-width: @border-thickness;
184 box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2);
184 box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2);
185 margin-top: 5px;
185 margin-top: 5px;
186 margin-left: 1px;
186 margin-left: 1px;
187 }
187 }
188
188
189 .diff-actions, .editor-actions {
189 .diff-actions, .editor-actions {
190 float: left;
190 float: left;
191
191
192 input{
192 input{
193 margin: 0 0.5em 0 0;
193 margin: 0 0.5em 0 0;
194 }
194 }
195 }
195 }
196
196
197 // END CODE-HEADER STYLES
197 // END CODE-HEADER STYLES
198
198
199 // BEGIN CODE-BODY STYLES
199 // BEGIN CODE-BODY STYLES
200
200
201 .code-body {
201 .code-body {
202 padding: 0;
202 padding: 0;
203 background-color: #ffffff;
203 background-color: #ffffff;
204 position: relative;
204 position: relative;
205 max-width: none;
205 max-width: none;
206 box-sizing: border-box;
206 box-sizing: border-box;
207 // TODO: johbo: Parent has overflow: auto, this forces the child here
207 // TODO: johbo: Parent has overflow: auto, this forces the child here
208 // to have the intended size and to scroll. Should be simplified.
208 // to have the intended size and to scroll. Should be simplified.
209 width: 100%;
209 width: 100%;
210 overflow-x: auto;
210 overflow-x: auto;
211 }
211 }
212
212
213 pre.raw {
213 pre.raw {
214 background: white;
214 background: white;
215 color: @grey1;
215 color: @grey1;
216 }
216 }
217 // END CODE-BODY STYLES
217 // END CODE-BODY STYLES
218
218
219 }
219 }
220
220
221
221
222 table.code-difftable {
222 table.code-difftable {
223 border-collapse: collapse;
223 border-collapse: collapse;
224 width: 99%;
224 width: 99%;
225 border-radius: 0px !important;
225 border-radius: 0px !important;
226
226
227 td {
227 td {
228 padding: 0 !important;
228 padding: 0 !important;
229 background: none !important;
229 background: none !important;
230 border: 0 !important;
230 border: 0 !important;
231 }
231 }
232
232
233 .context {
233 .context {
234 background: none repeat scroll 0 0 #DDE7EF;
234 background: none repeat scroll 0 0 #DDE7EF;
235 }
235 }
236
236
237 .add {
237 .add {
238 background: none repeat scroll 0 0 #DDFFDD;
238 background: none repeat scroll 0 0 #DDFFDD;
239
239
240 ins {
240 ins {
241 background: none repeat scroll 0 0 #AAFFAA;
241 background: none repeat scroll 0 0 #AAFFAA;
242 text-decoration: none;
242 text-decoration: none;
243 }
243 }
244 }
244 }
245
245
246 .del {
246 .del {
247 background: none repeat scroll 0 0 #FFDDDD;
247 background: none repeat scroll 0 0 #FFDDDD;
248
248
249 del {
249 del {
250 background: none repeat scroll 0 0 #FFAAAA;
250 background: none repeat scroll 0 0 #FFAAAA;
251 text-decoration: none;
251 text-decoration: none;
252 }
252 }
253 }
253 }
254
254
255 /** LINE NUMBERS **/
255 /** LINE NUMBERS **/
256 .lineno {
256 .lineno {
257 padding-left: 2px !important;
257 padding-left: 2px !important;
258 padding-right: 2px;
258 padding-right: 2px;
259 text-align: right;
259 text-align: right;
260 width: 32px;
260 width: 32px;
261 -moz-user-select: none;
261 -moz-user-select: none;
262 -webkit-user-select: none;
262 -webkit-user-select: none;
263 border-right: @border-thickness solid @grey5 !important;
263 border-right: @border-thickness solid @grey5 !important;
264 border-left: 0px solid #CCC !important;
264 border-left: 0px solid #CCC !important;
265 border-top: 0px solid #CCC !important;
265 border-top: 0px solid #CCC !important;
266 border-bottom: none !important;
266 border-bottom: none !important;
267
267
268 a {
268 a {
269 &:extend(pre);
269 &:extend(pre);
270 text-align: right;
270 text-align: right;
271 padding-right: 2px;
271 padding-right: 2px;
272 cursor: pointer;
272 cursor: pointer;
273 display: block;
273 display: block;
274 width: 32px;
274 width: 32px;
275 }
275 }
276 }
276 }
277
277
278 .context {
278 .context {
279 cursor: auto;
279 cursor: auto;
280 &:extend(pre);
280 &:extend(pre);
281 }
281 }
282
282
283 .lineno-inline {
283 .lineno-inline {
284 background: none repeat scroll 0 0 #FFF !important;
284 background: none repeat scroll 0 0 #FFF !important;
285 padding-left: 2px;
285 padding-left: 2px;
286 padding-right: 2px;
286 padding-right: 2px;
287 text-align: right;
287 text-align: right;
288 width: 30px;
288 width: 30px;
289 -moz-user-select: none;
289 -moz-user-select: none;
290 -webkit-user-select: none;
290 -webkit-user-select: none;
291 }
291 }
292
292
293 /** CODE **/
293 /** CODE **/
294 .code {
294 .code {
295 display: block;
295 display: block;
296 width: 100%;
296 width: 100%;
297
297
298 td {
298 td {
299 margin: 0;
299 margin: 0;
300 padding: 0;
300 padding: 0;
301 }
301 }
302
302
303 pre {
303 pre {
304 margin: 0;
304 margin: 0;
305 padding: 0;
305 padding: 0;
306 margin-left: .5em;
306 margin-left: .5em;
307 }
307 }
308 }
308 }
309 }
309 }
310
310
311
311
312 // Comments
312 // Comments
313
313
314 div.comment:target {
314 div.comment:target {
315 border-left: 6px solid @comment-highlight-color !important;
315 border-left: 6px solid @comment-highlight-color !important;
316 padding-left: 3px;
316 padding-left: 3px;
317 margin-left: -9px;
317 margin-left: -9px;
318 }
318 }
319
319
320 //TODO: anderson: can't get an absolute number out of anything, so had to put the
320 //TODO: anderson: can't get an absolute number out of anything, so had to put the
321 //current values that might change. But to make it clear I put as a calculation
321 //current values that might change. But to make it clear I put as a calculation
322 @comment-max-width: 1065px;
322 @comment-max-width: 1065px;
323 @pr-extra-margin: 34px;
323 @pr-extra-margin: 34px;
324 @pr-border-spacing: 4px;
324 @pr-border-spacing: 4px;
325 @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing;
325 @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing;
326
326
327 // Pull Request
327 // Pull Request
328 .cs_files .code-difftable {
328 .cs_files .code-difftable {
329 border: @border-thickness solid @grey5; //borders only on PRs
329 border: @border-thickness solid @grey5; //borders only on PRs
330
330
331 .comment-inline-form,
331 .comment-inline-form,
332 div.comment {
332 div.comment {
333 width: @pr-comment-width;
333 width: @pr-comment-width;
334 }
334 }
335 }
335 }
336
336
337 // Changeset
337 // Changeset
338 .code-difftable {
338 .code-difftable {
339 .comment-inline-form,
339 .comment-inline-form,
340 div.comment {
340 div.comment {
341 width: @comment-max-width;
341 width: @comment-max-width;
342 }
342 }
343 }
343 }
344
344
345 //Style page
345 //Style page
346 @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding;
346 @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding;
347 #style-page .code-difftable{
347 #style-page .code-difftable{
348 .comment-inline-form,
348 .comment-inline-form,
349 div.comment {
349 div.comment {
350 width: @comment-max-width - @style-extra-margin;
350 width: @comment-max-width - @style-extra-margin;
351 }
351 }
352 }
352 }
353
353
354 #context-bar > h2 {
354 #context-bar > h2 {
355 font-size: 20px;
355 font-size: 20px;
356 }
356 }
357
357
358 #context-bar > h2> a {
358 #context-bar > h2> a {
359 font-size: 20px;
359 font-size: 20px;
360 }
360 }
361 // end of defaults
361 // end of defaults
362
362
363 .file_diff_buttons {
363 .file_diff_buttons {
364 padding: 0 0 @padding;
364 padding: 0 0 @padding;
365
365
366 .drop-menu {
366 .drop-menu {
367 float: left;
367 float: left;
368 margin: 0 @padding 0 0;
368 margin: 0 @padding 0 0;
369 }
369 }
370 .btn {
370 .btn {
371 margin: 0 @padding 0 0;
371 margin: 0 @padding 0 0;
372 }
372 }
373 }
373 }
374
374
375 .code-body.textarea.editor {
375 .code-body.textarea.editor {
376 max-width: none;
376 max-width: none;
377 padding: 15px;
377 padding: 15px;
378 }
378 }
379
379
380 td.injected_diff{
380 td.injected_diff{
381 max-width: 1178px;
381 max-width: 1178px;
382 overflow-x: auto;
382 overflow-x: auto;
383 overflow-y: hidden;
383 overflow-y: hidden;
384
384
385 div.diff-container,
385 div.diff-container,
386 div.diffblock{
386 div.diffblock{
387 max-width: 100%;
387 max-width: 100%;
388 }
388 }
389
389
390 div.code-body {
390 div.code-body {
391 max-width: 1124px;
391 max-width: 1124px;
392 overflow-x: auto;
392 overflow-x: auto;
393 overflow-y: hidden;
393 overflow-y: hidden;
394 padding: 0;
394 padding: 0;
395 }
395 }
396 div.diffblock {
396 div.diffblock {
397 border: none;
397 border: none;
398 }
398 }
399
399
400 &.inline-form {
400 &.inline-form {
401 width: 99%
401 width: 99%
402 }
402 }
403 }
403 }
404
404
405
405
406 table.code-difftable {
406 table.code-difftable {
407 width: 100%;
407 width: 100%;
408 }
408 }
409
409
410 /** PYGMENTS COLORING **/
410 /** PYGMENTS COLORING **/
411 div.codeblock {
411 div.codeblock {
412
412
413 // TODO: johbo: Added interim to get rid of the margin around
413 // TODO: johbo: Added interim to get rid of the margin around
414 // Select2 widgets. This needs further cleanup.
414 // Select2 widgets. This needs further cleanup.
415 margin-top: @padding;
415 margin-top: @padding;
416
416
417 overflow: auto;
417 overflow: auto;
418 padding: 0px;
418 padding: 0px;
419 border: @border-thickness solid @grey5;
419 border: @border-thickness solid @grey5;
420 background: @grey6;
420 background: @grey6;
421 .border-radius(@border-radius);
421 .border-radius(@border-radius);
422
422
423 #remove_gist {
423 #remove_gist {
424 float: right;
424 float: right;
425 }
425 }
426
426
427 .gist_url {
428 padding: 0px 0px 10px 0px;
429 }
430
427 .author {
431 .author {
428 clear: both;
432 clear: both;
429 vertical-align: middle;
433 vertical-align: middle;
430 font-family: @text-bold;
434 font-family: @text-bold;
431 }
435 }
432
436
433 .btn-mini {
437 .btn-mini {
434 float: left;
438 float: left;
435 margin: 0 5px 0 0;
439 margin: 0 5px 0 0;
436 }
440 }
437
441
438 .code-header {
442 .code-header {
439 padding: @padding;
443 padding: @padding;
440 border-bottom: @border-thickness solid @grey5;
444 border-bottom: @border-thickness solid @grey5;
441
445
442 .rc-user {
446 .rc-user {
443 min-width: 0;
447 min-width: 0;
444 margin-right: .5em;
448 margin-right: .5em;
445 }
449 }
446
450
447 .stats {
451 .stats {
448 clear: both;
452 clear: both;
449 margin: 0 0 @padding 0;
453 margin: 0 0 @padding 0;
450 padding: 0;
454 padding: 0;
451 .left {
455 .left {
452 float: left;
456 float: left;
453 clear: left;
457 clear: left;
454 max-width: 75%;
458 max-width: 75%;
455 margin: 0 0 @padding 0;
459 margin: 0 0 @padding 0;
456
460
457 &.item {
461 &.item {
458 margin-right: @padding;
462 margin-right: @padding;
459 &.last { border-right: none; }
463 &.last { border-right: none; }
460 }
464 }
461 }
465 }
462 .buttons { float: right; }
466 .buttons { float: right; }
463 .author {
467 .author {
464 height: 25px; margin-left: 15px; font-weight: bold;
468 height: 25px; margin-left: 15px; font-weight: bold;
465 }
469 }
466 }
470 }
467
471
468 .commit {
472 .commit {
469 margin: 5px 0 0 26px;
473 margin: 5px 0 0 26px;
470 font-weight: normal;
474 font-weight: normal;
471 white-space: pre-wrap;
475 white-space: pre-wrap;
472 }
476 }
473 }
477 }
474
478
475 .message {
479 .message {
476 position: relative;
480 position: relative;
477 margin: @padding;
481 margin: @padding;
478
482
479 .codeblock-label {
483 .codeblock-label {
480 margin: 0 0 1em 0;
484 margin: 0 0 1em 0;
481 }
485 }
482 }
486 }
483
487
484 .code-body {
488 .code-body {
485 padding: @padding;
489 padding: @padding;
486 background-color: #ffffff;
490 background-color: #ffffff;
487 min-width: 100%;
491 min-width: 100%;
488 box-sizing: border-box;
492 box-sizing: border-box;
489 // TODO: johbo: Parent has overflow: auto, this forces the child here
493 // TODO: johbo: Parent has overflow: auto, this forces the child here
490 // to have the intended size and to scroll. Should be simplified.
494 // to have the intended size and to scroll. Should be simplified.
491 width: 100%;
495 width: 100%;
492 overflow-x: auto;
496 overflow-x: auto;
493
497
494 img.rendered-binary {
498 img.rendered-binary {
495 height: auto;
499 height: auto;
496 width: 100%;
500 width: 100%;
497 }
501 }
498 }
502 }
499 }
503 }
500
504
501 .code-highlighttable,
505 .code-highlighttable,
502 div.codeblock {
506 div.codeblock {
503
507
504 &.readme {
508 &.readme {
505 background-color: white;
509 background-color: white;
506 }
510 }
507
511
508 .markdown-block table {
512 .markdown-block table {
509 border-collapse: collapse;
513 border-collapse: collapse;
510
514
511 th,
515 th,
512 td {
516 td {
513 padding: .5em;
517 padding: .5em;
514 border: @border-thickness solid @border-default-color;
518 border: @border-thickness solid @border-default-color;
515 }
519 }
516 }
520 }
517
521
518 table {
522 table {
519 border: 0px;
523 border: 0px;
520 margin: 0;
524 margin: 0;
521 letter-spacing: normal;
525 letter-spacing: normal;
522
526
523
527
524 td {
528 td {
525 border: 0px;
529 border: 0px;
526 vertical-align: top;
530 vertical-align: top;
527 }
531 }
528 }
532 }
529 }
533 }
530
534
531 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
535 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
532 div.search-code-body {
536 div.search-code-body {
533 background-color: #ffffff; padding: 5px 0 5px 10px;
537 background-color: #ffffff; padding: 5px 0 5px 10px;
534 pre {
538 pre {
535 .match { background-color: #faffa6;}
539 .match { background-color: #faffa6;}
536 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
540 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
537 }
541 }
538 .code-highlighttable {
542 .code-highlighttable {
539 border-collapse: collapse;
543 border-collapse: collapse;
540
544
541 tr:hover {
545 tr:hover {
542 background: #fafafa;
546 background: #fafafa;
543 }
547 }
544 td.code {
548 td.code {
545 padding-left: 10px;
549 padding-left: 10px;
546 }
550 }
547 td.line {
551 td.line {
548 border-right: 1px solid #ccc !important;
552 border-right: 1px solid #ccc !important;
549 padding-right: 10px;
553 padding-right: 10px;
550 text-align: right;
554 text-align: right;
551 font-family: "Lucida Console",Monaco,monospace;
555 font-family: "Lucida Console",Monaco,monospace;
552 span {
556 span {
553 white-space: pre-wrap;
557 white-space: pre-wrap;
554 color: #666666;
558 color: #666666;
555 }
559 }
556 }
560 }
557 }
561 }
558 }
562 }
559
563
560 div.annotatediv { margin-left: 2px; margin-right: 4px; }
564 div.annotatediv { margin-left: 2px; margin-right: 4px; }
561 .code-highlight {
565 .code-highlight {
562 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
566 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
563 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
567 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
564 pre div:target {background-color: @comment-highlight-color !important;}
568 pre div:target {background-color: @comment-highlight-color !important;}
565 }
569 }
566
570
567 .linenos a { text-decoration: none; }
571 .linenos a { text-decoration: none; }
568
572
569 .CodeMirror-selected { background: @rchighlightblue; }
573 .CodeMirror-selected { background: @rchighlightblue; }
570 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
574 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
571 .CodeMirror ::selection { background: @rchighlightblue; }
575 .CodeMirror ::selection { background: @rchighlightblue; }
572 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
576 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
573
577
574 .code { display: block; border:0px !important; }
578 .code { display: block; border:0px !important; }
575 .code-highlight, /* TODO: dan: merge codehilite into code-highlight */
579 .code-highlight, /* TODO: dan: merge codehilite into code-highlight */
576 .codehilite {
580 .codehilite {
577 .hll { background-color: #ffffcc }
581 .hll { background-color: #ffffcc }
578 .c { color: #408080; font-style: italic } /* Comment */
582 .c { color: #408080; font-style: italic } /* Comment */
579 .err, .codehilite .err { border: @border-thickness solid #FF0000 } /* Error */
583 .err, .codehilite .err { border: @border-thickness solid #FF0000 } /* Error */
580 .k { color: #008000; font-weight: bold } /* Keyword */
584 .k { color: #008000; font-weight: bold } /* Keyword */
581 .o { color: #666666 } /* Operator */
585 .o { color: #666666 } /* Operator */
582 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
586 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
583 .cp { color: #BC7A00 } /* Comment.Preproc */
587 .cp { color: #BC7A00 } /* Comment.Preproc */
584 .c1 { color: #408080; font-style: italic } /* Comment.Single */
588 .c1 { color: #408080; font-style: italic } /* Comment.Single */
585 .cs { color: #408080; font-style: italic } /* Comment.Special */
589 .cs { color: #408080; font-style: italic } /* Comment.Special */
586 .gd { color: #A00000 } /* Generic.Deleted */
590 .gd { color: #A00000 } /* Generic.Deleted */
587 .ge { font-style: italic } /* Generic.Emph */
591 .ge { font-style: italic } /* Generic.Emph */
588 .gr { color: #FF0000 } /* Generic.Error */
592 .gr { color: #FF0000 } /* Generic.Error */
589 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
593 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
590 .gi { color: #00A000 } /* Generic.Inserted */
594 .gi { color: #00A000 } /* Generic.Inserted */
591 .go { color: #808080 } /* Generic.Output */
595 .go { color: #808080 } /* Generic.Output */
592 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
596 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
593 .gs { font-weight: bold } /* Generic.Strong */
597 .gs { font-weight: bold } /* Generic.Strong */
594 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
598 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
595 .gt { color: #0040D0 } /* Generic.Traceback */
599 .gt { color: #0040D0 } /* Generic.Traceback */
596 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
600 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
597 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
601 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
598 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
602 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
599 .kp { color: #008000 } /* Keyword.Pseudo */
603 .kp { color: #008000 } /* Keyword.Pseudo */
600 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
604 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
601 .kt { color: #B00040 } /* Keyword.Type */
605 .kt { color: #B00040 } /* Keyword.Type */
602 .m { color: #666666 } /* Literal.Number */
606 .m { color: #666666 } /* Literal.Number */
603 .s { color: #BA2121 } /* Literal.String */
607 .s { color: #BA2121 } /* Literal.String */
604 .na { color: #7D9029 } /* Name.Attribute */
608 .na { color: #7D9029 } /* Name.Attribute */
605 .nb { color: #008000 } /* Name.Builtin */
609 .nb { color: #008000 } /* Name.Builtin */
606 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
610 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
607 .no { color: #880000 } /* Name.Constant */
611 .no { color: #880000 } /* Name.Constant */
608 .nd { color: #AA22FF } /* Name.Decorator */
612 .nd { color: #AA22FF } /* Name.Decorator */
609 .ni { color: #999999; font-weight: bold } /* Name.Entity */
613 .ni { color: #999999; font-weight: bold } /* Name.Entity */
610 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
614 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
611 .nf { color: #0000FF } /* Name.Function */
615 .nf { color: #0000FF } /* Name.Function */
612 .nl { color: #A0A000 } /* Name.Label */
616 .nl { color: #A0A000 } /* Name.Label */
613 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
617 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
614 .nt { color: #008000; font-weight: bold } /* Name.Tag */
618 .nt { color: #008000; font-weight: bold } /* Name.Tag */
615 .nv { color: #19177C } /* Name.Variable */
619 .nv { color: #19177C } /* Name.Variable */
616 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
620 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
617 .w { color: #bbbbbb } /* Text.Whitespace */
621 .w { color: #bbbbbb } /* Text.Whitespace */
618 .mf { color: #666666 } /* Literal.Number.Float */
622 .mf { color: #666666 } /* Literal.Number.Float */
619 .mh { color: #666666 } /* Literal.Number.Hex */
623 .mh { color: #666666 } /* Literal.Number.Hex */
620 .mi { color: #666666 } /* Literal.Number.Integer */
624 .mi { color: #666666 } /* Literal.Number.Integer */
621 .mo { color: #666666 } /* Literal.Number.Oct */
625 .mo { color: #666666 } /* Literal.Number.Oct */
622 .sb { color: #BA2121 } /* Literal.String.Backtick */
626 .sb { color: #BA2121 } /* Literal.String.Backtick */
623 .sc { color: #BA2121 } /* Literal.String.Char */
627 .sc { color: #BA2121 } /* Literal.String.Char */
624 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
628 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
625 .s2 { color: #BA2121 } /* Literal.String.Double */
629 .s2 { color: #BA2121 } /* Literal.String.Double */
626 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
630 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
627 .sh { color: #BA2121 } /* Literal.String.Heredoc */
631 .sh { color: #BA2121 } /* Literal.String.Heredoc */
628 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
632 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
629 .sx { color: #008000 } /* Literal.String.Other */
633 .sx { color: #008000 } /* Literal.String.Other */
630 .sr { color: #BB6688 } /* Literal.String.Regex */
634 .sr { color: #BB6688 } /* Literal.String.Regex */
631 .s1 { color: #BA2121 } /* Literal.String.Single */
635 .s1 { color: #BA2121 } /* Literal.String.Single */
632 .ss { color: #19177C } /* Literal.String.Symbol */
636 .ss { color: #19177C } /* Literal.String.Symbol */
633 .bp { color: #008000 } /* Name.Builtin.Pseudo */
637 .bp { color: #008000 } /* Name.Builtin.Pseudo */
634 .vc { color: #19177C } /* Name.Variable.Class */
638 .vc { color: #19177C } /* Name.Variable.Class */
635 .vg { color: #19177C } /* Name.Variable.Global */
639 .vg { color: #19177C } /* Name.Variable.Global */
636 .vi { color: #19177C } /* Name.Variable.Instance */
640 .vi { color: #19177C } /* Name.Variable.Instance */
637 .il { color: #666666 } /* Literal.Number.Integer.Long */
641 .il { color: #666666 } /* Literal.Number.Integer.Long */
638 }
642 }
639
643
640 /* customized pre blocks for markdown/rst */
644 /* customized pre blocks for markdown/rst */
641 pre.literal-block, .codehilite pre{
645 pre.literal-block, .codehilite pre{
642 padding: @padding;
646 padding: @padding;
643 border: 1px solid @grey6;
647 border: 1px solid @grey6;
644 .border-radius(@border-radius);
648 .border-radius(@border-radius);
645 background-color: @grey7;
649 background-color: @grey7;
646 }
650 }
647
651
648
652
649 /* START NEW CODE BLOCK CSS */
653 /* START NEW CODE BLOCK CSS */
650
654
651 @cb-line-height: 18px;
655 @cb-line-height: 18px;
652 @cb-line-code-padding: 10px;
656 @cb-line-code-padding: 10px;
653 @cb-text-padding: 5px;
657 @cb-text-padding: 5px;
654
658
655 @pill-padding: 2px 7px;
659 @pill-padding: 2px 7px;
656
660
657 input.filediff-collapse-state {
661 input.filediff-collapse-state {
658 display: none;
662 display: none;
659
663
660 &:checked + .filediff { /* file diff is collapsed */
664 &:checked + .filediff { /* file diff is collapsed */
661 .cb {
665 .cb {
662 display: none
666 display: none
663 }
667 }
664 .filediff-collapse-indicator {
668 .filediff-collapse-indicator {
665 width: 0;
669 width: 0;
666 height: 0;
670 height: 0;
667 border-style: solid;
671 border-style: solid;
668 border-width: 4.5px 0 4.5px 9.3px;
672 border-width: 4.5px 0 4.5px 9.3px;
669 border-color: transparent transparent transparent #aaa;
673 border-color: transparent transparent transparent #aaa;
670 margin: 6px 0px;
674 margin: 6px 0px;
671 }
675 }
672 .filediff-menu {
676 .filediff-menu {
673 display: none;
677 display: none;
674 }
678 }
675 margin: 10px 0 0 0;
679 margin: 10px 0 0 0;
676 }
680 }
677
681
678 &+ .filediff { /* file diff is expanded */
682 &+ .filediff { /* file diff is expanded */
679 .filediff-collapse-indicator {
683 .filediff-collapse-indicator {
680 width: 0;
684 width: 0;
681 height: 0;
685 height: 0;
682 border-style: solid;
686 border-style: solid;
683 border-width: 9.3px 4.5px 0 4.5px;
687 border-width: 9.3px 4.5px 0 4.5px;
684 border-color: #aaa transparent transparent transparent;
688 border-color: #aaa transparent transparent transparent;
685 margin: 6px 0px;
689 margin: 6px 0px;
686
690
687 }
691 }
688 .filediff-menu {
692 .filediff-menu {
689 display: block;
693 display: block;
690 }
694 }
691 margin: 10px 0;
695 margin: 10px 0;
692 &:nth-child(2) {
696 &:nth-child(2) {
693 margin: 0;
697 margin: 0;
694 }
698 }
695 }
699 }
696 }
700 }
697 .cs_files {
701 .cs_files {
698 clear: both;
702 clear: both;
699 }
703 }
700
704
701 .diffset-menu {
705 .diffset-menu {
702 margin-bottom: 20px;
706 margin-bottom: 20px;
703 }
707 }
704 .diffset {
708 .diffset {
705 margin: 20px auto;
709 margin: 20px auto;
706 .diffset-heading {
710 .diffset-heading {
707 border: 1px solid @grey5;
711 border: 1px solid @grey5;
708 margin-bottom: -1px;
712 margin-bottom: -1px;
709 // margin-top: 20px;
713 // margin-top: 20px;
710 h2 {
714 h2 {
711 margin: 0;
715 margin: 0;
712 line-height: 38px;
716 line-height: 38px;
713 padding-left: 10px;
717 padding-left: 10px;
714 }
718 }
715 .btn {
719 .btn {
716 margin: 0;
720 margin: 0;
717 }
721 }
718 background: @grey6;
722 background: @grey6;
719 display: block;
723 display: block;
720 padding: 5px;
724 padding: 5px;
721 }
725 }
722 .diffset-heading-warning {
726 .diffset-heading-warning {
723 background: @alert3-inner;
727 background: @alert3-inner;
724 border: 1px solid @alert3;
728 border: 1px solid @alert3;
725 }
729 }
726 &.diffset-comments-disabled {
730 &.diffset-comments-disabled {
727 .cb-comment-box-opener, .comment-inline-form, .cb-comment-add-button {
731 .cb-comment-box-opener, .comment-inline-form, .cb-comment-add-button {
728 display: none !important;
732 display: none !important;
729 }
733 }
730 }
734 }
731 }
735 }
732
736
733 .pill {
737 .pill {
734 display: block;
738 display: block;
735 float: left;
739 float: left;
736 padding: @pill-padding;
740 padding: @pill-padding;
737 }
741 }
738 .pill-group {
742 .pill-group {
739 .pill {
743 .pill {
740 opacity: .8;
744 opacity: .8;
741 &:first-child {
745 &:first-child {
742 border-radius: @border-radius 0 0 @border-radius;
746 border-radius: @border-radius 0 0 @border-radius;
743 }
747 }
744 &:last-child {
748 &:last-child {
745 border-radius: 0 @border-radius @border-radius 0;
749 border-radius: 0 @border-radius @border-radius 0;
746 }
750 }
747 &:only-child {
751 &:only-child {
748 border-radius: @border-radius;
752 border-radius: @border-radius;
749 }
753 }
750 }
754 }
751 }
755 }
752
756
753 /* Main comments*/
757 /* Main comments*/
754 #comments {
758 #comments {
755 .comment-selected {
759 .comment-selected {
756 border-left: 6px solid @comment-highlight-color;
760 border-left: 6px solid @comment-highlight-color;
757 padding-left: 3px;
761 padding-left: 3px;
758 margin-left: -9px;
762 margin-left: -9px;
759 }
763 }
760 }
764 }
761
765
762 .filediff {
766 .filediff {
763 border: 1px solid @grey5;
767 border: 1px solid @grey5;
764
768
765 /* START OVERRIDES */
769 /* START OVERRIDES */
766 .code-highlight {
770 .code-highlight {
767 border: none; // TODO: remove this border from the global
771 border: none; // TODO: remove this border from the global
768 // .code-highlight, it doesn't belong there
772 // .code-highlight, it doesn't belong there
769 }
773 }
770 label {
774 label {
771 margin: 0; // TODO: remove this margin definition from global label
775 margin: 0; // TODO: remove this margin definition from global label
772 // it doesn't belong there - if margin on labels
776 // it doesn't belong there - if margin on labels
773 // are needed for a form they should be defined
777 // are needed for a form they should be defined
774 // in the form's class
778 // in the form's class
775 }
779 }
776 /* END OVERRIDES */
780 /* END OVERRIDES */
777
781
778 * {
782 * {
779 box-sizing: border-box;
783 box-sizing: border-box;
780 }
784 }
781 .filediff-anchor {
785 .filediff-anchor {
782 visibility: hidden;
786 visibility: hidden;
783 }
787 }
784 &:hover {
788 &:hover {
785 .filediff-anchor {
789 .filediff-anchor {
786 visibility: visible;
790 visibility: visible;
787 }
791 }
788 }
792 }
789
793
790 .filediff-collapse-indicator {
794 .filediff-collapse-indicator {
791 border-style: solid;
795 border-style: solid;
792 float: left;
796 float: left;
793 margin: 4px 0px 0 0;
797 margin: 4px 0px 0 0;
794 cursor: pointer;
798 cursor: pointer;
795 }
799 }
796
800
797 .filediff-heading {
801 .filediff-heading {
798 background: @grey7;
802 background: @grey7;
799 cursor: pointer;
803 cursor: pointer;
800 display: block;
804 display: block;
801 padding: 5px 10px;
805 padding: 5px 10px;
802 }
806 }
803 .filediff-heading:after {
807 .filediff-heading:after {
804 content: "";
808 content: "";
805 display: table;
809 display: table;
806 clear: both;
810 clear: both;
807 }
811 }
808 .filediff-heading:hover {
812 .filediff-heading:hover {
809 background: #e1e9f4 !important;
813 background: #e1e9f4 !important;
810 }
814 }
811
815
812 .filediff-menu {
816 .filediff-menu {
813 float: right;
817 float: right;
814 text-align: right;
818 text-align: right;
815 padding: 5px 5px 5px 0px;
819 padding: 5px 5px 5px 0px;
816
820
817 &> a,
821 &> a,
818 &> span {
822 &> span {
819 padding: 1px;
823 padding: 1px;
820 }
824 }
821 }
825 }
822
826
823 .pill {
827 .pill {
824 &[op="name"] {
828 &[op="name"] {
825 background: none;
829 background: none;
826 opacity: 1;
830 opacity: 1;
827 color: white;
831 color: white;
828 }
832 }
829 &[op="limited"] {
833 &[op="limited"] {
830 background: @grey2;
834 background: @grey2;
831 color: white;
835 color: white;
832 }
836 }
833 &[op="binary"] {
837 &[op="binary"] {
834 background: @color7;
838 background: @color7;
835 color: white;
839 color: white;
836 }
840 }
837 &[op="modified"] {
841 &[op="modified"] {
838 background: @alert1;
842 background: @alert1;
839 color: white;
843 color: white;
840 }
844 }
841 &[op="renamed"] {
845 &[op="renamed"] {
842 background: @color4;
846 background: @color4;
843 color: white;
847 color: white;
844 }
848 }
845 &[op="copied"] {
849 &[op="copied"] {
846 background: @color4;
850 background: @color4;
847 color: white;
851 color: white;
848 }
852 }
849 &[op="mode"] {
853 &[op="mode"] {
850 background: @grey3;
854 background: @grey3;
851 color: white;
855 color: white;
852 }
856 }
853 &[op="symlink"] {
857 &[op="symlink"] {
854 background: @color8;
858 background: @color8;
855 color: white;
859 color: white;
856 }
860 }
857
861
858 &[op="added"] { /* added lines */
862 &[op="added"] { /* added lines */
859 background: @alert1;
863 background: @alert1;
860 color: white;
864 color: white;
861 }
865 }
862 &[op="deleted"] { /* deleted lines */
866 &[op="deleted"] { /* deleted lines */
863 background: @alert2;
867 background: @alert2;
864 color: white;
868 color: white;
865 }
869 }
866
870
867 &[op="created"] { /* created file */
871 &[op="created"] { /* created file */
868 background: @alert1;
872 background: @alert1;
869 color: white;
873 color: white;
870 }
874 }
871 &[op="removed"] { /* deleted file */
875 &[op="removed"] { /* deleted file */
872 background: @color5;
876 background: @color5;
873 color: white;
877 color: white;
874 }
878 }
875 }
879 }
876
880
877 .filediff-collapse-button, .filediff-expand-button {
881 .filediff-collapse-button, .filediff-expand-button {
878 cursor: pointer;
882 cursor: pointer;
879 }
883 }
880 .filediff-collapse-button {
884 .filediff-collapse-button {
881 display: inline;
885 display: inline;
882 }
886 }
883 .filediff-expand-button {
887 .filediff-expand-button {
884 display: none;
888 display: none;
885 }
889 }
886 .filediff-collapsed .filediff-collapse-button {
890 .filediff-collapsed .filediff-collapse-button {
887 display: none;
891 display: none;
888 }
892 }
889 .filediff-collapsed .filediff-expand-button {
893 .filediff-collapsed .filediff-expand-button {
890 display: inline;
894 display: inline;
891 }
895 }
892
896
893 /**** COMMENTS ****/
897 /**** COMMENTS ****/
894
898
895 .filediff-menu {
899 .filediff-menu {
896 .show-comment-button {
900 .show-comment-button {
897 display: none;
901 display: none;
898 }
902 }
899 }
903 }
900 &.hide-comments {
904 &.hide-comments {
901 .inline-comments {
905 .inline-comments {
902 display: none;
906 display: none;
903 }
907 }
904 .filediff-menu {
908 .filediff-menu {
905 .show-comment-button {
909 .show-comment-button {
906 display: inline;
910 display: inline;
907 }
911 }
908 .hide-comment-button {
912 .hide-comment-button {
909 display: none;
913 display: none;
910 }
914 }
911 }
915 }
912 }
916 }
913
917
914 .hide-line-comments {
918 .hide-line-comments {
915 .inline-comments {
919 .inline-comments {
916 display: none;
920 display: none;
917 }
921 }
918 }
922 }
919
923
920 /**** END COMMENTS ****/
924 /**** END COMMENTS ****/
921
925
922 }
926 }
923
927
924 .filediff-outdated {
928 .filediff-outdated {
925 padding: 8px 0;
929 padding: 8px 0;
926
930
927 .filediff-heading {
931 .filediff-heading {
928 opacity: .5;
932 opacity: .5;
929 }
933 }
930 }
934 }
931
935
932 table.cb {
936 table.cb {
933 width: 100%;
937 width: 100%;
934 border-collapse: collapse;
938 border-collapse: collapse;
935
939
936 .cb-text {
940 .cb-text {
937 padding: @cb-text-padding;
941 padding: @cb-text-padding;
938 }
942 }
939 .cb-hunk {
943 .cb-hunk {
940 padding: @cb-text-padding;
944 padding: @cb-text-padding;
941 }
945 }
942 .cb-expand {
946 .cb-expand {
943 display: none;
947 display: none;
944 }
948 }
945 .cb-collapse {
949 .cb-collapse {
946 display: inline;
950 display: inline;
947 }
951 }
948 &.cb-collapsed {
952 &.cb-collapsed {
949 .cb-line {
953 .cb-line {
950 display: none;
954 display: none;
951 }
955 }
952 .cb-expand {
956 .cb-expand {
953 display: inline;
957 display: inline;
954 }
958 }
955 .cb-collapse {
959 .cb-collapse {
956 display: none;
960 display: none;
957 }
961 }
958 }
962 }
959
963
960 /* intentionally general selector since .cb-line-selected must override it
964 /* intentionally general selector since .cb-line-selected must override it
961 and they both use !important since the td itself may have a random color
965 and they both use !important since the td itself may have a random color
962 generated by annotation blocks. TLDR: if you change it, make sure
966 generated by annotation blocks. TLDR: if you change it, make sure
963 annotated block selection and line selection in file view still work */
967 annotated block selection and line selection in file view still work */
964 .cb-line-fresh .cb-content {
968 .cb-line-fresh .cb-content {
965 background: white !important;
969 background: white !important;
966 }
970 }
967 .cb-warning {
971 .cb-warning {
968 background: #fff4dd;
972 background: #fff4dd;
969 }
973 }
970
974
971 &.cb-diff-sideside {
975 &.cb-diff-sideside {
972 td {
976 td {
973 &.cb-content {
977 &.cb-content {
974 width: 50%;
978 width: 50%;
975 }
979 }
976 }
980 }
977 }
981 }
978
982
979 tr {
983 tr {
980 &.cb-annotate {
984 &.cb-annotate {
981 border-top: 1px solid #eee;
985 border-top: 1px solid #eee;
982 }
986 }
983
987
984 &.cb-hunk {
988 &.cb-hunk {
985 font-family: @font-family-monospace;
989 font-family: @font-family-monospace;
986 color: rgba(0, 0, 0, 0.3);
990 color: rgba(0, 0, 0, 0.3);
987
991
988 td {
992 td {
989 &:first-child {
993 &:first-child {
990 background: #edf2f9;
994 background: #edf2f9;
991 }
995 }
992 &:last-child {
996 &:last-child {
993 background: #f4f7fb;
997 background: #f4f7fb;
994 }
998 }
995 }
999 }
996 }
1000 }
997 }
1001 }
998
1002
999
1003
1000 td {
1004 td {
1001 vertical-align: top;
1005 vertical-align: top;
1002 padding: 0;
1006 padding: 0;
1003
1007
1004 &.cb-content {
1008 &.cb-content {
1005 font-size: 12.35px;
1009 font-size: 12.35px;
1006
1010
1007 &.cb-line-selected .cb-code {
1011 &.cb-line-selected .cb-code {
1008 background: @comment-highlight-color !important;
1012 background: @comment-highlight-color !important;
1009 }
1013 }
1010
1014
1011 span.cb-code {
1015 span.cb-code {
1012 line-height: @cb-line-height;
1016 line-height: @cb-line-height;
1013 padding-left: @cb-line-code-padding;
1017 padding-left: @cb-line-code-padding;
1014 padding-right: @cb-line-code-padding;
1018 padding-right: @cb-line-code-padding;
1015 display: block;
1019 display: block;
1016 white-space: pre-wrap;
1020 white-space: pre-wrap;
1017 font-family: @font-family-monospace;
1021 font-family: @font-family-monospace;
1018 word-break: break-all;
1022 word-break: break-all;
1019 .nonl {
1023 .nonl {
1020 color: @color5;
1024 color: @color5;
1021 }
1025 }
1022 }
1026 }
1023
1027
1024 &> button.cb-comment-box-opener {
1028 &> button.cb-comment-box-opener {
1025
1029
1026 padding: 2px 2px 1px 3px;
1030 padding: 2px 2px 1px 3px;
1027 margin-left: -6px;
1031 margin-left: -6px;
1028 margin-top: -1px;
1032 margin-top: -1px;
1029
1033
1030 border-radius: @border-radius;
1034 border-radius: @border-radius;
1031 position: absolute;
1035 position: absolute;
1032 display: none;
1036 display: none;
1033 }
1037 }
1034 .cb-comment {
1038 .cb-comment {
1035 margin-top: 10px;
1039 margin-top: 10px;
1036 white-space: normal;
1040 white-space: normal;
1037 }
1041 }
1038 }
1042 }
1039 &:hover {
1043 &:hover {
1040 button.cb-comment-box-opener {
1044 button.cb-comment-box-opener {
1041 display: block;
1045 display: block;
1042 }
1046 }
1043 &+ td button.cb-comment-box-opener {
1047 &+ td button.cb-comment-box-opener {
1044 display: block
1048 display: block
1045 }
1049 }
1046 }
1050 }
1047
1051
1048 &.cb-data {
1052 &.cb-data {
1049 text-align: right;
1053 text-align: right;
1050 width: 30px;
1054 width: 30px;
1051 font-family: @font-family-monospace;
1055 font-family: @font-family-monospace;
1052
1056
1053 .icon-comment {
1057 .icon-comment {
1054 cursor: pointer;
1058 cursor: pointer;
1055 }
1059 }
1056 &.cb-line-selected > div {
1060 &.cb-line-selected > div {
1057 display: block;
1061 display: block;
1058 background: @comment-highlight-color !important;
1062 background: @comment-highlight-color !important;
1059 line-height: @cb-line-height;
1063 line-height: @cb-line-height;
1060 color: rgba(0, 0, 0, 0.3);
1064 color: rgba(0, 0, 0, 0.3);
1061 }
1065 }
1062 }
1066 }
1063
1067
1064 &.cb-lineno {
1068 &.cb-lineno {
1065 padding: 0;
1069 padding: 0;
1066 width: 50px;
1070 width: 50px;
1067 color: rgba(0, 0, 0, 0.3);
1071 color: rgba(0, 0, 0, 0.3);
1068 text-align: right;
1072 text-align: right;
1069 border-right: 1px solid #eee;
1073 border-right: 1px solid #eee;
1070 font-family: @font-family-monospace;
1074 font-family: @font-family-monospace;
1071
1075
1072 a::before {
1076 a::before {
1073 content: attr(data-line-no);
1077 content: attr(data-line-no);
1074 }
1078 }
1075 &.cb-line-selected a {
1079 &.cb-line-selected a {
1076 background: @comment-highlight-color !important;
1080 background: @comment-highlight-color !important;
1077 }
1081 }
1078
1082
1079 a {
1083 a {
1080 display: block;
1084 display: block;
1081 padding-right: @cb-line-code-padding;
1085 padding-right: @cb-line-code-padding;
1082 padding-left: @cb-line-code-padding;
1086 padding-left: @cb-line-code-padding;
1083 line-height: @cb-line-height;
1087 line-height: @cb-line-height;
1084 color: rgba(0, 0, 0, 0.3);
1088 color: rgba(0, 0, 0, 0.3);
1085 }
1089 }
1086 }
1090 }
1087
1091
1088 &.cb-empty {
1092 &.cb-empty {
1089 background: @grey7;
1093 background: @grey7;
1090 }
1094 }
1091
1095
1092 ins {
1096 ins {
1093 color: black;
1097 color: black;
1094 background: #a6f3a6;
1098 background: #a6f3a6;
1095 text-decoration: none;
1099 text-decoration: none;
1096 }
1100 }
1097 del {
1101 del {
1098 color: black;
1102 color: black;
1099 background: #f8cbcb;
1103 background: #f8cbcb;
1100 text-decoration: none;
1104 text-decoration: none;
1101 }
1105 }
1102 &.cb-addition {
1106 &.cb-addition {
1103 background: #ecffec;
1107 background: #ecffec;
1104
1108
1105 &.blob-lineno {
1109 &.blob-lineno {
1106 background: #ddffdd;
1110 background: #ddffdd;
1107 }
1111 }
1108 }
1112 }
1109 &.cb-deletion {
1113 &.cb-deletion {
1110 background: #ffecec;
1114 background: #ffecec;
1111
1115
1112 &.blob-lineno {
1116 &.blob-lineno {
1113 background: #ffdddd;
1117 background: #ffdddd;
1114 }
1118 }
1115 }
1119 }
1116 &.cb-annotate-message-spacer {
1120 &.cb-annotate-message-spacer {
1117 width:8px;
1121 width:8px;
1118 padding: 1px 0px 0px 3px;
1122 padding: 1px 0px 0px 3px;
1119 }
1123 }
1120 &.cb-annotate-info {
1124 &.cb-annotate-info {
1121 width: 320px;
1125 width: 320px;
1122 min-width: 320px;
1126 min-width: 320px;
1123 max-width: 320px;
1127 max-width: 320px;
1124 padding: 5px 2px;
1128 padding: 5px 2px;
1125 font-size: 13px;
1129 font-size: 13px;
1126
1130
1127 .cb-annotate-message {
1131 .cb-annotate-message {
1128 padding: 2px 0px 0px 0px;
1132 padding: 2px 0px 0px 0px;
1129 white-space: pre-line;
1133 white-space: pre-line;
1130 overflow: hidden;
1134 overflow: hidden;
1131 }
1135 }
1132 .rc-user {
1136 .rc-user {
1133 float: none;
1137 float: none;
1134 padding: 0 6px 0 17px;
1138 padding: 0 6px 0 17px;
1135 min-width: unset;
1139 min-width: unset;
1136 min-height: unset;
1140 min-height: unset;
1137 }
1141 }
1138 }
1142 }
1139
1143
1140 &.cb-annotate-revision {
1144 &.cb-annotate-revision {
1141 cursor: pointer;
1145 cursor: pointer;
1142 text-align: right;
1146 text-align: right;
1143 padding: 1px 3px 0px 3px;
1147 padding: 1px 3px 0px 3px;
1144 }
1148 }
1145 }
1149 }
1146 }
1150 }
@@ -1,112 +1,118 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.mako"/>
2 <%inherit file="/base/base.mako"/>
3
3
4 <%def name="robots()">
4 <%def name="robots()">
5 %if c.gist.gist_type != 'public':
5 %if c.gist.gist_type != 'public':
6 <meta name="robots" content="noindex, nofollow">
6 <meta name="robots" content="noindex, nofollow">
7 %else:
7 %else:
8 ${parent.robots()}
8 ${parent.robots()}
9 %endif
9 %endif
10 </%def>
10 </%def>
11
11
12 <%def name="title()">
12 <%def name="title()">
13 ${_('Gist')} &middot; ${c.gist.gist_access_id}
13 ${_('Gist')} &middot; ${c.gist.gist_access_id}
14 %if c.rhodecode_name:
14 %if c.rhodecode_name:
15 &middot; ${h.branding(c.rhodecode_name)}
15 &middot; ${h.branding(c.rhodecode_name)}
16 %endif
16 %endif
17 </%def>
17 </%def>
18
18
19 <%def name="breadcrumbs_links()">
19 <%def name="breadcrumbs_links()">
20 ${_('Gist')} &middot; ${c.gist.gist_access_id}
20 ${_('Gist')} &middot; ${c.gist.gist_access_id}
21 </%def>
21 </%def>
22
22
23 <%def name="menu_bar_nav()">
23 <%def name="menu_bar_nav()">
24 ${self.menu_items(active='gists')}
24 ${self.menu_items(active='gists')}
25 </%def>
25 </%def>
26
26
27 <%def name="main()">
27 <%def name="main()">
28 <div class="box">
28 <div class="box">
29 <!-- box / title -->
29 <!-- box / title -->
30 <div class="title">
30 <div class="title">
31 ${self.breadcrumbs()}
31 ${self.breadcrumbs()}
32 %if c.rhodecode_user.username != h.DEFAULT_USER:
32 %if c.rhodecode_user.username != h.DEFAULT_USER:
33 <ul class="links">
33 <ul class="links">
34 <li>
34 <li>
35 <a href="${h.route_path('gists_new')}" class="btn btn-primary">${_(u'Create New Gist')}</a>
35 <a href="${h.route_path('gists_new')}" class="btn btn-primary">${_(u'Create New Gist')}</a>
36 </li>
36 </li>
37 </ul>
37 </ul>
38 %endif
38 %endif
39 </div>
39 </div>
40 <code>${c.gist.gist_url()}</code>
40
41 <div class="table">
41 <div class="table">
42 <div id="files_data">
42 <div id="files_data">
43 <div id="codeblock" class="codeblock">
43 <div id="codeblock" class="codeblock">
44 <div class="code-header">
44 <div class="code-header">
45 <div class="gist_url">
46 <code>
47 ${c.gist.gist_url()} <span class="icon-clipboard clipboard-action" data-clipboard-text="${c.gist.gist_url()}" title="${_('Copy the url')}"></span>
48 </code>
49 </div>
45 <div class="stats">
50 <div class="stats">
46 %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id:
51 %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id:
47 <div class="remove_gist">
52 <div class="remove_gist">
48 ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)}
53 ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)}
49 ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")}
54 ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")}
50 ${h.end_form()}
55 ${h.end_form()}
51 </div>
56 </div>
52 %endif
57 %endif
53 <div class="buttons">
58 <div class="buttons">
54 ## only owner should see that
59 ## only owner should see that
55 <a href="#copySource" onclick="return false;" class="btn btn-mini icon-clipboard clipboard-action" data-clipboard-text="${c.files[0].content}">${_('Copy Content')}</a>
60 <a href="#copySource" onclick="return false;" class="btn btn-mini icon-clipboard clipboard-action" data-clipboard-text="${c.files[0].content}">${_('Copy content')}</a>
56
61
57 %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id:
62 %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.rhodecode_user.user_id:
58 ${h.link_to(_('Edit'), h.route_path('gist_edit', gist_id=c.gist.gist_access_id), class_="btn btn-mini")}
63 ${h.link_to(_('Edit'), h.route_path('gist_edit', gist_id=c.gist.gist_access_id), class_="btn btn-mini")}
59 %endif
64 %endif
60 ${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")}
65 ${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")}
61 </div>
66 </div>
62 <div class="left" >
67 <div class="left" >
63 %if c.gist.gist_type != 'public':
68 %if c.gist.gist_type != 'public':
64 <span class="tag tag-ok disabled">${_('Private Gist')}</span>
69 <span class="tag tag-ok disabled">${_('Private Gist')}</span>
65 %endif
70 %endif
66 <span> ${c.gist.gist_description}</span>
71 <span> ${c.gist.gist_description}</span>
67 <span>${_('Expires')}:
72 <span>${_('Expires')}:
68 %if c.gist.gist_expires == -1:
73 %if c.gist.gist_expires == -1:
69 ${_('never')}
74 ${_('never')}
70 %else:
75 %else:
71 ${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))}
76 ${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))}
72 %endif
77 %endif
73 </span>
78 </span>
79
74 </div>
80 </div>
75 </div>
81 </div>
76
82
77 <div class="author">
83 <div class="author">
78 <div title="${h.tooltip(c.file_last_commit.author)}">
84 <div title="${h.tooltip(c.file_last_commit.author)}">
79 ${self.gravatar_with_user(c.file_last_commit.author, 16)} - ${_('created')} ${h.age_component(c.file_last_commit.date)}
85 ${self.gravatar_with_user(c.file_last_commit.author, 16)} - ${_('created')} ${h.age_component(c.file_last_commit.date)}
80 </div>
86 </div>
81
87
82 </div>
88 </div>
83 <div class="commit">${h.urlify_commit_message(c.file_last_commit.message, None)}</div>
89 <div class="commit">${h.urlify_commit_message(c.file_last_commit.message, None)}</div>
84 </div>
90 </div>
85
91
86 ## iterate over the files
92 ## iterate over the files
87 % for file in c.files:
93 % for file in c.files:
88 <% renderer = c.render and h.renderer_from_filename(file.path, exclude=['.txt', '.TXT'])%>
94 <% renderer = c.render and h.renderer_from_filename(file.path, exclude=['.txt', '.TXT'])%>
89 <!--
95 <!--
90 <div id="${h.FID('G', file.path)}" class="stats" >
96 <div id="${h.FID('G', file.path)}" class="stats" >
91 <a href="${c.gist.gist_url()}">¶</a>
97 <a href="${c.gist.gist_url()}">¶</a>
92 <b >${file.path}</b>
98 <b >${file.path}</b>
93 <div>
99 <div>
94 ${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")}
100 ${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")}
95 </div>
101 </div>
96 </div>
102 </div>
97 -->
103 -->
98 <div class="code-body textarea text-area editor">
104 <div class="code-body textarea text-area editor">
99 %if renderer:
105 %if renderer:
100 ${h.render(file.content, renderer=renderer)}
106 ${h.render(file.content, renderer=renderer)}
101 %else:
107 %else:
102 ${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
108 ${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
103 %endif
109 %endif
104 </div>
110 </div>
105 %endfor
111 %endfor
106 </div>
112 </div>
107 </div>
113 </div>
108 </div>
114 </div>
109
115
110
116
111 </div>
117 </div>
112 </%def>
118 </%def>
General Comments 0
You need to be logged in to leave comments. Login now