]> _ Git - fluidbook-html5.git/commitdiff
Refactor shadows images | wip #1466 @2
authorVincent <vincent@cubedesigners.com>
Wed, 6 Sep 2017 14:23:35 +0000 (16:23 +0200)
committerVincent <vincent@cubedesigners.com>
Wed, 6 Sep 2017 14:23:35 +0000 (16:23 +0200)
30 files changed:
images/book-shadow-left.png [deleted file]
images/book-shadow-right.png [deleted file]
images/cur-zoom-in.cur [deleted file]
images/cur-zoom-in.png [deleted file]
images/cur-zoom-out.cur [deleted file]
images/cur-zoom-out.png [deleted file]
images/edge-left.png [deleted file]
images/edge-right.png [deleted file]
images/edges/edge-left.png [new file with mode: 0644]
images/edges/edge-right.png [new file with mode: 0644]
images/icon-shad.png [deleted file]
images/mask.png [deleted file]
images/shade-thumb-left.png [deleted file]
images/shade-thumb-right.png [deleted file]
images/shadeleft-reflet.png [deleted file]
images/shadeleft-thumb.png [deleted file]
images/shadeleft.png [deleted file]
images/shaderight-reflet.png [deleted file]
images/shaderight-thumb.png [deleted file]
images/shaderight.png [deleted file]
images/shadows/back/left.png [new file with mode: 0644]
images/shadows/back/right.png [new file with mode: 0644]
images/shadows/pages/left.png [new file with mode: 0644]
images/shadows/pages/right.png [new file with mode: 0644]
images/shadows/thumbnails/back.png [new file with mode: 0644]
images/shadows/thumbnails/left.png [new file with mode: 0644]
images/shadows/thumbnails/right.png [new file with mode: 0644]
js/libs/fluidbook/fluidbook.loader.js
js/widget.js
style/fluidbook.less

diff --git a/images/book-shadow-left.png b/images/book-shadow-left.png
deleted file mode 100644 (file)
index 7a93d5d..0000000
Binary files a/images/book-shadow-left.png and /dev/null differ
diff --git a/images/book-shadow-right.png b/images/book-shadow-right.png
deleted file mode 100644 (file)
index 3abd659..0000000
Binary files a/images/book-shadow-right.png and /dev/null differ
diff --git a/images/cur-zoom-in.cur b/images/cur-zoom-in.cur
deleted file mode 100644 (file)
index a8359dc..0000000
Binary files a/images/cur-zoom-in.cur and /dev/null differ
diff --git a/images/cur-zoom-in.png b/images/cur-zoom-in.png
deleted file mode 100644 (file)
index bebcece..0000000
Binary files a/images/cur-zoom-in.png and /dev/null differ
diff --git a/images/cur-zoom-out.cur b/images/cur-zoom-out.cur
deleted file mode 100644 (file)
index a3cf1f8..0000000
Binary files a/images/cur-zoom-out.cur and /dev/null differ
diff --git a/images/cur-zoom-out.png b/images/cur-zoom-out.png
deleted file mode 100644 (file)
index c8c1485..0000000
Binary files a/images/cur-zoom-out.png and /dev/null differ
diff --git a/images/edge-left.png b/images/edge-left.png
deleted file mode 100644 (file)
index f3884b6..0000000
Binary files a/images/edge-left.png and /dev/null differ
diff --git a/images/edge-right.png b/images/edge-right.png
deleted file mode 100644 (file)
index 166475b..0000000
Binary files a/images/edge-right.png and /dev/null differ
diff --git a/images/edges/edge-left.png b/images/edges/edge-left.png
new file mode 100644 (file)
index 0000000..f3884b6
Binary files /dev/null and b/images/edges/edge-left.png differ
diff --git a/images/edges/edge-right.png b/images/edges/edge-right.png
new file mode 100644 (file)
index 0000000..166475b
Binary files /dev/null and b/images/edges/edge-right.png differ
diff --git a/images/icon-shad.png b/images/icon-shad.png
deleted file mode 100644 (file)
index c315879..0000000
Binary files a/images/icon-shad.png and /dev/null differ
diff --git a/images/mask.png b/images/mask.png
deleted file mode 100644 (file)
index 9899e53..0000000
Binary files a/images/mask.png and /dev/null differ
diff --git a/images/shade-thumb-left.png b/images/shade-thumb-left.png
deleted file mode 100644 (file)
index c9be493..0000000
Binary files a/images/shade-thumb-left.png and /dev/null differ
diff --git a/images/shade-thumb-right.png b/images/shade-thumb-right.png
deleted file mode 100644 (file)
index c66414f..0000000
Binary files a/images/shade-thumb-right.png and /dev/null differ
diff --git a/images/shadeleft-reflet.png b/images/shadeleft-reflet.png
deleted file mode 100644 (file)
index b41f888..0000000
Binary files a/images/shadeleft-reflet.png and /dev/null differ
diff --git a/images/shadeleft-thumb.png b/images/shadeleft-thumb.png
deleted file mode 100644 (file)
index 772f411..0000000
Binary files a/images/shadeleft-thumb.png and /dev/null differ
diff --git a/images/shadeleft.png b/images/shadeleft.png
deleted file mode 100644 (file)
index 8b593d9..0000000
Binary files a/images/shadeleft.png and /dev/null differ
diff --git a/images/shaderight-reflet.png b/images/shaderight-reflet.png
deleted file mode 100644 (file)
index 7b5dd6e..0000000
Binary files a/images/shaderight-reflet.png and /dev/null differ
diff --git a/images/shaderight-thumb.png b/images/shaderight-thumb.png
deleted file mode 100644 (file)
index 5aedbf6..0000000
Binary files a/images/shaderight-thumb.png and /dev/null differ
diff --git a/images/shaderight.png b/images/shaderight.png
deleted file mode 100644 (file)
index 5c7733d..0000000
Binary files a/images/shaderight.png and /dev/null differ
diff --git a/images/shadows/back/left.png b/images/shadows/back/left.png
new file mode 100644 (file)
index 0000000..7a93d5d
Binary files /dev/null and b/images/shadows/back/left.png differ
diff --git a/images/shadows/back/right.png b/images/shadows/back/right.png
new file mode 100644 (file)
index 0000000..3abd659
Binary files /dev/null and b/images/shadows/back/right.png differ
diff --git a/images/shadows/pages/left.png b/images/shadows/pages/left.png
new file mode 100644 (file)
index 0000000..8b593d9
Binary files /dev/null and b/images/shadows/pages/left.png differ
diff --git a/images/shadows/pages/right.png b/images/shadows/pages/right.png
new file mode 100644 (file)
index 0000000..5c7733d
Binary files /dev/null and b/images/shadows/pages/right.png differ
diff --git a/images/shadows/thumbnails/back.png b/images/shadows/thumbnails/back.png
new file mode 100644 (file)
index 0000000..c315879
Binary files /dev/null and b/images/shadows/thumbnails/back.png differ
diff --git a/images/shadows/thumbnails/left.png b/images/shadows/thumbnails/left.png
new file mode 100644 (file)
index 0000000..772f411
Binary files /dev/null and b/images/shadows/thumbnails/left.png differ
diff --git a/images/shadows/thumbnails/right.png b/images/shadows/thumbnails/right.png
new file mode 100644 (file)
index 0000000..5aedbf6
Binary files /dev/null and b/images/shadows/thumbnails/right.png differ
index 0e7b50cca24b750c95e5aa50606d56086e15b4a9..5ecfd529154169698acc20eea33eed6e4004d77b 100644 (file)
@@ -148,13 +148,8 @@ FluidbookLoader.prototype = {
             if (!$(page).is(':visible')) {
                 $(page).show();
             }
-            shade = 'shade' + position;
-            if (this.fluidbook.datas.pageReflection) {
-                shade += '-reflet';
-            }
-            shade += '.png';
 
-            $(page).children(".shade").html(this.loadImage('images/' + shade, this.fluidbook.datas.width / 4, this.fluidbook.datas.height));
+            $(page).children(".shade").html(this.loadPageShade(position));
             $(page).children('.clinks').html(this.fluidbook.datas.clinks[pageNr]);
             callback();
             return;
@@ -175,7 +170,10 @@ FluidbookLoader.prototype = {
         }
         shade += '.png';
         $(page).children('.clinks').html(this.fluidbook.datas.clinks[pageNr]);
-        $(page).children(".shade").html(this.loadImage('images/' + shade, this.fluidbook.datas.width / 4, this.fluidbook.datas.height));
+        $(page).children(".shade").html(this.loadPageShade(position));
+    },
+    loadPageShade:function(position){
+        return this.loadImage('images/shadows/pages/' + position + '.png', this.fluidbook.datas.width / 4, this.fluidbook.datas.height);
     },
     loadLeftPage: function (page, doublePage, callback) {
         if (page > 0 && page <= this.fluidbook.datas.pages) {
@@ -289,7 +287,7 @@ FluidbookLoader.prototype = {
                 p = '100%';
                 i = 'left';
             }
-            shadeImage = 'url("images/shade' + i + '-thumb.png"),';
+            shadeImage = 'url("images/shadows/thumbnails/' + i + '.png"),';
 
             shadePosition = p + " 0%,";
             shadeSize = '50px ' + h + 'px,';
index 3bb4e15c0657d9ee849b425d4c0da22ca34639ab..c5fc9cc80c69c4042a49287e66da9cb4b50edcfa 100644 (file)
@@ -3,7 +3,7 @@ $(function () {
     _GET = parseGet({\r
         background: 'transparent',\r
         target: '_blank',\r
-        link: '../index.'+DATAS.htmlExtension,\r
+        link: '../index.' + DATAS.htmlExtension,\r
         time: 4\r
     });\r
     _GET['time'] = Math.max(1.5, _GET['time']);\r
@@ -70,8 +70,7 @@ $(function () {
                 if (i == 0) {\r
                     pclass += ' loaded';\r
                 } else {\r
-\r
-                    shade = '<div class="shade"><img src="images/shade' + side + '.png" /></div>';\r
+                    shade = '<div class="shade"><img src="images/shadows/pages/' + side + '.png" /></div>';\r
                 }\r
 \r
                 pclass += ' ' + side;\r
index be6ca32c5e9bd1ba03bb42441bf5bf33bce55291..be7b32b30ca44139c754ae1918e973af19a302b7 100644 (file)
@@ -365,14 +365,14 @@ body, html {
                position: absolute;
                bottom: -@shadow-height+@shadow-offset;
                left: 0px;
-               background-image: url("../images/book-shadow-left.png");
+               background-image: url("../images/shadows/back/left.png");
                background-size: 100% @shadow-height;
                width: @book-page-width;
                height: @shadow-height;
 
                &.right {
                        display: none;
-                       background-image: url("../images/book-shadow-right.png");
+                       background-image: url("../images/shadows/back/right.png");
 
                        .landscape & {
                                left: @book-page-width;
@@ -399,7 +399,7 @@ body, html {
                        right: -@right-edge-width;
                        width: @right-edge-width;
                        height: @book-page-height+@right-edge-bottom-offset;
-                       background-image: url("../images/edge-right.png");
+                       background-image: url("../images/edges/edge-right.png");
                        background-repeat: no-repeat;
                        background-size: @right-edge-width unit(@book-page-height + @right-edge-bottom-offset, px);
                        background-position: 0 5px;
@@ -412,7 +412,7 @@ body, html {
                        left: -@left-edge-width;
                        width: @left-edge-width;
                        height: @book-page-height + @left-edge-bottom-offset;
-                       background-image: url("../images/edge-left.png");
+                       background-image: url("../images/edges/edge-left.png");
                        background-repeat: no-repeat;
                        background-size: @left-edge-width unit(@book-page-height + @left-edge-bottom-offset, px);
                        background-position: 0 0;
@@ -1249,7 +1249,7 @@ form input[type="text"], form input[type="email"] {
        &:before {
                position: absolute;
                content: "";
-               background-image: url("../images/icon-shad.png");
+               background-image: url("../images/shadows/thumbnails/back.png");
                background-size: 100% 100%;
                background-repeat: no-repeat;
                opacity: 0.65;
@@ -1301,6 +1301,7 @@ ul.chapters.shareList a.level0 img {
        .portrait & .icon.afterSearch {
                display: none;
        }
+       ²
        .icon {
                position: absolute;
                top: 0px;