- Add "Search by city" toggle as alternative to GPS location - Replace saved cafes button list with select dropdown - Show editable review form when selecting a Foursquare result - Guard all datastar-fetch handlers with in-progress signals - Fix step indicator spacing (mt-4 on steps 2 and 3)
23 lines
1.2 KiB
HTML
23 lines
1.2 KiB
HTML
<div id="nearby-results" class="mt-3 max-h-60 overflow-y-auto rounded-lg border border-amber-200 bg-white">
|
|
{% if cafes.is_empty() %}
|
|
<p class="px-3 py-2 text-sm text-stone-500">No nearby cafes found.</p>
|
|
{% else %}
|
|
<h3 class="px-3 py-2 text-xs font-semibold text-stone-500 uppercase tracking-wide">Nearby</h3>
|
|
{% for cafe in cafes %}
|
|
<button
|
|
type="button"
|
|
class="w-full px-3 py-2 text-left text-sm hover:bg-amber-100 transition"
|
|
data-cafe-name="{{ cafe.name }}"
|
|
data-cafe-city="{{ cafe.city }}"
|
|
data-cafe-country="{{ cafe.country }}"
|
|
data-cafe-lat="{{ cafe.latitude }}"
|
|
data-cafe-lng="{{ cafe.longitude }}"
|
|
data-cafe-website="{{ cafe.website }}"
|
|
data-on:click="$_cafeId = ''; $_cafeName = el.dataset.cafeName; $_cafeCity = el.dataset.cafeCity; $_cafeCountry = el.dataset.cafeCountry; $_cafeLat = parseFloat(el.dataset.cafeLat); $_cafeLng = parseFloat(el.dataset.cafeLng); $_cafeWebsite = el.dataset.cafeWebsite; $_reviewingCafe = true"
|
|
>
|
|
<span class="font-medium text-amber-900">{{ cafe.name }}</span>
|
|
<span class="ml-2 text-xs text-stone-500">{{ cafe.location }} · {{ cafe.distance }}</span>
|
|
</button>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|