From: Vincent Date: Wed, 6 Sep 2017 14:23:35 +0000 (+0200) Subject: Refactor shadows images | wip #1466 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f8a105a5ca42d5b6f658a5622776e64fb2d6c7d3;p=fluidbook-html5.git Refactor shadows images | wip #1466 @2 --- diff --git a/images/book-shadow-left.png b/images/book-shadow-left.png deleted file mode 100644 index 7a93d5da..00000000 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 index 3abd6592..00000000 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 index a8359dcb..00000000 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 index bebcece3..00000000 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 index a3cf1f8b..00000000 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 index c8c14850..00000000 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 index f3884b60..00000000 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 index 166475b4..00000000 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 index 00000000..f3884b60 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 index 00000000..166475b4 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 index c3158792..00000000 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 index 9899e53a..00000000 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 index c9be4930..00000000 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 index c66414f6..00000000 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 index b41f888d..00000000 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 index 772f4116..00000000 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 index 8b593d9f..00000000 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 index 7b5dd6ef..00000000 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 index 5aedbf6b..00000000 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 index 5c7733d2..00000000 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 index 00000000..7a93d5da 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 index 00000000..3abd6592 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 index 00000000..8b593d9f 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 index 00000000..5c7733d2 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 index 00000000..c3158792 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 index 00000000..772f4116 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 index 00000000..5aedbf6b Binary files /dev/null and b/images/shadows/thumbnails/right.png differ diff --git a/js/libs/fluidbook/fluidbook.loader.js b/js/libs/fluidbook/fluidbook.loader.js index 0e7b50cc..5ecfd529 100644 --- a/js/libs/fluidbook/fluidbook.loader.js +++ b/js/libs/fluidbook/fluidbook.loader.js @@ -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,'; diff --git a/js/widget.js b/js/widget.js index 3bb4e15c..c5fc9cc8 100644 --- a/js/widget.js +++ b/js/widget.js @@ -3,7 +3,7 @@ $(function () { _GET = parseGet({ background: 'transparent', target: '_blank', - link: '../index.'+DATAS.htmlExtension, + link: '../index.' + DATAS.htmlExtension, time: 4 }); _GET['time'] = Math.max(1.5, _GET['time']); @@ -70,8 +70,7 @@ $(function () { if (i == 0) { pclass += ' loaded'; } else { - - shade = '
'; + shade = '
'; } pclass += ' ' + side; diff --git a/style/fluidbook.less b/style/fluidbook.less index be6ca32c..be7b32b3 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -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;