moved directory

This commit is contained in:
2025-06-17 21:39:55 +02:00
parent fe02505cc6
commit 42a2d9ed85
895 changed files with 2 additions and 2 deletions

155
views/addRecipe/index.ejs Normal file
View File

@@ -0,0 +1,155 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Add recipe</title>
</head>
<body>
<main class="container">
<h1>Add a new recipe</h1>
<form action="/add/create-recipe" method="POST">
<label for="title">Recipe Title</label>
<input
type="text"
name="filename"
required
id="title"
placeholder="e.g. Grandma's Apple Pie"
/>
<label for="recipe">Recipe instructions</label>
<textarea
required
name="content"
id="recipe"
placeholder="Write your recipe here… You can use markdown!"
></textarea>
<small>You can use Markdown syntax for formatting.</small>
<div class="button-group">
<button type="submit">Save recipe</button>
<a href="/" class="back-btn">Back to recipes</a>
</div>
</form>
</main>
</body>
</html>
<style>
html {
font-family: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI",
Roboto, Helvetica, Arial, sans-serif;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: #f5f5f7;
color: #1d1d1f;
font-size: 16px;
line-height: 1.5;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
}
.container {
background-color: #ffffff;
padding: 2.5rem;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
width: 100%;
max-width: 600px;
}
h1 {
font-size: 1.8rem;
margin-bottom: 1.5rem;
font-weight: 600;
text-align: center;
}
label {
display: block;
margin-top: 1.2rem;
margin-bottom: 0.5rem;
font-weight: 500;
}
input[type="text"],
textarea {
width: 100%;
padding: 0.75rem 1rem;
border: 1px solid #d1d1d6;
border-radius: 12px;
background-color: #f9f9fa;
font-size: 1rem;
transition: border 0.2s ease;
}
input[type="text"]:focus,
textarea:focus {
border-color: #007aff;
outline: none;
background-color: #fff;
}
textarea {
resize: vertical;
min-height: 150px;
}
small {
display: block;
margin-top: 0.4rem;
color: #6e6e73;
font-size: 0.875rem;
}
.button-group {
margin-top: 2rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 1rem;
}
button,
.back-btn {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 12px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease-in-out;
text-decoration: none;
text-align: center;
}
button[type="submit"] {
background-color: #007aff;
color: white;
}
button[type="submit"]:hover {
background-color: #005ecb;
}
.back-btn {
background-color: #e5e5ea;
color: #1d1d1f;
}
.back-btn:hover {
background-color: #d1d1d6;
}
</style>

164
views/index.ejs Normal file
View File

@@ -0,0 +1,164 @@
<!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>

114
views/success.ejs Normal file
View File

@@ -0,0 +1,114 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Success!</title>
<style>
/* San Francisco / Apple System Font */
html {
font-family: -apple-system, BlinkMacSystemFont, "San Francisco",
"Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background-color: #f5f5f7;
color: #1d1d1f;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
padding: 2rem;
}
.container {
background-color: #fff;
border-radius: 20px;
padding: 2.5rem;
max-width: 500px;
width: 100%;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
text-align: center;
}
h1 {
font-size: 2rem;
margin-bottom: 1rem;
font-weight: 600;
}
p {
margin: 0.5rem 0;
font-size: 1rem;
}
strong {
color: #007aff;
}
.buttons {
margin-top: 2rem;
display: flex;
gap: 1rem;
justify-content: center;
flex-wrap: wrap;
}
button,
.btn-link {
padding: 0.75rem 1.5rem;
border: none;
border-radius: 12px;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
text-decoration: none;
text-align: center;
transition: background-color 0.2s ease;
}
button {
background-color: #007aff;
color: white;
}
button:hover {
background-color: #005ecb;
}
.btn-secondary {
background-color: #e5e5ea;
color: #1d1d1f;
}
.btn-secondary:hover {
background-color: #d1d1d6;
}
a {
text-decoration: none;
}
</style>
</head>
<body>
<div class="container">
<h1>✅ Recipe created successfully!</h1>
<p>Filename: <strong><%= filename %></strong></p>
<p>File path: <strong><%= path %></strong></p>
<div class="buttons">
<a href="/add"
><button class="btn-secondary"> Add more recipes</button></a
>
<a href="/"><button>📖 View all recipes</button></a>
</div>
</div>
</body>
</html>