##// END OF EJS Templates
styling: adds README styling for #4054 GFM
lisaq -
r345:190afce4 default
parent child Browse files
Show More
@@ -1,638 +1,642 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 background: white;
202 background: white;
203 padding: 0;
203 padding: 0;
204 background-color: #ffffff;
204 background-color: #ffffff;
205 position: relative;
205 position: relative;
206 max-width: none;
206 max-width: none;
207 box-sizing: border-box;
207 box-sizing: border-box;
208 // TODO: johbo: Parent has overflow: auto, this forces the child here
208 // TODO: johbo: Parent has overflow: auto, this forces the child here
209 // to have the intended size and to scroll. Should be simplified.
209 // to have the intended size and to scroll. Should be simplified.
210 width: 100%;
210 width: 100%;
211 overflow-x: auto;
211 overflow-x: auto;
212 }
212 }
213
213
214 pre.raw {
214 pre.raw {
215 background: white;
215 background: white;
216 color: @grey1;
216 color: @grey1;
217 }
217 }
218 // END CODE-BODY STYLES
218 // END CODE-BODY STYLES
219
219
220 }
220 }
221
221
222
222
223 table.code-difftable {
223 table.code-difftable {
224 border-collapse: collapse;
224 border-collapse: collapse;
225 width: 99%;
225 width: 99%;
226 border-radius: 0px !important;
226 border-radius: 0px !important;
227
227
228 td {
228 td {
229 padding: 0 !important;
229 padding: 0 !important;
230 background: none !important;
230 background: none !important;
231 border: 0 !important;
231 border: 0 !important;
232 }
232 }
233
233
234 .context {
234 .context {
235 background: none repeat scroll 0 0 #DDE7EF;
235 background: none repeat scroll 0 0 #DDE7EF;
236 }
236 }
237
237
238 .add {
238 .add {
239 background: none repeat scroll 0 0 #DDFFDD;
239 background: none repeat scroll 0 0 #DDFFDD;
240
240
241 ins {
241 ins {
242 background: none repeat scroll 0 0 #AAFFAA;
242 background: none repeat scroll 0 0 #AAFFAA;
243 text-decoration: none;
243 text-decoration: none;
244 }
244 }
245 }
245 }
246
246
247 .del {
247 .del {
248 background: none repeat scroll 0 0 #FFDDDD;
248 background: none repeat scroll 0 0 #FFDDDD;
249
249
250 del {
250 del {
251 background: none repeat scroll 0 0 #FFAAAA;
251 background: none repeat scroll 0 0 #FFAAAA;
252 text-decoration: none;
252 text-decoration: none;
253 }
253 }
254 }
254 }
255
255
256 /** LINE NUMBERS **/
256 /** LINE NUMBERS **/
257 .lineno {
257 .lineno {
258 padding-left: 2px;
258 padding-left: 2px;
259 padding-right: 2px;
259 padding-right: 2px;
260 text-align: right;
260 text-align: right;
261 width: 32px;
261 width: 32px;
262 -moz-user-select: none;
262 -moz-user-select: none;
263 -webkit-user-select: none;
263 -webkit-user-select: none;
264 border-right: @border-thickness solid @grey5 !important;
264 border-right: @border-thickness solid @grey5 !important;
265 border-left: 0px solid #CCC !important;
265 border-left: 0px solid #CCC !important;
266 border-top: 0px solid #CCC !important;
266 border-top: 0px solid #CCC !important;
267 border-bottom: none !important;
267 border-bottom: none !important;
268
268
269 a {
269 a {
270 &:extend(pre);
270 &:extend(pre);
271 text-align: right;
271 text-align: right;
272 padding-right: 2px;
272 padding-right: 2px;
273 cursor: pointer;
273 cursor: pointer;
274 display: block;
274 display: block;
275 width: 32px;
275 width: 32px;
276 }
276 }
277 }
277 }
278
278
279 .context {
279 .context {
280 cursor: auto;
280 cursor: auto;
281 &:extend(pre);
281 &:extend(pre);
282 }
282 }
283
283
284 .lineno-inline {
284 .lineno-inline {
285 background: none repeat scroll 0 0 #FFF !important;
285 background: none repeat scroll 0 0 #FFF !important;
286 padding-left: 2px;
286 padding-left: 2px;
287 padding-right: 2px;
287 padding-right: 2px;
288 text-align: right;
288 text-align: right;
289 width: 30px;
289 width: 30px;
290 -moz-user-select: none;
290 -moz-user-select: none;
291 -webkit-user-select: none;
291 -webkit-user-select: none;
292 }
292 }
293
293
294 /** CODE **/
294 /** CODE **/
295 .code {
295 .code {
296 display: block;
296 display: block;
297 width: 100%;
297 width: 100%;
298
298
299 td {
299 td {
300 margin: 0;
300 margin: 0;
301 padding: 0;
301 padding: 0;
302 }
302 }
303
303
304 pre {
304 pre {
305 margin: 0;
305 margin: 0;
306 padding: 0;
306 padding: 0;
307 margin-left: .5em;
307 margin-left: .5em;
308 }
308 }
309 }
309 }
310 }
310 }
311
311
312
312
313 // Comments
313 // Comments
314
314
315 div.comment:target {
315 div.comment:target {
316 border-left: 6px solid @comment-highlight-color;
316 border-left: 6px solid @comment-highlight-color;
317 padding-left: 3px;
317 padding-left: 3px;
318 margin-left: -9px;
318 margin-left: -9px;
319 }
319 }
320
320
321 //TODO: anderson: can't get an absolute number out of anything, so had to put the
321 //TODO: anderson: can't get an absolute number out of anything, so had to put the
322 //current values that might change. But to make it clear I put as a calculation
322 //current values that might change. But to make it clear I put as a calculation
323 @comment-max-width: 1065px;
323 @comment-max-width: 1065px;
324 @pr-extra-margin: 34px;
324 @pr-extra-margin: 34px;
325 @pr-border-spacing: 4px;
325 @pr-border-spacing: 4px;
326 @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing;
326 @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing;
327
327
328 // Pull Request
328 // Pull Request
329 .cs_files .code-difftable {
329 .cs_files .code-difftable {
330 border: @border-thickness solid @grey5; //borders only on PRs
330 border: @border-thickness solid @grey5; //borders only on PRs
331
331
332 .comment-inline-form,
332 .comment-inline-form,
333 div.comment {
333 div.comment {
334 width: @pr-comment-width;
334 width: @pr-comment-width;
335 }
335 }
336 }
336 }
337
337
338 // Changeset
338 // Changeset
339 .code-difftable {
339 .code-difftable {
340 .comment-inline-form,
340 .comment-inline-form,
341 div.comment {
341 div.comment {
342 width: @comment-max-width;
342 width: @comment-max-width;
343 }
343 }
344 }
344 }
345
345
346 //Style page
346 //Style page
347 @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding;
347 @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding;
348 #style-page .code-difftable{
348 #style-page .code-difftable{
349 .comment-inline-form,
349 .comment-inline-form,
350 div.comment {
350 div.comment {
351 width: @comment-max-width - @style-extra-margin;
351 width: @comment-max-width - @style-extra-margin;
352 }
352 }
353 }
353 }
354
354
355 #context-bar > h2 {
355 #context-bar > h2 {
356 font-size: 20px;
356 font-size: 20px;
357 }
357 }
358
358
359 #context-bar > h2> a {
359 #context-bar > h2> a {
360 font-size: 20px;
360 font-size: 20px;
361 }
361 }
362 // end of defaults
362 // end of defaults
363
363
364 .file_diff_buttons {
364 .file_diff_buttons {
365 padding: 0 0 @padding;
365 padding: 0 0 @padding;
366
366
367 .drop-menu {
367 .drop-menu {
368 float: left;
368 float: left;
369 margin: 0 @padding 0 0;
369 margin: 0 @padding 0 0;
370 }
370 }
371 .btn {
371 .btn {
372 margin: 0 @padding 0 0;
372 margin: 0 @padding 0 0;
373 }
373 }
374 }
374 }
375
375
376 .code-body.textarea.editor {
376 .code-body.textarea.editor {
377 max-width: none;
377 max-width: none;
378 padding: 15px;
378 padding: 15px;
379 }
379 }
380
380
381 td.injected_diff{
381 td.injected_diff{
382 max-width: 1178px;
382 max-width: 1178px;
383 overflow-x: auto;
383 overflow-x: auto;
384 overflow-y: hidden;
384 overflow-y: hidden;
385
385
386 div.diff-container,
386 div.diff-container,
387 div.diffblock{
387 div.diffblock{
388 max-width: 100%;
388 max-width: 100%;
389 }
389 }
390
390
391 div.code-body {
391 div.code-body {
392 max-width: 1124px;
392 max-width: 1124px;
393 overflow-x: auto;
393 overflow-x: auto;
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 .author {
427 .author {
428 clear: both;
428 clear: both;
429 vertical-align: middle;
429 vertical-align: middle;
430 font-family: @text-bold;
430 font-family: @text-bold;
431 }
431 }
432
432
433 .btn-mini {
433 .btn-mini {
434 float: left;
434 float: left;
435 margin: 0 5px 0 0;
435 margin: 0 5px 0 0;
436 }
436 }
437
437
438 .code-header {
438 .code-header {
439 padding: @padding;
439 padding: @padding;
440 border-bottom: @border-thickness solid @grey5;
440 border-bottom: @border-thickness solid @grey5;
441
441
442 .rc-user {
442 .rc-user {
443 min-width: 0;
443 min-width: 0;
444 margin-right: .5em;
444 margin-right: .5em;
445 }
445 }
446
446
447 .stats {
447 .stats {
448 clear: both;
448 clear: both;
449 margin: 0 0 @padding 0;
449 margin: 0 0 @padding 0;
450 padding: 0;
450 padding: 0;
451 .left {
451 .left {
452 float: left;
452 float: left;
453 clear: left;
453 clear: left;
454 max-width: 75%;
454 max-width: 75%;
455 margin: 0 0 @padding 0;
455 margin: 0 0 @padding 0;
456
456
457 &.item {
457 &.item {
458 margin-right: @padding;
458 margin-right: @padding;
459 &.last { border-right: none; }
459 &.last { border-right: none; }
460 }
460 }
461 }
461 }
462 .buttons { float: right; }
462 .buttons { float: right; }
463 .author {
463 .author {
464 height: 25px; margin-left: 15px; font-weight: bold;
464 height: 25px; margin-left: 15px; font-weight: bold;
465 }
465 }
466 }
466 }
467
467
468 .commit {
468 .commit {
469 margin: 5px 0 0 26px;
469 margin: 5px 0 0 26px;
470 font-weight: normal;
470 font-weight: normal;
471 white-space: pre-wrap;
471 white-space: pre-wrap;
472 }
472 }
473 }
473 }
474
474
475 .message {
475 .message {
476 position: relative;
476 position: relative;
477 margin: @padding;
477 margin: @padding;
478
478
479 .codeblock-label {
479 .codeblock-label {
480 margin: 0 0 1em 0;
480 margin: 0 0 1em 0;
481 }
481 }
482 }
482 }
483
483
484 .code-body {
484 .code-body {
485 padding: @padding;
485 padding: @padding;
486 background-color: #ffffff;
486 background-color: #ffffff;
487 min-width: 100%;
487 min-width: 100%;
488 box-sizing: border-box;
488 box-sizing: border-box;
489 // TODO: johbo: Parent has overflow: auto, this forces the child here
489 // TODO: johbo: Parent has overflow: auto, this forces the child here
490 // to have the intended size and to scroll. Should be simplified.
490 // to have the intended size and to scroll. Should be simplified.
491 width: 100%;
491 width: 100%;
492 overflow-x: auto;
492 overflow-x: auto;
493 }
493 }
494 }
494 }
495
495
496 .code-highlighttable,
496 .code-highlighttable,
497 div.codeblock {
497 div.codeblock {
498
498
499 .code-body .markdown-block table {
499 &.readme {
500 background-color: white;
501 }
502
503 .markdown-block table {
500 border-collapse: collapse;
504 border-collapse: collapse;
501
505
502 th,
506 th,
503 td {
507 td {
504 padding: .5em !important;
508 padding: .5em !important;
505 border: @border-thickness solid @border-default-color !important;
509 border: @border-thickness solid @border-default-color !important;
506 }
510 }
507 }
511 }
508
512
509 .code-body table {
513 table {
510 width: 0 !important;
514 width: 0 !important;
511 border: 0px !important;
515 border: 0px !important;
512 margin: 0;
516 margin: 0;
513 letter-spacing: normal;
517 letter-spacing: normal;
514
518
515
519
516 td {
520 td {
517 border: 0px !important;
521 border: 0px !important;
518 vertical-align: top;
522 vertical-align: top;
519 }
523 }
520 }
524 }
521 }
525 }
522
526
523 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
527 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
524 div.search-code-body {
528 div.search-code-body {
525 background-color: #ffffff; padding: 5px 0 5px 10px;
529 background-color: #ffffff; padding: 5px 0 5px 10px;
526 pre {
530 pre {
527 .match { background-color: #faffa6;}
531 .match { background-color: #faffa6;}
528 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
532 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
529 }
533 }
530 .code-highlighttable {
534 .code-highlighttable {
531 border-collapse: collapse;
535 border-collapse: collapse;
532
536
533 tr:hover {
537 tr:hover {
534 background: #fafafa;
538 background: #fafafa;
535 }
539 }
536 td.code {
540 td.code {
537 padding-left: 10px;
541 padding-left: 10px;
538 }
542 }
539 td.line {
543 td.line {
540 border-right: 1px solid #ccc !important;
544 border-right: 1px solid #ccc !important;
541 padding-right: 10px;
545 padding-right: 10px;
542 text-align: right;
546 text-align: right;
543 font-family: "Lucida Console",Monaco,monospace;
547 font-family: "Lucida Console",Monaco,monospace;
544 span {
548 span {
545 white-space: pre-wrap;
549 white-space: pre-wrap;
546 color: #666666;
550 color: #666666;
547 }
551 }
548 }
552 }
549 }
553 }
550 }
554 }
551
555
552 div.annotatediv { margin-left: 2px; margin-right: 4px; }
556 div.annotatediv { margin-left: 2px; margin-right: 4px; }
553 .code-highlight {
557 .code-highlight {
554 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
558 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
555 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
559 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
556 pre div:target {background-color: @comment-highlight-color !important;}
560 pre div:target {background-color: @comment-highlight-color !important;}
557 }
561 }
558
562
559 .linenos a { text-decoration: none; }
563 .linenos a { text-decoration: none; }
560
564
561 .CodeMirror-selected { background: @rchighlightblue; }
565 .CodeMirror-selected { background: @rchighlightblue; }
562 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
566 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
563 .CodeMirror ::selection { background: @rchighlightblue; }
567 .CodeMirror ::selection { background: @rchighlightblue; }
564 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
568 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
565
569
566 .code { display: block; border:0px !important; }
570 .code { display: block; border:0px !important; }
567 .code-highlight,
571 .code-highlight,
568 .codehilite {
572 .codehilite {
569 .hll { background-color: #ffffcc }
573 .hll { background-color: #ffffcc }
570 .c { color: #408080; font-style: italic } /* Comment */
574 .c { color: #408080; font-style: italic } /* Comment */
571 .err, .codehilite .err { border: @border-thickness solid #FF0000 } /* Error */
575 .err, .codehilite .err { border: @border-thickness solid #FF0000 } /* Error */
572 .k { color: #008000; font-weight: bold } /* Keyword */
576 .k { color: #008000; font-weight: bold } /* Keyword */
573 .o { color: #666666 } /* Operator */
577 .o { color: #666666 } /* Operator */
574 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
578 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
575 .cp { color: #BC7A00 } /* Comment.Preproc */
579 .cp { color: #BC7A00 } /* Comment.Preproc */
576 .c1 { color: #408080; font-style: italic } /* Comment.Single */
580 .c1 { color: #408080; font-style: italic } /* Comment.Single */
577 .cs { color: #408080; font-style: italic } /* Comment.Special */
581 .cs { color: #408080; font-style: italic } /* Comment.Special */
578 .gd { color: #A00000 } /* Generic.Deleted */
582 .gd { color: #A00000 } /* Generic.Deleted */
579 .ge { font-style: italic } /* Generic.Emph */
583 .ge { font-style: italic } /* Generic.Emph */
580 .gr { color: #FF0000 } /* Generic.Error */
584 .gr { color: #FF0000 } /* Generic.Error */
581 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
585 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
582 .gi { color: #00A000 } /* Generic.Inserted */
586 .gi { color: #00A000 } /* Generic.Inserted */
583 .go { color: #808080 } /* Generic.Output */
587 .go { color: #808080 } /* Generic.Output */
584 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
588 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
585 .gs { font-weight: bold } /* Generic.Strong */
589 .gs { font-weight: bold } /* Generic.Strong */
586 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
590 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
587 .gt { color: #0040D0 } /* Generic.Traceback */
591 .gt { color: #0040D0 } /* Generic.Traceback */
588 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
592 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
589 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
593 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
590 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
594 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
591 .kp { color: #008000 } /* Keyword.Pseudo */
595 .kp { color: #008000 } /* Keyword.Pseudo */
592 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
596 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
593 .kt { color: #B00040 } /* Keyword.Type */
597 .kt { color: #B00040 } /* Keyword.Type */
594 .m { color: #666666 } /* Literal.Number */
598 .m { color: #666666 } /* Literal.Number */
595 .s { color: #BA2121 } /* Literal.String */
599 .s { color: #BA2121 } /* Literal.String */
596 .na { color: #7D9029 } /* Name.Attribute */
600 .na { color: #7D9029 } /* Name.Attribute */
597 .nb { color: #008000 } /* Name.Builtin */
601 .nb { color: #008000 } /* Name.Builtin */
598 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
602 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
599 .no { color: #880000 } /* Name.Constant */
603 .no { color: #880000 } /* Name.Constant */
600 .nd { color: #AA22FF } /* Name.Decorator */
604 .nd { color: #AA22FF } /* Name.Decorator */
601 .ni { color: #999999; font-weight: bold } /* Name.Entity */
605 .ni { color: #999999; font-weight: bold } /* Name.Entity */
602 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
606 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
603 .nf { color: #0000FF } /* Name.Function */
607 .nf { color: #0000FF } /* Name.Function */
604 .nl { color: #A0A000 } /* Name.Label */
608 .nl { color: #A0A000 } /* Name.Label */
605 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
609 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
606 .nt { color: #008000; font-weight: bold } /* Name.Tag */
610 .nt { color: #008000; font-weight: bold } /* Name.Tag */
607 .nv { color: #19177C } /* Name.Variable */
611 .nv { color: #19177C } /* Name.Variable */
608 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
612 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
609 .w { color: #bbbbbb } /* Text.Whitespace */
613 .w { color: #bbbbbb } /* Text.Whitespace */
610 .mf { color: #666666 } /* Literal.Number.Float */
614 .mf { color: #666666 } /* Literal.Number.Float */
611 .mh { color: #666666 } /* Literal.Number.Hex */
615 .mh { color: #666666 } /* Literal.Number.Hex */
612 .mi { color: #666666 } /* Literal.Number.Integer */
616 .mi { color: #666666 } /* Literal.Number.Integer */
613 .mo { color: #666666 } /* Literal.Number.Oct */
617 .mo { color: #666666 } /* Literal.Number.Oct */
614 .sb { color: #BA2121 } /* Literal.String.Backtick */
618 .sb { color: #BA2121 } /* Literal.String.Backtick */
615 .sc { color: #BA2121 } /* Literal.String.Char */
619 .sc { color: #BA2121 } /* Literal.String.Char */
616 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
620 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
617 .s2 { color: #BA2121 } /* Literal.String.Double */
621 .s2 { color: #BA2121 } /* Literal.String.Double */
618 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
622 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
619 .sh { color: #BA2121 } /* Literal.String.Heredoc */
623 .sh { color: #BA2121 } /* Literal.String.Heredoc */
620 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
624 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
621 .sx { color: #008000 } /* Literal.String.Other */
625 .sx { color: #008000 } /* Literal.String.Other */
622 .sr { color: #BB6688 } /* Literal.String.Regex */
626 .sr { color: #BB6688 } /* Literal.String.Regex */
623 .s1 { color: #BA2121 } /* Literal.String.Single */
627 .s1 { color: #BA2121 } /* Literal.String.Single */
624 .ss { color: #19177C } /* Literal.String.Symbol */
628 .ss { color: #19177C } /* Literal.String.Symbol */
625 .bp { color: #008000 } /* Name.Builtin.Pseudo */
629 .bp { color: #008000 } /* Name.Builtin.Pseudo */
626 .vc { color: #19177C } /* Name.Variable.Class */
630 .vc { color: #19177C } /* Name.Variable.Class */
627 .vg { color: #19177C } /* Name.Variable.Global */
631 .vg { color: #19177C } /* Name.Variable.Global */
628 .vi { color: #19177C } /* Name.Variable.Instance */
632 .vi { color: #19177C } /* Name.Variable.Instance */
629 .il { color: #666666 } /* Literal.Number.Integer.Long */
633 .il { color: #666666 } /* Literal.Number.Integer.Long */
630 }
634 }
631
635
632 /* customized pre blocks for markdown/rst */
636 /* customized pre blocks for markdown/rst */
633 pre.literal-block, .codehilite pre{
637 pre.literal-block, .codehilite pre{
634 padding: @padding;
638 padding: @padding;
635 border: 1px solid @grey6;
639 border: 1px solid @grey6;
636 .border-radius(@border-radius);
640 .border-radius(@border-radius);
637 background-color: @grey7;
641 background-color: @grey7;
638 }
642 }
@@ -1,268 +1,256 b''
1 // summary.less
1 // summary.less
2 // For use in RhodeCode applications;
2 // For use in RhodeCode applications;
3 // Used for headers and file detail summary screens.
3 // Used for headers and file detail summary screens.
4
4
5 .summary {
5 .summary {
6 float: left;
6 float: left;
7 position: relative;
7 position: relative;
8 width: 100%;
8 width: 100%;
9 margin: 0;
9 margin: 0;
10 padding: 0;
10 padding: 0;
11
11
12 .summary-detail-header {
12 .summary-detail-header {
13 float: left;
13 float: left;
14 display: block;
14 display: block;
15 width: 100%;
15 width: 100%;
16 margin-bottom: @textmargin;
16 margin-bottom: @textmargin;
17 padding: 0 0 .5em 0;
17 padding: 0 0 .5em 0;
18 border-bottom: @border-thickness solid @border-default-color;
18 border-bottom: @border-thickness solid @border-default-color;
19
19
20 .breadcrumbs {
20 .breadcrumbs {
21 float: left;
21 float: left;
22 display: inline;
22 display: inline;
23 margin: 0;
23 margin: 0;
24 padding: 0;
24 padding: 0;
25 }
25 }
26 h4 {
26 h4 {
27 float: left;
27 float: left;
28 margin: 0 1em 0 0;
28 margin: 0 1em 0 0;
29 padding: 0;
29 padding: 0;
30 line-height: 1.2em;
30 line-height: 1.2em;
31 font-size: @basefontsize;
31 font-size: @basefontsize;
32 }
32 }
33
33
34 .action_link {
34 .action_link {
35 float: right;
35 float: right;
36 }
36 }
37
37
38 .new-file {
38 .new-file {
39 float: right;
39 float: right;
40 margin-top: -1.5em;
40 margin-top: -1.5em;
41 }
41 }
42 }
42 }
43
43
44 .summary-detail {
44 .summary-detail {
45 float: left;
45 float: left;
46 position: relative;
46 position: relative;
47 width: 73%;
47 width: 73%;
48 margin: 0 3% @space 0;
48 margin: 0 3% @space 0;
49 padding: 0;
49 padding: 0;
50
50
51 .file_diff_buttons {
51 .file_diff_buttons {
52 margin-top: @space;
52 margin-top: @space;
53 }
53 }
54
54
55 // commit message
55 // commit message
56 .commit {
56 .commit {
57 white-space: pre-wrap;
57 white-space: pre-wrap;
58 }
58 }
59
59
60 #clone_url,
60 #clone_url,
61 #clone_url_id {
61 #clone_url_id {
62 min-width: 29em;
62 min-width: 29em;
63 padding: @padding/4;
63 padding: @padding/4;
64 }
64 }
65
65
66 &.directory {
66 &.directory {
67 margin-bottom: 0;
67 margin-bottom: 0;
68 }
68 }
69
69
70 .desc {
70 .desc {
71 white-space: pre-wrap;
71 white-space: pre-wrap;
72 }
72 }
73 .disabled {
73 .disabled {
74 opacity: .5;
74 opacity: .5;
75 }
75 }
76 .help-block {
76 .help-block {
77 color: inherit;
77 color: inherit;
78 margin: 0;
78 margin: 0;
79 }
79 }
80 }
80 }
81
81
82 .sidebar-right {
82 .sidebar-right {
83 float: left;
83 float: left;
84 width: 24%;
84 width: 24%;
85 margin: 0;
85 margin: 0;
86 padding: 0;
86 padding: 0;
87
87
88 ul {
88 ul {
89 margin-left: 0;
89 margin-left: 0;
90 padding-left: 0;
90 padding-left: 0;
91
91
92 li {
92 li {
93
93
94 &:before {
94 &:before {
95 content: none;
95 content: none;
96 width: 0;
96 width: 0;
97 }
97 }
98 }
98 }
99 }
99 }
100 }
100 }
101
101
102 #clone_by_name, #clone_by_id{
102 #clone_by_name, #clone_by_id{
103 display: inline-block;
103 display: inline-block;
104 margin-left: @padding;
104 margin-left: @padding;
105 }
105 }
106
106
107 .codeblock {
107 .codeblock {
108 border: none;
108 border: none;
109 background-color: transparent;
109 background-color: transparent;
110 }
110 }
111
111
112 .code-body {
112 .code-body {
113 border: @border-thickness solid @border-default-color;
113 border: @border-thickness solid @border-default-color;
114 .border-radius(@border-radius);
114 .border-radius(@border-radius);
115 }
115 }
116 }
116 }
117
117
118 // this is used outside of just the summary
118 // this is used outside of just the summary
119 .fieldset, // similar to form fieldset
119 .fieldset, // similar to form fieldset
120 .summary .sidebar-right-content { // these have to match
120 .summary .sidebar-right-content { // these have to match
121 clear: both;
121 clear: both;
122 float: left;
122 float: left;
123 position: relative;
123 position: relative;
124 display:block;
124 display:block;
125 width: 100%;
125 width: 100%;
126 min-height: 1em;
126 min-height: 1em;
127 margin-bottom: @textmargin;
127 margin-bottom: @textmargin;
128 padding: 0;
128 padding: 0;
129 line-height: 1.2em;
129 line-height: 1.2em;
130
130
131 &:after { // clearfix
131 &:after { // clearfix
132 content: "";
132 content: "";
133 clear: both;
133 clear: both;
134 width: 100%;
134 width: 100%;
135 height: 1em;
135 height: 1em;
136 }
136 }
137 }
137 }
138
138
139 .summary .sidebar-right-content {
139 .summary .sidebar-right-content {
140 margin-bottom: @space;
140 margin-bottom: @space;
141 }
141 }
142
142
143 .fieldset {
143 .fieldset {
144
144
145 .left-label { // similar to form legend
145 .left-label { // similar to form legend
146 float: left;
146 float: left;
147 display: block;
147 display: block;
148 width: 25%;
148 width: 25%;
149 margin: 0;
149 margin: 0;
150 padding: 0;
150 padding: 0;
151 font-family: @text-semibold;
151 font-family: @text-semibold;
152 }
152 }
153
153
154 .right-content { // similar to form fields
154 .right-content { // similar to form fields
155 float: left;
155 float: left;
156 display: block;
156 display: block;
157 width: 75%;
157 width: 75%;
158 margin: 0 0 0 -15%;
158 margin: 0 0 0 -15%;
159 padding: 0 0 0 15%;
159 padding: 0 0 0 15%;
160
160
161 .truncate-wrap,
161 .truncate-wrap,
162 .truncate {
162 .truncate {
163 max-width: 100%;
163 max-width: 100%;
164 width: 100%;
164 width: 100%;
165 }
165 }
166
166
167 .commit-long {
167 .commit-long {
168 overflow-x: auto;
168 overflow-x: auto;
169 }
169 }
170 }
170 }
171 }
171 }
172
172
173 // expand commit message
173 // expand commit message
174 #message_expand {
174 #message_expand {
175 clear: both;
175 clear: both;
176 display: block;
176 display: block;
177 color: @rcblue;
177 color: @rcblue;
178 cursor: pointer;
178 cursor: pointer;
179 }
179 }
180
180
181 #trimmed_message_box {
181 #trimmed_message_box {
182 max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height
182 max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height
183 overflow: hidden;
183 overflow: hidden;
184 }
184 }
185
185
186 // show/hide comments button
186 // show/hide comments button
187 .show-inline-comments {
187 .show-inline-comments {
188 display: inline;
188 display: inline;
189 cursor: pointer;
189 cursor: pointer;
190
190
191 .comments-show { display: inline; }
191 .comments-show { display: inline; }
192 .comments-hide { display: none; }
192 .comments-hide { display: none; }
193
193
194 &.comments-visible {
194 &.comments-visible {
195 .comments-show { display: none; }
195 .comments-show { display: none; }
196 .comments-hide { display: inline; }
196 .comments-hide { display: inline; }
197 }
197 }
198 }
198 }
199
199
200 // Quick Start section
200 // Quick Start section
201 .quick_start {
201 .quick_start {
202 float: left;
202 float: left;
203 display: block;
203 display: block;
204 position: relative;
204 position: relative;
205
205
206 // adds some space to make copy and paste easier
206 // adds some space to make copy and paste easier
207 .left-label,
207 .left-label,
208 .right-content {
208 .right-content {
209 line-height: 1.6em;
209 line-height: 1.6em;
210 }
210 }
211 }
211 }
212
212
213 .submodule {
213 .submodule {
214 .summary-detail {
214 .summary-detail {
215 width: 100%;
215 width: 100%;
216
216
217 .btn-collapse {
217 .btn-collapse {
218 display: none;
218 display: none;
219 }
219 }
220 }
220 }
221 }
221 }
222
222
223 .codeblock-header {
223 .codeblock-header {
224 float: left;
224 float: left;
225 display: block;
225 display: block;
226 width: 100%;
226 width: 100%;
227 margin: 0;
227 margin: 0;
228 padding: @space 0 @padding 0;
228 padding: @space 0 @padding 0;
229 border-top: @border-thickness solid @border-default-color;
229 border-top: @border-thickness solid @border-default-color;
230
230
231 .stats {
231 .stats {
232 float: left;
232 float: left;
233 width: 50%;
233 width: 50%;
234 }
234 }
235
235
236 .buttons {
236 .buttons {
237 float: right;
237 float: right;
238 width: 50%;
238 width: 50%;
239 text-align: right;
239 text-align: right;
240 color: @grey4;
240 color: @grey4;
241 }
241 }
242 }
242 }
243
243
244 #summary-menu-stats {
244 #summary-menu-stats {
245
245
246 .stats-bullet {
246 .stats-bullet {
247 color: @grey3;
247 color: @grey3;
248 min-width: 3em;
248 min-width: 3em;
249 }
249 }
250
250
251 .repo-size {
251 .repo-size {
252 margin-bottom: .5em;
252 margin-bottom: .5em;
253 }
253 }
254
254
255 }
255 }
256
256
257 #readme {
258 width: 100%;
259
260 .readme {
261 overflow-x: auto;
262 border: @border-thickness solid @border-default-color;
263 .border-radius(@border-radius);
264 }
265 .readme_box {
266 margin: 15px;
267 }
268 }
@@ -1,130 +1,130 b''
1 <%inherit file="/summary/base.html"/>
1 <%inherit file="/summary/base.html"/>
2
2
3 <%namespace name="components" file="/summary/components.html"/>
3 <%namespace name="components" file="/summary/components.html"/>
4
4
5
5
6 <%def name="menu_bar_subnav()">
6 <%def name="menu_bar_subnav()">
7 ${self.repo_menu(active='summary')}
7 ${self.repo_menu(active='summary')}
8 </%def>
8 </%def>
9
9
10 <%def name="main()">
10 <%def name="main()">
11
11
12 <div class="title">
12 <div class="title">
13 ${self.repo_page_title(c.rhodecode_db_repo)}
13 ${self.repo_page_title(c.rhodecode_db_repo)}
14 <ul class="links icon-only-links block-right">
14 <ul class="links icon-only-links block-right">
15 <li>
15 <li>
16 %if c.rhodecode_user.username != h.DEFAULT_USER:
16 %if c.rhodecode_user.username != h.DEFAULT_USER:
17 <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name,auth_token=c.rhodecode_user.feed_token)}" title="${_('RSS Feed')}">
17 <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name,auth_token=c.rhodecode_user.feed_token)}" title="${_('RSS Feed')}">
18 %else:
18 %else:
19 <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}">
19 <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name)}" title="${_('RSS Feed')}">
20 %endif
20 %endif
21 <i class="icon-rss-sign"></i></a>
21 <i class="icon-rss-sign"></i></a>
22 </li>
22 </li>
23 </ul>
23 </ul>
24 </div>
24 </div>
25
25
26 <div id="repo-summary" class="summary">
26 <div id="repo-summary" class="summary">
27 ${components.summary_detail(breadcrumbs_links=self.breadcrumbs_links(), show_downloads=True)}
27 ${components.summary_detail(breadcrumbs_links=self.breadcrumbs_links(), show_downloads=True)}
28 ${components.summary_stats(gravatar_function=self.gravatar_with_user)}
28 ${components.summary_stats(gravatar_function=self.gravatar_with_user)}
29 </div><!--end repo-summary-->
29 </div><!--end repo-summary-->
30
30
31
31
32 <div class="box" >
32 <div class="box" >
33 %if not c.repo_commits:
33 %if not c.repo_commits:
34 <div class="title">
34 <div class="title">
35 <h3>${_('Quick start')}</h3>
35 <h3>${_('Quick start')}</h3>
36 </div>
36 </div>
37 %endif
37 %endif
38 <div class="table">
38 <div class="table">
39 <div id="shortlog_data">
39 <div id="shortlog_data">
40 <%include file='../changelog/changelog_summary_data.html'/>
40 <%include file='../changelog/changelog_summary_data.html'/>
41 </div>
41 </div>
42 </div>
42 </div>
43 </div>
43 </div>
44
44
45 %if c.readme_data:
45 %if c.readme_data:
46 <div id="readme" class="anchor">
46 <div id="readme" class="anchor">
47 <div class="box" >
47 <div class="box" >
48 <div class="title" title="${_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1])}">
48 <div class="title" title="${_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1])}">
49 <h3 class="breadcrumbs">
49 <h3 class="breadcrumbs">
50 <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a>
50 <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a>
51 </h3>
51 </h3>
52 </div>
52 </div>
53 <div class="readme">
53 <div class="readme codeblock">
54 <div class="readme_box">
54 <div class="readme_box markdown-block">
55 ${c.readme_data|n}
55 ${c.readme_data|n}
56 </div>
56 </div>
57 </div>
57 </div>
58 </div>
58 </div>
59 </div>
59 </div>
60 %endif
60 %endif
61
61
62 <script type="text/javascript">
62 <script type="text/javascript">
63 $(document).ready(function(){
63 $(document).ready(function(){
64 $('#clone_by_name').on('click',function(e){
64 $('#clone_by_name').on('click',function(e){
65 // show url by name and hide name button
65 // show url by name and hide name button
66 $('#clone_url').show();
66 $('#clone_url').show();
67 $('#clone_by_name').hide();
67 $('#clone_by_name').hide();
68
68
69 // hide url by id and show name button
69 // hide url by id and show name button
70 $('#clone_by_id').show();
70 $('#clone_by_id').show();
71 $('#clone_url_id').hide();
71 $('#clone_url_id').hide();
72
72
73 });
73 });
74 $('#clone_by_id').on('click',function(e){
74 $('#clone_by_id').on('click',function(e){
75
75
76 // show url by id and hide id button
76 // show url by id and hide id button
77 $('#clone_by_id').hide();
77 $('#clone_by_id').hide();
78 $('#clone_url_id').show();
78 $('#clone_url_id').show();
79
79
80 // hide url by name and show id button
80 // hide url by name and show id button
81 $('#clone_by_name').show();
81 $('#clone_by_name').show();
82 $('#clone_url').hide();
82 $('#clone_url').hide();
83 });
83 });
84
84
85 var initialCommitData = {
85 var initialCommitData = {
86 id: null,
86 id: null,
87 text: 'tip',
87 text: 'tip',
88 type: 'tag',
88 type: 'tag',
89 raw_id: null,
89 raw_id: null,
90 files_url: null
90 files_url: null
91 };
91 };
92
92
93 select2RefSwitcher('#download_options', initialCommitData);
93 select2RefSwitcher('#download_options', initialCommitData);
94
94
95 // on change of download options
95 // on change of download options
96 $('#download_options').on('change', function(e) {
96 $('#download_options').on('change', function(e) {
97 // format of Object {text: "v0.0.3", type: "tag", id: "rev"}
97 // format of Object {text: "v0.0.3", type: "tag", id: "rev"}
98 var selected_cs = e.added;
98 var selected_cs = e.added;
99 var fname= e.added.raw_id + ".zip";
99 var fname= e.added.raw_id + ".zip";
100 var href = pyroutes.url('files_archive_home', {'repo_name': templateContext.repo_name, 'fname':fname})
100 var href = pyroutes.url('files_archive_home', {'repo_name': templateContext.repo_name, 'fname':fname})
101 // set new label
101 // set new label
102 $('#archive_link').html('<i class="icon-archive"></i> '+ e.added.text+".zip")
102 $('#archive_link').html('<i class="icon-archive"></i> '+ e.added.text+".zip")
103
103
104 // set new url to button,
104 // set new url to button,
105 $('#archive_link').attr('href', href)
105 $('#archive_link').attr('href', href)
106 });
106 });
107
107
108
108
109 // load details on summary page expand
109 // load details on summary page expand
110 $('#summary_details_expand').on('click', function() {
110 $('#summary_details_expand').on('click', function() {
111
111
112 var callback = function (data) {
112 var callback = function (data) {
113 % if c.show_stats:
113 % if c.show_stats:
114 showRepoStats(
114 showRepoStats(
115 'lang_stats', data);
115 'lang_stats', data);
116 % endif
116 % endif
117 };
117 };
118
118
119 showRepoSize(
119 showRepoSize(
120 'repo_size_container',
120 'repo_size_container',
121 templateContext.repo_name,
121 templateContext.repo_name,
122 templateContext.repo_landing_commit,
122 templateContext.repo_landing_commit,
123 callback);
123 callback);
124
124
125 })
125 })
126
126
127 })
127 })
128 </script>
128 </script>
129
129
130 </%def>
130 </%def>
General Comments 0
You need to be logged in to leave comments. Login now