Move static asset URLs from root-level paths to /static/ prefix mirroring the filesystem layout (e.g. /styles.css → /static/css/styles.css, /components/*.js → /static/js/components/*.js).
55 lines
2.2 KiB
HTML
55 lines
2.2 KiB
HTML
{% extends "base.html" %}
|
|
{% import "partials/detail_cards.html" as detail %}
|
|
{% import "partials/icons.html" as icons %}
|
|
{% block title %}Brewlog · {{ cafe.name }}{% endblock %}
|
|
{% block og_title %}{{ cafe.name }} — Brewlog{% endblock %}
|
|
{% block og_description %}{{ cafe.name }} — {{ cafe.city }}, {{ cafe.country_flag }} {{ cafe.country }}{% endblock %}
|
|
{% block head %}<meta property="og:image" content="{{ base_url }}/static/og-image.png" />{% endblock %}
|
|
{% block content %}
|
|
<header class="flex items-start justify-between gap-4">
|
|
<div class="flex flex-col gap-2">
|
|
<h1 class="text-3xl font-semibold">{{ cafe.name }}</h1>
|
|
<p class="text-sm text-text-secondary">
|
|
{{ cafe.city }}, {{ cafe.country_flag }} {{ cafe.country }} · Added {{ cafe.created_date }}
|
|
</p>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="grid gap-6 md:grid-cols-2">
|
|
<div class="rounded-lg border bg-surface p-5">
|
|
<h2 class="text-lg font-semibold text-text mb-4">Details</h2>
|
|
<dl class="grid grid-cols-2 gap-x-4 gap-y-3 text-sm">
|
|
<div>
|
|
<dt class="text-text-muted">City</dt>
|
|
<dd class="font-medium text-text">{{ cafe.city }}</dd>
|
|
</div>
|
|
<div>
|
|
<dt class="text-text-muted">Country</dt>
|
|
<dd class="font-medium text-text">
|
|
{% if !cafe.country_flag.is_empty() %}{{ cafe.country_flag }} {% endif %}{{ cafe.country }}
|
|
</dd>
|
|
</div>
|
|
{% if let Some(url) = cafe.website %}
|
|
<div>
|
|
<dt class="text-text-muted">Website</dt>
|
|
<dd class="font-medium">
|
|
<a href="{{ url }}" target="_blank" rel="noreferrer noopener" class="text-accent hover:text-accent-hover transition">Visit Website</a>
|
|
</dd>
|
|
</div>
|
|
{% endif %}
|
|
</dl>
|
|
</div>
|
|
|
|
{{ detail::map_with_legend_1(cafe.map_countries, cafe.map_max, "Cafe", "") }}
|
|
</div>
|
|
|
|
{% if is_authenticated %}
|
|
<div class="rounded-lg border bg-surface p-5 flex items-center gap-2">
|
|
<button type="button"
|
|
class="inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium text-red-600 transition hover:bg-surface-alt"
|
|
data-on:click="confirm('Delete this cafe? This cannot be undone.') && @delete('/api/v1/cafes/{{ cafe.id }}')">
|
|
{{ icons::delete("h-4 w-4") }} Delete
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|