Reorganise the views and prepare summary
All checks were successful
Build and Deploy / build-and-push (push) Successful in 23s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 23s
This commit is contained in:
30
js/app.js
30
js/app.js
@@ -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');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user