Browse Source

fix(index.html): UI adjustments

master
yanas 8 years ago
parent
commit
c5cacd7955
1 changed files with 42 additions and 19 deletions
  1. 42
    19
      index.html

+ 42
- 19
index.html View File

@@ -63,25 +63,48 @@
63 63
 
64 64
                     document.body.innerHTML
65 65
                         = "<div style='"
66
-                            + "position: absolute;top: 50%;left: 50%;"
67
-                            + "text-align: center;"
68
-                            + "transform: translate(-50%, -50%)'>"
69
-                            + "The application failed to load."
70
-                            + "<a id='showMore' style='"
71
-                            + "text-decoration: underline;"
72
-                            + "cursor: pointer'>more</a>"
73
-                            + "<div id='moreInfo' style='"
74
-                            + "display: none'>" + fileRef + "</div>"
75
-                            + "<br/> "
76
-                            + "The page should reload shortly... "
77
-                            + "<a href='" + href + "'"
78
-                            + " style='text-decoration: underline'>reload</a>"
79
-                            + "</div>";
80
-                    document.getElementById("showMore")
81
-                        .addEventListener('click', function () {
82
-                           document
83
-                               .getElementById("moreInfo")
84
-                               .setAttribute("style", "display: block;");
66
+                        + "position: absolute;top: 50%;left: 50%;"
67
+                        + "text-align: center;"
68
+                        + "font-size: medium;"
69
+                        + "font-weight: 400;"
70
+                        + "transform: translate(-50%, -50%)'>"
71
+                        + "Uh oh! We couldn't fully download everything we needed :(" // jshint ignore:line
72
+                        + "<br/> "
73
+                        + "We will try again shortly. In the mean time, check for problems with your Internet connection!" // jshint ignore:line
74
+                        + "<br/><br/> "
75
+                        + "<div id='moreInfo' style='"
76
+                        + "display: none;'>" + "Missing " + fileRef
77
+                        + "<br/><br/></div>"
78
+                        + "<a id='showMore' style='"
79
+                        + "text-decoration: underline;"
80
+                        + "font-size:small;"
81
+                        + "cursor: pointer'>show more</a>"
82
+                        + "&nbsp;&nbsp;&nbsp;"
83
+                        + "<a href='" + href + "' style='"
84
+                        + "text-decoration: underline;"
85
+                        + "font-size:small;"
86
+                        + "'>reload now</a>"
87
+                        + "</div>";
88
+
89
+                    var showMoreElem = document.getElementById("showMore");
90
+                    showMoreElem.addEventListener('click', function () {
91
+                            var moreInfoElem
92
+                                    = document.getElementById("moreInfo");
93
+
94
+                            if (showMoreElem.innerHTML === "show more") {
95
+                                moreInfoElem.setAttribute(
96
+                                    "style",
97
+                                    "display: block;"
98
+                                    + "color:#FF991F;"
99
+                                    + "font-size:small;"
100
+                                    + "user-select:text;");
101
+                                showMoreElem.innerHTML = "show less";
102
+                            }
103
+                            else {
104
+                                moreInfoElem.setAttribute(
105
+                                    "style", "display: none;");
106
+                                showMoreElem.innerHTML = "show more";
107
+                            }
85 108
                         });
86 109
 
87 110
                     window.setTimeout(

Loading…
Cancel
Save