You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

237 lines
5.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Infraordinary</title>
<style>
@font-face {
font-family: Montserrat;
src: url(Montserrat-VariableFont_wght.ttf);
}
html,
body {
margin: 0 0;
font-family: Montserrat;
padding: 0 0;
width: 100%;
height: 100%;
}
* {
box-sizing: border-box;
}
body {
padding: 2rem;
}
h1,
h2,
h3 {
margin: 0 0;
}
h1{
font-weight: 200;
font-size: 1.8em;
}
h2{
font-weight: 600;
font-size: 1em;
}
main {
max-width: min(900px, calc(100vw - 4rem));
margin: 2rem auto;
}
button,
input[type="submit"] {
margin: 1rem auto;
background-color: black;
outline: none;
color: white;
padding: .5rem 1rem;
border-radius: 2px;
border: none;
z-index: 2;
cursor: pointer;
transition: .2s linear;
border: 2px solid black;
width: 100%;
font-weight: bolder;
}
button:hover,
input[type="submit"]:hover {
background-color: white;
border: 2px solid black;
color: black;
}
form {
display: flex;
flex-direction: column;
border: 2px dashed black;
margin: 2rem auto;
padding: 2rem;
gap: 1rem;
position: relative;
}
form[loading="true"] * {
opacity: 0;
}
@keyframes spinning {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
form[loading="true"]:before {
content: "";
position: absolute;
width: 2rem;
height: 2rem;
border-top: 2px solid black;
border-left: 2px solid black;
border-radius: 100%;
z-index: 2;
top: calc(50% - 1rem);
left: calc(50% - 1rem);
transform: translate3d(-50%, -50%, 0);
animation: .5s linear infinite spinning;
}
.border{
background-color: red;
width: fit-content;
padding: 5px;
rotate: 90deg;
position: fixed;
display: flex;
left: -930px;
overflow: clip;
}
.container{
margin-left: 50px;
}
.error {
color: red;
}
.title{
display: flex;
margin: auto;
position: relative;
margin-bottom: 20%;
}
.logo{
position: absolute;
top: -105%;
z-index: -10;
opacity: 0.5;
max-width: 200px;
}
@media only screen and (min-width: 801px){
.container{
margin-left: auto;
}
.logo{
right: 0;
opacity: 1;
top: -60%;
}
.title{
margin-bottom: 10%;
}
}
</style>
</head>
<body>
<div class="border">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
<img src="iologo.svg" alt="" width="100px">
</div>
<main class="container">
<div class="title">
<h1>Ministry of the <br>Infraordinary</h1>
<img src="iologo.svg" class="logo">
</div>
<h2>Upload your Infraordinary Observations:</h2>
<p>Inform our mapping by sharing your experiences with the infraordinary. It can be an image, video or audio file, upload your media here!</p>
{% if error %}
<h1 class="error">Oops.. Something went wrong: {{ error }}!</h1>
{% endif %}
{% if submitted %}
<p>Thank you for your contribution!<br>
<b>Consider becoming an M.I.O Agent (see paper form)</b>
</p>
<a href="/">back</a>
{% else %}
<form method="POST" action="upload" enctype="multipart/form-data">
<input type="file" name="file" accept="image/*,video/*,audio/*" required>
<input type="submit">
</form>
{% endif %}
</main>
<script type="text/javascript">
window.addEventListener("DOMContentLoaded", function () {
var form = document.querySelector("form");
if (!form) return false
form.addEventListener("submit", function () {
console.log("submit")
form.setAttribute("loading", "true");
})
})
</script>
</body>
</html>