Files
Cookbook/backend/views/index.ejs
2025-06-14 13:29:56 +02:00

165 lines
3.1 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/wiki/Home"
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">
<h1><%= recipe.title %></h1>
<div class="markdown"><%- recipe.content %></div>
</div>
<% }) %>
</section>
</main>
</body>
</html>
<style>
.markdown ul {
padding-left: 1.5rem;
list-style-type: disc;
margin: 0.5em 0;
}
.markdown ol {
padding-left: 1.5rem;
list-style-type: decimal;
margin: 0.5em 0;
}
.markdown li {
margin-bottom: 0.25em;
}
/*Markdown style*/
.markdown h1 {
font-size: 1.5rem;
margin-bottom: 0.5rem;
}
.markdown pre {
background: #f4f4f4;
padding: 10px;
border-radius: 5px;
}
/* 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>