From: Stephen Cameron Date: Mon, 29 Jan 2018 17:39:38 +0000 (+0100) Subject: Landing page functionality. WIP #1852 @6 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=81c5d56777759efb6f6f68f386f1669dd572fee8;p=fluidbook-html5.git Landing page functionality. WIP #1852 @6 --- diff --git a/_index.html b/_index.html index 9c4863ac..0feb8f32 100644 --- a/_index.html +++ b/_index.html @@ -87,7 +87,8 @@
+
- \ No newline at end of file + diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index 9fe416c1..aaff3359 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -25,6 +25,7 @@ Fluidbook.prototype = { init: function (datas) { this.datas = datas; this.junk = datas.cacheDate; + this.landingpage = new FluidbookLandingPage(this); this.menu = new FluidbookMenu(this); this.zoom = new FluidbookZoom(this); this.zoom.resetZoom(); @@ -326,6 +327,12 @@ Fluidbook.prototype = { $this.hideSplash(); }, true); } + + else if (args[1] == 'landing') { + $this.hideSplash(); + this.landingpage.show(); + } + else { var view = args[1]; if (this.currentPage == -1) { @@ -1087,4 +1094,4 @@ Fluidbook.prototype = { } } -} \ No newline at end of file +} diff --git a/js/libs/fluidbook/fluidbook.landingpage.js b/js/libs/fluidbook/fluidbook.landingpage.js new file mode 100644 index 00000000..b53e11dd --- /dev/null +++ b/js/libs/fluidbook/fluidbook.landingpage.js @@ -0,0 +1,75 @@ +function FluidbookLandingPage(fluidbook) { + this.fluidbook = fluidbook; + this.hasLandingPage = false; + this.init(); +} + +FluidbookLandingPage.prototype = { + + init: function () { + var $this = this; + + if (this.fluidbook.datas.landingPage != undefined && this.fluidbook.datas.landingPage != '') { + + this.hasLandingPage = true; + window.location.hash = '/landing'; + + $("#landingPage").append('