commit 38b12a1756ce4c58a3dfec241123b7aab10687b4 Author: Eldar <3009675@stud.hs-mannheim.de> Date: Tue Dec 10 11:30:02 2024 +0100 Alles commited diff --git a/Projekt_SE2/.classpath b/Projekt_SE2/.classpath new file mode 100644 index 0000000..a58e984 --- /dev/null +++ b/Projekt_SE2/.classpath @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Projekt_SE2/.gitignore b/Projekt_SE2/.gitignore new file mode 100644 index 0000000..84c048a --- /dev/null +++ b/Projekt_SE2/.gitignore @@ -0,0 +1 @@ +/build/ diff --git a/Projekt_SE2/.project b/Projekt_SE2/.project new file mode 100644 index 0000000..0749a4c --- /dev/null +++ b/Projekt_SE2/.project @@ -0,0 +1,31 @@ + + + Projekt_SE2 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.jdt.core.javanature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/Projekt_SE2/.settings/.jsdtscope b/Projekt_SE2/.settings/.jsdtscope new file mode 100644 index 0000000..76c2d63 --- /dev/null +++ b/Projekt_SE2/.settings/.jsdtscope @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Projekt_SE2/.settings/org.eclipse.core.resources.prefs b/Projekt_SE2/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/Projekt_SE2/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/Projekt_SE2/.settings/org.eclipse.jdt.core.prefs b/Projekt_SE2/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..ac366d9 --- /dev/null +++ b/Projekt_SE2/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,10 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=20 +org.eclipse.jdt.core.compiler.compliance=20 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=20 diff --git a/Projekt_SE2/.settings/org.eclipse.wst.common.component b/Projekt_SE2/.settings/org.eclipse.wst.common.component new file mode 100644 index 0000000..28231f2 --- /dev/null +++ b/Projekt_SE2/.settings/org.eclipse.wst.common.component @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Projekt_SE2/.settings/org.eclipse.wst.common.project.facet.core.xml b/Projekt_SE2/.settings/org.eclipse.wst.common.project.facet.core.xml new file mode 100644 index 0000000..c72504a --- /dev/null +++ b/Projekt_SE2/.settings/org.eclipse.wst.common.project.facet.core.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Projekt_SE2/.settings/org.eclipse.wst.jsdt.ui.superType.container b/Projekt_SE2/.settings/org.eclipse.wst.jsdt.ui.superType.container new file mode 100644 index 0000000..3bd5d0a --- /dev/null +++ b/Projekt_SE2/.settings/org.eclipse.wst.jsdt.ui.superType.container @@ -0,0 +1 @@ +org.eclipse.wst.jsdt.launching.baseBrowserLibrary \ No newline at end of file diff --git a/Projekt_SE2/.settings/org.eclipse.wst.jsdt.ui.superType.name b/Projekt_SE2/.settings/org.eclipse.wst.jsdt.ui.superType.name new file mode 100644 index 0000000..05bd71b --- /dev/null +++ b/Projekt_SE2/.settings/org.eclipse.wst.jsdt.ui.superType.name @@ -0,0 +1 @@ +Window \ No newline at end of file diff --git a/Projekt_SE2/src/main/java/com/cafe/getraenke/getraenkeServlet.java b/Projekt_SE2/src/main/java/com/cafe/getraenke/getraenkeServlet.java new file mode 100644 index 0000000..0151ee4 --- /dev/null +++ b/Projekt_SE2/src/main/java/com/cafe/getraenke/getraenkeServlet.java @@ -0,0 +1,179 @@ +package com.cafe.getraenke; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.*; +import java.util.HashMap; +import java.util.Map; + +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +@WebServlet("/getraenkeServlet") +public class getraenkeServlet extends HttpServlet { + private static final long serialVersionUID = 1L; + private static final String DB_URL = "jdbc:sqlite:C:/Users/asus/produkte.db"; + + private Map iconClassMap = new HashMap<>(); + + @Override + public void init() throws ServletException { + iconClassMap.put("Warme Getränke", "fa-solid fa-mug-hot"); + iconClassMap.put("Alkoholfreie Getränke","fa-solid fa-glass-water"); + iconClassMap.put("Biere", "fa-solid fa-beer-mug-empty"); + iconClassMap.put("Weine","fa-solid fa-wine-glass"); + iconClassMap.put("Liköre & Edelbrände","fa-solid fa-bottle-droplet"); + iconClassMap.put("Longdrinks","fa-solid fa-whiskey-glass"); + iconClassMap.put("Alkoholische Cocktails","fa-solid fa-martini-glass-citrus"); + iconClassMap.put("Alkoholfreie Cocktails","fa-solid fa-martini-glass-citrus"); + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + response.setCharacterEncoding("UTF-8"); + + String categoryFilter = request.getParameter("category"); + String searchFilter = request.getParameter("search"); + if (categoryFilter == null) categoryFilter = "all"; // Standard: Alle Kategorien + if (searchFilter == null) searchFilter = ""; // Standard: Kein Suchtext + + + try (PrintWriter out = response.getWriter()) { + + try { + Class.forName("org.sqlite.JDBC"); + } catch (ClassNotFoundException ex) { + ex.printStackTrace(); + out.println("

Error: SQLite JDBC Driver not found.

"); + return; + } + + String query = "SELECT * FROM getraenke_items WHERE (LOWER(kategorie) LIKE ? OR ? = 'all') AND LOWER(name) LIKE ? ORDER BY id"; + + try (Connection conn = DriverManager.getConnection(DB_URL); + PreparedStatement stmt = conn.prepareStatement(query)) { + + stmt.setString(1, "%" + categoryFilter + "%"); + stmt.setString(2, categoryFilter); + stmt.setString(3, "%" + searchFilter.toLowerCase() + "%"); + + ResultSet rs = stmt.executeQuery(); + + // HTML-Generierung starten + StringBuilder html = new StringBuilder(); + String currentCategory = ""; + + // Hauptcontainer starten + html.append("
"); + + while (rs.next()) { + String category = rs.getString("kategorie"); + String name = rs.getString("name"); + double price = rs.getDouble("preis"); + String allergens = rs.getString("allergene"); + String modalName = rs.getString("modal_name"); + String modalDescription = rs.getString("modal_beschreibung"); + String nutrition = rs.getString("naehrwerte"); // Nährwertdaten + + + // Neue Kategorie beginnen, wenn sie sich ändert + if (!category.equals(currentCategory)) { + if (!currentCategory.isEmpty()) { + // Schließe die vorherige Kategorie + html.append("
"); + } + + // Neue Kategorie öffnen + html.append("
"); + html.append("

").append(category); + + // Icon hinzufügen + String iconClass = iconClassMap.get(category); + if (iconClass != null) { + html.append(" "); + } + + html.append("

"); + html.append("
    "); + + currentCategory = category; + } + + // Einzelnes Item hinzufügen + html.append("
  1. ") + .append("").append(name).append(""); + + // Allergene hinzufügen + if (allergens != null && !allergens.isEmpty()) { + html.append("").append(allergens).append(""); + } + + // Info-Modal mit Nährwertangaben + if (modalName != null && !modalName.isEmpty()) { + String displayNutrition = (nutrition != null && !nutrition.isEmpty()) + ? escapeHtml(nutrition) + : "Keine Nährwertangaben vorhanden"; + + html.append("") + .append(""); + } + + // Preis anzeigen + html.append("") + .append(String.format("%.2f €", price)).append(""); + html.append("
  2. "); + } + + // Schließe die letzte Kategorie + if (!currentCategory.isEmpty()) { + html.append("
"); + } + + // Hauptcontainer schließen + html.append(""); + + html.append("
") + .append("
") + .append("×") + .append("
") + .append("") + .append("") + .append("
") + .append("
") + .append("

") + .append("

") + .append("
") + .append("
") + .append("

Nährwertangaben

") + .append("

") + .append("
") + .append("
"); + + out.println(html.toString()); + + } catch (SQLException e) { + response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Database error: " + e.getMessage()); + e.printStackTrace(); + } + } + } + + private String escapeHtml(String input) { + if (input == null) return ""; + return input.replace("&", "&") + .replace("<", "<") + .replace(">", ">") + .replace("\"", """) + .replace("'", "'"); + } +} diff --git a/Projekt_SE2/src/main/java/com/cafe/login/LoginServlet.java b/Projekt_SE2/src/main/java/com/cafe/login/LoginServlet.java new file mode 100644 index 0000000..bd8939d --- /dev/null +++ b/Projekt_SE2/src/main/java/com/cafe/login/LoginServlet.java @@ -0,0 +1,82 @@ +package com.cafe.login; + +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +import java.io.IOException; +import java.sql.*; + +@WebServlet("/LoginServlet") +public class LoginServlet extends HttpServlet { + private static final long serialVersionUID = 1L; + + private static final String DB_URL = "jdbc:sqlite:C:/Users/asus/personal.db"; + + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + String username = request.getParameter("username"); + String password = request.getParameter("password"); + + String userRole = authenticateUser(username, password); + + if ("Mitarbeiter".equals(userRole)) { + // Weiterleitung zur Mitarbeiter-Seite + response.sendRedirect("mitarbeiter.jsp"); + } else if ("Chef".equals(userRole)) { + // Weiterleitung zur Chef-Seite + response.sendRedirect("chef.jsp"); + } else { + // Zurück zur Login-Seite mit Fehlermeldung + request.setAttribute("errorMessage", "Ungültige Anmeldedaten!"); + request.getRequestDispatcher("startseite.jsp").forward(request, response); + } + } + + /** + * Authentifiziert den Benutzer in der Datenbank. + * + * @param username Der Benutzername (E-Mail in der Datenbank) + * @param password Das Passwort + * @return Die Benutzerrolle ("Mitarbeiter", "Chef") oder null, wenn ungültig + */ + private String authenticateUser(String username, String password) { + String role = null; + + String mitarbeiterQuery = "SELECT 'Mitarbeiter' as role FROM mitarbeiter WHERE email = ? AND password = ?"; + String chefQuery = "SELECT 'Chef' as role FROM chef WHERE email = ? AND password = ?"; + + try (Connection conn = DriverManager.getConnection(DB_URL)) { + // Mitarbeiter-Check + try (PreparedStatement mitarbeiterStmt = conn.prepareStatement(mitarbeiterQuery)) { + mitarbeiterStmt.setString(1, username); + mitarbeiterStmt.setString(2, password); + + try (ResultSet rs = mitarbeiterStmt.executeQuery()) { + if (rs.next()) { + role = rs.getString("role"); + return role; + } + } + } + + // Chef-Check + try (PreparedStatement chefStmt = conn.prepareStatement(chefQuery)) { + chefStmt.setString(1, username); + chefStmt.setString(2, password); + + try (ResultSet rs = chefStmt.executeQuery()) { + if (rs.next()) { + role = rs.getString("role"); + } + } + } + + } catch (SQLException e) { + e.printStackTrace(); + } + return role; + } +} diff --git a/Projekt_SE2/src/main/java/com/cafe/snacks/snacksServlet.java b/Projekt_SE2/src/main/java/com/cafe/snacks/snacksServlet.java new file mode 100644 index 0000000..3ff3d58 --- /dev/null +++ b/Projekt_SE2/src/main/java/com/cafe/snacks/snacksServlet.java @@ -0,0 +1,175 @@ +package com.cafe.snacks; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.*; +import java.util.HashMap; +import java.util.Map; + +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +@WebServlet("/snacksServlet") +public class snacksServlet extends HttpServlet { + private static final long serialVersionUID = 1L; + private static final String DB_URL = "jdbc:sqlite:C:/Users/asus/produkte.db"; + + private Map iconClassMap = new HashMap<>(); + + @Override + public void init() throws ServletException { + iconClassMap.put("Salzige Snacks", ""); + iconClassMap.put("Süße Snacks","fa-solid fa-cookie"); + iconClassMap.put("Saure Snacks","fa-solid fa-jar"); + iconClassMap.put("Nüsse","fa-solid fa-bowl-rice"); + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + response.setCharacterEncoding("UTF-8"); + + String categoryFilter = request.getParameter("category"); + String searchFilter = request.getParameter("search"); + if (categoryFilter == null) categoryFilter = "all"; // Standard: Alle Kategorien + if (searchFilter == null) searchFilter = ""; // Standard: Kein Suchtext + + try (PrintWriter out = response.getWriter()) { + + try { + Class.forName("org.sqlite.JDBC"); + } catch (ClassNotFoundException ex) { + ex.printStackTrace(); + out.println("

Error: SQLite JDBC Driver not found.

"); + return; + } + + String query = "SELECT * FROM snacks_items WHERE (LOWER(kategorie) LIKE ? OR ? = 'all') AND LOWER(name) LIKE ? ORDER BY id"; + + try (Connection conn = DriverManager.getConnection(DB_URL); + PreparedStatement stmt = conn.prepareStatement(query)) { + + stmt.setString(1, "%" + categoryFilter + "%"); + stmt.setString(2, categoryFilter); + stmt.setString(3, "%" + searchFilter.toLowerCase() + "%"); + + ResultSet rs = stmt.executeQuery(); + + // HTML-Generierung starten + StringBuilder html = new StringBuilder(); + String currentCategory = ""; + + // Hauptcontainer starten + html.append("
"); + + while (rs.next()) { + String category = rs.getString("kategorie"); + String name = rs.getString("name"); + double price = rs.getDouble("preis"); + String allergens = rs.getString("allergene"); + String modalName = rs.getString("modal_name"); + String modalDescription = rs.getString("modal_beschreibung"); + String nutrition = rs.getString("naehrwerte"); // Nährwertdaten + + + // Neue Kategorie beginnen, wenn sie sich ändert + if (!category.equals(currentCategory)) { + if (!currentCategory.isEmpty()) { + // Schließe die vorherige Kategorie + html.append("
"); + } + + // Neue Kategorie öffnen + html.append("
"); + html.append("

").append(category); + + // Icon hinzufügen + String iconClass = iconClassMap.get(category); + if (iconClass != null) { + html.append(" "); + } + + html.append("

"); + html.append("
    "); + + currentCategory = category; + } + + // Einzelnes Item hinzufügen + html.append("
  1. ") + .append("").append(name).append(""); + + // Allergene hinzufügen + if (allergens != null && !allergens.isEmpty()) { + html.append("").append(allergens).append(""); + } + + // Info-Modal mit Nährwertangaben + if (modalName != null && !modalName.isEmpty()) { + String displayNutrition = (nutrition != null && !nutrition.isEmpty()) + ? escapeHtml(nutrition) + : "Keine Nährwertangaben vorhanden"; + + html.append("") + .append(""); + } + + // Preis anzeigen + html.append("") + .append(String.format("%.2f €", price)).append(""); + html.append("
  2. "); + } + + // Schließe die letzte Kategorie + if (!currentCategory.isEmpty()) { + html.append("
"); + } + + // Hauptcontainer schließen + html.append(""); + + // Modal hinzufügen + html.append("
") + .append("
") + .append("×") + .append("
") + .append("") + .append("") + .append("
") + .append("
") + .append("

") + .append("

") + .append("
") + .append("
") + .append("

Nährwertangaben

") + .append("

") + .append("
") + .append("
"); + + out.println(html.toString()); + + } catch (SQLException e) { + response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Database error: " + e.getMessage()); + e.printStackTrace(); + } + } + } + + private String escapeHtml(String input) { + if (input == null) return ""; + return input.replace("&", "&") + .replace("<", "<") + .replace(">", ">") + .replace("\"", """) + .replace("'", "'"); + } +} \ No newline at end of file diff --git a/Projekt_SE2/src/main/java/com/cafe/speisen/speisenServlet.java b/Projekt_SE2/src/main/java/com/cafe/speisen/speisenServlet.java new file mode 100644 index 0000000..d2a0307 --- /dev/null +++ b/Projekt_SE2/src/main/java/com/cafe/speisen/speisenServlet.java @@ -0,0 +1,178 @@ +package com.cafe.speisen; + +import java.io.IOException; +import java.io.PrintWriter; +import java.sql.*; +import java.util.HashMap; +import java.util.Map; + +import jakarta.servlet.ServletException; +import jakarta.servlet.annotation.WebServlet; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +@WebServlet("/speisenServlet") +public class speisenServlet extends HttpServlet { + private static final long serialVersionUID = 1L; + private static final String DB_URL = "jdbc:sqlite:C:/Users/asus/produkte.db"; + + private Map iconClassMap = new HashMap<>(); + + @Override + public void init() throws ServletException { + iconClassMap.put("Vorspeisen", ""); + iconClassMap.put("Salate","fa-solid fa-seedling"); + iconClassMap.put("Nudelgerichte", "fa-solid fa-bowl-food"); + iconClassMap.put("Schnitzel",""); + iconClassMap.put("Burger","fa-solid fa-burger"); + iconClassMap.put("Fingerfood","fa-solid fa-drumstick-bite"); + iconClassMap.put("Pizza","fa-solid fa-pizza-slice"); + } + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + response.setCharacterEncoding("UTF-8"); + + String categoryFilter = request.getParameter("category"); + String searchFilter = request.getParameter("search"); + if (categoryFilter == null) categoryFilter = "all"; // Standard: Alle Kategorien + if (searchFilter == null) searchFilter = ""; // Standard: Kein Suchtext + + try (PrintWriter out = response.getWriter()) { + + try { + Class.forName("org.sqlite.JDBC"); + } catch (ClassNotFoundException ex) { + ex.printStackTrace(); + out.println("

Error: SQLite JDBC Driver not found.

"); + return; + } + + String query = "SELECT * FROM speisen_items WHERE (LOWER(kategorie) LIKE ? OR ? = 'all') AND LOWER(name) LIKE ? ORDER BY id"; + + try (Connection conn = DriverManager.getConnection(DB_URL); + PreparedStatement stmt = conn.prepareStatement(query)) { + + stmt.setString(1, "%" + categoryFilter + "%"); + stmt.setString(2, categoryFilter); + stmt.setString(3, "%" + searchFilter.toLowerCase() + "%"); + + ResultSet rs = stmt.executeQuery(); + + // HTML-Generierung starten + StringBuilder html = new StringBuilder(); + String currentCategory = ""; + + // Hauptcontainer starten + html.append("
"); + + while (rs.next()) { + String category = rs.getString("kategorie"); + String name = rs.getString("name"); + double price = rs.getDouble("preis"); + String allergens = rs.getString("allergene"); + String modalName = rs.getString("modal_name"); + String modalDescription = rs.getString("modal_beschreibung"); + String nutrition = rs.getString("naehrwerte"); // Nährwertdaten + + // Neue Kategorie beginnen, wenn sie sich ändert + if (!category.equals(currentCategory)) { + if (!currentCategory.isEmpty()) { + // Schließe die vorherige Kategorie + html.append("
"); + } + + // Neue Kategorie öffnen + html.append("
"); + html.append("

").append(category); + + // Icon hinzufügen + String iconClass = iconClassMap.get(category); + if (iconClass != null) { + html.append(" "); + } + + html.append("

"); + html.append("
    "); + + currentCategory = category; + } + + // Einzelnes Item hinzufügen + html.append("
  1. ") + .append("").append(name).append(""); + + // Allergene hinzufügen + if (allergens != null && !allergens.isEmpty()) { + html.append("").append(allergens).append(""); + } + + // Info-Modal mit Nährwertangaben + if (modalName != null && !modalName.isEmpty()) { + String displayNutrition = (nutrition != null && !nutrition.isEmpty()) + ? escapeHtml(nutrition) + : "Keine Nährwertangaben vorhanden"; + + html.append("") + .append(""); + } + + // Preis anzeigen + html.append("") + .append(String.format("%.2f €", price)).append(""); + html.append("
  2. "); + } + + // Schließe die letzte Kategorie + if (!currentCategory.isEmpty()) { + html.append("
"); + } + + // Hauptcontainer schließen + html.append(""); + + // Modal hinzufügen + html.append("
") + .append("
") + .append("×") + .append("
") + .append("") + .append("") + .append("
") + .append("
") + .append("

") + .append("

") + .append("
") + .append("
") + .append("

Nährwertangaben

") + .append("

") + .append("
") + .append("
"); + + out.println(html.toString()); + + } catch (SQLException e) { + response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Database error: " + e.getMessage()); + e.printStackTrace(); + } + } + } + + private String escapeHtml(String input) { + if (input == null) return ""; + return input.replace("&", "&") + .replace("<", "<") + .replace(">", ">") + .replace("\"", """) + .replace("'", "'"); + } +} + diff --git a/Projekt_SE2/src/main/webapp/Bilder/EJS_Palast_logo.jpg b/Projekt_SE2/src/main/webapp/Bilder/EJS_Palast_logo.jpg new file mode 100644 index 0000000..aef220d Binary files /dev/null and b/Projekt_SE2/src/main/webapp/Bilder/EJS_Palast_logo.jpg differ diff --git a/Projekt_SE2/src/main/webapp/Bilder/headerBild.jpg b/Projekt_SE2/src/main/webapp/Bilder/headerBild.jpg new file mode 100644 index 0000000..0177452 Binary files /dev/null and b/Projekt_SE2/src/main/webapp/Bilder/headerBild.jpg differ diff --git a/Projekt_SE2/src/main/webapp/META-INF/MANIFEST.MF b/Projekt_SE2/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/Projekt_SE2/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/Projekt_SE2/src/main/webapp/WEB-INF/lib/sqlite-jdbc-3.47.0.0.jar b/Projekt_SE2/src/main/webapp/WEB-INF/lib/sqlite-jdbc-3.47.0.0.jar new file mode 100644 index 0000000..ab27f70 Binary files /dev/null and b/Projekt_SE2/src/main/webapp/WEB-INF/lib/sqlite-jdbc-3.47.0.0.jar differ diff --git a/Projekt_SE2/src/main/webapp/WEB-INF/lib/web.xml b/Projekt_SE2/src/main/webapp/WEB-INF/lib/web.xml new file mode 100644 index 0000000..cb55dc4 --- /dev/null +++ b/Projekt_SE2/src/main/webapp/WEB-INF/lib/web.xml @@ -0,0 +1,49 @@ + + + + + index.html + index.jsp + index.htm + default.html + default.jsp + default.htm + + + +EJSS_Palast + + getraenkeServlet + /getraenkeServlet + + + getraenkeServlet + com.cafe.getraenke.getraenkeServlet + + + LoginServlet + com.cafe.login.LoginServlet + + + LoginServlet + /LoginServlet + + + speisenServlet + com.cafe.speisen.speisenServlet + + + speisenServlet + /speisenServlet + + + snacksServlet + com.cafe.snacks.snacksServlet + + + snacksServlet + /snacksServlet + \ No newline at end of file diff --git a/Projekt_SE2/src/main/webapp/chef.jsp b/Projekt_SE2/src/main/webapp/chef.jsp new file mode 100644 index 0000000..0d99cc5 --- /dev/null +++ b/Projekt_SE2/src/main/webapp/chef.jsp @@ -0,0 +1,84 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + EJSS Palast - Chefbereich + + + + + + + + + +
+ EJS Logo +

EJSS Palast - Chef

+
+ +
+ + + + +
+

+ Willkommen im Chefbereich
vom EJSS Palast

+ Hier kannst du alles verwalten, was dein Lokal so besonders macht.
+ In der vertrauten und professionellen Umgebung
+ hast du die Kontrolle über alle Abläufe.
+ Organisiere Veranstaltungen,
pflege Speise- und Getränkekarten,
+ und behalte den Überblick über deine Buchungen
+ und die Performance deines Cafés.

+ Falls du Unterstützung brauchst, steht dir unser Support-Team jederzeit zur Verfügung.
+ Wir freuen uns, dich auf dem Weg zum Erfolg begleiten zu dürfen.
+ Dein EJSS Palast Admin-Team +

+
+
+

Zurück zum Anfang

+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + diff --git a/Projekt_SE2/src/main/webapp/chefFunktionen/chefScript.js b/Projekt_SE2/src/main/webapp/chefFunktionen/chefScript.js new file mode 100644 index 0000000..2c8701a --- /dev/null +++ b/Projekt_SE2/src/main/webapp/chefFunktionen/chefScript.js @@ -0,0 +1,20 @@ +// Öffnet das Logout-Popup +function openLogoutPopup() { + const popup = document.getElementById("logoutPopup"); + if (popup) { + popup.style.display = "flex"; + } +} + +// Schließt das Logout-Popup +function closeLogoutPopup() { + const popup = document.getElementById("logoutPopup"); + if (popup) { + popup.style.display = "none"; + } +} + +// Bestätigt die Abmeldung und leitet zur Startseite weiter +function confirmLogout() { + window.location.href = "/Projekt_SE2/startseite.jsp"; // Weiterleitung zur Startseite +} diff --git a/Projekt_SE2/src/main/webapp/chefFunktionen/mitarbeiterVerwaltung.jsp b/Projekt_SE2/src/main/webapp/chefFunktionen/mitarbeiterVerwaltung.jsp new file mode 100644 index 0000000..52586f5 --- /dev/null +++ b/Projekt_SE2/src/main/webapp/chefFunktionen/mitarbeiterVerwaltung.jsp @@ -0,0 +1,80 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + EJSS Palast - Mitarbeiterverwaltung + + + + + + + + + +
+ EJS Logo +

EJSS Palast - Chef

+
+ +
+ + + + + +
+

+ Willkommen zur Mitarbeiterverwaltung
vom EJSS Palast

+ Hier kannst du alle deine Mitarbeiter verwalten, ihre Daten einsehen und deren Passwörter aktuellisieren.
+ Falls du Unterstützung brauchst, steht dir unser Support-Team jederzeit zur Verfügung.
+ Wir freuen uns, dich auf dem Weg zum Erfolg begleiten zu dürfen.
+ Dein EJSS Palast Admin-Team +

+
+
+

Zurück zum Anfang

+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + diff --git a/Projekt_SE2/src/main/webapp/chefFunktionen/produktVerwaltung.jsp b/Projekt_SE2/src/main/webapp/chefFunktionen/produktVerwaltung.jsp new file mode 100644 index 0000000..dc51a39 --- /dev/null +++ b/Projekt_SE2/src/main/webapp/chefFunktionen/produktVerwaltung.jsp @@ -0,0 +1,80 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + EJSS Palast - Produktverwaltung + + + + + + + + + +
+ EJS Logo +

EJSS Palast - Chef

+
+ +
+ + + + + +
+

+ Willkommen zur Produktverwaltung
vom EJSS Palast

+ Hier kannst du alle deine Produkt-Angebote verwalten, neue einfügen, löschen und aktuellisieren
+ Falls du Unterstützung brauchst, steht dir unser Support-Team jederzeit zur Verfügung.
+ Wir freuen uns, dich auf dem Weg zum Erfolg begleiten zu dürfen.
+ Dein EJSS Palast Admin-Team +

+
+
+

Zurück zum Anfang

+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + diff --git a/Projekt_SE2/src/main/webapp/chefFunktionen/schichtenPlan.jsp b/Projekt_SE2/src/main/webapp/chefFunktionen/schichtenPlan.jsp new file mode 100644 index 0000000..6351bfe --- /dev/null +++ b/Projekt_SE2/src/main/webapp/chefFunktionen/schichtenPlan.jsp @@ -0,0 +1,80 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + EJSS Palast - Schichtenplan + + + + + + + + + +
+ EJS Logo +

EJSS Palast - Chef

+
+ +
+ + + + + +
+

+ Willkommen zum Schichtenplan
vom EJSS Palast

+ Hier kannst du alle Schichten von deinen Mitarbeiter einsehen.
+ Falls du Unterstützung brauchst, steht dir unser Support-Team jederzeit zur Verfügung.
+ Wir freuen uns, dich auf dem Weg zum Erfolg begleiten zu dürfen.
+ Dein EJSS Palast Admin-Team +

+
+
+

Zurück zum Anfang

+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + diff --git a/Projekt_SE2/src/main/webapp/getraenke.jsp b/Projekt_SE2/src/main/webapp/getraenke.jsp new file mode 100644 index 0000000..98d09a4 --- /dev/null +++ b/Projekt_SE2/src/main/webapp/getraenke.jsp @@ -0,0 +1,299 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + EJSS Palast - Getränke + + + + + + + + + + +
+ EJS Logo +

EJSS Palast

+
+ + + + +
+ + +
+ + +
+ + +
+ + + +
+ +

Zurück zum Anfang

+
+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + + \ No newline at end of file diff --git a/Projekt_SE2/src/main/webapp/mitarbeiter.jsp b/Projekt_SE2/src/main/webapp/mitarbeiter.jsp new file mode 100644 index 0000000..59570b8 --- /dev/null +++ b/Projekt_SE2/src/main/webapp/mitarbeiter.jsp @@ -0,0 +1,78 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + EJSS Palast - Mitarbeiterbereich + + + + + + + + + +
+ EJS Logo +

EJSS Palast - Mitarbeiter

+
+ +
+ + + +
+

Willkommen im Mitarbeiterbereich
vom EJSS Palast

+ Du bist eingeloggt als: ...
+ Plane deine Schichten,
und behalte den Überblick über deine persönliche Daten

+ Deine Arbeit macht den Unterschied und trägt dazu bei, unseren Gästen unvergessliche Momente zu bereiten.
+ Solltest du Unterstützung benötigen, steht dir unser Team jederzeit zur Seite.
+ Vielen Dank für deinen Einsatz!
+ Dein EJSS Palast Team
+

+
+
+

Zurück zum Anfang

+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + diff --git a/Projekt_SE2/src/main/webapp/mitarbeiterFunktionen/datenMitarbeiter.jsp b/Projekt_SE2/src/main/webapp/mitarbeiterFunktionen/datenMitarbeiter.jsp new file mode 100644 index 0000000..240d11b --- /dev/null +++ b/Projekt_SE2/src/main/webapp/mitarbeiterFunktionen/datenMitarbeiter.jsp @@ -0,0 +1,77 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + EJSS Palast - Pers. Daten + + + + + + + + + +
+ EJS Logo +

EJSS Palast - Mitarbeiter

+
+ +
+ + + + +
+

Willkommen zum Persönlichem-Bereich
vom EJSS Palast

+ Du bist eingeloggt als: ....
+ Hier kannst du deine persönliche Daten einsehen und verwalten.
+ Vielen Dank für deinen Einsatz!
+ Dein EJSS Palast Team
+

+
+
+

Zurück zum Anfang

+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + diff --git a/Projekt_SE2/src/main/webapp/mitarbeiterFunktionen/mitarbeiterScript.js b/Projekt_SE2/src/main/webapp/mitarbeiterFunktionen/mitarbeiterScript.js new file mode 100644 index 0000000..2c8701a --- /dev/null +++ b/Projekt_SE2/src/main/webapp/mitarbeiterFunktionen/mitarbeiterScript.js @@ -0,0 +1,20 @@ +// Öffnet das Logout-Popup +function openLogoutPopup() { + const popup = document.getElementById("logoutPopup"); + if (popup) { + popup.style.display = "flex"; + } +} + +// Schließt das Logout-Popup +function closeLogoutPopup() { + const popup = document.getElementById("logoutPopup"); + if (popup) { + popup.style.display = "none"; + } +} + +// Bestätigt die Abmeldung und leitet zur Startseite weiter +function confirmLogout() { + window.location.href = "/Projekt_SE2/startseite.jsp"; // Weiterleitung zur Startseite +} diff --git a/Projekt_SE2/src/main/webapp/mitarbeiterFunktionen/schichtenPlanMitarbeiter.jsp b/Projekt_SE2/src/main/webapp/mitarbeiterFunktionen/schichtenPlanMitarbeiter.jsp new file mode 100644 index 0000000..a17469d --- /dev/null +++ b/Projekt_SE2/src/main/webapp/mitarbeiterFunktionen/schichtenPlanMitarbeiter.jsp @@ -0,0 +1,80 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + EJSS Palast - Schichtenplan + + + + + + + + + +
+ EJS Logo +

EJSS Palast - Mitarbeiter

+
+ +
+ + + + +
+

Willkommen zur Schichtplanung
vom EJSS Palast

+ Du bist eingeloggt als: ....
+ Hier kannst du deine Schichten einsehen und auswählen,
+ um deinen Beitrag zu unserem Team zu planen.

+ Bitte beachte, dass du dich nicht selbst aus einer Schicht austragen kannst.
+ Falls du dich abmelden möchtest,
kontaktiere bitte den Chef oder die zuständige Person.

+ Vielen Dank für deinen Einsatz!
+ Dein EJSS Palast Team
+

+
+
+

Zurück zum Anfang

+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + diff --git a/Projekt_SE2/src/main/webapp/modalScript.js b/Projekt_SE2/src/main/webapp/modalScript.js new file mode 100644 index 0000000..109407b --- /dev/null +++ b/Projekt_SE2/src/main/webapp/modalScript.js @@ -0,0 +1,57 @@ +// Modal-Logik initialisieren +function initializeModalLogic() { + const modal = document.getElementById("modal"); + const modalTitle = document.getElementById("modal-title"); + const modalDescription = document.getElementById("modal-description"); + const modalNutrition = document.getElementById("modal-nutrition"); + + if (!modal || !modalTitle || !modalDescription || !modalNutrition) { + console.error("Modal-Elemente fehlen."); + return; + } + + window.addEventListener("click", (event) => { + if (event.target === modal) { + closeModal(); + } + }); +} + +// Modal öffnen +function openModal(title, description, nutrition) { + document.getElementById("modal-title").textContent = title; + document.getElementById("modal-description").textContent = description; + document.getElementById("modal-nutrition").textContent = nutrition; + + openTab(null, "Description"); // Standardmäßig Beschreibung anzeigen + document.getElementById("modal").style.display = "block"; +} + +// Modal schließen +function closeModal() { + document.getElementById("modal").style.display = "none"; +} + +// Tabs in Modal öffnen +function openTab(evt, tabName) { + const tabContents = document.getElementsByClassName("tabcontent"); + for (let i = 0; i < tabContents.length; i++) { + tabContents[i].style.display = "none"; + } + + const tabButtons = document.getElementsByClassName("tablinks"); + for (let i = 0; i < tabButtons.length; i++) { + tabButtons[i].classList.remove("active"); + } + + const activeTab = document.getElementById(tabName); + if (activeTab) { + activeTab.style.display = "block"; + } else { + console.error("Tab-Inhalt nicht gefunden:", tabName); + } + + if (evt) { + evt.currentTarget.classList.add("active"); + } +} diff --git a/Projekt_SE2/src/main/webapp/script.js b/Projekt_SE2/src/main/webapp/script.js new file mode 100644 index 0000000..6af37db --- /dev/null +++ b/Projekt_SE2/src/main/webapp/script.js @@ -0,0 +1,155 @@ +// Initialisiert Filter, Scroll-Animationen und Modal-Logik +document.addEventListener("DOMContentLoaded", () => { + initializeEventListeners(); + initializeModalLogic(); + initializeScrollAnimations(); +}); + +// Funktion zum Anwenden von Filtern +function applyFilters(type) { + const searchInput = document.getElementById("searchInput").value; + const categoryFilter = document.getElementById("categoryFilter").value; + + let servletUrl = ""; + switch (type) { + case "speisen": + servletUrl = "/Projekt_SE2/speisenServlet"; + break; + case "getraenke": + servletUrl = "/Projekt_SE2/getraenkeServlet"; + break; + case "snacks": + servletUrl = "/Projekt_SE2/snacksServlet"; + break; + default: + console.error("Ungültiger Typ für Filterung:", type); + return; + } + + fetch(`${servletUrl}?category=${encodeURIComponent(categoryFilter)}&search=${encodeURIComponent(searchInput)}`) + .then((response) => { + if (!response.ok) { + throw new Error(`HTTP-Fehler: ${response.status}`); + } + return response.text(); + }) + .then((html) => { + const contentDiv = document.getElementById(`${type}-inhalt`); + if (contentDiv) { + contentDiv.innerHTML = html; + initializeScrollAnimations(); + initializeModalLogic(); + } + }) + .catch((err) => console.error("Fehler beim Laden der Inhalte:", err)); +} + +// Funktion zur Initialisierung von Event-Listenern für Such- und Filtereingaben +function initializeEventListeners() { + const searchInput = document.getElementById("searchInput"); + const categoryFilter = document.getElementById("categoryFilter"); + + // Automatisches Laden für alle Kategorien + applyFilters("getraenke"); + + // Filter-Events für Getränke + if (document.getElementById("getraenke-content")) { + searchInput.addEventListener("input", () => applyFilters("getraenke")); + categoryFilter.addEventListener("change", () => applyFilters("getraenke")); + } + + // Filter-Events für Speisen + if (document.getElementById("speisen-inhalt")) { + searchInput.addEventListener("input", () => applyFilters("speisen")); + categoryFilter.addEventListener("change", () => applyFilters("speisen")); + applyFilters("speisen"); + } + + // Filter-Events für Snacks + if (document.getElementById("snacks-inhalt")) { + searchInput.addEventListener("input", () => applyFilters("snacks")); + categoryFilter.addEventListener("change", () => applyFilters("snacks")); + applyFilters("snacks"); + } +} + +// Dynamisches Menü für Handys +function toggleMenu() { + const nav = document.querySelector(".navigation"); + const menuIcon = document.querySelector(".menu-icon"); + + if (nav && menuIcon) { + nav.classList.toggle("show"); + menuIcon.classList.toggle("open"); + menuIcon.textContent = nav.classList.contains("show") ? "✕ Menu" : "☰ Menu"; + } +} + +// Scroll-Animation für Kategorien und Items +function initializeScrollAnimations() { + const menuSections = document.querySelectorAll(".menu .category"); + + function revealItems(section) { + const items = section.querySelectorAll("li"); + items.forEach((item, index) => { + setTimeout(() => { + item.classList.add("visible"); + }, index * 50); + }); + } + + function onScroll() { + menuSections.forEach((section) => { + const sectionPosition = section.getBoundingClientRect().top; + const screenPosition = window.innerHeight / 1.3; + + if (sectionPosition < screenPosition && !section.classList.contains("animated")) { + revealItems(section); + section.classList.add("animated"); + } + }); + } + + window.addEventListener("scroll", onScroll); + onScroll(); // Erste Überprüfung +} + +// Accordion-Logik für Hinweise und Allergene +function toggleAccordion(id) { + const content = document.getElementById(id); + const icon = content.previousElementSibling.querySelector(".toggle-icon"); + + if (content.style.display === "none" || content.style.display === "") { + content.style.display = "block"; + if (icon) icon.textContent = "−"; + } else { + content.style.display = "none"; + if (icon) icon.textContent = "+"; + } +} + +// Login-Popup-Logik +function openLoginPopup() { + const popup = document.getElementById("loginPopup"); + if (popup) { + popup.style.display = "block"; + } else { + console.error("Login-Popup-Element nicht gefunden."); + } +} + +function closeLoginPopup() { + const popup = document.getElementById("loginPopup"); + if (popup) { + popup.style.display = "none"; + const loginForm = document.getElementById("loginForm"); + if (loginForm) loginForm.reset(); + } +} + +window.onclick = function (event) { + const popup = document.getElementById("loginPopup"); + if (event.target === popup) { + closeLoginPopup(); + } +}; diff --git a/Projekt_SE2/src/main/webapp/snacks.jsp b/Projekt_SE2/src/main/webapp/snacks.jsp new file mode 100644 index 0000000..ffc1b31 --- /dev/null +++ b/Projekt_SE2/src/main/webapp/snacks.jsp @@ -0,0 +1,295 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + + EJSS Palast - Snacks + + + + + + + + + + +
+ EJS Logo +

EJSS Palast

+
+ + + + +
+ +
+ + +
+ + +
+ + + +
+ +

Zurück zum Anfang

+
+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + + \ No newline at end of file diff --git a/Projekt_SE2/src/main/webapp/speisen.jsp b/Projekt_SE2/src/main/webapp/speisen.jsp new file mode 100644 index 0000000..9cabd7c --- /dev/null +++ b/Projekt_SE2/src/main/webapp/speisen.jsp @@ -0,0 +1,297 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + + EJSS Palast - Speisen + + + + + + + + + + +
+ EJS Logo +

EJSS Palast

+
+ + + + +
+ +
+ + +
+ + +
+ + + +
+ +

Zurück zum Anfang

+
+
+ +

+ Anschrift:
+ Musterstrasse 10
+ 68163 Mannheim
+

+
+ + + +
+
+ + + + + \ No newline at end of file diff --git a/Projekt_SE2/src/main/webapp/startseite.jsp b/Projekt_SE2/src/main/webapp/startseite.jsp new file mode 100644 index 0000000..4c42731 --- /dev/null +++ b/Projekt_SE2/src/main/webapp/startseite.jsp @@ -0,0 +1,143 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + + + +EJSS Palast - Startseite + + + + + + + + + + +
+ EJS Logo +

EJSS Palast

+
+ + + + + +
+
+

+ Den Alltag hinter dir lassen und + genießen.
Im EJSS Palast kannst du entspannte Stunden mit + Familie und Freunden verbringen.
In unserer stilvollen + Atmosphäre laden wir dich ein,
bei köstlichen Speisen und + Getränken den Tag ausklingen zu lassen.
Genieße + kulinarische Highlights,
ein gutes Glas Wein
oder + ein Dinner in bester Gesellschaft. +

Dein EJSS Palast Team +

+
+

+ Schön, dass Sie bei uns waren!
Wenn es + Ihnen gefallen hat, freuen wir uns über + Ihr Feedback auf Tripadvisor. So helfen Sie uns, unser Restaurant + noch besser zu machen.
Vielen Dank und bis bald! +

+

Unsere Öffnungszeiten:

+
+ + + + + + + + + + + + + + + + + + + + + + + +
MontagDienstagMittwochDonnerstagFreitagSamstagSonntag
Geschlossen12:00 - 22:0012:00 - 22:0012:00 - 22:0012:00 - 23:0012:00 - 23:0013:00 - 22:00
+
+
+ + +

Zurück zum Anfang

+
+
+ +

+ Anschrift:
Musterstrasse 10
68163 + Mannheim +
+

+
+ +
+
+ + + + + diff --git a/Projekt_SE2/src/main/webapp/styles.css b/Projekt_SE2/src/main/webapp/styles.css new file mode 100644 index 0000000..76c7331 --- /dev/null +++ b/Projekt_SE2/src/main/webapp/styles.css @@ -0,0 +1,935 @@ +html { + scroll-behavior: smooth; +} + +/* Grundstil für die Seite */ +body { + font-family: "Gowun Dodum", sans-serif; + margin: 0; + padding: 0; + background: linear-gradient(180deg, #fafafa, #f0f0f5); + color: #3b3b3b; + line-height: 1.6; +} + +header { + + background-color: #2c2c2c; + /* Gleiche Farbe wie die Navigation */ + color: #f5f5f5; + padding: 30px; + text-align: center; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + /* Reduzierter Schatten */ + border-bottom: none; + /* Entfernt harte Abgrenzung */ + position: relative; + background-image: url('Bilder/headerBild.jpg'); + background-size: cover; + background-position: center; + background-repeat: no-repeat; + background-blend-mode: overlay; + background-color: rgba(250, 249, 246, 0.95); + /* Transparenter Farbton */ + transition: all 0.3s ease; + /* Sanfter Übergang */ +} + + +header .logoOben { + max-width: 130px; + border-radius: 20px; + filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.5)); + transition: transform 0.3s ease, filter 0.3s ease; +} + +header .logoOben:hover { + transform: scale(1.1); + filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.6)); +} + + +/* Header-Text Styling */ +header h1, +header h2 { + font-family: 'Gowun Dodum', sans-serif; + /* Elegante Schrift für Überschriften */ + color: #c0c0cc; + text-transform: uppercase; + letter-spacing: 1px; + font-weight: bold; + margin: 0; +} + +/* Responsive Anpassungen */ +@media (max-width: 768px) { + header { + padding: 15px; + } + + header h2 { + font-size: 1.5em; + } + + header .logo { + width: 50px; + right: 15px; + } +} + +/* Standard Navigation Styling */ +nav { + background-color: #444; + color: white; + padding: 10px; + position: relative; + text-align: center; +} + +.menu-icon { + font-size: 24px; + cursor: pointer; + display: none; + /* Nur auf mobilen Geräten sichtbar */ + color: white; + position: relative; +} + +/* Hamburger Symbol */ +.menu-icon::before { + + opacity: 1; + transition: opacity 0.9s ease, transform 0.9s ease; +} + +/* Schließen Symbol */ +.menu-icon::after { + + position: absolute; + top: 0; + left: 0; + opacity: 0; + /* Standardmäßig unsichtbar */ + transition: opacity 0.8s ease; +} + +.menu-icon.open::before { + opacity: 0; + /* Hamburger-Symbol ausblenden */ + transform: rotate(180deg); + /* Dreht das Hamburger-Symbol */ +} + +.menu-icon.open::after { + opacity: 1; + /* Zeigt das Schließen-Symbol an */ +} + + +.navigation ul { + list-style-type: none; + padding: 0; + margin: 0; + display: flex; + justify-content: center; +} + +/* Mobiles Menü Styling */ +@media (max-width: 768px) { + .menu-icon { + display: inline-block; + /* Zeigt das Menü-Icon auf Mobilgeräten an */ + position: relative; + } + + .navigation ul { + flex-direction: column; + max-height: 0; + /* Startet geschlossen */ + overflow: hidden; + /* Verhindert Scrollen, wenn geschlossen */ + opacity: 0; + /* Unsichtbar, wenn geschlossen */ + transition: max-height 0.8s ease, opacity 0.8s ease; + /* Animiert Höhe und Transparenz */ + position: relative; + } + + .navigation.show ul { + max-height: 300px; + /* Höhe eine ungefähre maximale Höhe */ + opacity: 1; + /* Macht das Menü sichtbar */ + } + /* Listenelemente im Menü */ + .navigation li { + padding: 10px 15px; + text-align: center; /* Zentriert die Links */ + } + + .navigation ul li:last-child { + margin-left: 0; /* Entfernt das Standard-Auto-Margin */ + margin-top: 15px; /* Abstand nach oben, um es abzuheben */ + align-self: flex-end; /* Bewegt Login ans untere Ende */ + text-align: center; /* Zentriert den Text */ + width: 100%; /* Breite über die gesamte Navigation */ + border-top: 1px solid #ddd; /* Optionale Trennungslinie */ + } +} + +/* Listenelemente im Menü */ +.navigation li { + padding: 10px 15px; +} + +.navigation a { + color: white; + text-decoration: none; + +} + +.navigation a.aktiv { + background-color: #03855A; + color: #ffffff; + border-radius: 8px; + padding: 6px 12px; + font-weight: bold; + transition: background-color 0.3s ease; +} + +.navigation a:hover { + color: #ffffff; + border-radius: 8px; +} + +.navigation li a.aktiv { + display: block; + /* Lässt den Link die gesamte Zeile einnehmen */ + background-color: #04AA6D; + /* Hintergrundfarbe */ + color: white; + /* Textfarbe */ + padding: 10px 50px; + /* Optional: zusätzlicher Innenabstand */ + text-decoration: none; + /* Entfernt Unterstreichung */ +} +/* Verschiebe Login nach rechts */ +.navigation ul li:last-child { + margin-left: auto; /* Schiebt das letzte Element (Login) nach rechts */ + position: absolute; + right: 20px; + top: 50%; + transform: translateY(-50%); /* Zentriert Login vertikal */ +} +/* Popup-Hintergrund */ +.popup { + display: none; /* Versteckt das Popup standardmäßig */ + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); /* Halbtransparenter Hintergrund */ + z-index: 1000; +} + +/* Popup-Inhalt */ +.popup-content { + background-color: #fff; + margin: 15% auto; + padding: 20px; + border-radius: 8px; + width: 300px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + text-align: center; +} + +.popup-content h3 { + color: #444; + margin-top: 0; +} + +.popup-content form { + display: flex; + flex-direction: column; + gap: 10px; +} + +.popup-content input { + padding: 10px; + border: 1px solid #ddd; + border-radius: 5px; +} + +.popup-content button { + background-color: #04AA6D; + color: white; + border: none; + padding: 10px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s ease; +} + +.popup-content button:hover { + background-color: #03855A; +} + +/* Schließen-Button */ +.close-button { + position: absolute; + top: 10px; + right: 15px; + font-size: 18px; + cursor: pointer; + color: #333; +} + + +/* Willkommenstext */ +.willkommenstext { + background-color: #FAF9F6; /* Gleiche Hintergrundfarbe wie .menu */ + border-radius: 12px; /* Abgerundete Ecken */ + border: 1px solid #ddd; /* Gleicher Rand wie .menu */ + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Gleicher Schatten wie .menu */ + max-width: 1000px; /* Gleiche maximale Breite wie .menu */ + width: 90%; /* Gleiche Breite wie .menu */ + padding: 25px; /* Gleicher Innenabstand */ + margin: 20px auto; /* Zentrierung mit gleichem Abstand */ + text-align: center; /* Text zentrieren */ + transition: all 0.3s ease; /* Gleiche Übergangseffekte */ +} +.willkommenstext:hover { + box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25); /* Gleicher Hover-Effekt wie .menu */ +} + +.willkommenstext:target { + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); /* Gleicher Ziel-Effekt wie .menu */ +} + +.willkommenstext p { + margin: 0; + padding: 0; +} + +.willkommenstext .einleitung { + display: block; + font-size: 1.3em; + font-weight: bold; + color: #6c2f3d; + margin-bottom: 10px; +} + +.willkommenstext strong { + display: block; + margin: 15px 0; + font-size: 1.2em; + color: #333; +} + +.willkommenstext em { + display: block; + margin-top: 20px; + font-family: "Playwrite GB S", cursive; + font-size: 1.1em; + color: #666; +} + +/* Responsive Anpassungen */ +@media (max-width: 768px) { + .willkommenstext { + padding: 15px; + font-size: 1em; + } + + .willkommenstext .einleitung { + font-size: 1.2em; + } + + .willkommenstext strong { + font-size: 1.1em; + } +} + +/* Bewertungen und Footer */ +main p, +footer p { + text-align: center; + padding: 20px; +} + +footer { + background-color: #333; + color: #fff; + text-align: center; + padding: 20px; +} + +/*Öffnungszeiten */ +.oeff { + + /* Grundstil für die Tabelle */ + table { + width: 100%; + border: 1px solid #ccc; + /* Passt sich an die Bildschirmbreite an */ + max-width: 700px; + margin: 20px auto; + /* Zentriert die Tabelle */ + border-collapse: collapse; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + /* Weicher Schatten */ + overflow: hidden; + border-radius: 8px; + background-color: #fefefe; + transition: transform 0.3s ease; + } + + table:hover{ + transform: scale(1.01); + } + + /* Kopfzeilen-Styling */ + thead th { + + background-color: #623c3d; + /* Dunklerer, warmer Farbton */ + color: #fff; + padding: 12px; + text-transform: none; + font-size: 0.95em; + letter-spacing: 1px; + } + + /* Zellen-Styling */ + tbody td { + + padding: 12px; + text-align: center; + color: #333; + border-bottom: 1px solid #e0e0e0; + font-size: 0.95em; + transition: background-color 0.3s ease, color 0.3s ease; + } + + tbody td:hover{ + background-color: #e6e6e6; + /* Heller Hintergrund für Hover */ + color: #000; + /* Kontrastreicherer Text beim Hover */ + } + + /* Zeilen abwechselnd einfärben */ + tbody tr:nth-child(even) { + background-color: #fafafa; + /* Heller Hintergrund für abwechselnde Zeilen */ + } + + tbody tr:nth-child(odd) { + background-color: #ffffff; + /* Weiß für klare Abgrenzung */ + } + + tbody tr:hover{ + background-color: #ddd; + color: #000; + + } + + /* Responsive Anpassungen für kleine Bildschirme */ + @media (max-width: 768px) { + thead { + display: none; + /* Kopfzeile auf kleinen Bildschirmen ausblenden */ + } + + table, + tbody, + tr, + td { + display: block; + width: 100%; + } + + tr { + margin-bottom: 0px; + border: 1px solid #ddd; + border-radius: 10px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + /* Leichter Schatten für mobile Ansicht */ + } + + td { + text-align: right; + padding-left: 50%; + position: relative; + } + + td::before { + content: attr(data-label); + /* Label für die Zelle anzeigen */ + position: absolute; + left: 15px; + width: 45%; + font-weight: bold; + text-align: left; + color: #8B4513; + /* Passend zum Header-Farbton */ + } + + tbody td:nth-child(1)::before { + content: "Montag"; + } + + tbody td:nth-child(2)::before { + content: "Dienstag"; + } + + tbody td:nth-child(3)::before { + content: "Mittwoch"; + } + + tbody td:nth-child(4)::before { + content: "Donnerstag"; + } + + tbody td:nth-child(5)::before { + content: "Freitag"; + } + + tbody td:nth-child(6)::before { + content: "Samstag"; + } + + tbody td:nth-child(7)::before { + content: "Sonntag"; + } + } +} + +/* Stil für die Überschrift Öffnungszeiten */ +h2 { + font-size: 1.8em; + /* Größe anpassen */ + color: #8B4513; + /* Passend zum Braunton in der Tabelle */ + text-align: center; + margin-top: 20px; + margin-bottom: 15px; + font-weight: bold; + padding-bottom: 5px; + border-bottom: 2px solid #ddd; + /* Dezente Linie unter der Überschrift */ + max-width: 80%; + margin-left: auto; + margin-right: auto; +} + +/* Link "Anfang der Seite" */ +a h4 { + text-align: center; + font-size: 1em; + color: #04AA6D; +} + +a h4:hover { + color: #333; +} + +/* Zusatzstil für Links */ +a { + color: #03855A; + text-decoration: none; + transition: color 0.3s ease; +} + +a:hover { + color: #6F4E37; + text-decoration: underline; +} + +.menu { + background-color: #FAF9F6; + border-radius: 12px; + border: 1px solid #ddd; + box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); + max-width: 600px; + width: 90%; + padding: 25px; + margin: 20px auto; + text-align: center; + transition: all 0.3s ease; +} + +.menu:hover { + box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25); +} + +.menu { + transition: box-shadow 0.3s ease; +} + +.menu:target { + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); +} + +.category h3 { + font-size: 1.6em; + color: #6F4E37; + margin-top: 0px; + margin-bottom: 15px; + border-bottom: 2px solid #8B4513; + padding-bottom: 5px; + text-align: center; + font-weight: bold; +} + +.menu ol { + list-style: decimal; + padding-left: 0; + counter-reset: item; +} + +.menu ol li { + counter-increment: item; + position: relative; + margin: 10px 0; + font-size: 0.85em; + display: flex; + justify-content: space-between; + padding: 10px 0; + border-bottom: 1px solid #e6e6e6; + transition: background-color 0.2s ease; + +} + +/* Stil für das Info-Symbol */ +.info-icon { + font-size: 0.85em; + color: #8B4513; + cursor: pointer; + margin-left: 10px; + transition: color 0.3s ease, transform 0.3s ease; +} + +.info-icon:hover { + color: #6F4E37; + transform: scale(1.1); +} + +/* Modal-Styling für das Overlay */ +.modal { + display: none; + /* Standardmäßig versteckt */ + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + /* Halbtransparentes Overlay */ +} + +/* Modales Fenster ohne Transparenz */ +.modal-content { + background-color: #fefefe; + /* Vollständig deckend, keine Transparenz */ + margin: 15% auto; + /* Zentriert das Modal im Fenster */ + padding: 20px; + border-radius: 10px; + width: 80%; + max-width: 300px; + /* Beschränkt die Breite des Fensters */ + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); + text-align: center; + color: #555; + /* Textfarbe für bessere Lesbarkeit */ +} + +.tab { + overflow: hidden; + border-bottom: 1px solid #ccc; +} + +.tab button { + background-color: inherit; + float: left; + border: none; + outline: none; + cursor: pointer; + padding: 10px 20px; + transition: 0.3s; + font-size: 16.5px; +} + +.tab button:hover { + background-color: #ddd; +} + +.tab button.active { + background-color: #ccc; +} + +.tabcontent { + display: none; + padding: 10px; + border-top: none; +} + +.tabcontent h4 { + margin-top: 0; +} + + +.close-button { + background: none; + border: none; + font-size: 1.5em; + cursor: pointer; + position: absolute; + top: 10px; + right: 10px; + color: #555; +} + +.close-button:hover { + color: #333; +} + +/* Hochgestelltes Symbol Styling */ +.footnote-symbol { + font-size: 0.6em; + color: #777; + display: inline; + vertical-align: top; + margin-left: 2px; +} + +/* Fußnotenbereich Styling */ +.footnote { + font-size: 0.8em; + color: #555; + margin-top: 10px; +} + +.menu ol li:before { + content: counter(item) ". "; + font-weight: bold; + color: #8B4513; + margin-right: 5px; +} + +.menu .price { + font-weight: bold; + color: #6F4E37; + font-size: 0.85em; +} + +hr { + border: 0; + border-top: 1px solid #ddd; + margin: 15px 0; +} + +.menu p.note { + font-size: 0.9em; + color: #777; + text-align: center; + margin-top: 20px; +} + +/* Accordion-Bereich */ +.accordion-content { + display: none; + /* Startet versteckt */ + padding: 10px; + border-top: 1px solid #ddd; + margin-top: 10px; +} + +/* Symbol-Styling für die Plus- und Minus-Anzeige */ +.toggle-icon { + font-size: 1em; + color: #8B4513; + margin-left: 10px; +} + +/* Stil für Zusatzstoffe-Tabelle */ +.zusatzstoffe-table, +.allergen-table { + width: 100%; + border: 1px solid #ccc; + max-width: 700px; + margin: 20px auto; + border-collapse: collapse; + overflow: hidden; + border-radius: 8px; + background-color: #FAF9F6; +} + +.zusatzstoffe-table td, +.allergen-table td { + padding: 12px; + text-align: left; + color: #333; + border-bottom: 1px solid #ddd; + font-size: 0.80em; +} + +.zusatzstoffe-table tr:nth-child(even), +.allergen-table tr:nth-child(even) { + background-color: #FAF9F6; +} + +.zusatzstoffe-table tr:nth-child(odd), +.allergen-table tr:nth-child(odd) { + background-color: #FAF9F6; +} + +.zusatzstoffe-table td:first-child, +.allergen-table td:first-child { + font-weight: bold; + color: #8B4513; + width: 30%; + text-align: center; +} + + +/* Footer-Styling */ +footer { + background-color: #2c2c2c; + color: #d1d1d1; + padding: 25px; + text-align: center; + display: flex; + flex-direction: column; + align-items: center; + border-top: 3px solid #555; + gap: 10px; +} + +/* Logo im Footer */ +footer .logo { + width: 80px; + height: auto; + margin-bottom: 10px; + border-radius: 8px; +} + +/* Anschrift im Footer */ +footer p { + margin: 0; + font-size: 0.9em; + line-height: 1.5; +} + +/* Social-Media-Icons */ +footer .socials { + display: flex; + gap: 15px; + justify-content: center; +} + +footer .socials a { + color: #04AA6D; + font-size: 1.3em; + text-decoration: none; + transition: color 0.3s; +} + +footer .socials a:hover { + color: #028a5e; +} + +footer .call-icon { + color: #04AA6D; + transition: color 0.5s; +} + +footer .call-icon:hover { + color: #02a85e; +} + +/* Responsive Anpassungen */ +@media (max-width: 768px) { + footer { + padding: 15px; + } + + footer p { + font-size: 0.8em; + } + + footer .socials a { + font-size: 1.3em; + } + + footer .logo { + width: 60px; + } +} + +.search-filter { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: 15px; /* Abstand zwischen den Elementen */ + padding: 20px; + background-color: #f9f9f9; + border: 1px solid #ddd; + border-radius: 8px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + margin-bottom: 20px; +} + +.search-filter input[type="text"], +.search-filter select { + font-family: "Gowun Dodum", sans-serif; + font-size: 1em; + padding: 10px 15px; + width: 250px; /* Breite der Eingabefelder */ + max-width: 100%; + border: 1px solid #ccc; + border-radius: 5px; + outline: none; + transition: all 0.3s ease; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); +} + +.search-filter input[type="text"]:focus, +.search-filter select:focus { + border-color: #04aa6d; + box-shadow: 0 4px 6px rgba(0, 170, 109, 0.2); +} + +.search-filter select { + background-color: #fff; + cursor: pointer; +} + +.search-filter select:focus { + background-color: #f0fff4; +} + +.search-filter input[type="text"]::placeholder { + color: #aaa; + font-size: 0.9em; +} + +/* Responsive Anpassungen */ +@media (max-width: 768px) { + .search-filter { + flex-direction: column; /* Stapelt die Elemente untereinander */ + gap: 10px; /* Reduzierter Abstand */ + } + + .search-filter input[type="text"], + .search-filter select { + width: 90%; /* Anpassung für kleinere Bildschirme */ + } +} +