feat(ui): add web search page and preview-before-save flow
- /search shows 'Im Internet suchen' CTA when no local hits or always after search - /search/web lists SearXNG hits with domain pill and snippet - /preview loads recipe via preview endpoint and shows unified RecipeView with banner - Save button imports via POST and navigates to the saved recipe Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -48,7 +48,9 @@
|
||||
{:else if searched && hits.length === 0}
|
||||
<section class="empty">
|
||||
<p>Kein Rezept im Bestand für „{query}".</p>
|
||||
<p class="hint">Bald: Internet durchsuchen.</p>
|
||||
<a class="web-btn" href={`/search/web?q=${encodeURIComponent(query)}`}>
|
||||
🌐 Im Internet suchen
|
||||
</a>
|
||||
</section>
|
||||
{:else if hits.length > 0}
|
||||
<ul class="hits">
|
||||
@@ -77,7 +79,11 @@
|
||||
{/each}
|
||||
</ul>
|
||||
{#if canWebSearch}
|
||||
<p class="web-hint muted">Weitersuchen im Internet — Phase 4.</p>
|
||||
<div class="web-cta">
|
||||
<a class="web-btn" href={`/search/web?q=${encodeURIComponent(query)}`}>
|
||||
🌐 Im Internet weitersuchen
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -116,10 +122,6 @@
|
||||
text-align: center;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
.hint {
|
||||
color: #888;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.hits {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
@@ -169,7 +171,21 @@
|
||||
font-size: 0.8rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.web-hint {
|
||||
.web-cta {
|
||||
margin-top: 1.25rem;
|
||||
text-align: center;
|
||||
}
|
||||
.web-btn {
|
||||
display: inline-block;
|
||||
padding: 0.8rem 1.25rem;
|
||||
background: #2b6a3d;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
border-radius: 10px;
|
||||
font-size: 1rem;
|
||||
min-height: 48px;
|
||||
}
|
||||
.empty .web-btn {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user