Redesign recipe list

This commit is contained in:
2026-04-06 11:20:25 +02:00
parent 0aa8d12c1e
commit 2b0601956f
7 changed files with 604 additions and 129 deletions

View File

@@ -8,7 +8,7 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="Recipe">
<title>Recipe App - Modular</title>
<link rel="manifest" href="./manifest.webmanifest">
<link rel="manifest" href="./manifest.webmanifest?v=20260406-9">
<link rel="icon" type="image/png" sizes="192x192" href="./icons/icon-192.png">
<link rel="apple-touch-icon" href="./icons/apple-touch-icon.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
@@ -228,6 +228,11 @@
#pantry-view {
background: rgb(var(--app-bg-rgb)) !important;
}
#main-view,
#main-view > div:last-child,
#recipe-grid {
background: #2d2e2b !important;
}
#planner-view,
#planner-view > div:first-child,
#planner-scroll,
@@ -248,15 +253,15 @@
/* Cards and sheets */
#recipe-grid > div {
background: linear-gradient(180deg, rgba(var(--surface-rgb), 0.94), rgba(var(--surface-soft-rgb), 0.97)) !important;
border-color: rgba(var(--line-rgb), 0.14) !important;
background: #393937 !important;
border: none !important;
border-radius: 1.75rem !important;
box-shadow: var(--panel-shadow) !important;
box-shadow: none !important;
transition: transform 180ms ease, box-shadow 180ms ease !important;
}
#recipe-grid > div:hover {
transform: translateY(-2px);
box-shadow: var(--panel-shadow-strong) !important;
box-shadow: none !important;
}
#recipe-grid > div img {
transition: transform 240ms ease;
@@ -272,6 +277,48 @@
background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(var(--app-bg-rgb), 0.5) 92%);
pointer-events: none;
}
#recipe-search-shell {
min-height: 2.75rem;
border-radius: 1.7rem;
background: #3a3b38 !important;
border: 1px solid rgba(79, 81, 76, 0.95) !important;
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.045),
0 0 0 1px rgba(255, 255, 255, 0.015) !important;
}
#recipe-search-shell:focus-within {
background: #3a3b38 !important;
border: 1px solid rgba(92, 94, 88, 0.98) !important;
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.05),
0 0 0 1px rgba(255, 255, 255, 0.02) !important;
}
#recipe-search-input {
appearance: none;
-webkit-appearance: none;
background: transparent !important;
border: none !important;
box-shadow: none !important;
backdrop-filter: none !important;
color: #dfd9cf !important;
caret-color: #dfd9cf;
font-size: 15px;
font-weight: 400;
letter-spacing: -0.02em;
}
#recipe-search-input::placeholder {
color: #beb8ae !important;
opacity: 1;
}
#recipe-filter-btn {
border-radius: 999px;
background: transparent !important;
border: none !important;
box-shadow: none !important;
}
#recipe-filter-btn:hover {
background: rgba(255, 255, 255, 0.03) !important;
}
#planner-picker-sheet,
#planner-ing-sheet,
#pv2-edit-sheet,
@@ -331,10 +378,61 @@
</div>
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('./sw.js', { scope: './' }).catch(() => {});
}
const APP_ASSET_VERSION = '20260406-9';
const APP_VERSION_STORAGE_KEY = 'recipe-app-asset-version';
const APP_VERSION_QUERY_KEY = 'appv';
window.__APP_ASSET_VERSION__ = APP_ASSET_VERSION;
window.__APP_BOOTSTRAP__ = (async () => {
try {
const previousVersion = localStorage.getItem(APP_VERSION_STORAGE_KEY);
if (previousVersion === APP_ASSET_VERSION) return;
localStorage.setItem(APP_VERSION_STORAGE_KEY, APP_ASSET_VERSION);
if ('serviceWorker' in navigator) {
const registrations = await navigator.serviceWorker.getRegistrations().catch(() => []);
await Promise.all(registrations.map((registration) => registration.unregister().catch(() => false)));
}
if ('caches' in window) {
const cacheKeys = await caches.keys().catch(() => []);
await Promise.all(cacheKeys.map((key) => caches.delete(key).catch(() => false)));
}
const nextUrl = new URL(window.location.href);
if (nextUrl.searchParams.get(APP_VERSION_QUERY_KEY) !== APP_ASSET_VERSION) {
nextUrl.searchParams.set(APP_VERSION_QUERY_KEY, APP_ASSET_VERSION);
window.location.replace(nextUrl.toString());
await new Promise(() => {});
}
} catch (_) {
/* Ignore bootstrap cache reset errors and continue loading the app. */
}
})();
</script>
<script type="module">
const appVersion = window.__APP_ASSET_VERSION__ || '20260406-9';
try {
await window.__APP_BOOTSTRAP__;
} catch (_) {
/* Ignore bootstrap cache reset errors and continue loading the app. */
}
if ('serviceWorker' in navigator) {
try {
const registration = await navigator.serviceWorker.register(`./sw.js?v=${encodeURIComponent(appVersion)}`, {
scope: './',
updateViaCache: 'none',
});
registration.update().catch(() => {});
} catch (_) {
/* Ignore service worker registration failures. */
}
}
await import(`./js/app.js?v=${encodeURIComponent(appVersion)}`);
</script>
<script type="module" src="js/app.js?v=18"></script>
</body>
</html>