87 lines
2.5 KiB
HTML
87 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css"
|
|
/>
|
|
<link
|
|
rel="stylesheet"
|
|
type="text/css"
|
|
href="{{ url_for('static',filename='css/style.css') }}"
|
|
/>
|
|
<title>MLH Quizzet</title>
|
|
</head>
|
|
|
|
<body>
|
|
<nav
|
|
class="navbar is-dark is-fixed-top has-text-centered"
|
|
role="navigation"
|
|
aria-label="main navigation"
|
|
>
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item has-text-centered" href="#"
|
|
><strong>MLH Quizzet</strong></a
|
|
>
|
|
<div class="navbar-burger" data-target="navMenu">
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<main role="main">
|
|
<div class="card has-text-centered">
|
|
<img
|
|
src="https://cdn1.iconfinder.com/data/icons/leto-files/64/leto_files-72-512.png"
|
|
alt="upload"
|
|
/>
|
|
<form
|
|
action="http://localhost:5000/quiz"
|
|
method="POST"
|
|
enctype="multipart/form-data"
|
|
>
|
|
<div id="file-js-example" class="file has-name is-fullwidth">
|
|
<label class="file-label">
|
|
<input
|
|
class="file-input"
|
|
type="file"
|
|
name="file"
|
|
accept=".txt, application/pdf"
|
|
/>
|
|
<span class="file-cta">
|
|
<span class="file-icon">
|
|
<i class="fas fa-upload"></i>
|
|
</span>
|
|
<span class="file-label"> Choose a file… </span>
|
|
</span>
|
|
<span class="file-name"> No file uploaded </span>
|
|
</label>
|
|
</div>
|
|
|
|
<script>
|
|
const fileInput = document.querySelector(
|
|
"#file-js-example input[type=file]"
|
|
);
|
|
fileInput.onchange = () => {
|
|
if (fileInput.files.length > 0) {
|
|
const fileName = document.querySelector(
|
|
"#file-js-example .file-name"
|
|
);
|
|
fileName.textContent = fileInput.files[0].name;
|
|
}
|
|
};
|
|
</script>
|
|
<input
|
|
type="submit"
|
|
name="upload file"
|
|
class="button has-text-centered is-large is-fullwidth is-link"
|
|
/>
|
|
</form>
|
|
</div>
|
|
</main>
|
|
</body>
|
|
</html>
|