Files
2025-06-10 21:40:23 +02:00

156 lines
3.0 KiB
Plaintext

<!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>