# HG changeset patch # User Mads Kiilerich # Date 1497186129 -7200 # Node ID 5e3adb20839de1b20e50b71c6fae7d5b4734cc41 # Parent 7bca124ef278e0f0a9a719ad01caca9f6bb90d01 style: replace code-body etc with Bootstrap-ish panel and panel-heading, using panel-default for headers and tweak them grey Based on work by Dominik Ruf. diff -r 7bca124ef278 -r 5e3adb20839d kallithea/public/css/pygments.css --- a/kallithea/public/css/pygments.css Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/public/css/pygments.css Sun Jun 11 15:02:09 2017 +0200 @@ -82,11 +82,6 @@ padding: 0px 0px 0px 10px; } -div.search-code-body { - background-color: #FFFFFF; - padding: 5px 0px 5px 10px; -} - div.search-code-body pre .match { background-color: #FAFFA6; } diff -r 7bca124ef278 -r 5e3adb20839d kallithea/public/css/style.css --- a/kallithea/public/css/style.css Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/public/css/style.css Sun Jun 11 15:02:09 2017 +0200 @@ -525,11 +525,6 @@ border-radius: 4px 4px 0 0; } -#content div.panel div.panel-heading .panel-title, -#content div.panel div.panel-heading a { - color: #FFFFFF; -} - #content div.panel div.panel-heading ul.links li { list-style: none; float: left; @@ -551,6 +546,43 @@ padding: 11px 10px 11px 10px; } +div.panel.panel-default { + border: 1px solid #ccc; + box-shadow: none; + border-radius: 6px 6px 0px 0px; + margin-bottom: 20px; +} + +div.panel.panel-default:last-child { + margin-bottom: 0; +} + +div.panel.panel-default > div.panel-heading { + background: #eee; + border-bottom: 1px solid #ccc; + font-size: 14px; + font-weight: 700; +} + +div.panel.panel-default div.panel-heading a, +div.panel.panel-default div.panel-heading .pull-left, +div.panel.panel-default div.panel-heading .pull-left a, +div.panel.panel-default div.panel-heading .pull-right, +div.panel.panel-default div.panel-heading .pull-right a { + color: black !important; +} + +div.panel.panel-default div.panel-heading .diff-actions a, +div.panel.panel-default div.panel-heading .diff-actions span.no-file, +div.panel.panel-default div.panel-heading .diff-actions span.arrow { + color: #577632 !important; +} + +div.panel.panel-default div.panel-heading .diff-actions span.no-file, +div.panel.panel-default div.panel-heading .diff-actions span.arrow { + opacity: 0.5; +} + .clearfix::before, .clearfix::after, .dl-horizontal dd::before, .dl-horizontal dd::after, .container::before, .container::after, .container-fluid::before, .container-fluid::after, .row::before, .row::after, .form-horizontal .form-group::before, .form-horizontal .form-group::after, .btn-toolbar::before, .btn-toolbar::after, .btn-group-vertical > .btn-group::before, .btn-group-vertical > .btn-group::after, .nav::before, .nav::after, .navbar::before, .navbar::after, .navbar-header::before, .navbar-header::after, .navbar-collapse::before, .navbar-collapse::after, .pager::before, .pager::after, .panel::before, .panel::after, .panel-body::before, .panel-body::after, .modal-header::before, .modal-header::after, .modal-footer::before, .modal-footer::after, td.inline-comments::before, td.inline-comments::after { content: " "; display: table; @@ -575,11 +607,20 @@ float: right; } +#content div.panel div.panel-heading a, #content div.panel div.panel-heading .pull-left, #content div.panel div.panel-heading .pull-right { color: white; } +#content div.panel div.panel-heading .pull-left { + margin-right: 10px; +} + +#content div.panel div.panel-heading .pull-right { + margin-left: 10px; +} + #content div.panel h1, #content div.panel h2, #content div.panel h3, @@ -1753,11 +1794,6 @@ padding: 5px; } -#changeset_compare_view_content { - border: 1px solid #CCC; - padding: 5px; -} - #changeset_content .container { font-size: 1.2em; overflow: hidden; @@ -1922,8 +1958,7 @@ #graph_content #changesets { table-layout: fixed; border-collapse: collapse; - border-left: none; - border-right: none; + border: none; border-color: #cdcdcd; } @@ -2163,7 +2198,7 @@ clear: both; } -.right .changes .changed_total { +.pull-right .changes .changed_total { display: block; float: right; text-align: center; @@ -2175,7 +2210,7 @@ padding: 1px; } -.right .changes .added, +.pull-right .changes .added, .changed, .removed { display: block; padding: 1px; @@ -2185,15 +2220,15 @@ min-width: 15px; } -.right .changes .added { +.pull-right .changes .added { background: #CFC; } -.right .changes .changed { +.pull-right .changes .changed { background: #FEA; } -.right .changes .removed { +.pull-right .changes .removed { background: #FAA; } @@ -2465,63 +2500,7 @@ padding-left: 5px; text-align: left; } -.diffblock .changeset_header { - height: 16px; -} -.diffblock .changeset_file { - float: left; -} -.diffblock .diff-menu-wrapper { - float: left; -} - -.diffblock .diff-menu { - position: absolute; - background: none repeat scroll 0 0 #FFFFFF; - border-color: #577632 #666666 #666666; - border-right: 1px solid #666666; - border-style: solid solid solid; - border-width: 1px; - box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2); - margin-top: 5px; - margin-left: 1px; - -} -.diffblock .diff-actions { - float: left; -} -.diffblock .diff-actions span.no-file, -.diffblock .diff-actions span.arrow { - opacity: 0.5; -} -.diffblock .diff-actions span.arrow { - margin: 0 -3px; -} -.diffblock .diff-actions a i { - margin: 0 2px; -} -.diffblock.twoway { - overflow: visible; -} -.diffblock.twoway .diff-actions { - padding-top: 0; -} -.diffblock.twoway .diff-actions label input { - margin: -5px 5px 0 10px; - position: relative; - top: 3px; -} -.diffblock .diff-menu ul li { - padding: 0px 0px 0px 0px !important; -} -.diffblock .diff-menu ul li a { - display: block; - padding: 3px 8px 3px 8px !important; -} -.diffblock .diff-menu ul li a:hover { - text-decoration: none; - background-color: #EEEEEE; -} + table.code-browser .browser-dir { height: 16px; padding-left: 5px; @@ -2926,12 +2905,21 @@ .panel-body { padding: 20px; + +} + +.panel-body.no-padding { + padding: 0; } .panel-body ~ .panel-body { padding-top: 0; } +.panel-body.no-padding ~ .panel-body { + padding-top: 20px; +} + .panel-body.settings .text-muted { margin: 5px 0; } @@ -3148,7 +3136,8 @@ .repo-switcher-dropdown.select2-drop.select2-drop-active { box-shadow: none; color: #fff; - background-color: #576622; + background-color: #577632; + border-color: #577632; } .branch-switcher-dropdown.select2-drop.select2-drop-active .select2-results .select2-highlighted, @@ -3690,9 +3679,11 @@ margin: -1px 0px 0px 0px; } -.show-inline-comments { +.panel-heading .pull-left input[type=checkbox], +.panel-heading .pull-right input[type=checkbox] { position: relative; - top: 1px + top: 4px; + margin: -10px 2px 0; } /** comment inline form **/ @@ -3988,109 +3979,20 @@ ******************************************************************************/ .diff-collapse { text-align: center; - margin: 0 0 -10px; -} + margin-bottom: 20px; +} + .diff-collapse-button { cursor: pointer; color: #666; font-size: 16px; } -.diff-container { - -} - -.compare-revision-selector { - font-weight: bold; - font-size: 14px; -} + .compare-revision-selector > div { display: inline-block; - margin-left: 8px; - vertical-align: middle; -} -.compare-revision-selector .btn { - margin-bottom: 0; -} - - -div.diffblock { - overflow: auto; - padding: 0px; - border: 1px solid #ccc; - background: #f8f8f8; - font-size: 100%; - line-height: 100%; - /* new */ - line-height: 125%; - border-radius: 6px 6px 0px 0px; -} - -.compare-revision-selector, -div.diffblock .code-header { - border-bottom: 1px solid #CCCCCC; - background: #EEEEEE; - padding: 10px 0 10px 0; - min-height: 14px; -} - -div.diffblock .code-header.banner { - border-bottom: 1px solid #CCCCCC; - background: #EEEEEE; - height: 14px; - margin: 0; - padding: 3px 100px 11px 100px; -} - -div.diffblock .code-header-title { - padding: 0px 0px 10px 5px !important; - margin: 0 !important; -} -div.diffblock .code-header .hash { - float: left; - padding: 2px 0 0 2px; -} -div.diffblock .code-header .date { - float: left; - text-transform: uppercase; - padding: 2px 0px 0px 2px; -} -div.diffblock .code-header div { - margin-left: 4px; - font-weight: bold; - font-size: 14px; -} - -div.diffblock .parents { - float: left; - min-height: 26px; - font-size: 10px; - font-weight: 400; - vertical-align: middle; - padding: 0px 2px 2px 2px; - background-color: #eeeeee; - border-bottom: 1px solid #CCCCCC; -} - -div.diffblock .children { - float: right; - min-height: 26px; - font-size: 10px; - font-weight: 400; - vertical-align: middle; - text-align: right; - padding: 0px 2px 2px 2px; - background-color: #eeeeee; - border-bottom: 1px solid #CCCCCC; -} - -div.diffblock .code-body { - background: #FFFFFF; - clear: both; -} -div.diffblock pre.raw { - background: #FFFFFF; - color: #000000; -} + margin-right: 8px; +} + table.code-difftable { border-collapse: collapse; width: 99%; @@ -4555,3 +4457,13 @@ #clone_by_id.input-group > input { width: 80% !important; } + +#content div.panel .changelog-panel > .changelog-heading, +#content div.panel .changelog-panel > ul.pagination { + margin-left: 100px; +} + +textarea.commit-message { + width: 100%; + box-sizing: border-box; +} diff -r 7bca124ef278 -r 5e3adb20839d kallithea/public/js/base.js --- a/kallithea/public/js/base.js Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/public/js/base.js Sun Jun 11 15:02:09 2017 +0200 @@ -880,17 +880,15 @@ }); $('#file_enable').click(function(){ - $('#editor_container').show(); $('#upload_file_container').hide(); $('#filename_container').show(); - $('#mimetype_header').show(); + $('#body').show(); }); $('#upload_file_enable').click(function(){ - $('#editor_container').hide(); $('#upload_file_container').show(); $('#filename_container').hide(); - $('#mimetype_header').hide(); + $('#body').hide(); }); return myCodeMirror diff -r 7bca124ef278 -r 5e3adb20839d kallithea/templates/admin/gists/edit.html --- a/kallithea/templates/admin/gists/edit.html Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/templates/admin/gists/edit.html Sun Jun 11 15:02:09 2017 +0200 @@ -47,7 +47,7 @@
${h.gravatar_div(request.authuser.email, size=32)} -
@@ -66,15 +66,16 @@
% for cnt, file in enumerate(c.files): -
-
+
+
- - + +
-
-

-                        
+                    
+
+ +
diff -r 7bca124ef278 -r 5e3adb20839d kallithea/templates/admin/gists/new.html --- a/kallithea/templates/admin/gists/new.html Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/templates/admin/gists/new.html Sun Jun 11 15:02:09 2017 +0200 @@ -32,8 +32,7 @@
${h.form(h.url('gists'), method='post',id='eform')}
- ${h.gravatar_div(request.authuser.email, size=32)} - +
-
-
- ${h.text('filename', size=30, placeholder=_('name this file...'))} - +
+
+ ${h.text('filename', size=30, placeholder=_('Name this gist ...'), class_='form-control')} +
-
-

-                    
+                
+
-
+
${h.submit('private',_('Create Private Gist'),class_="btn btn-success btn-xs")} ${h.submit('public',_('Create Public Gist'),class_="btn btn-default btn-xs")} ${h.reset('reset',_('Reset'),class_="btn btn-default btn-xs")} diff -r 7bca124ef278 -r 5e3adb20839d kallithea/templates/admin/gists/show.html --- a/kallithea/templates/admin/gists/show.html Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/templates/admin/gists/show.html Sun Jun 11 15:02:09 2017 +0200 @@ -28,9 +28,8 @@
-
-
-
+
+
%if c.gist.gist_type == 'public':
${_('Public Gist')}
@@ -63,34 +62,33 @@ %endif ${h.link_to(_('Show as Raw'),h.url('formatted_gist', gist_id=c.gist.gist_access_id, format='raw'),class_="btn btn-default btn-xs")}
-
- +
+
${h.gravatar_div(h.email_or_none(c.file_changeset.author), size=16)}
${h.person(c.file_changeset.author)} - ${_('created')} ${h.age(c.file_changeset.date)}
-
${h.urlify_text(c.file_changeset.message,c.repo_name)}
+
${h.urlify_text(c.file_changeset.message,c.repo_name)}
- ## iterate over the files - % for file in c.files: -
-
- ΒΆ - ${h.safe_unicode(file.path)} -
- ${h.link_to(_('Show as raw'),h.url('formatted_gist_file', gist_id=c.gist.gist_access_id, format='raw', revision=file.changeset.raw_id, f_path=h.safe_unicode(file.path)),class_="btn btn-default btn-xs")} + %for file in c.files: +
+
+
+ ${h.safe_unicode(file.path)} +
+
+ ${h.link_to(_('Show as raw'),h.url('formatted_gist_file', gist_id=c.gist.gist_access_id, format='raw', revision=file.changeset.raw_id, f_path=h.safe_unicode(file.path)),class_="btn btn-default btn-xs")}
-
+
${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
- %endfor + %endfor
-
diff -r 7bca124ef278 -r 5e3adb20839d kallithea/templates/changelog/changelog.html --- a/kallithea/templates/changelog/changelog.html Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/templates/changelog/changelog.html Sun Jun 11 15:02:09 2017 +0200 @@ -31,10 +31,9 @@
${self.breadcrumbs()}
-
+
%if c.pagination: -
-
+
${h.form(h.url.current(),method='get',class_="form-inline")} ${h.submit('set',_('Show'),class_="btn btn-default btn-sm")} @@ -63,9 +62,8 @@ ${_("Branch filter:")} ${h.select('branch_filter',c.branch_name,c.branch_filters)}
-
+
-
@@ -179,8 +177,6 @@
    ${c.pagination.pager()}
-
-
-
-
+
+
- - ## diff block -
-
+ ## diff block + +
<%namespace name="diff_block" file="/changeset/diff_block.html"/> ${diff_block.diff_block_js()} <% a_rev, cs_rev, file_diff_data = c.changes[c.changeset.raw_id] %> @@ -207,6 +206,8 @@ ## main comment form and it status ${comment.comments()} +
+ ## FORM FOR MAKING JS ACTION AS CHANGESET COMMENTS
-
diff -r 7bca124ef278 -r 5e3adb20839d kallithea/templates/changeset/changeset_range.html --- a/kallithea/templates/changeset/changeset_range.html Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/templates/changeset/changeset_range.html Sun Jun 11 15:02:09 2017 +0200 @@ -20,29 +20,22 @@ ${self.repo_context_bar('changelog')}
- ${self.breadcrumbs()} +
+ ${self.breadcrumbs()} +
+
-
-
-
-
- ${h.show_id(c.cs_ranges[0])} - - ${h.show_id(c.cs_ranges[-1])} - Compare Revisions -
-
-
-
-
+
%for cnt,cs in enumerate(c.cs_ranges): %if c.visual.use_gravatar: %endif - + %endfor
${h.gravatar_div(h.email_or_none(cs.author), size=14)}${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}${h.link_to(h.short_id(cs.raw_id),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}
${h.person(cs.author)}
${cs.date} @@ -54,9 +47,8 @@
-
-

${_('Files affected')}

-
+

${_('Files affected')}

+
%for cs in c.cs_ranges:
${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}
<% a_rev, cs_rev, file_diff_data = c.changes[cs.raw_id] %> @@ -70,9 +62,8 @@
%endfor %endfor -
+
-
<%namespace name="comment" file="/changeset/changeset_file_comment.html"/> <%namespace name="diff_block" file="/changeset/diff_block.html"/> diff -r 7bca124ef278 -r 5e3adb20839d kallithea/templates/changeset/diff_block.html --- a/kallithea/templates/changeset/diff_block.html Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/templates/changeset/diff_block.html Sun Jun 11 15:02:09 2017 +0200 @@ -4,29 +4,27 @@ cs_repo_name, cs_ref_name, cs_ref_type, cs_rev, file_diff_data)">
- ↑ ${_('Collapse Diff')} ↑ + ↑ ${_('Collapse Diff')} ↑
-
%for id_fid, url_fid, op, a_filename, cs_filename, diff, stats in file_diff_data: ${diff_block_diffblock(id_fid, url_fid, op, diff, a_repo_name, a_rev, a_ref_type, a_ref_name, a_filename, - cs_repo_name, cs_rev, cs_ref_type, cs_ref_name, cs_filename)} + cs_repo_name, cs_rev, cs_ref_type, cs_ref_name, cs_filename, + 'no-padding-%s' % id(file_diff_data))} %endfor -
<%def name="diff_block_diffblock(id_fid, url_fid, op, diff, a_repo_name, a_rev, a_ref_type, a_ref_name, a_filename, - cs_repo_name, cs_rev, cs_ref_type, cs_ref_name, cs_filename)" + cs_repo_name, cs_rev, cs_ref_type, cs_ref_name, cs_filename, cls)" > -
-
-
-
-
+
+
+
+
${h.safe_unicode(cs_filename)}
-
+
%if op == 'A': @@ -70,22 +68,19 @@ ${c.ignorews_url(request.GET, url_fid)} ${c.context_url(request.GET, url_fid)}
- - - -
+
+ ${_('Show inline comments')} + ${h.checkbox('checkbox-show-inline-' + id_fid, checked="checked",class_="show-inline-comments",**{'data-id_for':id_fid})} +
-
+
${diff|n} %if cs_filename.rsplit('.')[-1] in ['png', 'gif', 'jpg', 'bmp']:
Show images
%if op == 'M': %endif -
+
%if op in 'DM': @@ -125,8 +120,9 @@ $('.btn-image-diff-swap').mouseleave(reset); $('.diff-collapse-button').click(function(e) { + $('.diff_block').toggleClass('hidden'); var $button = $(e.currentTarget); - var $target = $('#' + $button.data('target')); + var $target = $('.' + $button.data('target')); if($target.hasClass('hidden')){ $target.removeClass('hidden'); $button.html("↑ {0} ↑".format(_TM['Collapse Diff'])); diff -r 7bca124ef278 -r 5e3adb20839d kallithea/templates/compare/compare_diff.html --- a/kallithea/templates/compare/compare_diff.html Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/templates/compare/compare_diff.html Sun Jun 11 15:02:09 2017 +0200 @@ -24,8 +24,8 @@ ${self.breadcrumbs()}
-
-
+
+
## divs are "inline-block" and cannot have whitespace between them.
@@ -44,11 +44,11 @@
%if c.compare_home: -
+

${_('Compare revisions, branches, bookmarks, or tags.')}

%else: -
+
##CS
${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}
<%include file="compare_cs.html" /> @@ -82,7 +82,10 @@ %endif
+
+ %endif + %if not c.compare_home: ## diff block <%namespace name="diff_block" file="/changeset/diff_block.html"/> ${diff_block.diff_block_js()} @@ -91,7 +94,6 @@ % if c.limited_diff:

${_('Changeset was too big and was cut off...')} ${_('Show full diff')}

% endif -
%endif
diff -r 7bca124ef278 -r 5e3adb20839d kallithea/templates/files/diff_2way.html --- a/kallithea/templates/files/diff_2way.html Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/templates/files/diff_2way.html Sun Jun 11 15:02:09 2017 +0200 @@ -30,15 +30,15 @@ ${self.breadcrumbs()}
-
-
-
+
+
+
-
+
${h.link_to(h.safe_unicode(c.node1.path),h.url('files_home',repo_name=c.repo_name, revision=c.cs2.raw_id,f_path=h.safe_unicode(c.node1.path)))}
-
+
diff -r 7bca124ef278 -r 5e3adb20839d kallithea/templates/files/files_add.html --- a/kallithea/templates/files/files_add.html Sun Jun 11 15:02:09 2017 +0200 +++ b/kallithea/templates/files/files_add.html Sun Jun 11 15:02:09 2017 +0200 @@ -28,15 +28,15 @@
${self.breadcrumbs()}
-
- ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data", class_="form-horizontal form-inline")} -

- ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.f_path)} / + ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data", class_="form-horizontal form-inline")} +

+ ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.f_path)} / @@ -46,24 +46,28 @@ ${_('or')} ${_('Create New File')} -

-
-
- + +
+
+
+ +
+
+
+ +
-
-

-                    
-                
-
${_('Commit Message')}
- -
-
- ${h.submit('commit',_('Commit Changes'),class_="btn btn-success btn-sm")} - ${h.reset('reset',_('Reset'),class_="btn btn-default btn-sm")} +
+
+
${_('Commit Message')}
+ +
+
+ ${h.submit('commit',_('Commit Changes'),class_="btn btn-success")} + ${h.reset('reset',_('Reset'),class_="btn btn-default")} +
${h.end_form()}