Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
86c8b76736 | |||
c85b68b072 | |||
c8648788d0 | |||
fe5ad6ba8d | |||
512e89205c | |||
dbb99ba47a | |||
9c42e0fc63 | |||
92508a23ae | |||
8c3155434a | |||
777ad92b22 | |||
708ce6dd3d | |||
75b66806a2 | |||
6b5c3c36ca | |||
7f90ad4c05 | |||
9dee350323 | |||
c3c3b4f83d |
@ -219,6 +219,12 @@ def delete_nutrition():
|
||||
conn.close()
|
||||
|
||||
|
||||
@app.route('/random')
|
||||
def random_page():
|
||||
# Diese Route gibt die HTML-Seite 'random.html' zurück
|
||||
return render_template('random.html')
|
||||
|
||||
|
||||
exposed_app = ProxyFix(app, x_for=1, x_host=1)
|
||||
|
||||
|
||||
|
BIN
src/static/images/elisa.jpg
Normal file
BIN
src/static/images/elisa.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 64 KiB |
BIN
src/static/images/elo.jpg
Normal file
BIN
src/static/images/elo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 256 KiB |
BIN
src/static/images/marie.jpg
Normal file
BIN
src/static/images/marie.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
src/static/images/marie2.jpg
Normal file
BIN
src/static/images/marie2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 167 KiB |
@ -241,3 +241,27 @@ button#cancel-button:not(:disabled):hover {
|
||||
.form-row {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
button#submit-button {
|
||||
background-image: url('images/elisa.jpg'); /* Pfad zum Bild */
|
||||
background-size: contain; /* Passt das Bild innerhalb des Buttons an, ohne es zu strecken */
|
||||
background-repeat: no-repeat; /* Verhindert das Wiederholen des Bildes */
|
||||
background-position: center; /* Zentriert das Bild im Button */
|
||||
color: transparent; /* Macht den Text unsichtbar, damit nur das Bild sichtbar ist */
|
||||
width: 62px; /* Setzt die Breite automatisch entsprechend des Inhalts */
|
||||
height: 85px; /* Passt die Höhe an, um das Bild vollständig anzuzeigen */
|
||||
padding: 10px 20px; /* Hinzufügen von etwas Platz um das Bild */
|
||||
}
|
||||
|
||||
button#remove-button {
|
||||
background-image: url('images/marie2.jpg'); /* Pfad zum Bild */
|
||||
background-size: contain; /* Passt das Bild innerhalb des Buttons an, ohne es zu strecken */
|
||||
background-repeat: no-repeat; /* Verhindert das Wiederholen des Bildes */
|
||||
background-position: center; /* Zentriert das Bild im Button */
|
||||
color: transparent; /* Macht den Text unsichtbar, damit nur das Bild sichtbar ist */
|
||||
width: 78px; /* Setzt die Breite automatisch entsprechend des Inhalts */
|
||||
height: 85px; /* Passt die Höhe an, um das Bild vollständig anzuzeigen */
|
||||
padding: 10px 20px; /* Hinzufügen von etwas Platz um das Bild */
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@ function updateTotalNutrition() {
|
||||
</tr>
|
||||
<!-- Zeilen werden hier dynamisch hinzugefügt -->
|
||||
</table>
|
||||
<button id="remove-button" onclick="removeSelectedRow()" disabled>Entfernen</button>
|
||||
<button id="remove-button" onclick="removeSelectedRow()" disabled></button>
|
||||
<table id="total-nutrition-table">
|
||||
<tr>
|
||||
<th>Lebensmittel</th>
|
||||
|
@ -172,7 +172,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function openImagePage() {
|
||||
window.open('random', '_blank'); // Öffnet die neue Seite in einem neuen Tab
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@ -215,6 +217,10 @@
|
||||
|
||||
<div class="search-container">
|
||||
<input type="text" id="search-input" placeholder="Lebensmittel suchen..." oninput="filterTable()">
|
||||
<button onclick="openImagePage()" style="background-image: url('../static/images/marie.jpg'); border: none; cursor: pointer; background-size: cover; width: 62px; height: 85px; vertical-align: middle;">
|
||||
<!-- Der Text wird durch den transparenten Text ersetzt, falls nötig -->
|
||||
<span style="opacity: 0;">Öffnen</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
10
src/templates/random.html
Normal file
10
src/templates/random.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Bildansicht</title>
|
||||
</head>
|
||||
<body style="margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh;">
|
||||
<img src="../static/images/elo.jpg" alt="Elo Bild" style="max-width: 100%; max-height: 100%;">
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user