##// END OF EJS Templates
gists: updated styling on gists pages according to the design.
marcink -
r4082:e40fd3fa default
parent child Browse files
Show More
@@ -418,9 +418,17 b' div.codeblock {'
418 }
418 }
419
419
420 .gist_url {
420 .gist_url {
421 padding: 0px 0px 10px 0px;
421 padding: 0px 0px 35px 0px;
422 }
422 }
423
423
424 .gist-desc {
425 clear: both;
426 margin: 0 0 10px 0;
427 code {
428 white-space: pre-line;
429 line-height: inherit
430 }
431 }
424 .author {
432 .author {
425 clear: both;
433 clear: both;
426 vertical-align: middle;
434 vertical-align: middle;
@@ -49,6 +49,19 b''
49 .tag7 { .border ( @border-thickness-tags, @color7 ); color:@color7; }
49 .tag7 { .border ( @border-thickness-tags, @color7 ); color:@color7; }
50 .tag8 { .border ( @border-thickness-tags, @color8 ); color:@color8; }
50 .tag8 { .border ( @border-thickness-tags, @color8 ); color:@color8; }
51
51
52
53 .tag-gist-public {
54 .border (@border-thickness-tags, @color1);
55 color: @color1;
56 }
57
58
59 .tag-gist-private {
60 .border (@border-thickness-tags, @color2);
61 color: @color2;
62 }
63
64
52 .metatag-list {
65 .metatag-list {
53 margin: 0;
66 margin: 0;
54 padding: 0;
67 padding: 0;
@@ -1,5 +1,6 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.mako"/>
2 <%inherit file="/base/base.mako"/>
3 <%namespace name="dt" file="/data_table/_dt_elements.mako"/>
3
4
4 <%def name="robots()">
5 <%def name="robots()">
5 %if c.gist.gist_type != 'public':
6 %if c.gist.gist_type != 'public':
@@ -27,55 +28,53 b''
27 <%def name="main()">
28 <%def name="main()">
28 <div class="box">
29 <div class="box">
29 <!-- box / title -->
30 <!-- box / title -->
30 <div class="title">
31 ${self.breadcrumbs()}
32 </div>
33
31
34 <div class="table">
32 <div class="table">
35 <div id="files_data">
33 <div id="files_data">
36 <div id="codeblock" class="codeblock">
34 <div id="codeblock" class="codeblock">
37 <div class="code-header">
35 <div class="code-header">
38 <div class="gist_url">
36 <div class="gist_url">
39 <code>
37 <div class="pull-left">
38 <code>
39 ${dt.gist_type(c.gist.gist_type)}
40 <span class="tag disabled">${c.gist.gist_access_id}</span>
40 ${c.gist.gist_url()} <span class="icon-clipboard clipboard-action" data-clipboard-text="${c.gist.gist_url()}" title="${_('Copy the url')}"></span>
41 ${c.gist.gist_url()} <span class="icon-clipboard clipboard-action" data-clipboard-text="${c.gist.gist_url()}" title="${_('Copy the url')}"></span>
41 </code>
42 </code>
42 </div>
43 <div class="stats">
44 %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id:
45 <div class="remove_gist">
46 ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)}
47 ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")}
48 ${h.end_form()}
49 </div>
43 </div>
50 %endif
44
51 <div class="buttons">
45 <div class="pull-right buttons">
52 ## only owner should see that
46 ## only owner should see that
53 <a href="#copySource" onclick="return false;" class="btn btn-mini icon-clipboard clipboard-action" data-clipboard-text="${c.files[0].content}">${_('Copy content')}</a>
47 <a href="#copySource" onclick="return false;" class="btn btn-mini icon-clipboard clipboard-action" data-clipboard-text="${c.files[0].content}">${_('Copy content')}</a>
54
48
55 %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id:
49 %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id:
56 ${h.link_to(_('Edit'), h.route_path('gist_edit', gist_id=c.gist.gist_access_id), class_="btn btn-mini")}
50 ${h.link_to(_('Edit'), h.route_path('gist_edit', gist_id=c.gist.gist_access_id), class_="btn btn-mini")}
57 %endif
51 %endif
58 ${h.link_to(_('Show as Raw'), h.route_path('gist_show_formatted', gist_id=c.gist.gist_access_id, revision='tip', format='raw'), class_="btn btn-mini")}
52 ${h.link_to(_('Show as Raw'), h.route_path('gist_show_formatted', gist_id=c.gist.gist_access_id, revision='tip', format='raw'), class_="btn btn-mini")}
53
54 %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id:
55 <div class="pull-right remove_gist">
56 ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)}
57 ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")}
58 ${h.end_form()}
59 </div>
60 %endif
59 </div>
61 </div>
60 <div class="left" >
62 </div>
61 %if c.gist.gist_type != 'public':
63
62 <span class="tag tag-ok disabled">${_('Private Gist')}</span>
64 <div class="gist-desc">
63 %endif
65 <code>${c.gist.gist_description}</code>
64 <span> ${c.gist.gist_description}</span>
66 </div>
65 <span>${_('Expires')}:
67
68 <div class="author">
69 <div title="${h.tooltip(c.file_last_commit.author)}">
70 ${self.gravatar_with_user(c.file_last_commit.author, 16, tooltip=True)} - ${_('created')} ${h.age_component(c.file_last_commit.date)},
71 ${_('expires')}:
66 %if c.gist.gist_expires == -1:
72 %if c.gist.gist_expires == -1:
67 ${_('never')}
73 ${_('never')}
68 %else:
74 %else:
69 ${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))}
75 ${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))}
70 %endif
76 %endif
71 </span>
77 </span>
72
73 </div>
74 </div>
75
76 <div class="author">
77 <div title="${h.tooltip(c.file_last_commit.author)}">
78 ${self.gravatar_with_user(c.file_last_commit.author, 16, tooltip=True)} - ${_('created')} ${h.age_component(c.file_last_commit.date)}
79 </div>
78 </div>
80
79
81 </div>
80 </div>
@@ -83,22 +82,22 b''
83 </div>
82 </div>
84
83
85 ## iterate over the files
84 ## iterate over the files
86 % for file in c.files:
85 % for gist_file in c.files:
87 <% renderer = c.render and h.renderer_from_filename(file.path, exclude=['.txt', '.TXT'])%>
86 <% renderer = c.render and h.renderer_from_filename(gist_file.path, exclude=['.txt', '.TXT'])%>
88 <!--
87 <!--
89 <div id="${h.FID('G', file.path)}" class="stats" >
88 <div id="${h.FID('G', gist_file.path)}" class="stats" >
90 <a href="${c.gist.gist_url()}">¶</a>
89 <a href="${c.gist.gist_url()}">¶</a>
91 <b >${file.path}</b>
90 <b >${gist_file.path}</b>
92 <div>
91 <div>
93 ${h.link_to(_('Show as raw'), h.route_path('gist_show_formatted_path', gist_id=c.gist.gist_access_id, revision=file.commit.raw_id, format='raw', f_path=file.path), class_="btn btn-mini")}
92 ${h.link_to(_('Show as raw'), h.route_path('gist_show_formatted_path', gist_id=c.gist.gist_access_id, revision=gist_file.commit.raw_id, format='raw', f_path=gist_file.path), class_="btn btn-mini")}
94 </div>
93 </div>
95 </div>
94 </div>
96 -->
95 -->
97 <div class="code-body textarea text-area editor">
96 <div class="code-body textarea text-area editor">
98 %if renderer:
97 %if renderer:
99 ${h.render(file.content, renderer=renderer)}
98 ${h.render(gist_file.content, renderer=renderer)}
100 %else:
99 %else:
101 ${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
100 ${h.pygmentize(gist_file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
102 %endif
101 %endif
103 </div>
102 </div>
104 %endfor
103 %endfor
@@ -338,8 +338,10 b''
338 </%def>
338 </%def>
339
339
340 <%def name="gist_type(gist_type)">
340 <%def name="gist_type(gist_type)">
341 %if gist_type != 'public':
341 %if gist_type == 'public':
342 <div class="tag">${_('Private')}</div>
342 <span class="tag tag-gist-public disabled">${_('Public Gist')}</span>
343 %else:
344 <span class="tag tag-gist-private disabled">${_('Private Gist')}</span>
343 %endif
345 %endif
344 </%def>
346 </%def>
345
347
General Comments 0
You need to be logged in to leave comments. Login now