Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +145 -259
templates/index.html
CHANGED
|
@@ -1,259 +1,145 @@
|
|
| 1 |
-
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8" />
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
-
<title>File Uploader</title>
|
| 7 |
-
<link
|
| 8 |
-
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
|
| 9 |
-
rel="stylesheet"
|
| 10 |
-
/>
|
| 11 |
-
<style>
|
| 12 |
-
body {
|
| 13 |
-
background-color: #1c1c1e;
|
| 14 |
-
font-family: "Poppins", sans-serif;
|
| 15 |
-
color: #f5f5f7;
|
| 16 |
-
}
|
| 17 |
-
h1 {
|
| 18 |
-
color: #e5e5e7;
|
| 19 |
-
text-align: center;
|
| 20 |
-
margin-bottom: 20px;
|
| 21 |
-
}
|
| 22 |
-
.container {
|
| 23 |
-
margin-top: 50px;
|
| 24 |
-
}
|
| 25 |
-
.file-upload-section {
|
| 26 |
-
background-color: #2c2c2e;
|
| 27 |
-
padding: 30px;
|
| 28 |
-
border-radius: 15px;
|
| 29 |
-
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
|
| 30 |
-
text-align: center;
|
| 31 |
-
}
|
| 32 |
-
.file-upload-section input[type="file"] {
|
| 33 |
-
margin: 20px 0;
|
| 34 |
-
}
|
| 35 |
-
.file-upload-section input[type="submit"] {
|
| 36 |
-
background-color: #ff9f0a;
|
| 37 |
-
color: white;
|
| 38 |
-
border: none;
|
| 39 |
-
padding: 10px 20px;
|
| 40 |
-
border-radius: 5px;
|
| 41 |
-
transition: background-color 0.3s ease;
|
| 42 |
-
}
|
| 43 |
-
.file-upload-section input[type="submit"]:hover {
|
| 44 |
-
background-color: #e68a00;
|
| 45 |
-
}
|
| 46 |
-
.file-actions a {
|
| 47 |
-
margin: 0 10px;
|
| 48 |
-
text-decoration: none;
|
| 49 |
-
color: #ff9f0a;
|
| 50 |
-
}
|
| 51 |
-
.file-actions a:hover {
|
| 52 |
-
color: #e68a00;
|
| 53 |
-
}
|
| 54 |
-
.flash-message {
|
| 55 |
-
margin-bottom: 20px;
|
| 56 |
-
padding: 15px;
|
| 57 |
-
border-radius: 5px;
|
| 58 |
-
color: #333;
|
| 59 |
-
}
|
| 60 |
-
.alert {
|
| 61 |
-
text-align: center;
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
</
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
.file-upload-section input[type="file"] {
|
| 147 |
-
margin: 20px 0;
|
| 148 |
-
}
|
| 149 |
-
.file-upload-section input[type="submit"] {
|
| 150 |
-
background-color: #ff9f0a;
|
| 151 |
-
color: white;
|
| 152 |
-
border: none;
|
| 153 |
-
padding: 10px 20px;
|
| 154 |
-
border-radius: 5px;
|
| 155 |
-
transition: background-color 0.3s ease;
|
| 156 |
-
}
|
| 157 |
-
.file-upload-section input[type="submit"]:hover {
|
| 158 |
-
background-color: #e68a00;
|
| 159 |
-
}
|
| 160 |
-
.file-actions a {
|
| 161 |
-
margin: 0 10px;
|
| 162 |
-
text-decoration: none;
|
| 163 |
-
color: #ff9f0a;
|
| 164 |
-
}
|
| 165 |
-
.file-actions a:hover {
|
| 166 |
-
color: #e68a00;
|
| 167 |
-
}
|
| 168 |
-
.flash-message {
|
| 169 |
-
margin-bottom: 20px;
|
| 170 |
-
padding: 15px;
|
| 171 |
-
border-radius: 5px;
|
| 172 |
-
color: #333;
|
| 173 |
-
}
|
| 174 |
-
.alert {
|
| 175 |
-
text-align: center;
|
| 176 |
-
position: absolute;
|
| 177 |
-
top: 0;
|
| 178 |
-
right: 15%;
|
| 179 |
-
}
|
| 180 |
-
/* Loader styles */
|
| 181 |
-
.loader {
|
| 182 |
-
border: 8px solid #f3f3f3;
|
| 183 |
-
border-top: 8px solid #ff9f0a;
|
| 184 |
-
border-radius: 50%;
|
| 185 |
-
width: 60px;
|
| 186 |
-
height: 60px;
|
| 187 |
-
animation: spin 2s linear infinite;
|
| 188 |
-
margin: 20px auto;
|
| 189 |
-
display: none;
|
| 190 |
-
}
|
| 191 |
-
@keyframes spin {
|
| 192 |
-
0% { transform: rotate(0deg); }
|
| 193 |
-
100% { transform: rotate(360deg); }
|
| 194 |
-
}
|
| 195 |
-
</style>
|
| 196 |
-
</head>
|
| 197 |
-
<body>
|
| 198 |
-
<div class="container">
|
| 199 |
-
<h1>Upload File</h1>
|
| 200 |
-
|
| 201 |
-
<div class="file-upload-section">
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
<form
|
| 205 |
-
id="fileUploadForm"
|
| 206 |
-
action="{{ url_for('upload_and_process') }}"
|
| 207 |
-
method="POST"
|
| 208 |
-
enctype="multipart/form-data"
|
| 209 |
-
>
|
| 210 |
-
<input type="file" name="file" class="form-control" required />
|
| 211 |
-
<input type="submit" value="Upload" class="btn btn-outline-primary" />
|
| 212 |
-
</form>
|
| 213 |
-
|
| 214 |
-
{% if session.get('uploaded_file') %}
|
| 215 |
-
<p class="mt-4">
|
| 216 |
-
Uploaded:
|
| 217 |
-
<span class="text-danger">{{ session.get('uploaded_file') }}</span>
|
| 218 |
-
</p>
|
| 219 |
-
<div class="file-actions">
|
| 220 |
-
<form action="{{ url_for('remove_file') }}" method="post">
|
| 221 |
-
<button type="submit" class="btn btn-outline-danger">
|
| 222 |
-
<i class="bi bi-trash"></i> Remove Uploaded File
|
| 223 |
-
</button>
|
| 224 |
-
</form>
|
| 225 |
-
</div>
|
| 226 |
-
{% endif %}
|
| 227 |
-
</div>
|
| 228 |
-
|
| 229 |
-
<div class="container">
|
| 230 |
-
<!-- Loader -->
|
| 231 |
-
<div class="loader" id="loader"></div>
|
| 232 |
-
</div>
|
| 233 |
-
|
| 234 |
-
{% with messages = get_flashed_messages() %} {% if messages %}
|
| 235 |
-
<div class="alert alert-success mt-4" id="flash-message">
|
| 236 |
-
{{ messages[0] }}
|
| 237 |
-
</div>
|
| 238 |
-
{% endif %} {% endwith %}
|
| 239 |
-
</div>
|
| 240 |
-
|
| 241 |
-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
|
| 242 |
-
<script>
|
| 243 |
-
// Loader functionality
|
| 244 |
-
document.getElementById('fileUploadForm').onsubmit = function() {
|
| 245 |
-
document.getElementById('loader').style.display = 'block';
|
| 246 |
-
};
|
| 247 |
-
|
| 248 |
-
// Flash message auto-hide
|
| 249 |
-
setTimeout(function () {
|
| 250 |
-
let flashMessage = document.getElementById("flash-message");
|
| 251 |
-
if (flashMessage) {
|
| 252 |
-
flashMessage.style.transition = "opacity 1s ease";
|
| 253 |
-
flashMessage.style.opacity = 0;
|
| 254 |
-
setTimeout(() => flashMessage.remove(), 1000);
|
| 255 |
-
}
|
| 256 |
-
}, 3000);
|
| 257 |
-
</script>
|
| 258 |
-
</body>
|
| 259 |
-
</html>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 6 |
+
<title>File Uploader</title>
|
| 7 |
+
<link
|
| 8 |
+
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
|
| 9 |
+
rel="stylesheet"
|
| 10 |
+
/>
|
| 11 |
+
<style>
|
| 12 |
+
body {
|
| 13 |
+
background-color: #1c1c1e;
|
| 14 |
+
font-family: "Poppins", sans-serif;
|
| 15 |
+
color: #f5f5f7;
|
| 16 |
+
}
|
| 17 |
+
h1 {
|
| 18 |
+
color: #e5e5e7;
|
| 19 |
+
text-align: center;
|
| 20 |
+
margin-bottom: 20px;
|
| 21 |
+
}
|
| 22 |
+
.container {
|
| 23 |
+
margin-top: 50px;
|
| 24 |
+
}
|
| 25 |
+
.file-upload-section {
|
| 26 |
+
background-color: #2c2c2e;
|
| 27 |
+
padding: 30px;
|
| 28 |
+
border-radius: 15px;
|
| 29 |
+
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
|
| 30 |
+
text-align: center;
|
| 31 |
+
}
|
| 32 |
+
.file-upload-section input[type="file"] {
|
| 33 |
+
margin: 20px 0;
|
| 34 |
+
}
|
| 35 |
+
.file-upload-section input[type="submit"] {
|
| 36 |
+
background-color: #ff9f0a;
|
| 37 |
+
color: white;
|
| 38 |
+
border: none;
|
| 39 |
+
padding: 10px 20px;
|
| 40 |
+
border-radius: 5px;
|
| 41 |
+
transition: background-color 0.3s ease;
|
| 42 |
+
}
|
| 43 |
+
.file-upload-section input[type="submit"]:hover {
|
| 44 |
+
background-color: #e68a00;
|
| 45 |
+
}
|
| 46 |
+
.file-actions a {
|
| 47 |
+
margin: 0 10px;
|
| 48 |
+
text-decoration: none;
|
| 49 |
+
color: #ff9f0a;
|
| 50 |
+
}
|
| 51 |
+
.file-actions a:hover {
|
| 52 |
+
color: #e68a00;
|
| 53 |
+
}
|
| 54 |
+
.flash-message {
|
| 55 |
+
margin-bottom: 20px;
|
| 56 |
+
padding: 15px;
|
| 57 |
+
border-radius: 5px;
|
| 58 |
+
color: #333;
|
| 59 |
+
}
|
| 60 |
+
.alert {
|
| 61 |
+
text-align: center;
|
| 62 |
+
position: absolute;
|
| 63 |
+
top: 0;
|
| 64 |
+
right: 15%;
|
| 65 |
+
}
|
| 66 |
+
/* Loader styles */
|
| 67 |
+
.loader {
|
| 68 |
+
border: 8px solid #f3f3f3;
|
| 69 |
+
border-top: 8px solid #ff9f0a;
|
| 70 |
+
border-radius: 50%;
|
| 71 |
+
width: 60px;
|
| 72 |
+
height: 60px;
|
| 73 |
+
animation: spin 2s linear infinite;
|
| 74 |
+
margin: 20px auto;
|
| 75 |
+
display: none;
|
| 76 |
+
}
|
| 77 |
+
@keyframes spin {
|
| 78 |
+
0% { transform: rotate(0deg); }
|
| 79 |
+
100% { transform: rotate(360deg); }
|
| 80 |
+
}
|
| 81 |
+
</style>
|
| 82 |
+
</head>
|
| 83 |
+
<body>
|
| 84 |
+
<div class="container">
|
| 85 |
+
<h1>Resume Data Extractor</h1>
|
| 86 |
+
|
| 87 |
+
<div class="file-upload-section">
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
<form
|
| 91 |
+
id="fileUploadForm"
|
| 92 |
+
action="{{ url_for('upload_and_process') }}"
|
| 93 |
+
method="POST"
|
| 94 |
+
enctype="multipart/form-data"
|
| 95 |
+
>
|
| 96 |
+
<input type="file" name="file" class="form-control" required />
|
| 97 |
+
<input type="submit" value="Upload you Resume" class="btn btn-outline-primary" />
|
| 98 |
+
</form>
|
| 99 |
+
|
| 100 |
+
{% if session.get('uploaded_file') %}
|
| 101 |
+
<p class="mt-4">
|
| 102 |
+
Uploaded:
|
| 103 |
+
<span class="text-danger">{{ session.get('uploaded_file') }}</span>
|
| 104 |
+
</p>
|
| 105 |
+
<div class="file-actions">
|
| 106 |
+
<form action="{{ url_for('remove_file') }}" method="post">
|
| 107 |
+
<button type="submit" class="btn btn-outline-danger">
|
| 108 |
+
<i class="bi bi-trash"></i> Remove Uploaded File
|
| 109 |
+
</button>
|
| 110 |
+
</form>
|
| 111 |
+
</div>
|
| 112 |
+
{% endif %}
|
| 113 |
+
</div>
|
| 114 |
+
|
| 115 |
+
<div class="container">
|
| 116 |
+
<!-- Loader -->
|
| 117 |
+
<div class="loader" id="loader"></div>
|
| 118 |
+
</div>
|
| 119 |
+
|
| 120 |
+
{% with messages = get_flashed_messages() %} {% if messages %}
|
| 121 |
+
<div class="alert alert-success mt-4" id="flash-message">
|
| 122 |
+
{{ messages[0] }}
|
| 123 |
+
</div>
|
| 124 |
+
{% endif %} {% endwith %}
|
| 125 |
+
</div>
|
| 126 |
+
|
| 127 |
+
<script src="https://cdn.jsdelivr.net/npm/[email protected]-alpha1/dist/js/bootstrap.bundle.min.js"></script>
|
| 128 |
+
<script>
|
| 129 |
+
// Loader functionality
|
| 130 |
+
document.getElementById('fileUploadForm').onsubmit = function() {
|
| 131 |
+
document.getElementById('loader').style.display = 'block';
|
| 132 |
+
};
|
| 133 |
+
|
| 134 |
+
// Flash message auto-hide
|
| 135 |
+
setTimeout(function () {
|
| 136 |
+
let flashMessage = document.getElementById("flash-message");
|
| 137 |
+
if (flashMessage) {
|
| 138 |
+
flashMessage.style.transition = "opacity 1s ease";
|
| 139 |
+
flashMessage.style.opacity = 0;
|
| 140 |
+
setTimeout(() => flashMessage.remove(), 1000);
|
| 141 |
+
}
|
| 142 |
+
}, 3000);
|
| 143 |
+
</script>
|
| 144 |
+
</body>
|
| 145 |
+
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|