added template and instructions to upload-page

This commit is contained in:
mkrieger 2024-11-14 10:41:50 +01:00
parent 81e906c01d
commit d12ac4189f
4 changed files with 60 additions and 11 deletions

View file

@ -0,0 +1,6 @@
PLZ;Stadt;Straße;Hausnummer;Zusatz
53175;Bonn;Godesberger Str.;27;
50667;Köln;Hohenzollernring;52;Hinterhaus
10115;Berlin;Chausseestraße;125;
80331;München;Marienplatz;1;Eingang Ost
20095;Hamburg;Ostwall;5;
1 PLZ Stadt Straße Hausnummer Zusatz
2 53175 Bonn Godesberger Str. 27
3 50667 Köln Hohenzollernring 52 Hinterhaus
4 10115 Berlin Chausseestraße 125
5 80331 München Marienplatz 1 Eingang Ost
6 20095 Hamburg Ostwall 5

View file

@ -320,3 +320,30 @@ tr:nth-child(even) td {
width: 100px; /* Noch kleinere Breite auf sehr kleinen Bildschirmen */
}
}
.template-info {
background-color: #f9f9f9;
padding: 1em;
border-radius: 8px;
margin-bottom: 1.5em;
text-align: center;
}
.template-info p {
margin: 0.5em 0;
}
.template-download {
display: inline-block;
padding: 0.5em 1em;
margin-top: 0.5em;
background-color: #007aff;
color: white;
border-radius: 4px;
text-decoration: none;
transition: background-color 0.2s ease;
}
.template-download:hover {
background-color: #005bb5;
}

View file

@ -1,11 +1,27 @@
{% extends "base.html" %}
{% block content %}
<div class="form-container">
<h2>Datei hochladen</h2>
<form method="POST" enctype="multipart/form-data">
<label for="file">CSV-Datei:</label>
<input type="file" id="file" name="file" accept=".csv" required>
<button type="submit">Upload</button>
</form>
</div>
{% endblock %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Datei hochladen</title>
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
<div class="form-container">
<h2>Datei hochladen</h2>
<!-- Instructions and download link for the template -->
<div class="template-info">
<p>Bitte verwenden Sie die folgende Vorlage für Ihre Adressliste:</p>
<a href="{{ url_for('static', filename='Adressliste_vorlage.csv') }}" download="Adressliste_vorlage.csv" class="template-download">Adressliste Vorlage herunterladen</a>
<p>Die Vorlage enthält die folgenden Spalten: <strong>PLZ, Stadt, Straße, Hausnummer, Zusatz</strong>. Bitte verwenden Sie das Format für eine reibungslose Verarbeitung.</p>
</div>
<form action="{{ url_for('auth.upload') }}" method="post" enctype="multipart/form-data">
<label for="file">Datei auswählen:</label>
<input type="file" id="file" name="file" accept=".csv" required>
<button type="submit">Datei hochladen</button>
</form>
</div>
</body>
</html>