From feed2b79f25899d4655b1391b2ff58f8147303af Mon Sep 17 00:00:00 2001 From: pacien Date: Thu, 19 Jul 2018 12:32:20 +0200 Subject: Add welcome screen --- pointless/viewer/viewer.css | 14 +++++++++++++- pointless/viewer/viewer.js | 6 ++++-- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'pointless') diff --git a/pointless/viewer/viewer.css b/pointless/viewer/viewer.css index be4f876..57d95f4 100644 --- a/pointless/viewer/viewer.css +++ b/pointless/viewer/viewer.css @@ -13,10 +13,22 @@ html, body { height: 100%; } -#fileInput { +#welcomeScreen { display: none; } +#welcomeScreen table { + width: 100%; + border-collapse: collapse; +} + +#welcomeScreen table td { + text-align: center; + border: 1px solid white; + width: 50%; + height: 8rem; +} + .centered { position: absolute; top: 50%; diff --git a/pointless/viewer/viewer.js b/pointless/viewer/viewer.js index 78035ee..9e92c2c 100644 --- a/pointless/viewer/viewer.js +++ b/pointless/viewer/viewer.js @@ -9,13 +9,15 @@ class Viewer { constructor() { + this.welcomeScreen = document.getElementById("welcomeScreen"); this.fileInput = document.getElementById("fileInput"); - this.fileInput.style.display = "block"; + + this.welcomeScreen.style.display = "block"; this._listenForInput(); } load(source) { - this.fileInput.style.display = "none"; + this.welcomeScreen.style.display = "none"; pdfjsLib.getDocument(source).then(function(pdf) { var presentation = new Presentation(pdf); }); -- cgit v1.2.3