From: Vincent Vanwaelscappel Date: Tue, 22 Jan 2019 15:22:27 +0000 (+0100) Subject: fix #2532 @2 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b6e51adc73dcf06748c92c59401710fc0372b1fa;p=fluidbook-html5.git fix #2532 @2 --- diff --git a/_index.html b/_index.html index 0065c8ed..4f281629 100644 --- a/_index.html +++ b/_index.html @@ -54,7 +54,6 @@
-
@@ -92,14 +91,10 @@
-
- - -
diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index fcd54c0b..5bcd06ad 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -123,6 +123,7 @@ Fluidbook.prototype = { }, initTheme: function () { + var $this = this; if (this.datas.arrowsTheme) { $('html').addClass('sharp'); } @@ -132,7 +133,26 @@ Fluidbook.prototype = { } else { $('html').addClass('menu-default'); } + + $(document).on('fluidbook.init', function () { + console.log('fluidbook init'); + var logoImg = $("#splash .logo img"); + if ($(logoImg).isLoaded()) { + $this.splashLogoLoaded(); + } else { + $(logoImg).on('load', function () { + $this.splashLogoLoaded(); + }); + } + }); }, + + splashLogoLoaded: function () { + console.log('logo loaded'); + resize(); + $("#splash .logo img").css('opacity', 1); + }, + initLoading: function () { if ($("#loader svg").length > 0) { return; diff --git a/style/fluidbook.less b/style/fluidbook.less index c65e9004..ef4da119 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -2386,20 +2386,24 @@ ul.chapters { /* Splash screen */ #splash { position: absolute; - top: 0px; - left: 0px; + top: 0; + left: 0; z-index: 40; -} + width: 100%; + height: 100%; -#splash .logo { - position: absolute; + .logo { + position: absolute; - // Make sure logo fits and is centred even on small screens - img { - max-width: 95%; - height: auto; - display: block; - margin: 0 auto; + // Make sure logo fits and is centred even on small screens + img { + transition: opacity 400ms linear; + max-width: 95%; + height: auto; + display: block; + margin: 0 auto; + opacity: 0; + } } }