WebashalarForML commited on
Commit
e4cb1f1
·
verified ·
1 Parent(s): 63c632b

Update templates/upload.html

Browse files
Files changed (1) hide show
  1. templates/upload.html +47 -0
templates/upload.html CHANGED
@@ -76,9 +76,47 @@
76
  .form-group button:hover {
77
  background-color: #0056b3;
78
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  </style>
80
  </head>
81
  <body>
 
 
 
 
 
 
 
 
 
 
 
82
  <div class="container">
83
  <header>
84
  <h1>Upload Database</h1>
@@ -99,4 +137,13 @@
99
  </div>
100
  </div>
101
  </body>
 
 
 
 
 
 
 
 
 
102
  </html>
 
76
  .form-group button:hover {
77
  background-color: #0056b3;
78
  }
79
+
80
+ .alert {
81
+ padding: 10px;
82
+ margin-bottom: 10px;
83
+ border-radius: 5px;
84
+ text-align: center;
85
+ position: absolute;
86
+ position-area: top center;
87
+ top: 30px;
88
+ align-items: center;
89
+ }
90
+
91
+ .alert-error {
92
+ background-color: #D84040;
93
+ color: #ffffff;
94
+ }
95
+
96
+ .alert-success {
97
+ background-color: #D2DE32;
98
+ color: #ffffff;
99
+ }
100
+
101
+ .alert-warning {
102
+ background-color: #FFC700;
103
+ color: #ffffff;
104
+ }
105
+
106
  </style>
107
  </head>
108
  <body>
109
+
110
+ <div class="container-flash">
111
+ {% with messages = get_flashed_messages(with_categories=true) %}
112
+ {% if messages %}
113
+ <div id="flash-message" class="alert alert-{{ messages[0][0] }}">
114
+ <strong>{{ messages[0][1] }}</strong>
115
+ </div>
116
+ {% endif %}
117
+ {% endwith %}
118
+ </div>
119
+
120
  <div class="container">
121
  <header>
122
  <h1>Upload Database</h1>
 
137
  </div>
138
  </div>
139
  </body>
140
+ <script>
141
+ const flashMessage = document.getElementById('flash-message');
142
+ //for flash message
143
+ if (flashMessage) {
144
+ setTimeout(function() {
145
+ flashMessage.style.display = 'none';
146
+ }, 2000); // Hide after 2 seconds
147
+ }
148
+ </script>
149
  </html>