From 19163b68d3ad0cf47d01e7e640a50f515b31f187 Mon Sep 17 00:00:00 2001
From: pacien
Date: Thu, 19 Jul 2018 20:29:38 +0200
Subject: Add offline capability indicator and links
---
index.html | 54 ++++++++++++++++++++++++++++++---------------
pointless/viewer/init.js | 3 +++
pointless/viewer/viewer.css | 41 ++++++++++++++++++++++++++++++++++
3 files changed, 80 insertions(+), 18 deletions(-)
diff --git a/index.html b/index.html
index b402c8a..90f9aad 100644
--- a/index.html
+++ b/index.html
@@ -18,25 +18,43 @@
-
Pointless Viewer
-
-
This viewer accepts double-width PDF presentations of the following shape:
-
-
-
- (LATEX-Beamer users may use
- \setbeameroption{show notes on second screen=right}
)
-
-
-
Please select a PDF presentation file to open.
-
+
+ Pointless Viewer
+ (available offline)
+
+
+
+
This viewer accepts double-width PDF presentations of the following shape:
+
+
+
+ (LATEX-Beamer users may use
+ \setbeameroption{show notes on second screen=right}
)
+
+
+
+ Please select a PDF file to load.
+ Slides will be opened in a new window.
+
+
+
+
+
+
-
+
diff --git a/pointless/viewer/init.js b/pointless/viewer/init.js
index 9ba881c..dddbf17 100644
--- a/pointless/viewer/init.js
+++ b/pointless/viewer/init.js
@@ -23,6 +23,9 @@ function isController() {
function initCache() {
if (!navigator.serviceWorker) return;
navigator.serviceWorker.register("appcache.js");
+
+ var offlineCapableIndicator = document.getElementById("offlineCapable");
+ offlineCapableIndicator.style.visibility = "visible";
}
function init() {
diff --git a/pointless/viewer/viewer.css b/pointless/viewer/viewer.css
index 57d95f4..d5b766b 100644
--- a/pointless/viewer/viewer.css
+++ b/pointless/viewer/viewer.css
@@ -13,10 +13,33 @@ html, body {
height: 100%;
}
+a {
+ color: white;
+}
+
+header > h1 {
+ display: inline-block;
+ margin-bottom: 0;
+ margin-right: 0.5rem;
+
+}
+
+header span {
+ font-size: 1.25rem;
+}
+
+#offlineCapable {
+ visibility: hidden;
+}
+
#welcomeScreen {
display: none;
}
+#welcomeScreen > div {
+ margin-bottom: 4rem;
+}
+
#welcomeScreen table {
width: 100%;
border-collapse: collapse;
@@ -29,6 +52,24 @@ html, body {
height: 8rem;
}
+#welcomeScreen ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+}
+
+#welcomeScreen li {
+ display: inline;
+}
+
+#welcomeScreen li + li::before {
+ content: " • ";
+}
+
+#fileInput {
+ width: 100%;
+}
+
.centered {
position: absolute;
top: 50%;
--
cgit v1.2.3