Show More
@@ -1,412 +1,408 b'' | |||
|
1 | 1 | // summary.less |
|
2 | 2 | // For use in RhodeCode applications; |
|
3 | 3 | // Used for headers and file detail summary screens. |
|
4 | 4 | |
|
5 | 5 | .summary { |
|
6 | 6 | clear: both; |
|
7 | 7 | float: none; |
|
8 | 8 | position: relative; |
|
9 | 9 | width: 100%; |
|
10 | 10 | margin: 0; |
|
11 | 11 | padding: 0; |
|
12 | 12 | background: #FCFCFC; |
|
13 | 13 | border: 1px solid #EAEAEA; |
|
14 | 14 | border-radius: @border-radius; |
|
15 | 15 | margin-bottom: 20px; |
|
16 | 16 | |
|
17 | 17 | .summary-detail-header { |
|
18 | 18 | float: left; |
|
19 | 19 | display: block; |
|
20 | 20 | width: 100%; |
|
21 | 21 | margin-bottom: @textmargin; |
|
22 | 22 | padding: 0 0 .5em 0; |
|
23 | 23 | border-bottom: @border-thickness solid @border-default-color; |
|
24 | 24 | |
|
25 | 25 | .breadcrumbs { |
|
26 | 26 | float: left; |
|
27 | 27 | display: inline; |
|
28 | 28 | margin: 0; |
|
29 | 29 | padding: 0; |
|
30 | 30 | } |
|
31 | 31 | h4 { |
|
32 | 32 | float: left; |
|
33 | 33 | margin: 0 1em 0 0; |
|
34 | 34 | padding: 0; |
|
35 | 35 | line-height: 1.2em; |
|
36 | 36 | font-size: @basefontsize; |
|
37 | 37 | } |
|
38 | 38 | |
|
39 | 39 | .action_link { |
|
40 | 40 | float: right; |
|
41 | 41 | } |
|
42 | 42 | |
|
43 | 43 | .new-file { |
|
44 | 44 | float: right; |
|
45 | 45 | margin-top: -1.5em; |
|
46 | 46 | } |
|
47 | 47 | } |
|
48 | 48 | |
|
49 | 49 | .summary-detail { |
|
50 | 50 | float: none; |
|
51 | 51 | position: relative; |
|
52 | 52 | width: 100%; |
|
53 | 53 | margin: 0; |
|
54 | 54 | padding: 0; |
|
55 | 55 | |
|
56 | 56 | .file_diff_buttons { |
|
57 | 57 | margin-top: @space; |
|
58 | 58 | } |
|
59 | 59 | |
|
60 | 60 | // commit message |
|
61 | 61 | .commit { |
|
62 | 62 | white-space: pre-wrap; |
|
63 | 63 | } |
|
64 | 64 | |
|
65 | 65 | .left-clone { |
|
66 | 66 | float: left; |
|
67 | 67 | height: 30px; |
|
68 | 68 | margin: 0; |
|
69 | 69 | padding: 0; |
|
70 | 70 | width: 130px; |
|
71 | 71 | font-weight: @text-semibold-weight; |
|
72 | 72 | font-family: @text-semibold; |
|
73 | 73 | } |
|
74 | 74 | .left-clone select { |
|
75 | 75 | width: 130px; |
|
76 | 76 | margin-right: 0; |
|
77 | 77 | background-color: @grey7; |
|
78 | 78 | border-color: @grey4; |
|
79 | 79 | color: #5C5C5C; |
|
80 | 80 | border-top-right-radius: 0; |
|
81 | 81 | border-bottom-right-radius: 0; |
|
82 | 82 | } |
|
83 | 83 | |
|
84 | 84 | .right-clone { |
|
85 | 85 | float: left; |
|
86 | 86 | width: ~"calc(100% - 170px)"; |
|
87 | 87 | |
|
88 | 88 | .clipboard-action { |
|
89 | 89 | margin-left: -30px; |
|
90 | 90 | } |
|
91 | 91 | } |
|
92 | 92 | |
|
93 | 93 | .clone_url_input { |
|
94 | 94 | width: ~"calc(100% - 90px)"; |
|
95 | 95 | padding: 6px 30px 6px 10px; |
|
96 | 96 | height: 14px; |
|
97 | 97 | box-shadow: 0 1px 1px 0 rgba(0,0,0,0.07); |
|
98 | 98 | border-top-left-radius: 0; |
|
99 | 99 | border-bottom-left-radius: 0; |
|
100 | 100 | margin-left: -1px; |
|
101 | 101 | } |
|
102 | 102 | |
|
103 | 103 | &.directory { |
|
104 | 104 | margin-bottom: 0; |
|
105 | 105 | } |
|
106 | 106 | |
|
107 | 107 | .desc { |
|
108 | 108 | white-space: pre-wrap; |
|
109 | 109 | } |
|
110 | 110 | .disabled { |
|
111 | 111 | opacity: .5; |
|
112 | 112 | cursor: inherit; |
|
113 | 113 | } |
|
114 | 114 | .help-block { |
|
115 | 115 | color: inherit; |
|
116 | 116 | margin: 0; |
|
117 | 117 | } |
|
118 | 118 | } |
|
119 | 119 | |
|
120 | 120 | .sidebar-right { |
|
121 | 121 | float: left; |
|
122 | 122 | width: 24%; |
|
123 | 123 | margin: 0; |
|
124 | 124 | padding: 0; |
|
125 | 125 | |
|
126 | 126 | ul { |
|
127 | 127 | margin-left: 0; |
|
128 | 128 | padding-left: 0; |
|
129 | 129 | |
|
130 | 130 | li { |
|
131 | 131 | list-style-type: none; |
|
132 | 132 | } |
|
133 | 133 | } |
|
134 | 134 | } |
|
135 | 135 | |
|
136 | 136 | #clone_by_name, #clone_by_id{ |
|
137 | 137 | display: inline-block; |
|
138 | 138 | margin-left: 0px; |
|
139 | 139 | } |
|
140 | 140 | |
|
141 | 141 | .codeblock { |
|
142 | 142 | border: none; |
|
143 | 143 | background-color: transparent; |
|
144 | 144 | } |
|
145 | 145 | |
|
146 | 146 | .code-body { |
|
147 | 147 | border: @border-thickness solid @border-default-color; |
|
148 | 148 | .border-radius(@border-radius); |
|
149 | 149 | } |
|
150 | 150 | |
|
151 | 151 | .btn-collapse { |
|
152 | 152 | clear: both; |
|
153 | 153 | float: none; |
|
154 | 154 | background: #F7F7F7; |
|
155 | 155 | text-align: center; |
|
156 | 156 | color: #949494; |
|
157 | 157 | font-size: 11px; |
|
158 | 158 | |
|
159 | 159 | &:hover { |
|
160 | 160 | background: #f1f1f1; |
|
161 | 161 | color: #2B2B2D; |
|
162 | 162 | } |
|
163 | 163 | } |
|
164 | 164 | } |
|
165 | 165 | |
|
166 | 166 | // this is used outside of just the summary |
|
167 | 167 | .fieldset, // similar to form fieldset |
|
168 | 168 | .summary .sidebar-right-content { // these have to match |
|
169 | 169 | clear: both; |
|
170 | 170 | float: none; |
|
171 | 171 | position: relative; |
|
172 | 172 | display:block; |
|
173 | 173 | width: 100%; |
|
174 | 174 | min-height: 1em; |
|
175 | 175 | margin-bottom: 10px; |
|
176 | 176 | padding: 0; |
|
177 | 177 | line-height: 1.2em; |
|
178 | 178 | |
|
179 | 179 | &:after { // clearfix |
|
180 | 180 | content: ""; |
|
181 | 181 | clear: both; |
|
182 | 182 | width: 100%; |
|
183 | 183 | height: 1em; |
|
184 | 184 | } |
|
185 | 185 | } |
|
186 | 186 | |
|
187 | 187 | .summary .sidebar-right-content { |
|
188 | 188 | margin-bottom: @space; |
|
189 | 189 | |
|
190 | 190 | .rc-user { |
|
191 | 191 | min-width: 0; |
|
192 | 192 | } |
|
193 | 193 | } |
|
194 | 194 | |
|
195 | 195 | .fieldset { |
|
196 | 196 | |
|
197 | 197 | .left-label { // similar to form legend |
|
198 | 198 | display: block; |
|
199 | 199 | margin: 0; |
|
200 | 200 | padding: 0; |
|
201 | 201 | font-weight: @text-semibold-weight; |
|
202 | 202 | font-family: @text-semibold; |
|
203 | 203 | } |
|
204 | 204 | |
|
205 | 205 | .left-label-summary { |
|
206 | 206 | padding-left: 20px; |
|
207 | 207 | margin-bottom: 5px; |
|
208 | 208 | |
|
209 | 209 | p { |
|
210 | 210 | margin-bottom: 5px; |
|
211 | 211 | color: @grey1; |
|
212 | 212 | float: left; |
|
213 | 213 | width: 130px; |
|
214 | 214 | } |
|
215 | 215 | |
|
216 | 216 | .right-label-summary { |
|
217 | 217 | float: left; |
|
218 | 218 | margin-top: 7px; |
|
219 | 219 | } |
|
220 | 220 | } |
|
221 | 221 | |
|
222 | 222 | .left-content { |
|
223 | 223 | width: ~"calc(50% - 20px)"; |
|
224 | 224 | float: left; |
|
225 | 225 | margin: 15px 0 15px 20px; |
|
226 | 226 | } |
|
227 | 227 | |
|
228 | 228 | .right-content { // similar to form fields |
|
229 | 229 | float: left; |
|
230 | 230 | display: block; |
|
231 | 231 | width: ~"calc(50% - 20px)"; |
|
232 | 232 | text-align: right; |
|
233 | 233 | margin: 15px 20px 15px 0; |
|
234 | 234 | |
|
235 | 235 | .truncate-wrap, |
|
236 | 236 | .truncate { |
|
237 | 237 | max-width: 100%; |
|
238 | 238 | width: 100%; |
|
239 | 239 | } |
|
240 | 240 | |
|
241 | 241 | .commit-long { |
|
242 | 242 | overflow-x: auto; |
|
243 | 243 | } |
|
244 | 244 | |
|
245 | 245 | .commit-info { |
|
246 | 246 | margin-top: 7px; |
|
247 | 247 | } |
|
248 | 248 | |
|
249 | 249 | .tag, .tagtag, .branchtag, .booktag, .metatag, .perm_tag { |
|
250 | 250 | background:transparent; |
|
251 | 251 | border: none; |
|
252 | 252 | box-shadow: none; |
|
253 | 253 | margin-left: 10px; |
|
254 | 254 | font-size: 13px; |
|
255 | 255 | } |
|
256 | 256 | |
|
257 | 257 | .tag span, .tag i { |
|
258 | 258 | color: @grey1; |
|
259 | 259 | } |
|
260 | 260 | } |
|
261 | 261 | .commit.truncate-wrap { |
|
262 | 262 | overflow:hidden; |
|
263 | 263 | text-overflow: ellipsis; |
|
264 | 264 | } |
|
265 | 265 | } |
|
266 | 266 | |
|
267 | 267 | // expand commit message |
|
268 | 268 | #message_expand { |
|
269 | 269 | clear: both; |
|
270 | 270 | display: block; |
|
271 | 271 | color: @rcblue; |
|
272 | 272 | cursor: pointer; |
|
273 | 273 | } |
|
274 | 274 | |
|
275 | 275 | #trimmed_message_box { |
|
276 | 276 | max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height |
|
277 | 277 | overflow: hidden; |
|
278 | 278 | } |
|
279 | 279 | |
|
280 | 280 | // show/hide comments button |
|
281 | 281 | .show-inline-comments { |
|
282 | 282 | display: inline; |
|
283 | 283 | cursor: pointer; |
|
284 | 284 | |
|
285 | 285 | .comments-show { display: inline; } |
|
286 | 286 | .comments-hide { display: none; } |
|
287 | 287 | |
|
288 | 288 | &.comments-visible { |
|
289 | 289 | .comments-show { display: none; } |
|
290 | 290 | .comments-hide { display: inline; } |
|
291 | 291 | } |
|
292 | 292 | } |
|
293 | 293 | |
|
294 | 294 | // Quick Start section |
|
295 | 295 | |
|
296 | 296 | .empty-repo { |
|
297 | 297 | border: 1px solid #EAEAEA; |
|
298 | 298 | border-bottom: 0; |
|
299 | 299 | border-radius: @border-radius; |
|
300 | 300 | padding: 0 20px; |
|
301 | 301 | } |
|
302 | 302 | |
|
303 | 303 | .empty-repo h3, .quick_start p { |
|
304 | 304 | margin-bottom: 10px; |
|
305 | 305 | } |
|
306 | 306 | |
|
307 | 307 | .quick_start pre { |
|
308 | 308 | background: #FCFEFF; |
|
309 | 309 | border: 1px solid #CBDBEB; |
|
310 | 310 | box-shadow: @button-shadow; |
|
311 | 311 | padding: 10px 15px; |
|
312 | 312 | border-radius: 4px; |
|
313 | 313 | color: @grey2; |
|
314 | 314 | } |
|
315 | 315 | |
|
316 | .clearfix { | |
|
316 | .clear-fix { | |
|
317 | 317 | clear: both; |
|
318 | 318 | } |
|
319 | 319 | |
|
320 | 320 | .quick_start { |
|
321 | 321 | display: block; |
|
322 | 322 | position: relative; |
|
323 | 323 | border: 1px solid #EAEAEA; |
|
324 | 324 | border-top: 0; |
|
325 | 325 | border-radius: @border-radius; |
|
326 | 326 | padding: 0 20px; |
|
327 | 327 | |
|
328 | 328 | // adds some space to make copy and paste easier |
|
329 | 329 | .left-label, |
|
330 | 330 | .right-content { |
|
331 | 331 | line-height: 1.6em; |
|
332 | 332 | } |
|
333 | 333 | } |
|
334 | 334 | |
|
335 | 335 | |
|
336 | 336 | .submodule { |
|
337 | 337 | .summary-detail { |
|
338 | 338 | width: 100%; |
|
339 | 339 | |
|
340 | 340 | .btn-collapse { |
|
341 | 341 | display: none; |
|
342 | 342 | } |
|
343 | 343 | } |
|
344 | 344 | } |
|
345 | 345 | |
|
346 | 346 | .codeblock-header { |
|
347 | 347 | float: left; |
|
348 | 348 | display: block; |
|
349 | 349 | width: 100%; |
|
350 | 350 | margin: 0; |
|
351 | 351 | padding: @space 0 10px 0; |
|
352 | 352 | border-top: @border-thickness solid @border-default-color; |
|
353 | 353 | |
|
354 | 354 | .stats { |
|
355 | 355 | float: left; |
|
356 | 356 | } |
|
357 | 357 | .stats-filename { |
|
358 | 358 | font-size: 120%; |
|
359 | 359 | } |
|
360 | 360 | .stats-first-item { |
|
361 | 361 | padding: 0px 0px 0px 3px; |
|
362 | 362 | } |
|
363 | 363 | |
|
364 | 364 | .buttons { |
|
365 | 365 | float: right; |
|
366 | 366 | text-align: right; |
|
367 | 367 | color: @grey4; |
|
368 | 368 | } |
|
369 | 369 | |
|
370 | 370 | .file-container { |
|
371 | 371 | display: inline-block; |
|
372 | 372 | width: 100%; |
|
373 | 373 | } |
|
374 | 374 | |
|
375 | 375 | } |
|
376 | 376 | |
|
377 | 377 | #summary-menu-stats { |
|
378 | 378 | |
|
379 | 379 | .stats-bullet { |
|
380 | 380 | color: @grey3; |
|
381 | 381 | min-width: 3em; |
|
382 | 382 | } |
|
383 | 383 | |
|
384 | 384 | .repo-size { |
|
385 | 385 | margin-bottom: .5em; |
|
386 | 386 | } |
|
387 | 387 | |
|
388 | 388 | } |
|
389 | 389 | |
|
390 | 390 | .rctable.repo_summary { |
|
391 | 391 | border: 1px solid #eaeaea; |
|
392 | 392 | border-radius: 2px; |
|
393 | 393 | border-collapse: inherit; |
|
394 | 394 | border-bottom: 0; |
|
395 | 395 | |
|
396 | 396 | th { |
|
397 | 397 | background: @grey7; |
|
398 | 398 | border-bottom: 0; |
|
399 | 399 | } |
|
400 | 400 | |
|
401 | 401 | td { |
|
402 | 402 | border-color: #eaeaea; |
|
403 | 403 | } |
|
404 | 404 | |
|
405 | 405 | td.td-status { |
|
406 | 406 | padding: 0 0 0 10px; |
|
407 | 407 | } |
|
408 | 408 | } |
|
409 | ||
|
410 | ||
|
411 | ||
|
412 |
@@ -1,114 +1,114 b'' | |||
|
1 | 1 | <%inherit file="/summary/summary_base.mako"/> |
|
2 | 2 | |
|
3 | 3 | <%namespace name="components" file="/summary/components.mako"/> |
|
4 | 4 | |
|
5 | 5 | |
|
6 | 6 | <%def name="menu_bar_subnav()"> |
|
7 | 7 | ${self.repo_menu(active='summary')} |
|
8 | 8 | </%def> |
|
9 | 9 | |
|
10 | 10 | <%def name="main()"> |
|
11 | 11 | |
|
12 | 12 | <div id="repo-summary" class="summary"> |
|
13 | 13 | ${components.summary_detail(breadcrumbs_links=self.breadcrumbs_links(), show_downloads=True)} |
|
14 | 14 | </div><!--end repo-summary--> |
|
15 | 15 | |
|
16 | 16 | |
|
17 | 17 | <div class="box"> |
|
18 | 18 | %if not c.repo_commits: |
|
19 | 19 | <div class="empty-repo"> |
|
20 | 20 | <div class="title"> |
|
21 | 21 | <h3>${_('Quick start')}</h3> |
|
22 | 22 | </div> |
|
23 | <div class="clearfix"></div> | |
|
23 | <div class="clear-fix"></div> | |
|
24 | 24 | </div> |
|
25 | 25 | %endif |
|
26 | 26 | <div class="table"> |
|
27 | 27 | <div id="shortlog_data"> |
|
28 | 28 | <%include file='summary_commits.mako'/> |
|
29 | 29 | </div> |
|
30 | 30 | </div> |
|
31 | 31 | </div> |
|
32 | 32 | |
|
33 | 33 | %if c.readme_data: |
|
34 | 34 | <div id="readme" class="anchor"> |
|
35 | 35 | <div class="box"> |
|
36 | 36 | <div class="title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1]))}"> |
|
37 | 37 | <h3 class="breadcrumbs"> |
|
38 | 38 | <a href="${h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.landing_rev[1],f_path=c.readme_file)}">${c.readme_file}</a> |
|
39 | 39 | </h3> |
|
40 | 40 | </div> |
|
41 | 41 | <div class="readme codeblock"> |
|
42 | 42 | <div class="readme_box"> |
|
43 | 43 | ${c.readme_data|n} |
|
44 | 44 | </div> |
|
45 | 45 | </div> |
|
46 | 46 | </div> |
|
47 | 47 | </div> |
|
48 | 48 | %endif |
|
49 | 49 | |
|
50 | 50 | <script type="text/javascript"> |
|
51 | 51 | $(document).ready(function(){ |
|
52 | 52 | |
|
53 | 53 | var showCloneField = function(clone_url_format){ |
|
54 | 54 | $.each(['http', 'http_id', 'ssh'], function (idx, val) { |
|
55 | 55 | if(val === clone_url_format){ |
|
56 | 56 | $('#clone_option_' + val).show(); |
|
57 | 57 | $('#clone_option').val(val) |
|
58 | 58 | } else { |
|
59 | 59 | $('#clone_option_' + val).hide(); |
|
60 | 60 | } |
|
61 | 61 | }); |
|
62 | 62 | }; |
|
63 | 63 | // default taken from session |
|
64 | 64 | showCloneField(templateContext.session_attrs.clone_url_format); |
|
65 | 65 | |
|
66 | 66 | $('#clone_option').on('change', function(e) { |
|
67 | 67 | var selected = $(this).val(); |
|
68 | 68 | |
|
69 | 69 | storeUserSessionAttr('rc_user_session_attr.clone_url_format', selected); |
|
70 | 70 | showCloneField(selected) |
|
71 | 71 | }); |
|
72 | 72 | |
|
73 | 73 | var initialCommitData = { |
|
74 | 74 | id: null, |
|
75 | 75 | text: 'tip', |
|
76 | 76 | type: 'tag', |
|
77 | 77 | raw_id: null, |
|
78 | 78 | files_url: null |
|
79 | 79 | }; |
|
80 | 80 | |
|
81 | 81 | select2RefSwitcher('#download_options', initialCommitData); |
|
82 | 82 | |
|
83 | 83 | // on change of download options |
|
84 | 84 | $('#download_options').on('change', function(e) { |
|
85 | 85 | // format of Object {text: "v0.0.3", type: "tag", id: "rev"} |
|
86 | 86 | var ext = '.zip'; |
|
87 | 87 | var selected_cs = e.added; |
|
88 | 88 | var fname = e.added.raw_id + ext; |
|
89 | 89 | var href = pyroutes.url('repo_archivefile', {'repo_name': templateContext.repo_name, 'fname':fname}); |
|
90 | 90 | // set new label |
|
91 | 91 | $('#archive_link').html('<i class="icon-archive"></i> {0}{1}'.format(escapeHtml(e.added.text), ext)); |
|
92 | 92 | |
|
93 | 93 | // set new url to button, |
|
94 | 94 | $('#archive_link').attr('href', href) |
|
95 | 95 | }); |
|
96 | 96 | |
|
97 | 97 | |
|
98 | 98 | // calculate size of repository |
|
99 | 99 | calculateSize = function () { |
|
100 | 100 | |
|
101 | 101 | var callback = function (data) { |
|
102 | 102 | % if c.show_stats: |
|
103 | 103 | showRepoStats('lang_stats', data); |
|
104 | 104 | % endif |
|
105 | 105 | }; |
|
106 | 106 | |
|
107 | 107 | showRepoSize('repo_size_container', templateContext.repo_name, templateContext.repo_landing_commit, callback); |
|
108 | 108 | |
|
109 | 109 | } |
|
110 | 110 | |
|
111 | 111 | }) |
|
112 | 112 | </script> |
|
113 | 113 | |
|
114 | 114 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now