Fix icon hover colors, text alignment, and UI improvements
This commit is contained in:
+28
-4
@@ -112,6 +112,12 @@
|
||||
<span>Bookings</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/admin/availability.html" class="nav-link">
|
||||
<i class="fas fa-clock"></i>
|
||||
<span>Availability</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -387,6 +393,24 @@
|
||||
document.getElementById('back-to-list').addEventListener('click', showList);
|
||||
document.getElementById('publish-btn').addEventListener('click', () => saveProject('published'));
|
||||
document.getElementById('save-draft-btn').addEventListener('click', () => saveProject('draft'));
|
||||
|
||||
document.getElementById('portfolio-grid').addEventListener('click', function(event) {
|
||||
const actionBtn = event.target.closest('[data-action]');
|
||||
if (!actionBtn) return;
|
||||
|
||||
const { action, id } = actionBtn.dataset;
|
||||
if (action === 'edit' && id) {
|
||||
editProject(id);
|
||||
} else if (action === 'delete' && id) {
|
||||
deleteProject(id);
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('gallery-preview').addEventListener('click', function(event) {
|
||||
const removeBtn = event.target.closest('[data-action="remove-gallery-item"]');
|
||||
if (!removeBtn) return;
|
||||
removeGalleryItem(removeBtn);
|
||||
});
|
||||
|
||||
// Filters
|
||||
document.getElementById('category-filter').addEventListener('change', filterProjects);
|
||||
@@ -450,10 +474,10 @@
|
||||
<p class="portfolio-category">${project.category}</p>
|
||||
<p class="portfolio-client">Client: ${project.client || 'N/A'}</p>
|
||||
<div class="portfolio-admin-actions">
|
||||
<button class="btn btn-sm btn-outline" onclick="editProject('${project.id}')">
|
||||
<button class="btn btn-sm btn-outline" data-action="edit" data-id="${project.id}">
|
||||
<i class="fas fa-edit"></i> Edit
|
||||
</button>
|
||||
<button class="btn btn-sm btn-outline btn-danger" onclick="deleteProject('${project.id}')">
|
||||
<button class="btn btn-sm btn-outline btn-danger" data-action="delete" data-id="${project.id}">
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
@@ -585,7 +609,7 @@
|
||||
galleryPreview.innerHTML = existingGallery.map(url =>
|
||||
`<div class="gallery-preview-item" data-url="${url}">
|
||||
<img src="/${url}" alt="Gallery image">
|
||||
<button type="button" class="gallery-remove-btn" onclick="removeGalleryItem(this)"><i class="fas fa-times"></i></button>
|
||||
<button type="button" class="gallery-remove-btn" data-action="remove-gallery-item"><i class="fas fa-times"></i></button>
|
||||
</div>`
|
||||
).join('');
|
||||
}
|
||||
@@ -621,7 +645,7 @@
|
||||
const item = document.createElement('div');
|
||||
item.className = 'gallery-preview-item';
|
||||
item.dataset.galleryIdx = idx;
|
||||
item.innerHTML = `<img src="${ev.target.result}" alt=""><button type="button" class="gallery-remove-btn" onclick="removeGalleryItem(this)"><i class="fas fa-times"></i></button>`;
|
||||
item.innerHTML = `<img src="${ev.target.result}" alt=""><button type="button" class="gallery-remove-btn" data-action="remove-gallery-item"><i class="fas fa-times"></i></button>`;
|
||||
preview.appendChild(item);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
|
||||
Reference in New Issue
Block a user