Spaces:
Sleeping
Sleeping
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Upload Images</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
background-color: #f4f4f9; | |
margin: 0; | |
padding: 0; | |
} | |
.container { | |
width: 50%; | |
margin: auto; | |
background-color: white; | |
padding: 20px; | |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | |
border-radius: 10px; | |
margin-top: 50px; | |
} | |
h1 { | |
text-align: center; | |
color: #333; | |
} | |
.form-group { | |
margin-bottom: 15px; | |
} | |
label { | |
font-size: 1.1em; | |
color: #333; | |
} | |
input[type="text"], input[type="file"] { | |
width: 100%; | |
padding: 10px; | |
margin-top: 5px; | |
border-radius: 5px; | |
border: 1px solid #ccc; | |
} | |
button { | |
background-color: #4CAF50; | |
color: white; | |
border: none; | |
padding: 10px 20px; | |
cursor: pointer; | |
width: 100%; | |
border-radius: 5px; | |
} | |
button:hover { | |
background-color: #45a049; | |
} | |
.alert { | |
padding: 15px; | |
margin-top: 20px; | |
border-radius: 5px; | |
color: white; | |
text-align: center; | |
} | |
.alert.success { | |
background-color: #4CAF50; | |
} | |
.alert.error { | |
background-color: #f44336; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>Upload Images to GitHub</h1> | |
<!-- Display Success/Failure Message --> | |
{% if success_message %} | |
<div class="alert {{ 'success' if 'successfully' in success_message else 'error' }}"> | |
{{ success_message }} | |
</div> | |
{% endif %} | |
<form action="/" method="POST" enctype="multipart/form-data"> | |
<div class="form-group"> | |
<label for="username">Username:</label> | |
<input type="text" name="username" id="username" required> | |
</div> | |
<div class="form-group"> | |
<label for="image1">Upload Image 1:</label> | |
<input type="file" name="image1" id="image1" required> | |
</div> | |
<div class="form-group"> | |
<label for="image2">Upload Image 2:</label> | |
<input type="file" name="image2" id="image2" required> | |
</div> | |
<button type="submit">Upload</button> | |
</form> | |
</div> | |
</body> | |
</html> | |