Show More
@@ -1,408 +1,423 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 | clear: both; |
|
6 | clear: both; | |
7 | float: none; |
|
7 | float: none; | |
8 | position: relative; |
|
8 | position: relative; | |
9 | width: 100%; |
|
9 | width: 100%; | |
10 | margin: 0; |
|
10 | margin: 0; | |
11 | padding: 0; |
|
11 | padding: 0; | |
12 | background: #FCFCFC; |
|
12 | background: #FCFCFC; | |
13 | border: 1px solid #EAEAEA; |
|
13 | border: 1px solid #EAEAEA; | |
14 | border-radius: @border-radius; |
|
14 | border-radius: @border-radius; | |
15 | margin-bottom: 20px; |
|
15 | margin-bottom: 20px; | |
16 |
|
16 | |||
17 | .summary-detail-header { |
|
17 | .summary-detail-header { | |
18 | float: left; |
|
|||
19 | display: block; |
|
18 | display: block; | |
20 | width: 100%; |
|
19 | width: 100%; | |
21 | margin-bottom: @textmargin; |
|
20 | margin-bottom: @textmargin; | |
22 | padding: 0 0 .5em 0; |
|
21 | padding: 0 0 .5em 0; | |
23 | border-bottom: @border-thickness solid @border-default-color; |
|
22 | border-bottom: @border-thickness solid @border-default-color; | |
24 |
|
23 | |||
25 | .breadcrumbs { |
|
24 | .breadcrumbs { | |
26 | float: left; |
|
|||
27 | display: inline; |
|
25 | display: inline; | |
28 | margin: 0; |
|
26 | margin: 0; | |
29 | padding: 0; |
|
27 | padding: 0; | |
30 | } |
|
28 | } | |
|
29 | ||||
31 | h4 { |
|
30 | h4 { | |
32 | float: left; |
|
|||
33 | margin: 0 1em 0 0; |
|
31 | margin: 0 1em 0 0; | |
34 | padding: 0; |
|
32 | padding: 0; | |
35 | line-height: 1.2em; |
|
33 | line-height: 1.2em; | |
36 | font-size: @basefontsize; |
|
34 | font-size: @basefontsize; | |
37 | } |
|
35 | } | |
38 |
|
36 | |||
39 | .action_link { |
|
37 | .action_link { | |
40 | float: right; |
|
38 | float: right; | |
41 | } |
|
39 | } | |
42 |
|
40 | |||
43 | .new-file { |
|
41 | .new-file { | |
44 | float: right; |
|
42 | float: right; | |
45 | margin-top: -1.5em; |
|
43 | margin-top: -1.5em; | |
46 | } |
|
44 | } | |
47 | } |
|
45 | } | |
48 |
|
46 | |||
49 | .summary-detail { |
|
47 | .summary-detail { | |
50 | float: none; |
|
48 | float: none; | |
51 | position: relative; |
|
49 | position: relative; | |
52 | width: 100%; |
|
50 | width: 100%; | |
53 | margin: 0; |
|
51 | margin: 0; | |
54 | padding: 0; |
|
52 | padding: 0; | |
55 |
|
53 | |||
56 | .file_diff_buttons { |
|
54 | .file_diff_buttons { | |
57 | margin-top: @space; |
|
55 | margin-top: @space; | |
58 | } |
|
56 | } | |
59 |
|
57 | |||
60 | // commit message |
|
58 | // commit message | |
61 | .commit { |
|
59 | .commit { | |
62 | white-space: pre-wrap; |
|
60 | white-space: pre-wrap; | |
63 | } |
|
61 | } | |
64 |
|
62 | |||
65 | .left-clone { |
|
63 | .left-clone { | |
66 | float: left; |
|
64 | float: left; | |
67 | height: 30px; |
|
65 | height: 30px; | |
68 | margin: 0; |
|
66 | margin: 0; | |
69 | padding: 0; |
|
67 | padding: 0; | |
70 | width: 130px; |
|
68 | width: 130px; | |
71 | font-weight: @text-semibold-weight; |
|
69 | font-weight: @text-semibold-weight; | |
72 | font-family: @text-semibold; |
|
70 | font-family: @text-semibold; | |
73 | } |
|
71 | } | |
74 | .left-clone select { |
|
72 | .left-clone select { | |
75 | width: 130px; |
|
73 | width: 130px; | |
76 | margin-right: 0; |
|
74 | margin-right: 0; | |
77 | background-color: @grey7; |
|
75 | background-color: @grey7; | |
78 | border-color: @grey4; |
|
76 | border-color: @grey4; | |
79 | color: #5C5C5C; |
|
77 | color: #5C5C5C; | |
80 | border-top-right-radius: 0; |
|
78 | border-top-right-radius: 0; | |
81 | border-bottom-right-radius: 0; |
|
79 | border-bottom-right-radius: 0; | |
82 | } |
|
80 | } | |
83 |
|
81 | |||
84 | .right-clone { |
|
82 | .right-clone { | |
85 | float: left; |
|
83 | float: left; | |
86 | width: ~"calc(100% - 170px)"; |
|
84 | width: ~"calc(100% - 170px)"; | |
87 |
|
85 | |||
88 | .clipboard-action { |
|
86 | .clipboard-action { | |
89 | margin-left: -30px; |
|
87 | margin-left: -30px; | |
90 | } |
|
88 | } | |
91 | } |
|
89 | } | |
92 |
|
90 | |||
93 | .clone_url_input { |
|
91 | .clone_url_input { | |
94 | width: ~"calc(100% - 90px)"; |
|
92 | width: ~"calc(100% - 90px)"; | |
95 | padding: 6px 30px 6px 10px; |
|
93 | padding: 6px 30px 6px 10px; | |
96 | height: 14px; |
|
94 | height: 14px; | |
97 | box-shadow: 0 1px 1px 0 rgba(0,0,0,0.07); |
|
95 | box-shadow: 0 1px 1px 0 rgba(0,0,0,0.07); | |
98 | border-top-left-radius: 0; |
|
96 | border-top-left-radius: 0; | |
99 | border-bottom-left-radius: 0; |
|
97 | border-bottom-left-radius: 0; | |
100 | margin-left: -1px; |
|
98 | margin-left: -1px; | |
101 | } |
|
99 | } | |
102 |
|
100 | |||
103 | &.directory { |
|
101 | &.directory { | |
104 | margin-bottom: 0; |
|
102 | margin-bottom: 0; | |
105 | } |
|
103 | } | |
106 |
|
104 | |||
107 | .desc { |
|
105 | .desc { | |
108 | white-space: pre-wrap; |
|
106 | white-space: pre-wrap; | |
109 | } |
|
107 | } | |
110 | .disabled { |
|
108 | .disabled { | |
111 | opacity: .5; |
|
109 | opacity: .5; | |
112 | cursor: inherit; |
|
110 | cursor: inherit; | |
113 | } |
|
111 | } | |
114 | .help-block { |
|
112 | .help-block { | |
115 | color: inherit; |
|
113 | color: inherit; | |
116 | margin: 0; |
|
114 | margin: 0; | |
117 | } |
|
115 | } | |
118 | } |
|
116 | } | |
119 |
|
117 | |||
120 | .sidebar-right { |
|
118 | .sidebar-right { | |
121 | float: left; |
|
119 | float: left; | |
122 | width: 24%; |
|
120 | width: 24%; | |
123 | margin: 0; |
|
121 | margin: 0; | |
124 | padding: 0; |
|
122 | padding: 0; | |
125 |
|
123 | |||
126 | ul { |
|
124 | ul { | |
127 | margin-left: 0; |
|
125 | margin-left: 0; | |
128 | padding-left: 0; |
|
126 | padding-left: 0; | |
129 |
|
127 | |||
130 | li { |
|
128 | li { | |
131 | list-style-type: none; |
|
129 | list-style-type: none; | |
132 | } |
|
130 | } | |
133 | } |
|
131 | } | |
134 | } |
|
132 | } | |
135 |
|
133 | |||
136 | #clone_by_name, #clone_by_id{ |
|
134 | #clone_by_name, #clone_by_id{ | |
137 | display: inline-block; |
|
135 | display: inline-block; | |
138 | margin-left: 0px; |
|
136 | margin-left: 0px; | |
139 | } |
|
137 | } | |
140 |
|
138 | |||
141 | .codeblock { |
|
139 | .codeblock { | |
142 | border: none; |
|
140 | border: none; | |
143 | background-color: transparent; |
|
141 | background-color: transparent; | |
144 | } |
|
142 | } | |
145 |
|
143 | |||
146 | .code-body { |
|
144 | .code-body { | |
147 | border: @border-thickness solid @border-default-color; |
|
145 | border: @border-thickness solid @border-default-color; | |
148 | .border-radius(@border-radius); |
|
146 | .border-radius(@border-radius); | |
149 | } |
|
147 | } | |
150 |
|
148 | |||
151 | .btn-collapse { |
|
149 | .btn-collapse { | |
152 | clear: both; |
|
150 | clear: both; | |
153 | float: none; |
|
151 | float: none; | |
154 | background: #F7F7F7; |
|
152 | background: #F7F7F7; | |
155 | text-align: center; |
|
153 | text-align: center; | |
156 | color: #949494; |
|
154 | color: #949494; | |
157 | font-size: 11px; |
|
155 | font-size: 11px; | |
158 |
|
156 | |||
159 | &:hover { |
|
157 | &:hover { | |
160 | background: #f1f1f1; |
|
158 | background: #f1f1f1; | |
161 | color: #2B2B2D; |
|
159 | color: #2B2B2D; | |
162 | } |
|
160 | } | |
163 | } |
|
161 | } | |
164 | } |
|
162 | } | |
165 |
|
163 | |||
166 | // this is used outside of just the summary |
|
164 | // this is used outside of just the summary | |
167 | .fieldset, // similar to form fieldset |
|
165 | .fieldset, // similar to form fieldset | |
168 | .summary .sidebar-right-content { // these have to match |
|
166 | .summary .sidebar-right-content { // these have to match | |
169 | clear: both; |
|
167 | clear: both; | |
170 | float: none; |
|
168 | float: none; | |
171 | position: relative; |
|
169 | position: relative; | |
172 | display:block; |
|
170 | display:block; | |
173 | width: 100%; |
|
171 | width: 100%; | |
174 | min-height: 1em; |
|
172 | min-height: 1em; | |
175 | margin-bottom: 10px; |
|
173 | margin-bottom: 10px; | |
176 | padding: 0; |
|
174 | padding: 0; | |
177 | line-height: 1.2em; |
|
175 | line-height: 1.2em; | |
178 |
|
176 | |||
179 | &:after { // clearfix |
|
177 | &:after { // clearfix | |
180 | content: ""; |
|
178 | content: ""; | |
181 | clear: both; |
|
179 | clear: both; | |
182 | width: 100%; |
|
180 | width: 100%; | |
183 | height: 1em; |
|
181 | height: 1em; | |
184 | } |
|
182 | } | |
185 | } |
|
183 | } | |
186 |
|
184 | |||
187 | .summary .sidebar-right-content { |
|
185 | .summary .sidebar-right-content { | |
188 | margin-bottom: @space; |
|
186 | margin-bottom: @space; | |
189 |
|
187 | |||
190 | .rc-user { |
|
188 | .rc-user { | |
191 | min-width: 0; |
|
189 | min-width: 0; | |
192 | } |
|
190 | } | |
193 | } |
|
191 | } | |
194 |
|
192 | |||
|
193 | .summary { | |||
|
194 | .fieldset { | |||
|
195 | margin-bottom: 0; | |||
|
196 | } | |||
|
197 | } | |||
|
198 | ||||
195 | .fieldset { |
|
199 | .fieldset { | |
196 |
|
200 | |||
197 | .left-label { // similar to form legend |
|
201 | .left-label { // similar to form legend | |
198 | display: block; |
|
202 | display: block; | |
199 | margin: 0; |
|
203 | margin: 0; | |
200 | padding: 0; |
|
204 | padding: 0; | |
201 | font-weight: @text-semibold-weight; |
|
205 | font-weight: @text-semibold-weight; | |
202 | font-family: @text-semibold; |
|
206 | font-family: @text-semibold; | |
203 | } |
|
207 | } | |
204 |
|
208 | |||
205 | .left-label-summary { |
|
209 | .left-label-summary { | |
206 | padding-left: 20px; |
|
210 | padding-left: 20px; | |
207 | margin-bottom: 5px; |
|
211 | margin-bottom: 5px; | |
208 |
|
212 | |||
209 | p { |
|
213 | p { | |
210 | margin-bottom: 5px; |
|
214 | margin-bottom: 5px; | |
211 | color: @grey1; |
|
215 | color: @grey1; | |
212 | float: left; |
|
216 | float: left; | |
213 | width: 130px; |
|
217 | width: 130px; | |
214 | } |
|
218 | } | |
215 |
|
219 | |||
216 | .right-label-summary { |
|
220 | .right-label-summary { | |
217 | float: left; |
|
221 | float: left; | |
218 | margin-top: 7px; |
|
222 | margin-top: 7px; | |
219 | } |
|
223 | } | |
220 | } |
|
224 | } | |
221 |
|
225 | |||
222 | .left-content { |
|
226 | .left-content { | |
223 | width: ~"calc(50% - 20px)"; |
|
227 | width: ~"calc(50% - 20px)"; | |
224 | float: left; |
|
228 | float: left; | |
225 | margin: 15px 0 15px 20px; |
|
229 | margin: 15px 0 15px 20px; | |
|
230 | ||||
|
231 | .rc-user { | |||
|
232 | min-width: auto; | |||
|
233 | max-width: none; | |||
|
234 | min-height: auto; | |||
|
235 | padding-right: 5px; | |||
|
236 | } | |||
226 | } |
|
237 | } | |
227 |
|
238 | |||
228 | .right-content { // similar to form fields |
|
239 | .right-content { // similar to form fields | |
229 | float: left; |
|
240 | float: left; | |
230 | display: block; |
|
241 | display: block; | |
231 | width: ~"calc(50% - 20px)"; |
|
242 | width: ~"calc(50% - 20px)"; | |
232 | text-align: right; |
|
243 | text-align: right; | |
233 | margin: 15px 20px 15px 0; |
|
244 | margin: 15px 20px 15px 0; | |
234 |
|
245 | |||
235 | .truncate-wrap, |
|
246 | .truncate-wrap, | |
236 | .truncate { |
|
247 | .truncate { | |
237 | max-width: 100%; |
|
248 | max-width: 100%; | |
238 | width: 100%; |
|
249 | width: 100%; | |
239 | } |
|
250 | } | |
240 |
|
251 | |||
241 | .commit-long { |
|
252 | .commit-long { | |
242 | overflow-x: auto; |
|
253 | overflow-x: auto; | |
243 | } |
|
254 | } | |
244 |
|
255 | |||
245 | .commit-info { |
|
256 | .commit-info { | |
246 | margin-top: 7px; |
|
257 | margin-top: 7px; | |
247 | } |
|
258 | } | |
248 |
|
259 | |||
249 | .tag, .tagtag, .branchtag, .booktag, .metatag, .perm_tag { |
|
260 | .tag, .tagtag, .branchtag, .booktag, .metatag, .perm_tag { | |
250 | background:transparent; |
|
261 | background:transparent; | |
251 | border: none; |
|
262 | border: none; | |
252 | box-shadow: none; |
|
263 | box-shadow: none; | |
253 | margin-left: 10px; |
|
264 | margin-left: 10px; | |
254 | font-size: 13px; |
|
265 | font-size: 13px; | |
255 | } |
|
266 | } | |
256 |
|
267 | |||
257 | .tag span, .tag i { |
|
268 | .tag span, .tag i { | |
258 | color: @grey1; |
|
269 | color: @grey1; | |
259 | } |
|
270 | } | |
260 | } |
|
271 | } | |
|
272 | .commit { | |||
|
273 | color: @grey1; | |||
|
274 | margin-bottom: 10px; | |||
|
275 | } | |||
261 | .commit.truncate-wrap { |
|
276 | .commit.truncate-wrap { | |
262 | overflow:hidden; |
|
277 | overflow:hidden; | |
263 | text-overflow: ellipsis; |
|
278 | text-overflow: ellipsis; | |
264 | } |
|
279 | } | |
265 | } |
|
280 | } | |
266 |
|
281 | |||
267 | // expand commit message |
|
282 | // expand commit message | |
268 | #message_expand { |
|
283 | #message_expand { | |
269 | clear: both; |
|
284 | clear: both; | |
270 | display: block; |
|
285 | display: block; | |
271 | color: @rcblue; |
|
286 | color: @rcblue; | |
272 | cursor: pointer; |
|
287 | cursor: pointer; | |
273 | } |
|
288 | } | |
274 |
|
289 | |||
275 | #trimmed_message_box { |
|
290 | #trimmed_message_box { | |
276 | max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height |
|
291 | max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height | |
277 | overflow: hidden; |
|
292 | overflow: hidden; | |
278 | } |
|
293 | } | |
279 |
|
294 | |||
280 | // show/hide comments button |
|
295 | // show/hide comments button | |
281 | .show-inline-comments { |
|
296 | .show-inline-comments { | |
282 | display: inline; |
|
297 | display: inline; | |
283 | cursor: pointer; |
|
298 | cursor: pointer; | |
284 |
|
299 | |||
285 | .comments-show { display: inline; } |
|
300 | .comments-show { display: inline; } | |
286 | .comments-hide { display: none; } |
|
301 | .comments-hide { display: none; } | |
287 |
|
302 | |||
288 | &.comments-visible { |
|
303 | &.comments-visible { | |
289 | .comments-show { display: none; } |
|
304 | .comments-show { display: none; } | |
290 | .comments-hide { display: inline; } |
|
305 | .comments-hide { display: inline; } | |
291 | } |
|
306 | } | |
292 | } |
|
307 | } | |
293 |
|
308 | |||
294 | // Quick Start section |
|
309 | // Quick Start section | |
295 |
|
310 | |||
296 | .empty-repo { |
|
311 | .empty-repo { | |
297 | border: 1px solid #EAEAEA; |
|
312 | border: 1px solid #EAEAEA; | |
298 | border-bottom: 0; |
|
313 | border-bottom: 0; | |
299 | border-radius: @border-radius; |
|
314 | border-radius: @border-radius; | |
300 | padding: 0 20px; |
|
315 | padding: 0 20px; | |
301 | } |
|
316 | } | |
302 |
|
317 | |||
303 | .empty-repo h3, .quick_start p { |
|
318 | .empty-repo h3, .quick_start p { | |
304 | margin-bottom: 10px; |
|
319 | margin-bottom: 10px; | |
305 | } |
|
320 | } | |
306 |
|
321 | |||
307 | .quick_start pre { |
|
322 | .quick_start pre { | |
308 | background: #FCFEFF; |
|
323 | background: #FCFEFF; | |
309 | border: 1px solid #CBDBEB; |
|
324 | border: 1px solid #CBDBEB; | |
310 | box-shadow: @button-shadow; |
|
325 | box-shadow: @button-shadow; | |
311 | padding: 10px 15px; |
|
326 | padding: 10px 15px; | |
312 | border-radius: 4px; |
|
327 | border-radius: 4px; | |
313 | color: @grey2; |
|
328 | color: @grey2; | |
314 | } |
|
329 | } | |
315 |
|
330 | |||
316 | .clear-fix { |
|
331 | .clear-fix { | |
317 | clear: both; |
|
332 | clear: both; | |
318 | } |
|
333 | } | |
319 |
|
334 | |||
320 | .quick_start { |
|
335 | .quick_start { | |
321 | display: block; |
|
336 | display: block; | |
322 | position: relative; |
|
337 | position: relative; | |
323 | border: 1px solid #EAEAEA; |
|
338 | border: 1px solid #EAEAEA; | |
324 | border-top: 0; |
|
339 | border-top: 0; | |
325 | border-radius: @border-radius; |
|
340 | border-radius: @border-radius; | |
326 | padding: 0 20px; |
|
341 | padding: 0 20px; | |
327 |
|
342 | |||
328 | // adds some space to make copy and paste easier |
|
343 | // adds some space to make copy and paste easier | |
329 | .left-label, |
|
344 | .left-label, | |
330 | .right-content { |
|
345 | .right-content { | |
331 | line-height: 1.6em; |
|
346 | line-height: 1.6em; | |
332 | } |
|
347 | } | |
333 | } |
|
348 | } | |
334 |
|
349 | |||
335 |
|
350 | |||
336 | .submodule { |
|
351 | .submodule { | |
337 | .summary-detail { |
|
352 | .summary-detail { | |
338 | width: 100%; |
|
353 | width: 100%; | |
339 |
|
354 | |||
340 | .btn-collapse { |
|
355 | .btn-collapse { | |
341 | display: none; |
|
356 | display: none; | |
342 | } |
|
357 | } | |
343 | } |
|
358 | } | |
344 | } |
|
359 | } | |
345 |
|
360 | |||
346 | .codeblock-header { |
|
361 | .codeblock-header { | |
347 | float: left; |
|
362 | float: left; | |
348 | display: block; |
|
363 | display: block; | |
349 | width: 100%; |
|
364 | width: 100%; | |
350 | margin: 0; |
|
365 | margin: 0; | |
351 | padding: @space 0 10px 0; |
|
366 | padding: @space 0 10px 0; | |
352 | border-top: @border-thickness solid @border-default-color; |
|
367 | border-top: @border-thickness solid @border-default-color; | |
353 |
|
368 | |||
354 | .stats { |
|
369 | .stats { | |
355 | float: left; |
|
370 | float: left; | |
356 | } |
|
371 | } | |
357 | .stats-filename { |
|
372 | .stats-filename { | |
358 | font-size: 120%; |
|
373 | font-size: 120%; | |
359 | } |
|
374 | } | |
360 | .stats-first-item { |
|
375 | .stats-first-item { | |
361 | padding: 0px 0px 0px 3px; |
|
376 | padding: 0px 0px 0px 3px; | |
362 | } |
|
377 | } | |
363 |
|
378 | |||
364 | .buttons { |
|
379 | .buttons { | |
365 | float: right; |
|
380 | float: right; | |
366 | text-align: right; |
|
381 | text-align: right; | |
367 | color: @grey4; |
|
382 | color: @grey4; | |
368 | } |
|
383 | } | |
369 |
|
384 | |||
370 | .file-container { |
|
385 | .file-container { | |
371 | display: inline-block; |
|
386 | display: inline-block; | |
372 | width: 100%; |
|
387 | width: 100%; | |
373 | } |
|
388 | } | |
374 |
|
389 | |||
375 | } |
|
390 | } | |
376 |
|
391 | |||
377 | #summary-menu-stats { |
|
392 | #summary-menu-stats { | |
378 |
|
393 | |||
379 | .stats-bullet { |
|
394 | .stats-bullet { | |
380 | color: @grey3; |
|
395 | color: @grey3; | |
381 | min-width: 3em; |
|
396 | min-width: 3em; | |
382 | } |
|
397 | } | |
383 |
|
398 | |||
384 | .repo-size { |
|
399 | .repo-size { | |
385 | margin-bottom: .5em; |
|
400 | margin-bottom: .5em; | |
386 | } |
|
401 | } | |
387 |
|
402 | |||
388 | } |
|
403 | } | |
389 |
|
404 | |||
390 | .rctable.repo_summary { |
|
405 | .rctable.repo_summary { | |
391 | border: 1px solid #eaeaea; |
|
406 | border: 1px solid #eaeaea; | |
392 | border-radius: 2px; |
|
407 | border-radius: 2px; | |
393 | border-collapse: inherit; |
|
408 | border-collapse: inherit; | |
394 | border-bottom: 0; |
|
409 | border-bottom: 0; | |
395 |
|
410 | |||
396 | th { |
|
411 | th { | |
397 | background: @grey7; |
|
412 | background: @grey7; | |
398 | border-bottom: 0; |
|
413 | border-bottom: 0; | |
399 | } |
|
414 | } | |
400 |
|
415 | |||
401 | td { |
|
416 | td { | |
402 | border-color: #eaeaea; |
|
417 | border-color: #eaeaea; | |
403 | } |
|
418 | } | |
404 |
|
419 | |||
405 | td.td-status { |
|
420 | td.td-status { | |
406 | padding: 0 0 0 10px; |
|
421 | padding: 0 0 0 10px; | |
407 | } |
|
422 | } | |
408 | } |
|
423 | } |
@@ -1,566 +1,571 b'' | |||||
1 | // |
|
1 | // | |
2 | // Typography |
|
2 | // Typography | |
3 | // modified from Bootstrap |
|
3 | // modified from Bootstrap | |
4 | // -------------------------------------------------- |
|
4 | // -------------------------------------------------- | |
5 |
|
5 | |||
6 | // Base |
|
6 | // Base | |
7 | body { |
|
7 | body { | |
8 | font-size: @basefontsize; |
|
8 | font-size: @basefontsize; | |
9 | font-family: @text-light; |
|
9 | font-family: @text-light; | |
10 | letter-spacing: .02em; |
|
10 | letter-spacing: .02em; | |
11 | color: @grey2; |
|
11 | color: @grey2; | |
12 | } |
|
12 | } | |
13 |
|
13 | |||
14 | #content, label{ |
|
14 | #content, label{ | |
15 | font-size: @basefontsize; |
|
15 | font-size: @basefontsize; | |
16 | } |
|
16 | } | |
17 |
|
17 | |||
18 | label { |
|
18 | label { | |
19 | color: @grey2; |
|
19 | color: @grey2; | |
20 | } |
|
20 | } | |
21 |
|
21 | |||
22 | ::selection { background: @rchighlightblue; } |
|
22 | ::selection { background: @rchighlightblue; } | |
23 |
|
23 | |||
24 | // Headings |
|
24 | // Headings | |
25 | // ------------------------- |
|
25 | // ------------------------- | |
26 |
|
26 | |||
27 | h1, h2, h3, h4, h5, h6, |
|
27 | h1, h2, h3, h4, h5, h6, | |
28 | .h1, .h2, .h3, .h4, .h5, .h6 { |
|
28 | .h1, .h2, .h3, .h4, .h5, .h6 { | |
29 | margin: 0 0 @textmargin 0; |
|
29 | margin: 0 0 @textmargin 0; | |
30 | padding: 0; |
|
30 | padding: 0; | |
31 | line-height: 1.8em; |
|
31 | line-height: 1.8em; | |
32 | color: @text-color; |
|
32 | color: @text-color; | |
33 | a { |
|
33 | a { | |
34 | color: @rcblue; |
|
34 | color: @rcblue; | |
35 | } |
|
35 | } | |
36 | } |
|
36 | } | |
37 |
|
37 | |||
38 | h1, .h1 { font-size: 1.54em; font-weight: @text-bold-weight; font-family: @text-bold; } |
|
38 | h1, .h1 { font-size: 1.54em; font-weight: @text-bold-weight; font-family: @text-bold; } | |
39 | h2, .h2 { font-size: 1.23em; font-weight: @text-semibold-weight; font-family: @text-semibold; } |
|
39 | h2, .h2 { font-size: 1.23em; font-weight: @text-semibold-weight; font-family: @text-semibold; } | |
40 | h3, .h3 { font-size: 1.23em; font-family: @text-regular; } |
|
40 | h3, .h3 { font-size: 1.23em; font-family: @text-regular; } | |
41 | h4, .h4 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; } |
|
41 | h4, .h4 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; } | |
42 | h5, .h5 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; } |
|
42 | h5, .h5 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; } | |
43 | h6, .h6 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; } |
|
43 | h6, .h6 { font-size: 1em; font-weight: @text-bold-weight; font-family: @text-bold; } | |
44 |
|
44 | |||
45 | // Breadcrumbs |
|
45 | // Breadcrumbs | |
46 | .breadcrumbs { |
|
46 | .breadcrumbs { | |
47 | font-size: @repo-title-fontsize; |
|
47 | font-size: @repo-title-fontsize; | |
48 | margin: 0; |
|
48 | margin: 0; | |
|
49 | ||||
|
50 | h4 { | |||
|
51 | font-size: @basefontsize; | |||
|
52 | margin-bottom: 15px; | |||
|
53 | } | |||
49 | } |
|
54 | } | |
50 |
|
55 | |||
51 | .breadcrumbs_light { |
|
56 | .breadcrumbs_light { | |
52 | float:left; |
|
57 | float:left; | |
53 | font-size: 1.3em; |
|
58 | font-size: 1.3em; | |
54 | line-height: 38px; |
|
59 | line-height: 38px; | |
55 | } |
|
60 | } | |
56 |
|
61 | |||
57 | // Body text |
|
62 | // Body text | |
58 | // ------------------------- |
|
63 | // ------------------------- | |
59 |
|
64 | |||
60 | p { |
|
65 | p { | |
61 | margin: 0 0 @textmargin 0; |
|
66 | margin: 0 0 @textmargin 0; | |
62 | padding: 0; |
|
67 | padding: 0; | |
63 | line-height: 2em; |
|
68 | line-height: 2em; | |
64 | } |
|
69 | } | |
65 |
|
70 | |||
66 | .lead { |
|
71 | .lead { | |
67 | margin-bottom: @textmargin; |
|
72 | margin-bottom: @textmargin; | |
68 | font-weight: 300; |
|
73 | font-weight: 300; | |
69 | line-height: 1.4; |
|
74 | line-height: 1.4; | |
70 |
|
75 | |||
71 | @media (min-width: @screen-sm-min) { |
|
76 | @media (min-width: @screen-sm-min) { | |
72 | font-size: (@basefontsize * 1.5); |
|
77 | font-size: (@basefontsize * 1.5); | |
73 | } |
|
78 | } | |
74 | } |
|
79 | } | |
75 |
|
80 | |||
76 | a, |
|
81 | a, | |
77 | .link { |
|
82 | .link { | |
78 | color: @rcblue; |
|
83 | color: @rcblue; | |
79 | text-decoration: none; |
|
84 | text-decoration: none; | |
80 | outline: none; |
|
85 | outline: none; | |
81 | cursor: pointer; |
|
86 | cursor: pointer; | |
82 |
|
87 | |||
83 | &:focus { |
|
88 | &:focus { | |
84 | outline: none; |
|
89 | outline: none; | |
85 | } |
|
90 | } | |
86 |
|
91 | |||
87 | &:hover { |
|
92 | &:hover { | |
88 | color: @rcdarkblue; |
|
93 | color: @rcdarkblue; | |
89 | } |
|
94 | } | |
90 | } |
|
95 | } | |
91 |
|
96 | |||
92 | img { |
|
97 | img { | |
93 | border: none; |
|
98 | border: none; | |
94 | outline: none; |
|
99 | outline: none; | |
95 | } |
|
100 | } | |
96 |
|
101 | |||
97 | strong { |
|
102 | strong { | |
98 | font-weight: @text-bold-weight; |
|
103 | font-weight: @text-bold-weight; | |
99 | font-family: @text-bold; |
|
104 | font-family: @text-bold; | |
100 | } |
|
105 | } | |
101 |
|
106 | |||
102 | em { |
|
107 | em { | |
103 | font-family: @text-italic; |
|
108 | font-family: @text-italic; | |
104 | font-style: italic; |
|
109 | font-style: italic; | |
105 | } |
|
110 | } | |
106 |
|
111 | |||
107 | strong em, |
|
112 | strong em, | |
108 | em strong { |
|
113 | em strong { | |
109 | font-style: italic; |
|
114 | font-style: italic; | |
110 | font-weight: @text-bold-italic-weight; |
|
115 | font-weight: @text-bold-italic-weight; | |
111 | font-family: @text-bold-italic; |
|
116 | font-family: @text-bold-italic; | |
112 | } |
|
117 | } | |
113 |
|
118 | |||
114 | //TODO: lisa: b and i are depreciated, but we are still using them in places. |
|
119 | //TODO: lisa: b and i are depreciated, but we are still using them in places. | |
115 | // Should probably make some decision whether to keep or lose these. |
|
120 | // Should probably make some decision whether to keep or lose these. | |
116 | b { |
|
121 | b { | |
117 |
|
122 | |||
118 | } |
|
123 | } | |
119 |
|
124 | |||
120 | i { |
|
125 | i { | |
121 | font-style: normal; |
|
126 | font-style: normal; | |
122 | } |
|
127 | } | |
123 |
|
128 | |||
124 | label { |
|
129 | label { | |
125 | color: @text-color; |
|
130 | color: @text-color; | |
126 |
|
131 | |||
127 | input[type="checkbox"] { |
|
132 | input[type="checkbox"] { | |
128 | margin-right: 1em; |
|
133 | margin-right: 1em; | |
129 | } |
|
134 | } | |
130 | input[type="radio"] { |
|
135 | input[type="radio"] { | |
131 | margin-right: 1em; |
|
136 | margin-right: 1em; | |
132 | } |
|
137 | } | |
133 | } |
|
138 | } | |
134 |
|
139 | |||
135 | code, |
|
140 | code, | |
136 | .code { |
|
141 | .code { | |
137 | font-size: .95em; |
|
142 | font-size: .95em; | |
138 | font-family: @text-code; |
|
143 | font-family: @text-code; | |
139 | color: @grey3; |
|
144 | color: @grey3; | |
140 |
|
145 | |||
141 | a { |
|
146 | a { | |
142 | color: lighten(@rcblue,10%) |
|
147 | color: lighten(@rcblue,10%) | |
143 | } |
|
148 | } | |
144 | } |
|
149 | } | |
145 |
|
150 | |||
146 | pre { |
|
151 | pre { | |
147 | margin: 0; |
|
152 | margin: 0; | |
148 | padding: 0; |
|
153 | padding: 0; | |
149 | border: 0; |
|
154 | border: 0; | |
150 | outline: 0; |
|
155 | outline: 0; | |
151 | font-size: @basefontsize*.95; |
|
156 | font-size: @basefontsize*.95; | |
152 | line-height: 1.4em; |
|
157 | line-height: 1.4em; | |
153 | font-family: @text-code; |
|
158 | font-family: @text-code; | |
154 | color: @grey3; |
|
159 | color: @grey3; | |
155 | } |
|
160 | } | |
156 |
|
161 | |||
157 | // Emphasis & misc |
|
162 | // Emphasis & misc | |
158 | // ------------------------- |
|
163 | // ------------------------- | |
159 | .discreet { |
|
164 | .discreet { | |
160 | color: @grey4; |
|
165 | color: @grey4; | |
161 | font-size: 85%; |
|
166 | font-size: 85%; | |
162 | font-weight: normal; |
|
167 | font-weight: normal; | |
163 |
|
168 | |||
164 | a { |
|
169 | a { | |
165 | color: @grey4; |
|
170 | color: @grey4; | |
166 |
|
171 | |||
167 | &:hover { |
|
172 | &:hover { | |
168 | color: @rcdarkblue; |
|
173 | color: @rcdarkblue; | |
169 | } |
|
174 | } | |
170 | } |
|
175 | } | |
171 | } |
|
176 | } | |
172 |
|
177 | |||
173 | small, |
|
178 | small, | |
174 | .small { |
|
179 | .small { | |
175 | font-size: 75%; |
|
180 | font-size: 75%; | |
176 | font-weight: normal; |
|
181 | font-weight: normal; | |
177 | line-height: 1em; |
|
182 | line-height: 1em; | |
178 | } |
|
183 | } | |
179 |
|
184 | |||
180 | mark, |
|
185 | mark, | |
181 | .mark { |
|
186 | .mark { | |
182 | padding: .2em; |
|
187 | padding: .2em; | |
183 | } |
|
188 | } | |
184 |
|
189 | |||
185 | // Alignment |
|
190 | // Alignment | |
186 | .text-left { text-align: left; } |
|
191 | .text-left { text-align: left; } | |
187 | .text-right { text-align: right; } |
|
192 | .text-right { text-align: right; } | |
188 | .text-center { text-align: center; } |
|
193 | .text-center { text-align: center; } | |
189 | .text-justify { text-align: justify; } |
|
194 | .text-justify { text-align: justify; } | |
190 | .text-nowrap { white-space: nowrap; } |
|
195 | .text-nowrap { white-space: nowrap; } | |
191 |
|
196 | |||
192 | // Transformation |
|
197 | // Transformation | |
193 | .text-lowercase { text-transform: lowercase; } |
|
198 | .text-lowercase { text-transform: lowercase; } | |
194 | .text-uppercase { text-transform: uppercase; } |
|
199 | .text-uppercase { text-transform: uppercase; } | |
195 | .text-capitalize { text-transform: capitalize; } |
|
200 | .text-capitalize { text-transform: capitalize; } | |
196 |
|
201 | |||
197 | // Contextual colors |
|
202 | // Contextual colors | |
198 | .text-muted { |
|
203 | .text-muted { | |
199 | color: @grey4; |
|
204 | color: @grey4; | |
200 | } |
|
205 | } | |
201 | .text-primary { |
|
206 | .text-primary { | |
202 | color: @rcblue; |
|
207 | color: @rcblue; | |
203 | } |
|
208 | } | |
204 | .text-success { |
|
209 | .text-success { | |
205 | color: @alert1; |
|
210 | color: @alert1; | |
206 | } |
|
211 | } | |
207 | .text-info { |
|
212 | .text-info { | |
208 | color: @alert4; |
|
213 | color: @alert4; | |
209 | } |
|
214 | } | |
210 | .text-warning { |
|
215 | .text-warning { | |
211 | color: @alert3; |
|
216 | color: @alert3; | |
212 | } |
|
217 | } | |
213 | .text-danger { |
|
218 | .text-danger { | |
214 | color: @alert2; |
|
219 | color: @alert2; | |
215 | } |
|
220 | } | |
216 |
|
221 | |||
217 | // Contextual backgrounds |
|
222 | // Contextual backgrounds | |
218 | .bg-primary { |
|
223 | .bg-primary { | |
219 | background-color: white; |
|
224 | background-color: white; | |
220 | } |
|
225 | } | |
221 | .bg-success { |
|
226 | .bg-success { | |
222 | background-color: @alert1; |
|
227 | background-color: @alert1; | |
223 | } |
|
228 | } | |
224 | .bg-info { |
|
229 | .bg-info { | |
225 | background-color: @alert4; |
|
230 | background-color: @alert4; | |
226 | } |
|
231 | } | |
227 | .bg-warning { |
|
232 | .bg-warning { | |
228 | background-color: @alert3; |
|
233 | background-color: @alert3; | |
229 | } |
|
234 | } | |
230 | .bg-danger { |
|
235 | .bg-danger { | |
231 | background-color: @alert2; |
|
236 | background-color: @alert2; | |
232 | } |
|
237 | } | |
233 |
|
238 | |||
234 |
|
239 | |||
235 | // Page header |
|
240 | // Page header | |
236 | // ------------------------- |
|
241 | // ------------------------- | |
237 |
|
242 | |||
238 | .page-header { |
|
243 | .page-header { | |
239 | margin: @pagepadding 0 @textmargin; |
|
244 | margin: @pagepadding 0 @textmargin; | |
240 | border-bottom: @border-thickness solid @grey5; |
|
245 | border-bottom: @border-thickness solid @grey5; | |
241 | } |
|
246 | } | |
242 |
|
247 | |||
243 | .title { |
|
248 | .title { | |
244 | clear: both; |
|
249 | clear: both; | |
245 | float: left; |
|
250 | float: left; | |
246 | width: 100%; |
|
251 | width: 100%; | |
247 | margin: @pagepadding/2 0 @pagepadding/4; |
|
252 | margin: @pagepadding/2 0 @pagepadding/4; | |
248 | min-height: 25px; |
|
253 | min-height: 25px; | |
249 |
|
254 | |||
250 | .breadcrumbs { |
|
255 | .breadcrumbs { | |
251 | float: left; |
|
256 | float: left; | |
252 | clear: both; |
|
257 | clear: both; | |
253 | width: 700px; |
|
258 | width: 700px; | |
254 | margin: 0; |
|
259 | margin: 0; | |
255 |
|
260 | |||
256 | .q_filter_box { |
|
261 | .q_filter_box { | |
257 | margin-right: @padding; |
|
262 | margin-right: @padding; | |
258 | } |
|
263 | } | |
259 | } |
|
264 | } | |
260 |
|
265 | |||
261 | h1 a { |
|
266 | h1 a { | |
262 | color: @rcblue; |
|
267 | color: @rcblue; | |
263 | } |
|
268 | } | |
264 |
|
269 | |||
265 | input{ |
|
270 | input{ | |
266 | margin-right: @padding; |
|
271 | margin-right: @padding; | |
267 | } |
|
272 | } | |
268 |
|
273 | |||
269 | h5, .h5 { |
|
274 | h5, .h5 { | |
270 | color: @grey1; |
|
275 | color: @grey1; | |
271 | margin-bottom: @space; |
|
276 | margin-bottom: @space; | |
272 |
|
277 | |||
273 | span { |
|
278 | span { | |
274 | display: inline-block; |
|
279 | display: inline-block; | |
275 | } |
|
280 | } | |
276 | } |
|
281 | } | |
277 |
|
282 | |||
278 | p { |
|
283 | p { | |
279 | margin-bottom: 0; |
|
284 | margin-bottom: 0; | |
280 | } |
|
285 | } | |
281 |
|
286 | |||
282 | .links { |
|
287 | .links { | |
283 | float: right; |
|
288 | float: right; | |
284 | display: inline; |
|
289 | display: inline; | |
285 | margin: 0; |
|
290 | margin: 0; | |
286 | padding-left: 0; |
|
291 | padding-left: 0; | |
287 | list-style: none; |
|
292 | list-style: none; | |
288 | text-align: right; |
|
293 | text-align: right; | |
289 |
|
294 | |||
290 | li { |
|
295 | li { | |
291 | float: right; |
|
296 | float: right; | |
292 | list-style-type: none; |
|
297 | list-style-type: none; | |
293 | } |
|
298 | } | |
294 |
|
299 | |||
295 | a { |
|
300 | a { | |
296 | display: inline-block; |
|
301 | display: inline-block; | |
297 | margin-left: @textmargin/2; |
|
302 | margin-left: @textmargin/2; | |
298 | } |
|
303 | } | |
299 | } |
|
304 | } | |
300 |
|
305 | |||
301 | .title-content { |
|
306 | .title-content { | |
302 | float: left; |
|
307 | float: left; | |
303 | margin: 0; |
|
308 | margin: 0; | |
304 | padding: 0; |
|
309 | padding: 0; | |
305 |
|
310 | |||
306 | & + .breadcrumbs { |
|
311 | & + .breadcrumbs { | |
307 | margin-top: @padding; |
|
312 | margin-top: @padding; | |
308 | } |
|
313 | } | |
309 |
|
314 | |||
310 | & + .links { |
|
315 | & + .links { | |
311 | margin-top: -@button-padding; |
|
316 | margin-top: -@button-padding; | |
312 |
|
317 | |||
313 | & + .breadcrumbs { |
|
318 | & + .breadcrumbs { | |
314 | margin-top: @padding; |
|
319 | margin-top: @padding; | |
315 | } |
|
320 | } | |
316 | } |
|
321 | } | |
317 |
|
322 | |||
318 | .repo-group-desc { |
|
323 | .repo-group-desc { | |
319 | padding: 8px 0px 0px 0px; |
|
324 | padding: 8px 0px 0px 0px; | |
320 | } |
|
325 | } | |
321 | } |
|
326 | } | |
322 |
|
327 | |||
323 | .title-main { |
|
328 | .title-main { | |
324 | font-size: @repo-title-fontsize; |
|
329 | font-size: @repo-title-fontsize; | |
325 | } |
|
330 | } | |
326 |
|
331 | |||
327 | .title-description { |
|
332 | .title-description { | |
328 | margin-top: .5em; |
|
333 | margin-top: .5em; | |
329 | } |
|
334 | } | |
330 |
|
335 | |||
331 | .q_filter_box { |
|
336 | .q_filter_box { | |
332 | width: 200px; |
|
337 | width: 200px; | |
333 | } |
|
338 | } | |
334 |
|
339 | |||
335 | } |
|
340 | } | |
336 |
|
341 | |||
337 | #readme .title { |
|
342 | #readme .title { | |
338 | text-transform: none; |
|
343 | text-transform: none; | |
339 | } |
|
344 | } | |
340 |
|
345 | |||
341 | // Lists |
|
346 | // Lists | |
342 | // ------------------------- |
|
347 | // ------------------------- | |
343 |
|
348 | |||
344 | // Unordered and Ordered lists |
|
349 | // Unordered and Ordered lists | |
345 | ul, |
|
350 | ul, | |
346 | ol { |
|
351 | ol { | |
347 | margin-top: 0; |
|
352 | margin-top: 0; | |
348 | margin-bottom: @textmargin; |
|
353 | margin-bottom: @textmargin; | |
349 | ul, |
|
354 | ul, | |
350 | ol { |
|
355 | ol { | |
351 | margin-bottom: 0; |
|
356 | margin-bottom: 0; | |
352 | } |
|
357 | } | |
353 | } |
|
358 | } | |
354 |
|
359 | |||
355 | li { |
|
360 | li { | |
356 | line-height: 2em; |
|
361 | line-height: 2em; | |
357 | } |
|
362 | } | |
358 |
|
363 | |||
359 | ul li { |
|
364 | ul li { | |
360 | position: relative; |
|
365 | position: relative; | |
361 | list-style-type: disc; |
|
366 | list-style-type: disc; | |
362 |
|
367 | |||
363 | p:first-child { |
|
368 | p:first-child { | |
364 | display:inline; |
|
369 | display:inline; | |
365 | } |
|
370 | } | |
366 | } |
|
371 | } | |
367 |
|
372 | |||
368 | // List options |
|
373 | // List options | |
369 |
|
374 | |||
370 | // Unstyled keeps list items block level, just removes default browser padding and list-style |
|
375 | // Unstyled keeps list items block level, just removes default browser padding and list-style | |
371 | .list-unstyled { |
|
376 | .list-unstyled { | |
372 | padding-left: 0; |
|
377 | padding-left: 0; | |
373 | list-style: none; |
|
378 | list-style: none; | |
374 | li:before { content: none; } |
|
379 | li:before { content: none; } | |
375 | } |
|
380 | } | |
376 |
|
381 | |||
377 | // Inline turns list items into inline-block |
|
382 | // Inline turns list items into inline-block | |
378 | .list-inline { |
|
383 | .list-inline { | |
379 | .list-unstyled(); |
|
384 | .list-unstyled(); | |
380 | margin-left: -5px; |
|
385 | margin-left: -5px; | |
381 |
|
386 | |||
382 | > li { |
|
387 | > li { | |
383 | display: inline-block; |
|
388 | display: inline-block; | |
384 | padding-left: 5px; |
|
389 | padding-left: 5px; | |
385 | padding-right: 5px; |
|
390 | padding-right: 5px; | |
386 | } |
|
391 | } | |
387 | } |
|
392 | } | |
388 |
|
393 | |||
389 | // Description Lists |
|
394 | // Description Lists | |
390 |
|
395 | |||
391 | dl { |
|
396 | dl { | |
392 | margin-top: 0; // Remove browser default |
|
397 | margin-top: 0; // Remove browser default | |
393 | margin-bottom: @textmargin; |
|
398 | margin-bottom: @textmargin; | |
394 | } |
|
399 | } | |
395 |
|
400 | |||
396 | dt, |
|
401 | dt, | |
397 | dd { |
|
402 | dd { | |
398 | line-height: 1.4em; |
|
403 | line-height: 1.4em; | |
399 | } |
|
404 | } | |
400 |
|
405 | |||
401 | dt { |
|
406 | dt { | |
402 | margin: @textmargin 0 0 0; |
|
407 | margin: @textmargin 0 0 0; | |
403 | font-weight: @text-bold-weight; |
|
408 | font-weight: @text-bold-weight; | |
404 | font-family: @text-bold; |
|
409 | font-family: @text-bold; | |
405 | } |
|
410 | } | |
406 |
|
411 | |||
407 | dd { |
|
412 | dd { | |
408 | margin-left: 0; // Undo browser default |
|
413 | margin-left: 0; // Undo browser default | |
409 | } |
|
414 | } | |
410 |
|
415 | |||
411 | // Horizontal description lists |
|
416 | // Horizontal description lists | |
412 | // Defaults to being stacked without any of the below styles applied, until the |
|
417 | // Defaults to being stacked without any of the below styles applied, until the | |
413 | // grid breakpoint is reached (default of ~768px). |
|
418 | // grid breakpoint is reached (default of ~768px). | |
414 | // These are used in forms as well; see style guide. |
|
419 | // These are used in forms as well; see style guide. | |
415 | // TODO: lisa: These should really not be used in forms. |
|
420 | // TODO: lisa: These should really not be used in forms. | |
416 |
|
421 | |||
417 | .dl-horizontal { |
|
422 | .dl-horizontal { | |
418 |
|
423 | |||
419 | overflow: hidden; |
|
424 | overflow: hidden; | |
420 | margin-bottom: @space; |
|
425 | margin-bottom: @space; | |
421 |
|
426 | |||
422 | dt, dd { |
|
427 | dt, dd { | |
423 | float: left; |
|
428 | float: left; | |
424 | margin: 5px 0 5px 0; |
|
429 | margin: 5px 0 5px 0; | |
425 | } |
|
430 | } | |
426 |
|
431 | |||
427 | dt { |
|
432 | dt { | |
428 | clear: left; |
|
433 | clear: left; | |
429 | width: @label-width - @form-vertical-margin; |
|
434 | width: @label-width - @form-vertical-margin; | |
430 | } |
|
435 | } | |
431 |
|
436 | |||
432 | dd { |
|
437 | dd { | |
433 | &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present |
|
438 | &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present | |
434 | margin-left: @form-vertical-margin; |
|
439 | margin-left: @form-vertical-margin; | |
435 | max-width: @form-max-width - (@label-width - @form-vertical-margin) - @form-vertical-margin; |
|
440 | max-width: @form-max-width - (@label-width - @form-vertical-margin) - @form-vertical-margin; | |
436 | } |
|
441 | } | |
437 |
|
442 | |||
438 | pre { |
|
443 | pre { | |
439 | margin: 0; |
|
444 | margin: 0; | |
440 | } |
|
445 | } | |
441 |
|
446 | |||
442 | &.settings { |
|
447 | &.settings { | |
443 | dt { |
|
448 | dt { | |
444 | text-align: left; |
|
449 | text-align: left; | |
445 | } |
|
450 | } | |
446 | } |
|
451 | } | |
447 |
|
452 | |||
448 | @media (min-width: 768px) { |
|
453 | @media (min-width: 768px) { | |
449 | dt { |
|
454 | dt { | |
450 | float: left; |
|
455 | float: left; | |
451 | width: 185px; |
|
456 | width: 185px; | |
452 | clear: left; |
|
457 | clear: left; | |
453 | text-align: right; |
|
458 | text-align: right; | |
454 | } |
|
459 | } | |
455 | dd { |
|
460 | dd { | |
456 | margin-left: 20px; |
|
461 | margin-left: 20px; | |
457 | } |
|
462 | } | |
458 | } |
|
463 | } | |
459 | } |
|
464 | } | |
460 |
|
465 | |||
461 |
|
466 | |||
462 | // Misc |
|
467 | // Misc | |
463 | // ------------------------- |
|
468 | // ------------------------- | |
464 |
|
469 | |||
465 | // Abbreviations and acronyms |
|
470 | // Abbreviations and acronyms | |
466 | abbr[title], |
|
471 | abbr[title], | |
467 | abbr[data-original-title] { |
|
472 | abbr[data-original-title] { | |
468 | cursor: help; |
|
473 | cursor: help; | |
469 | border-bottom: @border-thickness dotted @grey4; |
|
474 | border-bottom: @border-thickness dotted @grey4; | |
470 | } |
|
475 | } | |
471 | .initialism { |
|
476 | .initialism { | |
472 | font-size: 90%; |
|
477 | font-size: 90%; | |
473 | text-transform: uppercase; |
|
478 | text-transform: uppercase; | |
474 | } |
|
479 | } | |
475 |
|
480 | |||
476 | // Blockquotes |
|
481 | // Blockquotes | |
477 | blockquote { |
|
482 | blockquote { | |
478 | padding: 1em 2em; |
|
483 | padding: 1em 2em; | |
479 | margin: 0 0 2em; |
|
484 | margin: 0 0 2em; | |
480 | font-size: @basefontsize; |
|
485 | font-size: @basefontsize; | |
481 | border-left: 2px solid @grey6; |
|
486 | border-left: 2px solid @grey6; | |
482 |
|
487 | |||
483 | p, |
|
488 | p, | |
484 | ul, |
|
489 | ul, | |
485 | ol { |
|
490 | ol { | |
486 | &:last-child { |
|
491 | &:last-child { | |
487 | margin-bottom: 0; |
|
492 | margin-bottom: 0; | |
488 | } |
|
493 | } | |
489 | } |
|
494 | } | |
490 |
|
495 | |||
491 | footer, |
|
496 | footer, | |
492 | small, |
|
497 | small, | |
493 | .small { |
|
498 | .small { | |
494 | display: block; |
|
499 | display: block; | |
495 | font-size: 80%; |
|
500 | font-size: 80%; | |
496 |
|
501 | |||
497 | &:before { |
|
502 | &:before { | |
498 | content: '\2014 \00A0'; // em dash, nbsp |
|
503 | content: '\2014 \00A0'; // em dash, nbsp | |
499 | } |
|
504 | } | |
500 | } |
|
505 | } | |
501 | } |
|
506 | } | |
502 |
|
507 | |||
503 | // Opposite alignment of blockquote |
|
508 | // Opposite alignment of blockquote | |
504 | // |
|
509 | // | |
505 | .blockquote-reverse, |
|
510 | .blockquote-reverse, | |
506 | blockquote.pull-right { |
|
511 | blockquote.pull-right { | |
507 | padding-right: 15px; |
|
512 | padding-right: 15px; | |
508 | padding-left: 0; |
|
513 | padding-left: 0; | |
509 | border-right: 5px solid @grey6; |
|
514 | border-right: 5px solid @grey6; | |
510 | border-left: 0; |
|
515 | border-left: 0; | |
511 | text-align: right; |
|
516 | text-align: right; | |
512 |
|
517 | |||
513 | // Account for citation |
|
518 | // Account for citation | |
514 | footer, |
|
519 | footer, | |
515 | small, |
|
520 | small, | |
516 | .small { |
|
521 | .small { | |
517 | &:before { content: ''; } |
|
522 | &:before { content: ''; } | |
518 | &:after { |
|
523 | &:after { | |
519 | content: '\00A0 \2014'; // nbsp, em dash |
|
524 | content: '\00A0 \2014'; // nbsp, em dash | |
520 | } |
|
525 | } | |
521 | } |
|
526 | } | |
522 | } |
|
527 | } | |
523 |
|
528 | |||
524 | // Addresses |
|
529 | // Addresses | |
525 | address { |
|
530 | address { | |
526 | margin-bottom: 2em; |
|
531 | margin-bottom: 2em; | |
527 | font-style: normal; |
|
532 | font-style: normal; | |
528 | line-height: 1.8em; |
|
533 | line-height: 1.8em; | |
529 | } |
|
534 | } | |
530 |
|
535 | |||
531 | .error-message { |
|
536 | .error-message { | |
532 | display: block; |
|
537 | display: block; | |
533 | margin: @padding/3 0; |
|
538 | margin: @padding/3 0; | |
534 | color: @alert2; |
|
539 | color: @alert2; | |
535 | } |
|
540 | } | |
536 |
|
541 | |||
537 | .issue-tracker-link { |
|
542 | .issue-tracker-link { | |
538 | color: @rcblue; |
|
543 | color: @rcblue; | |
539 | } |
|
544 | } | |
540 |
|
545 | |||
541 | .info_text{ |
|
546 | .info_text{ | |
542 | font-size: @basefontsize; |
|
547 | font-size: @basefontsize; | |
543 | color: @grey4; |
|
548 | color: @grey4; | |
544 | font-family: @text-regular; |
|
549 | font-family: @text-regular; | |
545 | } |
|
550 | } | |
546 |
|
551 | |||
547 | .help-block-inline { |
|
552 | .help-block-inline { | |
548 | margin: 0; |
|
553 | margin: 0; | |
549 | } |
|
554 | } | |
550 |
|
555 | |||
551 | // help block text |
|
556 | // help block text | |
552 | .help-block { |
|
557 | .help-block { | |
553 | display: block; |
|
558 | display: block; | |
554 | margin: 0 0 @padding; |
|
559 | margin: 0 0 @padding; | |
555 | color: @grey4; |
|
560 | color: @grey4; | |
556 | font-family: @text-light; |
|
561 | font-family: @text-light; | |
557 | &.pre-formatting { |
|
562 | &.pre-formatting { | |
558 | white-space: pre-wrap; |
|
563 | white-space: pre-wrap; | |
559 | } |
|
564 | } | |
560 | } |
|
565 | } | |
561 |
|
566 | |||
562 | .error-message { |
|
567 | .error-message { | |
563 | display: block; |
|
568 | display: block; | |
564 | margin: @padding/3 0; |
|
569 | margin: @padding/3 0; | |
565 | color: @alert2; |
|
570 | color: @alert2; | |
566 | } |
|
571 | } |
@@ -1,321 +1,321 b'' | |||||
1 | <%inherit file="/base/base.mako"/> |
|
1 | <%inherit file="/base/base.mako"/> | |
2 |
|
2 | |||
3 | <%def name="title(*args)"> |
|
3 | <%def name="title(*args)"> | |
4 | ${_('%s Files') % c.repo_name} |
|
4 | ${_('%s Files') % c.repo_name} | |
5 | %if hasattr(c,'file'): |
|
5 | %if hasattr(c,'file'): | |
6 | · ${h.safe_unicode(c.file.path) or '\\'} |
|
6 | · ${h.safe_unicode(c.file.path) or '\\'} | |
7 | %endif |
|
7 | %endif | |
8 |
|
8 | |||
9 | %if c.rhodecode_name: |
|
9 | %if c.rhodecode_name: | |
10 | · ${h.branding(c.rhodecode_name)} |
|
10 | · ${h.branding(c.rhodecode_name)} | |
11 | %endif |
|
11 | %endif | |
12 | </%def> |
|
12 | </%def> | |
13 |
|
13 | |||
14 | <%def name="breadcrumbs_links()"> |
|
14 | <%def name="breadcrumbs_links()"> | |
15 | ${_('Files')} |
|
15 | ${_('Files')} | |
16 | %if c.file: |
|
16 | %if c.file: | |
17 | @ ${h.show_id(c.commit)} |
|
17 | @ ${h.show_id(c.commit)} | |
18 | %endif |
|
18 | %endif | |
19 | </%def> |
|
19 | </%def> | |
20 |
|
20 | |||
21 | <%def name="menu_bar_nav()"> |
|
21 | <%def name="menu_bar_nav()"> | |
22 | ${self.menu_items(active='repositories')} |
|
22 | ${self.menu_items(active='repositories')} | |
23 | </%def> |
|
23 | </%def> | |
24 |
|
24 | |||
25 | <%def name="menu_bar_subnav()"> |
|
25 | <%def name="menu_bar_subnav()"> | |
26 | ${self.repo_menu(active='files')} |
|
26 | ${self.repo_menu(active='files')} | |
27 | </%def> |
|
27 | </%def> | |
28 |
|
28 | |||
29 | <%def name="main()"> |
|
29 | <%def name="main()"> | |
30 |
<div id="pjax-container" |
|
30 | <div id="pjax-container"> | |
31 | <div id="files_data"> |
|
31 | <div id="files_data"> | |
32 | <%include file='files_pjax.mako'/> |
|
32 | <%include file='files_pjax.mako'/> | |
33 | </div> |
|
33 | </div> | |
34 | </div> |
|
34 | </div> | |
35 | <script> |
|
35 | <script> | |
36 | var curState = { |
|
36 | var curState = { | |
37 | commit_id: "${c.commit.raw_id}" |
|
37 | commit_id: "${c.commit.raw_id}" | |
38 | }; |
|
38 | }; | |
39 |
|
39 | |||
40 | var getState = function(context) { |
|
40 | var getState = function(context) { | |
41 | var url = $(location).attr('href'); |
|
41 | var url = $(location).attr('href'); | |
42 | var _base_url = '${h.route_path("repo_files",repo_name=c.repo_name,commit_id='',f_path='')}'; |
|
42 | var _base_url = '${h.route_path("repo_files",repo_name=c.repo_name,commit_id='',f_path='')}'; | |
43 | var _annotate_url = '${h.route_path("repo_files:annotated",repo_name=c.repo_name,commit_id='',f_path='')}'; |
|
43 | var _annotate_url = '${h.route_path("repo_files:annotated",repo_name=c.repo_name,commit_id='',f_path='')}'; | |
44 | _base_url = _base_url.replace('//', '/'); |
|
44 | _base_url = _base_url.replace('//', '/'); | |
45 | _annotate_url = _annotate_url.replace('//', '/'); |
|
45 | _annotate_url = _annotate_url.replace('//', '/'); | |
46 |
|
46 | |||
47 | //extract f_path from url. |
|
47 | //extract f_path from url. | |
48 | var parts = url.split(_base_url); |
|
48 | var parts = url.split(_base_url); | |
49 | if (parts.length != 2) { |
|
49 | if (parts.length != 2) { | |
50 | parts = url.split(_annotate_url); |
|
50 | parts = url.split(_annotate_url); | |
51 | if (parts.length != 2) { |
|
51 | if (parts.length != 2) { | |
52 | var rev = "tip"; |
|
52 | var rev = "tip"; | |
53 | var f_path = ""; |
|
53 | var f_path = ""; | |
54 | } else { |
|
54 | } else { | |
55 | var parts2 = parts[1].split('/'); |
|
55 | var parts2 = parts[1].split('/'); | |
56 | var rev = parts2.shift(); // pop the first element which is the revision |
|
56 | var rev = parts2.shift(); // pop the first element which is the revision | |
57 | var f_path = parts2.join('/'); |
|
57 | var f_path = parts2.join('/'); | |
58 | } |
|
58 | } | |
59 |
|
59 | |||
60 | } else { |
|
60 | } else { | |
61 | var parts2 = parts[1].split('/'); |
|
61 | var parts2 = parts[1].split('/'); | |
62 | var rev = parts2.shift(); // pop the first element which is the revision |
|
62 | var rev = parts2.shift(); // pop the first element which is the revision | |
63 | var f_path = parts2.join('/'); |
|
63 | var f_path = parts2.join('/'); | |
64 | } |
|
64 | } | |
65 |
|
65 | |||
66 | var _node_list_url = pyroutes.url('repo_files_nodelist', |
|
66 | var _node_list_url = pyroutes.url('repo_files_nodelist', | |
67 | {repo_name: templateContext.repo_name, |
|
67 | {repo_name: templateContext.repo_name, | |
68 | commit_id: rev, f_path: f_path}); |
|
68 | commit_id: rev, f_path: f_path}); | |
69 | var _url_base = pyroutes.url('repo_files', |
|
69 | var _url_base = pyroutes.url('repo_files', | |
70 | {repo_name: templateContext.repo_name, |
|
70 | {repo_name: templateContext.repo_name, | |
71 | commit_id: rev, f_path:'__FPATH__'}); |
|
71 | commit_id: rev, f_path:'__FPATH__'}); | |
72 | return { |
|
72 | return { | |
73 | url: url, |
|
73 | url: url, | |
74 | f_path: f_path, |
|
74 | f_path: f_path, | |
75 | rev: rev, |
|
75 | rev: rev, | |
76 | commit_id: curState.commit_id, |
|
76 | commit_id: curState.commit_id, | |
77 | node_list_url: _node_list_url, |
|
77 | node_list_url: _node_list_url, | |
78 | url_base: _url_base |
|
78 | url_base: _url_base | |
79 | }; |
|
79 | }; | |
80 | }; |
|
80 | }; | |
81 |
|
81 | |||
82 | var metadataRequest = null; |
|
82 | var metadataRequest = null; | |
83 | var getFilesMetadata = function() { |
|
83 | var getFilesMetadata = function() { | |
84 | if (metadataRequest && metadataRequest.readyState != 4) { |
|
84 | if (metadataRequest && metadataRequest.readyState != 4) { | |
85 | metadataRequest.abort(); |
|
85 | metadataRequest.abort(); | |
86 | } |
|
86 | } | |
87 | if (fileSourcePage) { |
|
87 | if (fileSourcePage) { | |
88 | return false; |
|
88 | return false; | |
89 | } |
|
89 | } | |
90 |
|
90 | |||
91 | if ($('#file-tree-wrapper').hasClass('full-load')) { |
|
91 | if ($('#file-tree-wrapper').hasClass('full-load')) { | |
92 | // in case our HTML wrapper has full-load class we don't |
|
92 | // in case our HTML wrapper has full-load class we don't | |
93 | // trigger the async load of metadata |
|
93 | // trigger the async load of metadata | |
94 | return false; |
|
94 | return false; | |
95 | } |
|
95 | } | |
96 |
|
96 | |||
97 | var state = getState('metadata'); |
|
97 | var state = getState('metadata'); | |
98 | var url_data = { |
|
98 | var url_data = { | |
99 | 'repo_name': templateContext.repo_name, |
|
99 | 'repo_name': templateContext.repo_name, | |
100 | 'commit_id': state.commit_id, |
|
100 | 'commit_id': state.commit_id, | |
101 | 'f_path': state.f_path |
|
101 | 'f_path': state.f_path | |
102 | }; |
|
102 | }; | |
103 |
|
103 | |||
104 | var url = pyroutes.url('repo_nodetree_full', url_data); |
|
104 | var url = pyroutes.url('repo_nodetree_full', url_data); | |
105 |
|
105 | |||
106 | metadataRequest = $.ajax({url: url}); |
|
106 | metadataRequest = $.ajax({url: url}); | |
107 |
|
107 | |||
108 | metadataRequest.done(function(data) { |
|
108 | metadataRequest.done(function(data) { | |
109 | $('#file-tree').html(data); |
|
109 | $('#file-tree').html(data); | |
110 | timeagoActivate(); |
|
110 | timeagoActivate(); | |
111 | }); |
|
111 | }); | |
112 | metadataRequest.fail(function (data, textStatus, errorThrown) { |
|
112 | metadataRequest.fail(function (data, textStatus, errorThrown) { | |
113 | console.log(data); |
|
113 | console.log(data); | |
114 | if (data.status != 0) { |
|
114 | if (data.status != 0) { | |
115 | alert("Error while fetching metadata.\nError code {0} ({1}).Please consider reloading the page".format(data.status,data.statusText)); |
|
115 | alert("Error while fetching metadata.\nError code {0} ({1}).Please consider reloading the page".format(data.status,data.statusText)); | |
116 | } |
|
116 | } | |
117 | }); |
|
117 | }); | |
118 | }; |
|
118 | }; | |
119 |
|
119 | |||
120 | var callbacks = function() { |
|
120 | var callbacks = function() { | |
121 | var state = getState('callbacks'); |
|
121 | var state = getState('callbacks'); | |
122 | timeagoActivate(); |
|
122 | timeagoActivate(); | |
123 |
|
123 | |||
124 | // used for history, and switch to |
|
124 | // used for history, and switch to | |
125 | var initialCommitData = { |
|
125 | var initialCommitData = { | |
126 | id: null, |
|
126 | id: null, | |
127 | text: '${_("Pick Commit")}', |
|
127 | text: '${_("Pick Commit")}', | |
128 | type: 'sha', |
|
128 | type: 'sha', | |
129 | raw_id: null, |
|
129 | raw_id: null, | |
130 | files_url: null |
|
130 | files_url: null | |
131 | }; |
|
131 | }; | |
132 |
|
132 | |||
133 | if ($('#trimmed_message_box').height() < 50) { |
|
133 | if ($('#trimmed_message_box').height() < 50) { | |
134 | $('#message_expand').hide(); |
|
134 | $('#message_expand').hide(); | |
135 | } |
|
135 | } | |
136 |
|
136 | |||
137 | $('#message_expand').on('click', function(e) { |
|
137 | $('#message_expand').on('click', function(e) { | |
138 | $('#trimmed_message_box').css('max-height', 'none'); |
|
138 | $('#trimmed_message_box').css('max-height', 'none'); | |
139 | $(this).hide(); |
|
139 | $(this).hide(); | |
140 | }); |
|
140 | }); | |
141 |
|
141 | |||
142 | if (fileSourcePage) { |
|
142 | if (fileSourcePage) { | |
143 | // variants for with source code, not tree view |
|
143 | // variants for with source code, not tree view | |
144 |
|
144 | |||
145 | // select code link event |
|
145 | // select code link event | |
146 | $("#hlcode").mouseup(getSelectionLink); |
|
146 | $("#hlcode").mouseup(getSelectionLink); | |
147 |
|
147 | |||
148 | // file history select2 |
|
148 | // file history select2 | |
149 | select2FileHistorySwitcher('#diff1', initialCommitData, state); |
|
149 | select2FileHistorySwitcher('#diff1', initialCommitData, state); | |
150 |
|
150 | |||
151 | // show at, diff to actions handlers |
|
151 | // show at, diff to actions handlers | |
152 | $('#diff1').on('change', function(e) { |
|
152 | $('#diff1').on('change', function(e) { | |
153 | $('#diff_to_commit').removeClass('disabled').removeAttr("disabled"); |
|
153 | $('#diff_to_commit').removeClass('disabled').removeAttr("disabled"); | |
154 | $('#diff_to_commit').val(_gettext('Diff to Commit ') + e.val.truncateAfter(8, '...')); |
|
154 | $('#diff_to_commit').val(_gettext('Diff to Commit ') + e.val.truncateAfter(8, '...')); | |
155 |
|
155 | |||
156 | $('#show_at_commit').removeClass('disabled').removeAttr("disabled"); |
|
156 | $('#show_at_commit').removeClass('disabled').removeAttr("disabled"); | |
157 | $('#show_at_commit').val(_gettext('Show at Commit ') + e.val.truncateAfter(8, '...')); |
|
157 | $('#show_at_commit').val(_gettext('Show at Commit ') + e.val.truncateAfter(8, '...')); | |
158 | }); |
|
158 | }); | |
159 |
|
159 | |||
160 | $('#diff_to_commit').on('click', function(e) { |
|
160 | $('#diff_to_commit').on('click', function(e) { | |
161 | var diff1 = $('#diff1').val(); |
|
161 | var diff1 = $('#diff1').val(); | |
162 | var diff2 = $('#diff2').val(); |
|
162 | var diff2 = $('#diff2').val(); | |
163 |
|
163 | |||
164 | var url_data = { |
|
164 | var url_data = { | |
165 | repo_name: templateContext.repo_name, |
|
165 | repo_name: templateContext.repo_name, | |
166 | source_ref: diff1, |
|
166 | source_ref: diff1, | |
167 | source_ref_type: 'rev', |
|
167 | source_ref_type: 'rev', | |
168 | target_ref: diff2, |
|
168 | target_ref: diff2, | |
169 | target_ref_type: 'rev', |
|
169 | target_ref_type: 'rev', | |
170 | merge: 1, |
|
170 | merge: 1, | |
171 | f_path: state.f_path |
|
171 | f_path: state.f_path | |
172 | }; |
|
172 | }; | |
173 | window.location = pyroutes.url('repo_compare', url_data); |
|
173 | window.location = pyroutes.url('repo_compare', url_data); | |
174 | }); |
|
174 | }); | |
175 |
|
175 | |||
176 | $('#show_at_commit').on('click', function(e) { |
|
176 | $('#show_at_commit').on('click', function(e) { | |
177 | var diff1 = $('#diff1').val(); |
|
177 | var diff1 = $('#diff1').val(); | |
178 |
|
178 | |||
179 | var annotate = $('#annotate').val(); |
|
179 | var annotate = $('#annotate').val(); | |
180 | if (annotate === "True") { |
|
180 | if (annotate === "True") { | |
181 | var url = pyroutes.url('repo_files:annotated', |
|
181 | var url = pyroutes.url('repo_files:annotated', | |
182 | {'repo_name': templateContext.repo_name, |
|
182 | {'repo_name': templateContext.repo_name, | |
183 | 'commit_id': diff1, 'f_path': state.f_path}); |
|
183 | 'commit_id': diff1, 'f_path': state.f_path}); | |
184 | } else { |
|
184 | } else { | |
185 | var url = pyroutes.url('repo_files', |
|
185 | var url = pyroutes.url('repo_files', | |
186 | {'repo_name': templateContext.repo_name, |
|
186 | {'repo_name': templateContext.repo_name, | |
187 | 'commit_id': diff1, 'f_path': state.f_path}); |
|
187 | 'commit_id': diff1, 'f_path': state.f_path}); | |
188 | } |
|
188 | } | |
189 | window.location = url; |
|
189 | window.location = url; | |
190 |
|
190 | |||
191 | }); |
|
191 | }); | |
192 |
|
192 | |||
193 | // show more authors |
|
193 | // show more authors | |
194 | $('#show_authors').on('click', function(e) { |
|
194 | $('#show_authors').on('click', function(e) { | |
195 | e.preventDefault(); |
|
195 | e.preventDefault(); | |
196 | var url = pyroutes.url('repo_file_authors', |
|
196 | var url = pyroutes.url('repo_file_authors', | |
197 | {'repo_name': templateContext.repo_name, |
|
197 | {'repo_name': templateContext.repo_name, | |
198 | 'commit_id': state.rev, 'f_path': state.f_path}); |
|
198 | 'commit_id': state.rev, 'f_path': state.f_path}); | |
199 |
|
199 | |||
200 | $.pjax({ |
|
200 | $.pjax({ | |
201 | url: url, |
|
201 | url: url, | |
202 | data: 'annotate=${"1" if c.annotate else "0"}', |
|
202 | data: 'annotate=${"1" if c.annotate else "0"}', | |
203 | container: '#file_authors', |
|
203 | container: '#file_authors', | |
204 | push: false, |
|
204 | push: false, | |
205 | timeout: pjaxTimeout |
|
205 | timeout: pjaxTimeout | |
206 | }).complete(function(){ |
|
206 | }).complete(function(){ | |
207 | $('#show_authors').hide(); |
|
207 | $('#show_authors').hide(); | |
208 | $('#file_authors_title').html(_gettext('All Authors')) |
|
208 | $('#file_authors_title').html(_gettext('All Authors')) | |
209 | }) |
|
209 | }) | |
210 | }); |
|
210 | }); | |
211 |
|
211 | |||
212 | // load file short history |
|
212 | // load file short history | |
213 | $('#file_history_overview').on('click', function(e) { |
|
213 | $('#file_history_overview').on('click', function(e) { | |
214 | e.preventDefault(); |
|
214 | e.preventDefault(); | |
215 | path = state.f_path; |
|
215 | path = state.f_path; | |
216 | if (path.indexOf("#") >= 0) { |
|
216 | if (path.indexOf("#") >= 0) { | |
217 | path = path.slice(0, path.indexOf("#")); |
|
217 | path = path.slice(0, path.indexOf("#")); | |
218 | } |
|
218 | } | |
219 | var url = pyroutes.url('repo_changelog_file', |
|
219 | var url = pyroutes.url('repo_changelog_file', | |
220 | {'repo_name': templateContext.repo_name, |
|
220 | {'repo_name': templateContext.repo_name, | |
221 | 'commit_id': state.rev, 'f_path': path, 'limit': 6}); |
|
221 | 'commit_id': state.rev, 'f_path': path, 'limit': 6}); | |
222 | $('#file_history_container').show(); |
|
222 | $('#file_history_container').show(); | |
223 | $('#file_history_container').html('<div class="file-history-inner">{0}</div>'.format(_gettext('Loading ...'))); |
|
223 | $('#file_history_container').html('<div class="file-history-inner">{0}</div>'.format(_gettext('Loading ...'))); | |
224 |
|
224 | |||
225 | $.pjax({ |
|
225 | $.pjax({ | |
226 | url: url, |
|
226 | url: url, | |
227 | container: '#file_history_container', |
|
227 | container: '#file_history_container', | |
228 | push: false, |
|
228 | push: false, | |
229 | timeout: pjaxTimeout |
|
229 | timeout: pjaxTimeout | |
230 | }) |
|
230 | }) | |
231 | }); |
|
231 | }); | |
232 |
|
232 | |||
233 | } |
|
233 | } | |
234 | else { |
|
234 | else { | |
235 | getFilesMetadata(); |
|
235 | getFilesMetadata(); | |
236 |
|
236 | |||
237 | // fuzzy file filter |
|
237 | // fuzzy file filter | |
238 | fileBrowserListeners(state.node_list_url, state.url_base); |
|
238 | fileBrowserListeners(state.node_list_url, state.url_base); | |
239 |
|
239 | |||
240 | // switch to widget |
|
240 | // switch to widget | |
241 | select2RefSwitcher('#refs_filter', initialCommitData); |
|
241 | select2RefSwitcher('#refs_filter', initialCommitData); | |
242 | $('#refs_filter').on('change', function(e) { |
|
242 | $('#refs_filter').on('change', function(e) { | |
243 | var data = $('#refs_filter').select2('data'); |
|
243 | var data = $('#refs_filter').select2('data'); | |
244 | curState.commit_id = data.raw_id; |
|
244 | curState.commit_id = data.raw_id; | |
245 | $.pjax({url: data.files_url, container: '#pjax-container', timeout: pjaxTimeout}); |
|
245 | $.pjax({url: data.files_url, container: '#pjax-container', timeout: pjaxTimeout}); | |
246 | }); |
|
246 | }); | |
247 |
|
247 | |||
248 | $("#prev_commit_link").on('click', function(e) { |
|
248 | $("#prev_commit_link").on('click', function(e) { | |
249 | var data = $(this).data(); |
|
249 | var data = $(this).data(); | |
250 | curState.commit_id = data.commitId; |
|
250 | curState.commit_id = data.commitId; | |
251 | }); |
|
251 | }); | |
252 |
|
252 | |||
253 | $("#next_commit_link").on('click', function(e) { |
|
253 | $("#next_commit_link").on('click', function(e) { | |
254 | var data = $(this).data(); |
|
254 | var data = $(this).data(); | |
255 | curState.commit_id = data.commitId; |
|
255 | curState.commit_id = data.commitId; | |
256 | }); |
|
256 | }); | |
257 |
|
257 | |||
258 | $('#at_rev').on("keypress", function(e) { |
|
258 | $('#at_rev').on("keypress", function(e) { | |
259 | /* ENTER PRESSED */ |
|
259 | /* ENTER PRESSED */ | |
260 | if (e.keyCode === 13) { |
|
260 | if (e.keyCode === 13) { | |
261 | var rev = $('#at_rev').val(); |
|
261 | var rev = $('#at_rev').val(); | |
262 | // explicit reload page here. with pjax entering bad input |
|
262 | // explicit reload page here. with pjax entering bad input | |
263 | // produces not so nice results |
|
263 | // produces not so nice results | |
264 | window.location = pyroutes.url('repo_files', |
|
264 | window.location = pyroutes.url('repo_files', | |
265 | {'repo_name': templateContext.repo_name, |
|
265 | {'repo_name': templateContext.repo_name, | |
266 | 'commit_id': rev, 'f_path': state.f_path}); |
|
266 | 'commit_id': rev, 'f_path': state.f_path}); | |
267 | } |
|
267 | } | |
268 | }); |
|
268 | }); | |
269 | } |
|
269 | } | |
270 | }; |
|
270 | }; | |
271 |
|
271 | |||
272 | var pjaxTimeout = 5000; |
|
272 | var pjaxTimeout = 5000; | |
273 |
|
273 | |||
274 | $(document).pjax(".pjax-link", "#pjax-container", { |
|
274 | $(document).pjax(".pjax-link", "#pjax-container", { | |
275 | "fragment": "#pjax-content", |
|
275 | "fragment": "#pjax-content", | |
276 | "maxCacheLength": 1000, |
|
276 | "maxCacheLength": 1000, | |
277 | "timeout": pjaxTimeout |
|
277 | "timeout": pjaxTimeout | |
278 | }); |
|
278 | }); | |
279 |
|
279 | |||
280 | // define global back/forward states |
|
280 | // define global back/forward states | |
281 | var isPjaxPopState = false; |
|
281 | var isPjaxPopState = false; | |
282 | $(document).on('pjax:popstate', function() { |
|
282 | $(document).on('pjax:popstate', function() { | |
283 | isPjaxPopState = true; |
|
283 | isPjaxPopState = true; | |
284 | }); |
|
284 | }); | |
285 |
|
285 | |||
286 | $(document).on('pjax:end', function(xhr, options) { |
|
286 | $(document).on('pjax:end', function(xhr, options) { | |
287 | if (isPjaxPopState) { |
|
287 | if (isPjaxPopState) { | |
288 | isPjaxPopState = false; |
|
288 | isPjaxPopState = false; | |
289 | callbacks(); |
|
289 | callbacks(); | |
290 | _NODEFILTER.resetFilter(); |
|
290 | _NODEFILTER.resetFilter(); | |
291 | } |
|
291 | } | |
292 |
|
292 | |||
293 | // run callback for tracking if defined for google analytics etc. |
|
293 | // run callback for tracking if defined for google analytics etc. | |
294 | // this is used to trigger tracking on pjax |
|
294 | // this is used to trigger tracking on pjax | |
295 | if (typeof window.rhodecode_statechange_callback !== 'undefined') { |
|
295 | if (typeof window.rhodecode_statechange_callback !== 'undefined') { | |
296 | var state = getState('statechange'); |
|
296 | var state = getState('statechange'); | |
297 | rhodecode_statechange_callback(state.url, null) |
|
297 | rhodecode_statechange_callback(state.url, null) | |
298 | } |
|
298 | } | |
299 | }); |
|
299 | }); | |
300 |
|
300 | |||
301 | $(document).on('pjax:success', function(event, xhr, options) { |
|
301 | $(document).on('pjax:success', function(event, xhr, options) { | |
302 | if (event.target.id == "file_history_container") { |
|
302 | if (event.target.id == "file_history_container") { | |
303 | $('#file_history_overview').hide(); |
|
303 | $('#file_history_overview').hide(); | |
304 | $('#file_history_overview_full').show(); |
|
304 | $('#file_history_overview_full').show(); | |
305 | timeagoActivate(); |
|
305 | timeagoActivate(); | |
306 | } else { |
|
306 | } else { | |
307 | callbacks(); |
|
307 | callbacks(); | |
308 | } |
|
308 | } | |
309 | }); |
|
309 | }); | |
310 |
|
310 | |||
311 | $(document).ready(function() { |
|
311 | $(document).ready(function() { | |
312 | callbacks(); |
|
312 | callbacks(); | |
313 | var search_GET = "${request.GET.get('search','')}"; |
|
313 | var search_GET = "${request.GET.get('search','')}"; | |
314 | if (search_GET === "1") { |
|
314 | if (search_GET === "1") { | |
315 | _NODEFILTER.initFilter(); |
|
315 | _NODEFILTER.initFilter(); | |
316 | } |
|
316 | } | |
317 | }); |
|
317 | }); | |
318 |
|
318 | |||
319 | </script> |
|
319 | </script> | |
320 |
|
320 | |||
321 | </%def> |
|
321 | </%def> |
@@ -1,49 +1,46 b'' | |||||
1 | <%def name="title(*args)"> |
|
1 | <%def name="title(*args)"> | |
2 | ${_('{} Files').format(c.repo_name)} |
|
2 | ${_('{} Files').format(c.repo_name)} | |
3 | %if hasattr(c,'file'): |
|
3 | %if hasattr(c,'file'): | |
4 | · ${(h.safe_unicode(c.file.path) or '\\')} |
|
4 | · ${(h.safe_unicode(c.file.path) or '\\')} | |
5 | %endif |
|
5 | %endif | |
6 |
|
6 | |||
7 | %if c.rhodecode_name: |
|
7 | %if c.rhodecode_name: | |
8 | · ${h.branding(c.rhodecode_name)} |
|
8 | · ${h.branding(c.rhodecode_name)} | |
9 | %endif |
|
9 | %endif | |
10 | </%def> |
|
10 | </%def> | |
11 |
|
11 | |||
12 | <div id="pjax-content" data-title="${self.title()}"> |
|
12 | <div id="pjax-content" data-title="${self.title()}"> | |
13 | <script> |
|
13 | <script> | |
14 | // set the pageSource variable |
|
14 | // set the pageSource variable | |
15 | var fileSourcePage = ${c.file_source_page}; |
|
15 | var fileSourcePage = ${c.file_source_page}; | |
16 | </script> |
|
16 | </script> | |
17 |
|
17 | |||
18 | <div class="summary-detail"> |
|
18 | <div class="summary-detail"> | |
19 | <div class="summary-detail-header"> |
|
19 | <div class="summary-detail-header"> | |
20 | <div class="breadcrumbs files_location"> |
|
20 | <div class="breadcrumbs files_location"> | |
21 | <h4> |
|
21 | <h4> | |
22 |
|
|
22 | ${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.file.path)} | |
23 | %if c.annotate: |
|
23 | %if c.annotate: | |
24 | - ${_('annotation')} |
|
24 | - ${_('annotation')} | |
25 | %endif |
|
25 | %endif | |
26 | </h4> |
|
26 | </h4> | |
27 | </div> |
|
27 | </div> | |
28 | <div class="btn-collapse" data-toggle="summary-details"> |
|
|||
29 | ${_('Show More')} |
|
|||
30 | </div> |
|
|||
31 | </div><!--end summary-detail-header--> |
|
28 | </div><!--end summary-detail-header--> | |
32 |
|
29 | |||
33 | % if c.file.is_submodule(): |
|
30 | % if c.file.is_submodule(): | |
34 | <span class="submodule-dir">Submodule ${h.escape(c.file.name)}</span> |
|
31 | <span class="submodule-dir">Submodule ${h.escape(c.file.name)}</span> | |
35 | % elif c.file.is_dir(): |
|
32 | % elif c.file.is_dir(): | |
36 | <%include file='files_tree_header.mako'/> |
|
33 | <%include file='files_tree_header.mako'/> | |
37 | % else: |
|
34 | % else: | |
38 | <%include file='files_source_header.mako'/> |
|
35 | <%include file='files_source_header.mako'/> | |
39 | % endif |
|
36 | % endif | |
40 |
|
37 | |||
41 | </div> <!--end summary-detail--> |
|
38 | </div> <!--end summary-detail--> | |
42 |
|
39 | |||
43 | % if c.file.is_dir(): |
|
40 | % if c.file.is_dir(): | |
44 | <%include file='files_browser.mako'/> |
|
41 | <%include file='files_browser.mako'/> | |
45 | % else: |
|
42 | % else: | |
46 | <%include file='files_source.mako'/> |
|
43 | <%include file='files_source.mako'/> | |
47 | % endif |
|
44 | % endif | |
48 |
|
45 | |||
49 | </div> |
|
46 | </div> |
@@ -1,45 +1,37 b'' | |||||
1 | <%namespace name="base" file="/base/base.mako"/> |
|
1 | <%namespace name="base" file="/base/base.mako"/> | |
2 | <%namespace name="file_base" file="/files/base.mako"/> |
|
2 | <%namespace name="file_base" file="/files/base.mako"/> | |
3 |
|
3 | |||
4 | <div class="fieldset collapsable-content no-hide" data-toggle="summary-details"> |
|
4 | <div class="summary"> | |
5 |
<div class=" |
|
5 | <div class="fieldset"> | |
6 | ${_('Description')}: |
|
6 | <div class="left-content"> | |
7 | </div> |
|
7 | <div class="fieldset collapsable-content no-hide" data-toggle="summary-details"> | |
8 |
<div class="commit |
|
8 | <div class="commit truncate-wrap">${h.urlify_commit_message(h.chop_at_smart(c.commit.message, '\n', suffix_if_chopped='...'), c.repo_name)}</div> | |
9 | </div> |
|
9 | </div> | |
|
10 | ||||
|
11 | <div class="fieldset collapsable-content" data-toggle="summary-details"> | |||
|
12 | <div class="commit">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div> | |||
|
13 | </div> | |||
10 |
|
14 | |||
11 | <div class="fieldset collapsable-content" data-toggle="summary-details"> |
|
15 | <div class="clear-fix">${base.gravatar_with_user(c.commit.author)}-${h.age_component(c.commit.date)}</div> | |
12 | <div class="left-label"> |
|
16 | </div> | |
13 | ${_('Description')}: |
|
17 | ||
|
18 | <div class="right-content"> | |||
|
19 | <div class="tags commit-info"> | |||
|
20 | <code> | |||
|
21 | <a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.commit.raw_id)}">${h.show_id(c.commit)}</a> | |||
|
22 | </code> | |||
|
23 | ||||
|
24 | ${file_base.refs(c.commit)} | |||
|
25 | </div> | |||
|
26 | </div> | |||
|
27 | <div class="clear-fix"> | |||
14 | </div> |
|
28 | </div> | |
15 | <div class="commit right-content">${h.urlify_commit_message(c.commit.message,c.repo_name)}</div> |
|
29 | ||
16 | </div> |
|
|||
17 |
|
30 | |||
18 | <div class="fieldset"> |
|
31 | <div class="btn-collapse" data-toggle="summary-details"> | |
19 | <div class="left-label"> |
|
32 | ${_('Show More')} | |
20 | ${_('References')}: |
|
|||
21 | </div> |
|
|||
22 | <div class="right-content"> |
|
|||
23 | <div class="tags"> |
|
|||
24 | <code> |
|
|||
25 | <a href="${h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.commit.raw_id)}">${h.show_id(c.commit)}</a> |
|
|||
26 | </code> |
|
|||
27 |
|
||||
28 | ${file_base.refs(c.commit)} |
|
|||
29 | </div> |
|
|||
30 | </div> |
|
33 | </div> | |
31 | </div> |
|
34 | </div> | |
32 |
|
||||
33 | <div class="fieldset"> |
|
|||
34 | <div class="left-label"> |
|
|||
35 | ${_('Commit Author')}: |
|
|||
36 | </div> |
|
|||
37 | <div class="right-content"> |
|
|||
38 | ${base.gravatar_with_user(c.commit.author)} |
|
|||
39 | <div class="user-inline-data">- ${h.age_component(c.commit.date)}</div> |
|
|||
40 | </div> |
|
|||
41 | </div> |
|
|||
42 |
|
||||
43 | <script> |
|
35 | <script> | |
44 | collapsableContent(); |
|
36 | collapsableContent(); | |
45 | </script> |
|
37 | </script> |
General Comments 0
You need to be logged in to leave comments.
Login now