Commit 2407976f2d35200856712629914a92b9b5f5ad4b
1 parent
3ee4fd02
Exists in
master
feat: add a "javascript is disabled" disclaimer
Showing
1 changed file
with
37 additions
and
0 deletions
Show diff stats
flaskr/templates/base.html
... | ... | @@ -70,6 +70,43 @@ |
70 | 70 | {% endif %} |
71 | 71 | {% endwith %} |
72 | 72 | |
73 | + <style> | |
74 | + .nojs { | |
75 | + opacity: 0; | |
76 | + animation: 16.18s fadeIn; | |
77 | + animation-delay: 1.618s; | |
78 | + animation-fill-mode: forwards; | |
79 | + | |
80 | + visibility: hidden; | |
81 | + pointer-events: none; | |
82 | + } | |
83 | + | |
84 | + @keyframes fadeIn { | |
85 | + 0% { | |
86 | + opacity: 0; | |
87 | + } | |
88 | + 25% { | |
89 | + visibility: visible; | |
90 | + opacity: 1; | |
91 | + } | |
92 | + 93% { | |
93 | + visibility: visible; | |
94 | + opacity: 1; | |
95 | + } | |
96 | + 99% { | |
97 | + visibility: visible; | |
98 | + opacity: 0; | |
99 | + } | |
100 | + 100% { | |
101 | + visibility: hidden; | |
102 | + } | |
103 | + } | |
104 | + </style> | |
105 | + <div class="alert alert-danger nojs"> | |
106 | + Javascript appears disabled, and we totally get that. | |
107 | + You'll need javascript to render the plots, though. | |
108 | + </div> | |
109 | + | |
73 | 110 | {% block body %} |
74 | 111 | {% endblock %} |
75 | 112 | </div> | ... | ... |