Browse Source

Add noscript warning (#119)

Danilo Bargen 8 years ago
parent
commit
8ea2db9ffa
3 changed files with 27 additions and 0 deletions
  1. 6 0
      index.html
  2. 1 0
      src/sass/app.scss
  3. 20 0
      src/sass/sections/_noscript.scss

+ 6 - 0
index.html

@@ -49,6 +49,12 @@
 <body ng-controller="StatusController as ctrl" class="{{ ctrl.statusClass }}" ng-class="{expanded: ctrl.expandStatusBar}">
     <img src="img/bg1.jpg?v=1" id="background-image" draggable="false"/>
 
+    <noscript>
+        <img id="logo-noscript" src="img/logo.svg?v=[[VERSION]]"></img>
+        <h2>Error: JavaScript not supported</h2>
+        <p>Please enable JavaScript in your browser to be able to use Threema Web.</p>
+    </noscript>
+
     <div id="main-wrapper" ng-cloak ng-class="{wide: ctrl.wide()}">
         <header>
             <h1 id="title">

+ 1 - 0
src/sass/app.scss

@@ -53,6 +53,7 @@
 @import "sections/footer";
 @import "sections/status_bar";
 @import "sections/my_identity";
+@import "sections/noscript";
 
 // Vendors: Third party code.
 // Nothing to see here yet!

+ 20 - 0
src/sass/sections/_noscript.scss

@@ -0,0 +1,20 @@
+noscript {
+    background-color: white;
+    display: block;
+    margin: 16px auto 0;
+    width: 50%;
+    text-align: center;
+    padding: 16px;
+
+    h2 {
+        padding-bottom: 8px;
+    }
+
+    img#logo-noscript {
+        min-width: 100px;
+        max-width: 300px;
+        padding-bottom: 16px;
+        margin-bottom: 16px;
+        border-bottom: 1px solid rgba(0, 0, 0, 0.54);
+    }
+}