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