added filter and tag for ingredients

This commit is contained in:
2025-10-25 22:13:55 +02:00
parent b8046c87b9
commit cc28aa9a8e
5 changed files with 914 additions and 29 deletions

View File

@@ -460,6 +460,201 @@ button:hover {
font-style: italic;
}
/* Tags */
.tag {
display: inline-block;
padding: 4px 10px;
background-color: #3498db;
color: white;
border-radius: 12px;
font-size: 12px;
font-weight: 500;
margin-right: 5px;
margin-bottom: 5px;
}
.item-tags {
display: flex;
flex-wrap: wrap;
gap: 5px;
margin-top: 8px;
}
.item-content {
flex: 1;
}
.item-actions {
display: flex;
gap: 8px;
flex-shrink: 0;
}
.edit-tags-btn {
background-color: #9b59b6;
padding: 8px 15px;
font-size: 13px;
}
.edit-tags-btn:hover {
background-color: #8e44ad;
}
/* Tag Filter Section */
.search-section {
margin-bottom: 25px;
padding: 20px;
background-color: #f8f9fa;
border-radius: 8px;
border: 1px solid #e0e0e0;
}
.search-section h3 {
margin-bottom: 15px;
color: #2c3e50;
font-size: 1.1em;
}
.tag-filter {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 15px;
}
.tag-filter-btn {
padding: 8px 16px;
background-color: #ecf0f1;
color: #2c3e50;
border: 2px solid #bdc3c7;
border-radius: 20px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
}
.tag-filter-btn:hover {
background-color: #bdc3c7;
border-color: #95a5a6;
}
.tag-filter-btn.active {
background-color: #3498db;
color: white;
border-color: #3498db;
}
.active-filters {
color: #7f8c8d;
font-size: 14px;
font-style: italic;
min-height: 20px;
margin-bottom: 10px;
}
.clear-filters-btn {
padding: 8px 16px;
background-color: #e74c3c;
color: white;
font-size: 13px;
}
.clear-filters-btn:hover {
background-color: #c0392b;
}
/* Tag Edit Modal */
.modal {
display: none;
position: fixed;
z-index: 1000;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
}
.modal .modal-content {
background-color: white;
margin: 10% auto;
padding: 30px;
border-radius: 10px;
width: 90%;
max-width: 500px;
position: relative;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.close {
color: #aaa;
float: right;
font-size: 28px;
font-weight: bold;
cursor: pointer;
line-height: 20px;
}
.close:hover,
.close:focus {
color: #000;
}
.tag-edit-section {
margin-top: 20px;
}
.tag-edit-section h4 {
margin-top: 20px;
margin-bottom: 10px;
color: #2c3e50;
}
#current-tags-{{.IngredientID}},
[id^="current-tags-"] {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 20px;
min-height: 40px;
padding: 10px;
background-color: #f8f9fa;
border-radius: 6px;
}
.tag-remove {
background-color: transparent;
color: white;
padding: 0 5px;
margin-left: 5px;
font-size: 16px;
font-weight: bold;
border: none;
cursor: pointer;
border-radius: 50%;
}
.tag-remove:hover {
background-color: rgba(0, 0, 0, 0.2);
}
.add-tag-form {
display: flex;
gap: 10px;
padding: 15px;
background-color: #f8f9fa;
border-radius: 6px;
}
.add-tag-form input {
flex: 1;
}
.add-tag-form button {
flex-shrink: 0;
}
/* Authentication Pages */
.auth-container {
min-height: 100vh;