Reorganise the views and prepare summary
All checks were successful
Build and Deploy / build-and-push (push) Successful in 23s

This commit is contained in:
2026-03-26 22:29:06 +01:00
parent d9cf61ee74
commit f80b115cae
12 changed files with 1394 additions and 484 deletions

View File

@@ -1,4 +1,4 @@
import { getRecipeListHTML } from './views/RecipeList.js';
import { getRecipeListHTML, setupRecipeList } from './views/RecipeList.js';
import { getFilterHTML, setupFilter } from './views/Filter.js';
import { getRecipeDetailHTML, setupRecipeDetail } from './views/RecipeDetail.js';
import { getMealPlannerHTML, setupMealPlanner } from './views/MealPlanner.js';
@@ -95,36 +95,10 @@ document.addEventListener('DOMContentLoaded', () => {
`;
setupTabs();
setupRecipeList();
setupMealPlanner();
setupPantry();
setupShopping();
setupFilter();
setupRecipeDetail();
});
// --- GLOBAL NAVIGATION METHODS ---
window.openRecipeDetail = () => {
const view = document.getElementById('recipe-detail-view');
// Swap Tailwind classes to slide IN
view.classList.remove('translate-x-full', 'opacity-0', 'pointer-events-none');
view.classList.add('translate-x-0', 'opacity-100', 'pointer-events-auto');
};
window.closeRecipeDetail = () => {
const view = document.getElementById('recipe-detail-view');
// Swap Tailwind classes to slide OUT
view.classList.remove('translate-x-0', 'opacity-100', 'pointer-events-auto');
view.classList.add('translate-x-full', 'opacity-0', 'pointer-events-none');
};
window.openFilters = () => {
const fv = document.getElementById('filter-view');
fv.classList.remove('hidden');
fv.classList.add('flex');
};
window.closeFilters = () => {
const fv = document.getElementById('filter-view');
fv.classList.add('hidden');
fv.classList.remove('flex');
};