Show More
@@ -1,257 +1,266 b'' | |||
|
1 | 1 | /** README styling **/ |
|
2 | ||
|
3 | .readme-title { | |
|
4 | border: 1px solid @grey6; | |
|
5 | padding: 10px 5px; | |
|
6 | font-weight: 600; | |
|
7 | margin-top: 30px; | |
|
8 | margin-bottom: -1px; | |
|
9 | } | |
|
10 | ||
|
2 | 11 | div.readme_box { |
|
3 | 12 | clear: both; |
|
4 | 13 | overflow: hidden; |
|
5 | 14 | margin: 0; |
|
6 | 15 | padding: 3px 15px 3px; |
|
7 | 16 | } |
|
8 | 17 | |
|
9 | 18 | div.readme_box h1, |
|
10 | 19 | div.readme_box h2, |
|
11 | 20 | div.readme_box h3, |
|
12 | 21 | div.readme_box h4, |
|
13 | 22 | div.readme_box h5, |
|
14 | 23 | div.readme_box h6 { |
|
15 | 24 | border-bottom: none !important; |
|
16 | 25 | padding: 0 !important; |
|
17 | 26 | overflow: visible !important; |
|
18 | 27 | } |
|
19 | 28 | |
|
20 | 29 | div.readme_box h1, |
|
21 | 30 | div.readme_box h2 { |
|
22 | 31 | border-bottom: 1px #e6e5e5 solid !important; |
|
23 | 32 | } |
|
24 | 33 | |
|
25 | 34 | div.readme_box h1 { |
|
26 | 35 | font-size: 32px; |
|
27 | 36 | margin: 15px 0 15px 0 !important; |
|
28 | 37 | padding-bottom: 5px !important; |
|
29 | 38 | } |
|
30 | 39 | |
|
31 | 40 | div.readme_box h2 { |
|
32 | 41 | font-size: 24px !important; |
|
33 | 42 | margin: 34px 0 10px 0 !important; |
|
34 | 43 | padding-top: 15px !important; |
|
35 | 44 | padding-bottom: 8px !important; |
|
36 | 45 | } |
|
37 | 46 | |
|
38 | 47 | div.readme_box h3 { |
|
39 | 48 | font-size: 18px !important; |
|
40 | 49 | margin: 30px 0 8px 0 !important; |
|
41 | 50 | padding-bottom: 2px !important; |
|
42 | 51 | } |
|
43 | 52 | |
|
44 | 53 | div.readme_box h4 { |
|
45 | 54 | font-size: 13px !important; |
|
46 | 55 | margin: 18px 0 3px 0 !important; |
|
47 | 56 | } |
|
48 | 57 | |
|
49 | 58 | div.readme_box h5 { |
|
50 | 59 | font-size: 12px !important; |
|
51 | 60 | margin: 15px 0 3px 0 !important; |
|
52 | 61 | } |
|
53 | 62 | |
|
54 | 63 | div.readme_box h6 { |
|
55 | 64 | font-size: 12px; |
|
56 | 65 | color: #777777; |
|
57 | 66 | margin: 15px 0 3px 0 !important; |
|
58 | 67 | } |
|
59 | 68 | |
|
60 | 69 | div.readme_box hr { |
|
61 | 70 | border: 0; |
|
62 | 71 | color: #e6e5e5; |
|
63 | 72 | background-color: #e6e5e5; |
|
64 | 73 | height: 3px; |
|
65 | 74 | margin-bottom: 13px; |
|
66 | 75 | } |
|
67 | 76 | |
|
68 | 77 | div.readme_box ol, |
|
69 | 78 | div.readme_box ul, |
|
70 | 79 | div.readme_box p, |
|
71 | 80 | div.readme_box blockquote, |
|
72 | 81 | div.readme_box dl, |
|
73 | 82 | div.readme_box li, |
|
74 | 83 | div.readme_box table { |
|
75 | 84 | margin: 3px 0px 13px 0px !important; |
|
76 | 85 | color: #424242 !important; |
|
77 | 86 | font-size: 13px !important; |
|
78 | 87 | font-family: @text-regular; |
|
79 | 88 | font-weight: normal !important; |
|
80 | 89 | overflow: visible !important; |
|
81 | 90 | line-height: 140% !important; |
|
82 | 91 | } |
|
83 | 92 | |
|
84 | 93 | div.readme_box pre { |
|
85 | 94 | margin: 3px 0px 13px 0px !important; |
|
86 | 95 | padding: .5em; |
|
87 | 96 | color: #424242 !important; |
|
88 | 97 | font-size: 13px !important; |
|
89 | 98 | overflow: visible !important; |
|
90 | 99 | line-height: 140% !important; |
|
91 | 100 | } |
|
92 | 101 | |
|
93 | 102 | div.readme_box img { |
|
94 | 103 | border-style: none; |
|
95 | 104 | background-color: #fff; |
|
96 | 105 | padding-right: 20px; |
|
97 | 106 | max-width: 100%; |
|
98 | 107 | } |
|
99 | 108 | |
|
100 | 109 | |
|
101 | 110 | div.readme_box strong { |
|
102 | 111 | font-weight: 600; |
|
103 | 112 | margin: 0; |
|
104 | 113 | } |
|
105 | 114 | |
|
106 | 115 | div.readme_box ul, |
|
107 | 116 | div.readme_box ol { |
|
108 | 117 | padding-left: 30px !important; |
|
109 | 118 | margin-top: 0px !important; |
|
110 | 119 | margin-bottom: 18px !important; |
|
111 | 120 | } |
|
112 | 121 | |
|
113 | 122 | div.readme_box ul li, |
|
114 | 123 | div.readme_box ol li { |
|
115 | 124 | list-style: disc !important; |
|
116 | 125 | margin: 6px !important; |
|
117 | 126 | padding: 0 !important; |
|
118 | 127 | } |
|
119 | 128 | |
|
120 | 129 | div.readme_box ol li { |
|
121 | 130 | list-style: decimal !important; |
|
122 | 131 | } |
|
123 | 132 | |
|
124 | 133 | /* |
|
125 | 134 | div.readme_box a, |
|
126 | 135 | div.readme_box a:visited { |
|
127 | 136 | color: #4183C4 !important; |
|
128 | 137 | background-color: inherit; |
|
129 | 138 | text-decoration: none; |
|
130 | 139 | } |
|
131 | 140 | */ |
|
132 | 141 | |
|
133 | 142 | |
|
134 | 143 | div.readme_box button { |
|
135 | 144 | font-size: @basefontsize; |
|
136 | 145 | padding: 4px 6px; |
|
137 | 146 | .border-radius(@border-radius); |
|
138 | 147 | border: @border-thickness solid @grey5; |
|
139 | 148 | background-color: @grey6; |
|
140 | 149 | } |
|
141 | 150 | |
|
142 | 151 | div.readme_box code, |
|
143 | 152 | div.readme_box pre { |
|
144 | 153 | font-family: @text-monospace; |
|
145 | 154 | font-size: 11px; |
|
146 | 155 | .border-radius(@border-radius); |
|
147 | 156 | background-color: white; |
|
148 | 157 | color: @grey3; |
|
149 | 158 | } |
|
150 | 159 | |
|
151 | 160 | |
|
152 | 161 | div.readme_box code { |
|
153 | 162 | border: @border-thickness solid @grey6; |
|
154 | 163 | margin: 0 2px; |
|
155 | 164 | padding: 0 5px; |
|
156 | 165 | } |
|
157 | 166 | |
|
158 | 167 | div.readme_box pre { |
|
159 | 168 | border: @border-thickness solid #CBDBEB; |
|
160 | 169 | overflow: auto; |
|
161 | 170 | padding: .5em; |
|
162 | 171 | background-color: #FCFEFF; |
|
163 | 172 | } |
|
164 | 173 | |
|
165 | 174 | div.readme_box pre > code { |
|
166 | 175 | border: 0; |
|
167 | 176 | margin: 0; |
|
168 | 177 | padding: 0; |
|
169 | 178 | } |
|
170 | 179 | |
|
171 | 180 | /** RST STYLE **/ |
|
172 | 181 | div.rst-block { |
|
173 | 182 | clear: both; |
|
174 | 183 | overflow: hidden; |
|
175 | 184 | margin: 0; |
|
176 | 185 | padding: 3px 15px 3px; |
|
177 | 186 | } |
|
178 | 187 | |
|
179 | 188 | div.rst-block h2 { |
|
180 | 189 | font-weight: normal; |
|
181 | 190 | } |
|
182 | 191 | |
|
183 | 192 | div.rst-block h1, |
|
184 | 193 | div.rst-block h2, |
|
185 | 194 | div.rst-block h3, |
|
186 | 195 | div.rst-block h4, |
|
187 | 196 | div.rst-block h5, |
|
188 | 197 | div.rst-block h6 { |
|
189 | 198 | border-bottom: 0 !important; |
|
190 | 199 | margin: 0 !important; |
|
191 | 200 | padding: 0 !important; |
|
192 | 201 | line-height: 1.5em !important; |
|
193 | 202 | } |
|
194 | 203 | |
|
195 | 204 | |
|
196 | 205 | div.rst-block h1:first-child { |
|
197 | 206 | padding-top: .25em !important; |
|
198 | 207 | } |
|
199 | 208 | |
|
200 | 209 | div.rst-block h2, |
|
201 | 210 | div.rst-block h3 { |
|
202 | 211 | margin: 1em 0 !important; |
|
203 | 212 | } |
|
204 | 213 | |
|
205 | 214 | div.rst-block h2 { |
|
206 | 215 | margin-top: 1.5em !important; |
|
207 | 216 | border-top: 4px solid #e0e0e0 !important; |
|
208 | 217 | padding-top: .5em !important; |
|
209 | 218 | } |
|
210 | 219 | |
|
211 | 220 | div.rst-block p { |
|
212 | 221 | color: black !important; |
|
213 | 222 | margin: 1em 0 !important; |
|
214 | 223 | line-height: 1.5em !important; |
|
215 | 224 | } |
|
216 | 225 | |
|
217 | 226 | div.rst-block ul { |
|
218 | 227 | list-style: disc !important; |
|
219 | 228 | margin: 1em 0 1em 2em !important; |
|
220 | 229 | clear: both; |
|
221 | 230 | } |
|
222 | 231 | |
|
223 | 232 | div.rst-block ol { |
|
224 | 233 | list-style: decimal; |
|
225 | 234 | margin: 1em 0 1em 2em !important; |
|
226 | 235 | } |
|
227 | 236 | |
|
228 | 237 | div.rst-block pre, |
|
229 | 238 | div.rst-block code { |
|
230 | 239 | font: 12px "Bitstream Vera Sans Mono","Courier",monospace; |
|
231 | 240 | } |
|
232 | 241 | |
|
233 | 242 | div.rst-block code { |
|
234 | 243 | font-size: 12px !important; |
|
235 | 244 | background-color: ghostWhite !important; |
|
236 | 245 | color: #444 !important; |
|
237 | 246 | padding: 0 .2em !important; |
|
238 | 247 | border: 1px solid #dedede !important; |
|
239 | 248 | } |
|
240 | 249 | |
|
241 | 250 | div.rst-block pre code { |
|
242 | 251 | padding: 0 !important; |
|
243 | 252 | font-size: 12px !important; |
|
244 | 253 | background-color: #eee !important; |
|
245 | 254 | border: none !important; |
|
246 | 255 | } |
|
247 | 256 | |
|
248 | 257 | div.rst-block pre { |
|
249 | 258 | margin: 1em 0; |
|
250 | 259 | padding: @padding; |
|
251 | 260 | border: 1px solid @grey6; |
|
252 | 261 | .border-radius(@border-radius); |
|
253 | 262 | overflow: auto; |
|
254 | 263 | font-size: 12px; |
|
255 | 264 | color: #444; |
|
256 | 265 | background-color: @grey7; |
|
257 | 266 | } No newline at end of file |
@@ -1,83 +1,84 b'' | |||
|
1 | 1 | |
|
2 | 2 | <div id="codeblock" class="browserblock"> |
|
3 | 3 | <div class="browser-header"> |
|
4 | 4 | <div class="browser-nav"> |
|
5 | 5 | |
|
6 | 6 | <div class="info_box"> |
|
7 | 7 | |
|
8 | 8 | <div class="info_box_elem previous"> |
|
9 | 9 | <a id="prev_commit_link" data-commit-id="${c.prev_commit.raw_id}" class=" ${('disabled' if c.url_prev == '#' else '')}" href="${c.url_prev}" title="${_('Previous commit')}"><i class="icon-left"></i></a> |
|
10 | 10 | </div> |
|
11 | 11 | |
|
12 | 12 | ${h.hidden('refs_filter')} |
|
13 | 13 | |
|
14 | 14 | <div class="info_box_elem next"> |
|
15 | 15 | <a id="next_commit_link" data-commit-id="${c.next_commit.raw_id}" class=" ${('disabled' if c.url_next == '#' else '')}" href="${c.url_next}" title="${_('Next commit')}"><i class="icon-right"></i></a> |
|
16 | 16 | </div> |
|
17 | 17 | </div> |
|
18 | 18 | |
|
19 | 19 | % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name): |
|
20 | 20 | <div> |
|
21 | 21 | <a class="btn btn-primary new-file" href="${h.route_path('repo_files_upload_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> |
|
22 | 22 | ${_('Upload File')} |
|
23 | 23 | </a> |
|
24 | 24 | <a class="btn btn-primary new-file" href="${h.route_path('repo_files_add_file',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}"> |
|
25 | 25 | ${_('Add File')} |
|
26 | 26 | </a> |
|
27 | 27 | </div> |
|
28 | 28 | % endif |
|
29 | 29 | |
|
30 | 30 | % if c.enable_downloads: |
|
31 | 31 | <% at_path = '{}'.format(request.GET.get('at') or c.commit.raw_id[:6]) %> |
|
32 | 32 | <div class="btn btn-default new-file"> |
|
33 | 33 | % if c.f_path == '/': |
|
34 | 34 | <a href="${h.route_path('repo_archivefile',repo_name=c.repo_name, fname='{}.zip'.format(c.commit.raw_id))}"> |
|
35 | 35 | ${_('Download full tree ZIP')} |
|
36 | 36 | </a> |
|
37 | 37 | % else: |
|
38 | 38 | <a href="${h.route_path('repo_archivefile',repo_name=c.repo_name, fname='{}.zip'.format(c.commit.raw_id), _query={'at_path':c.f_path})}"> |
|
39 | 39 | ${_('Download this tree ZIP')} |
|
40 | 40 | </a> |
|
41 | 41 | % endif |
|
42 | 42 | </div> |
|
43 | 43 | % endif |
|
44 | 44 | |
|
45 | 45 | <div class="files-quick-filter"> |
|
46 | 46 | <ul class="files-filter-box"> |
|
47 | 47 | <li class="files-filter-box-path"> |
|
48 | 48 | <i class="icon-search"></i> |
|
49 | 49 | </li> |
|
50 | 50 | <li class="files-filter-box-input"> |
|
51 | 51 | <input onkeydown="NodeFilter.initFilter(event)" class="init" type="text" placeholder="Quick filter" name="filter" size="25" id="node_filter" autocomplete="off"> |
|
52 | 52 | </li> |
|
53 | 53 | </ul> |
|
54 | 54 | </div> |
|
55 | 55 | </div> |
|
56 | 56 | |
|
57 | 57 | </div> |
|
58 | 58 | |
|
59 | 59 | ## file tree is computed from caches, and filled in |
|
60 | 60 | <div id="file-tree"> |
|
61 | 61 | ${c.file_tree |n} |
|
62 | 62 | </div> |
|
63 | 63 | |
|
64 | 64 | %if c.readme_data: |
|
65 | 65 | <div id="readme" class="anchor"> |
|
66 | 66 | <div class="box"> |
|
67 | <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]))}"> | |
|
68 | <h3 class="breadcrumbs"> | |
|
67 | <div class="readme-title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1]))}"> | |
|
68 | <div> | |
|
69 | <i class="icon-file-text"></i> | |
|
69 | 70 | <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)}"> |
|
70 | 71 | ${c.readme_file} |
|
71 | 72 | </a> |
|
72 |
</ |
|
|
73 | </div> | |
|
73 | 74 | </div> |
|
74 | 75 | <div class="readme codeblock"> |
|
75 | 76 | <div class="readme_box"> |
|
76 | 77 | ${c.readme_data|n} |
|
77 | 78 | </div> |
|
78 | 79 | </div> |
|
79 | 80 | </div> |
|
80 | 81 | </div> |
|
81 | 82 | %endif |
|
82 | 83 | |
|
83 | 84 | </div> |
@@ -1,116 +1,118 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 | 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 | <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 | <h3 class="breadcrumbs"> | |
|
36 | ||
|
37 | <div class="readme-title" title="${h.tooltip(_('Readme file from commit %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1]))}"> | |
|
38 | <div> | |
|
39 | <i class="icon-file-text"></i> | |
|
38 | 40 | <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)}"> |
|
39 | 41 | ${c.readme_file} |
|
40 | 42 | </a> |
|
41 |
</ |
|
|
43 | </div> | |
|
42 | 44 | </div> |
|
43 | 45 | <div class="readme codeblock"> |
|
44 | 46 | <div class="readme_box"> |
|
45 | 47 | ${c.readme_data|n} |
|
46 | 48 | </div> |
|
47 | 49 | </div> |
|
48 | 50 | </div> |
|
49 | 51 | </div> |
|
50 | 52 | %endif |
|
51 | 53 | |
|
52 | 54 | <script type="text/javascript"> |
|
53 | 55 | $(document).ready(function(){ |
|
54 | 56 | |
|
55 | 57 | var showCloneField = function(clone_url_format){ |
|
56 | 58 | $.each(['http', 'http_id', 'ssh'], function (idx, val) { |
|
57 | 59 | if(val === clone_url_format){ |
|
58 | 60 | $('#clone_option_' + val).show(); |
|
59 | 61 | $('#clone_option').val(val) |
|
60 | 62 | } else { |
|
61 | 63 | $('#clone_option_' + val).hide(); |
|
62 | 64 | } |
|
63 | 65 | }); |
|
64 | 66 | }; |
|
65 | 67 | // default taken from session |
|
66 | 68 | showCloneField(templateContext.session_attrs.clone_url_format); |
|
67 | 69 | |
|
68 | 70 | $('#clone_option').on('change', function(e) { |
|
69 | 71 | var selected = $(this).val(); |
|
70 | 72 | |
|
71 | 73 | storeUserSessionAttr('rc_user_session_attr.clone_url_format', selected); |
|
72 | 74 | showCloneField(selected) |
|
73 | 75 | }); |
|
74 | 76 | |
|
75 | 77 | var initialCommitData = { |
|
76 | 78 | id: null, |
|
77 | 79 | text: 'tip', |
|
78 | 80 | type: 'tag', |
|
79 | 81 | raw_id: null, |
|
80 | 82 | files_url: null |
|
81 | 83 | }; |
|
82 | 84 | |
|
83 | 85 | select2RefSwitcher('#download_options', initialCommitData); |
|
84 | 86 | |
|
85 | 87 | // on change of download options |
|
86 | 88 | $('#download_options').on('change', function(e) { |
|
87 | 89 | // format of Object {text: "v0.0.3", type: "tag", id: "rev"} |
|
88 | 90 | var ext = '.zip'; |
|
89 | 91 | var selected_cs = e.added; |
|
90 | 92 | var fname = e.added.raw_id + ext; |
|
91 | 93 | var href = pyroutes.url('repo_archivefile', {'repo_name': templateContext.repo_name, 'fname':fname}); |
|
92 | 94 | // set new label |
|
93 | 95 | $('#archive_link').html('{0}{1}'.format(escapeHtml(e.added.text), ext)); |
|
94 | 96 | |
|
95 | 97 | // set new url to button, |
|
96 | 98 | $('#archive_link').attr('href', href) |
|
97 | 99 | }); |
|
98 | 100 | |
|
99 | 101 | |
|
100 | 102 | // calculate size of repository |
|
101 | 103 | calculateSize = function () { |
|
102 | 104 | |
|
103 | 105 | var callback = function (data) { |
|
104 | 106 | % if c.show_stats: |
|
105 | 107 | showRepoStats('lang_stats', data); |
|
106 | 108 | % endif |
|
107 | 109 | }; |
|
108 | 110 | |
|
109 | 111 | showRepoSize('repo_size_container', templateContext.repo_name, templateContext.repo_landing_commit, callback); |
|
110 | 112 | |
|
111 | 113 | } |
|
112 | 114 | |
|
113 | 115 | }) |
|
114 | 116 | </script> |
|
115 | 117 | |
|
116 | 118 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now