Files
Cookbook/backend/views/index.ejs
2025-06-10 20:37:53 +02:00

138 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Cookbook</title>
<!-- Apple-Style: San Francisco Font und Styling -->
</head>
<body>
<main class="container">
<header>
<h1>Cookbook</h1>
<div class="button-group">
<a href="/"><button>🔄 Sync Recipes</button></a>
<a href="/add" class="secondary-button"> Add Recipe</a>
<a
href="https://git.the1s.de/theis.gaedigk/Cookbook/src/branch/main/helpSite.md"
class="secondary-button"
target="_blank"
rel="noopener noreferrer"
>❓ Help</a
>
</div>
</header>
<section id="recipes" class="recipes-list">
<% recipes.forEach(recipe => { %>
<div class="recipe-card">
<h2><%= recipe.title %></h2>
<p><%- recipe.content.replace(/\n/g, "<br />") %></p>
</div>
<% }) %>
</section>
</main>
</body>
</html>
<style>
/* System Font */
html {
font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI",
Roboto, Helvetica, Arial, sans-serif;
}
/* Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #f5f5f7;
color: #1d1d1f;
font-size: 16px;
line-height: 1.5;
padding: 2rem;
display: flex;
justify-content: center;
min-height: 100vh;
}
.container {
width: 100%;
max-width: 800px;
background-color: #fff;
border-radius: 20px;
padding: 2rem;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
header {
display: flex;
flex-direction: column;
gap: 1.5rem;
margin-bottom: 2rem;
text-align: center;
}
h1 {
font-size: 2rem;
font-weight: 600;
}
.button-group {
display: flex;
justify-content: center;
gap: 1rem;
flex-wrap: wrap;
}
button,
.secondary-button {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 12px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
text-decoration: none;
display: inline-block;
text-align: center;
}
button {
background-color: #007aff;
color: #fff;
}
button:hover {
background-color: #005ecb;
}
.secondary-button {
background-color: #e5e5ea;
color: #1d1d1f;
}
.secondary-button:hover {
background-color: #d1d1d6;
}
.recipes-list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.recipe-card {
padding: 1rem;
border-radius: 16px;
background-color: #f9f9fa;
border: 1px solid #e0e0e0;
}
</style>