feat: add food detail pages for OFF and custom meal sources

Extend the nutrition detail page to support OpenFoodFacts items (looked up
by barcode) and custom meals (with ingredient breakdown). All food diary
cards and search results now link to detail pages regardless of source.
This commit is contained in:
2026-04-09 18:17:39 +02:00
parent 765fbf4613
commit 6029cfe18c
5 changed files with 187 additions and 7 deletions
+1 -1
View File
@@ -434,7 +434,7 @@
</div>
<span class="fs-result-cal">{item.calories}<small> kcal</small></span>
</button>
{#if showDetailLinks && (item.source === 'bls' || item.source === 'usda')}
{#if showDetailLinks && (item.source === 'bls' || item.source === 'usda' || item.source === 'off')}
<a class="fs-detail-link" href="/fitness/{s.nutrition}/food/{item.source}/{item.id}" aria-label="View details">
<ExternalLink size={13} />
</a>