Skip to content

Commit 8ed4c8e

Browse files
committed
Add delete button to recipe page
1 parent 6740ce4 commit 8ed4c8e

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

page/functions/page-functions.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function showRecipePage(recipePath) {
142142
let mainHtml = `
143143
<div class="container">
144144
<div class="row">
145-
<div class="col-md-8">
145+
<div class="col-md-7">
146146
<h1 id="recipe-title">${recipe.title}</h1>
147147
</div>
148148
<div id="rename-button" class="col-md-2">
@@ -151,6 +151,9 @@ function showRecipePage(recipePath) {
151151
<div id="edit-button" class="col-md-2">
152152
<div class="edit-button hover-pointer" onclick="editRecipe('${recipe.title.replace(/'/g, "\\'")}')">Edit</div>
153153
</div>
154+
<div id="delete-button" class="col-md-1">
155+
<div class="edit-button delete-button bold hover-pointer" onclick="showDeleteDialog()">⊖</div>
156+
</div>
154157
</div><hr>
155158
<div class="row">
156159
<div class="col-md-4">

page/style.css

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ ul {
4343
}
4444

4545
.bold {
46-
font-weight: bold;
46+
font-weight: bold !important;
4747
}
4848

4949
main {
@@ -363,6 +363,18 @@ input:checked+.slider:before {
363363
background-color: var(--secondary);
364364
}
365365

366+
.delete-button {
367+
background-color: #d81515;
368+
}
369+
370+
.delete-button:hover {
371+
background-color: red;
372+
}
373+
374+
.delete-button:active {
375+
background-color: #d81515;
376+
}
377+
366378
.form {
367379
border: 1px solid #ccc;
368380
height: 100%;

0 commit comments

Comments
 (0)