From bae957cd80e59f16fe011dda45ce2624e2ffd4d2 Mon Sep 17 00:00:00 2001 From: Tom <tw201207@gmail.com> Date: Wed, 12 Nov 2014 14:19:29 -0500 Subject: [PATCH] Support for adding bottom scripts --- src/main/resources/gitblit.css | 260 ++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 211 insertions(+), 49 deletions(-) diff --git a/src/main/resources/gitblit.css b/src/main/resources/gitblit.css index 7894770..f6d6b24 100644 --- a/src/main/resources/gitblit.css +++ b/src/main/resources/gitblit.css @@ -38,6 +38,19 @@ font-weight: bold; } +.gray { + color: #888; +} + +.octicon-centered { + text-align: center; + width: 16px; +} + +tr:hover .octicon-centered { + color:#eee; +} + .label a.bugtraq { font-weight: normal; color: white; @@ -55,7 +68,7 @@ white-space: nowrap; vertical-align: baseline; } - + [class^="icon-"], [class*=" icon-"] i { /* override for a links that look like bootstrap buttons */ vertical-align: text-bottom; @@ -237,14 +250,13 @@ } .repositorynavbar { - background-color: #fbfbfb; + background-color: #f8f8f8; border-bottom: 1px solid #ccc; margin-bottom: 10px; } .repositorynavbar .title { - line-height: 32px; - padding: 5px 0px; + padding: 10px 0px; } .repositorynavbar .repository { @@ -782,6 +794,10 @@ td.ticket-list-state { vertical-align: middle; +} + +td.ticket-list-priority { + vertical-align: middle; } .ticket-list-details { @@ -990,6 +1006,11 @@ a.list { text-decoration: none; + color: inherit; +} + +a.list-strikethrough { + text-decoration: line-through; color: inherit; } @@ -1329,19 +1350,6 @@ font-family: inherit; } -div.diff.hunk_header { - -moz-border-bottom-colors: none; - -moz-border-image: none; - -moz-border-left-colors: none; - -moz-border-right-colors: none; - -moz-border-top-colors: none; - border-color: #FFE0FF; - border-style: dotted; - border-width: 1px 0 0; - margin-top: 2px; - font-family: inherit; -} - span.diff.hunk_info { background-color: #FFEEFF; color: #990099; @@ -1353,61 +1361,142 @@ font-family: inherit; } -div.diff.add2 { - background-color: #DDFFDD; - font-family: inherit; +.diff-cell { + margin: 0px; + padding: 0 2px; + border: 0; + border-left: 1px solid #bbb; } -div.diff.remove2 { +.add2 { + background-color: #DDFFDD; +} + +.remove2 { background-color: #FFDDDD; - font-family: inherit; } -div.diff table { +.context2 { + background-color: #FEFEFE; +} + +.trailingws-add { + background-color: #99FF99; +} + +.trailingws-sub { + background-color: #FF9999; +} + +div.diff > table { border-radius: 0; border-right: 1px solid #bbb; border-bottom: 1px solid #bbb; width: 100%; } -div.diff table th, div.diff table td { - margin: 0px; - padding: 0px; - font-family: monospace; - border: 0; -} - -div.diff table th { - background-color: #f0f0f0; +.diff-line { + background-color: #fbfbfb; text-align: center; color: #999; - padding-left: 5px; - padding-right: 5px; - width: 30px; + padding-left: 2px; + padding-right: 2px; + width: 3em; /* Font-size relative! */ + min-width: 3em; } -div.diff table th.header { - background-color: #D2C3AF; - border-right: 0px; - border-bottom: 1px solid #808080; - font-family: inherit; - font-size:0.9em; - color: black; - padding: 2px; - text-align: left; +.diff-line:before { + content: attr(data-lineno); } -div.diff table td.hunk_header { +.diff-state { + background-color: #fbfbfb; + text-align: center; + color: #999; + padding-left: 2px; + padding-right: 2px; + width: 0.5em; /* Font-size relative! */ +} + +.diff-state-add:before { + color: green; + font-weight: bold; + content: '+'; +} + +.diff-state-sub:before { + color: red; + font-weight: bold; + content: '-'; +} + +.hunk_header { background-color: #dAe2e5 !important; + border-left: 1px solid #bbb; border-top: 1px solid #bac2c5; border-bottom: 1px solid #bac2c5; color: #555; } -div.diff table td { - border-left: 1px solid #bbb; - background-color: #fbfbfb; +/* Image diffs. + Kudos to Lea Verou: http://lea.verou.me/2014/07/image-comparison-slider-with-pure-css/ + Slightly modified by Tom to allow moving the slider fully at the left edge of the images. */ +div.imgdiff { + margin: 5px 2px; + position: relative; + display: inline-block; + line-height: 0; + padding-left: 18px; } + +/* Note: width defines the initial position of the slider. Would have liked to have it + at 50% initially, but that fails on webkit, which refuses to go below the specified + width. (min-width won't help.) This is known behavior of webkit, see + https://codereview.chromium.org/239983004 and https://bugs.webkit.org/show_bug.cgi?id=72948 + There is a hack (setting width to 1px in :hover) to work around this, but that causes + ugly screen flicker and makes for a dreadful UI. We're better off setting the slider + to the far left initially. */ +div.imgdiff-left { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 18px; + max-width: 100%; + overflow: hidden; + resize: horizontal; + /* Some border that should be visible on most images, combined of a dark color (red) + and white in case the image was all red itself or used other colors that would make + a thin red line hard to make out. */ + border-right: 1px solid red; + box-shadow: 1px 0px 0px 0px white; +} + +div.imgdiff-left:before { + content: ''; + position: absolute; + right: 0; + bottom: 0; + width: 13px; + height: 13px; + background: linear-gradient(-45deg, red 50%, transparent 0); + background-clip: content-box; + cursor: ew-resize; +} + +img.imgdiff-left { + margin-left: 18px; /* Compensate for padding on outer div. */ +} + +img.imagediff { + user-select: none; +} + +.diff-img { + margin: 2px 2px; +} + +/* End image diffs */ td.changeType { width: 15px; @@ -2074,4 +2163,77 @@ background-color: #fff; border-color: #ece7e2; color: #815b3a; -} \ No newline at end of file +} +.severity-catastrophic { + color:#D51900; +} +.severity-catastrophic:after { + font-family: Helvetica,arial,freesans,clean,sans-serif ; + content: "●●●●●"; + font-weight:900; + font-size:.45em; + font-variant:small-caps; + display:flex; + white-space: pre; +} +.severity-critical { + color:#D55900; +} +.severity-critical:after { + font-family: Helvetica,arial,freesans,clean,sans-serif ; + content: " ●●●●"; + font-weight:900; + font-size:.45em; + font-variant:small-caps; + display:flex; + white-space: pre; +} +.severity-serious { + color:#E69F00; +} +.severity-serious:after { + font-family: Helvetica,arial,freesans,clean,sans-serif ; + content: " ●●●"; + font-weight:900; + font-size:.45em; + font-variant:small-caps; + display:flex; + white-space: pre; +} +.severity-minor { + color:#009E73; +} +.severity-minor:after { + font-family: Helvetica,arial,freesans,clean,sans-serif ; + content: " ●●"; + font-weight:900; + font-size:.45em; + font-variant:small-caps; + display:flex; + white-space: pre; +} +.severity-negligible { + color:#0072B2; +} +.severity-negligible:after { + font-family: Helvetica,arial,freesans,clean,sans-serif ; + content: " ●"; + font-weight:900; + font-size:.45em; + font-variant:small-caps; + display:flex; + white-space: pre; +} +.severity-unrated { +} +.priority-urgent { + color:#D51900; +} +.priority-high { + color:#D55900; +} +.priority-normal { +} +.priority-low { + color:#0072B2; +} -- Gitblit v1.9.1