summaryrefslogtreecommitdiffstats
path: root/src/main/resources/gitblit.css
diff options
context:
space:
mode:
authorTom <tw201207@gmail.com>2014-11-12 20:31:12 +0100
committerTom <tw201207@gmail.com>2014-11-12 20:31:12 +0100
commit3e1336cc6d32511daf2acab9c45a517cd3b10058 (patch)
tree525cf009501d0ba340e17f12154dbd54bf7af602 /src/main/resources/gitblit.css
parent4dee2c5ee06677d12d5719bc18199a0affd13cc0 (diff)
downloadgitblit-3e1336cc6d32511daf2acab9c45a517cd3b10058.tar.gz
gitblit-3e1336cc6d32511daf2acab9c45a517cd3b10058.zip
Opacity adjustments for image diffs
* ImageDiffHandler adds the slider; styled in gitblit.css * imgdiff.js is a little bottom-loaded Javascript that adjusts the opacity on sliders' scroll events. * The three diff pages add this bottom script to the page if needed * GitBlitDiffFormatter: center image diffs.
Diffstat (limited to 'src/main/resources/gitblit.css')
-rw-r--r--src/main/resources/gitblit.css31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/main/resources/gitblit.css b/src/main/resources/gitblit.css
index f6d6b24d..bdab2056 100644
--- a/src/main/resources/gitblit.css
+++ b/src/main/resources/gitblit.css
@@ -1486,14 +1486,43 @@ div.imgdiff-left:before {
img.imgdiff-left {
margin-left: 18px; /* Compensate for padding on outer div. */
+ user-select: none;
}
img.imagediff {
user-select: none;
+ /* Checkerboard background */
+ background-color: white;
+ background-image: linear-gradient(45deg, #DDD 25%, transparent 25%, transparent 75%, #DDD 75%, #DDD), linear-gradient(45deg, #DDD 25%, transparent 25%, transparent 75%, #DDD 75%, #DDD);
+ background-size: 16px 16px;
+ background-position: 0 0, 8px 8px;
}
.diff-img {
- margin: 2px 2px;
+ margin: 2px;
+}
+
+div.imgdiff-slider {
+ display: inline-block;
+ position: relative;
+ margin: 0px 2px;
+ width: 420px;
+ max-width: 420px;
+ height: 24px;
+ min-height: 18px;
+ overflow-x: scroll;
+ background: linear-gradient(to right, #F00, #0F0);
+}
+
+div.imgdiff-slider-inner {
+ position: absolute;
+ bottom: 0;
+ margin: 0;
+ padding: 0;
+ width : 1000%;
+ height: 1px;
+ border: none;
+ background: transparent;
}
/* End image diffs */