Lee Morgan 4 лет назад
Родитель
Сommit
b25e99b04d
2 измененных файлов с 48 добавлено и 0 удалено
  1. 27 0
      helper.js
  2. 21 0
      thing.html

+ 27 - 0
helper.js

@@ -0,0 +1,27 @@
+module.exports = {
+    error: function(message){
+        return `
+            <div id="bannerContainer">
+                <div id="errorBanner">
+                    <style>
+                        #bannerContainer{
+                            display: flex;
+                            justify-content: center;
+                            width: 100vw;
+                        }
+                        
+                        #errorBanner{
+                            position: fixed;
+                            top: 10px;
+                            background: red;
+                            color: white;
+                            width: 50%;
+                        }
+                    </style>
+            
+                    <h2>${message}</h2>
+                </div>
+            </div>
+        `;
+    }
+}

+ 21 - 0
thing.html

@@ -0,0 +1,21 @@
+<div id="bannerContainer">
+    <div id="errorBanner">
+        <style>
+            #bannerContainer{
+                display: flex;
+                justify-content: center;
+                width: 100vw;
+            }
+            
+            #errorBanner{
+                position: fixed;
+            top: 10px;
+            background: red;
+            color: white;
+            width: 50%;
+        }
+        </style>
+
+        <h2>${message}</h2>
+    </div>
+</div>