about page
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
brand = Tennis Court Booking
|
||||
brand = Tenis Rajec
|
||||
nav-calendar = Calendar
|
||||
nav-admin = Admin login
|
||||
admin-title = Admin
|
||||
@@ -63,3 +63,12 @@ hour-from = From
|
||||
hour-to = Until
|
||||
repeat-weeks = Repeat for (weeks)
|
||||
repeat-hint = 1 books a single week. A higher number repeats the same hours every following week.
|
||||
nav-about = About
|
||||
about-title = About us
|
||||
about-edit = Edit page
|
||||
back-to-about = Back to About
|
||||
about-heading = Heading
|
||||
about-body = Description
|
||||
about-address = Address
|
||||
about-phone = Phone
|
||||
about-email = Email
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
brand = Rezervácia tenisového kurtu
|
||||
brand = Tenis Rajec
|
||||
nav-calendar = Kalendár
|
||||
nav-admin = Prihlásenie admina
|
||||
admin-title = Admin
|
||||
@@ -63,3 +63,12 @@ hour-from = Od
|
||||
hour-to = Do
|
||||
repeat-weeks = Opakovať (počet týždňov)
|
||||
repeat-hint = 1 rezervuje jeden týždeň. Vyššie číslo opakuje rovnaké hodiny každý ďalší týždeň.
|
||||
nav-about = O nás
|
||||
about-title = O nás
|
||||
about-edit = Upraviť stránku
|
||||
back-to-about = Späť na stránku O nás
|
||||
about-heading = Nadpis
|
||||
about-body = Popis
|
||||
about-address = Adresa
|
||||
about-phone = Telefón
|
||||
about-email = E-mail
|
||||
|
||||
51
ht_booking/assets/views/about.html
Normal file
51
ht_booking/assets/views/about.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ t(key="about-title", lang=lang) }}{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="mx-auto max-w-2xl">
|
||||
<div class="mb-4 flex items-center justify-between gap-2">
|
||||
<h1 class="text-2xl font-bold">
|
||||
{% if title %}{{ title }}{% else %}{{ t(key="about-title", lang=lang) }}{% endif %}
|
||||
</h1>
|
||||
{% if logged_in | default(value=false) %}
|
||||
<a href="/admin/about" class="btn btn-ghost btn-sm">{{ t(key="about-edit", lang=lang) }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="card border border-base-300 bg-base-100 shadow-sm">
|
||||
<div class="card-body gap-4">
|
||||
{% if body %}
|
||||
<p class="whitespace-pre-line leading-relaxed">{{ body }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if address or phone or email %}
|
||||
<dl class="divide-y divide-base-300 border-t border-base-300 pt-1">
|
||||
{% if address %}
|
||||
<div class="flex justify-between gap-4 py-2">
|
||||
<dt class="text-sm opacity-70">{{ t(key="about-address", lang=lang) }}</dt>
|
||||
<dd class="whitespace-pre-line text-right text-sm font-medium">{{ address }}</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if phone %}
|
||||
<div class="flex justify-between gap-4 py-2">
|
||||
<dt class="text-sm opacity-70">{{ t(key="about-phone", lang=lang) }}</dt>
|
||||
<dd class="text-right text-sm font-medium">
|
||||
<a href="tel:{{ phone }}" class="link link-hover">{{ phone }}</a>
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if email %}
|
||||
<div class="flex justify-between gap-4 py-2">
|
||||
<dt class="text-sm opacity-70">{{ t(key="about-email", lang=lang) }}</dt>
|
||||
<dd class="text-right text-sm font-medium">
|
||||
<a href="mailto:{{ email }}" class="link link-hover">{{ email }}</a>
|
||||
</dd>
|
||||
</div>
|
||||
{% endif %}
|
||||
</dl>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
43
ht_booking/assets/views/admin/about_form.html
Normal file
43
ht_booking/assets/views/admin/about_form.html
Normal file
@@ -0,0 +1,43 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ t(key="about-edit", lang=lang) }}{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="mx-auto max-w-2xl">
|
||||
<div class="mb-4 flex items-center justify-between">
|
||||
<h1 class="text-2xl font-bold">{{ t(key="about-edit", lang=lang) }}</h1>
|
||||
<a href="/about" class="btn btn-ghost btn-sm">« {{ t(key="back-to-about", lang=lang) }}</a>
|
||||
</div>
|
||||
|
||||
<div class="card border border-base-300 bg-base-100 shadow-sm">
|
||||
<div class="card-body">
|
||||
<form method="post" action="/admin/about" class="space-y-2">
|
||||
<div class="form-control">
|
||||
<label class="label"><span class="label-text">{{ t(key="about-heading", lang=lang) }}</span></label>
|
||||
<input name="title" value="{{ title }}" class="input input-bordered w-full">
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label class="label"><span class="label-text">{{ t(key="about-body", lang=lang) }}</span></label>
|
||||
<textarea name="body" rows="8" class="textarea textarea-bordered w-full">{{ body }}</textarea>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label class="label"><span class="label-text">{{ t(key="about-address", lang=lang) }}</span></label>
|
||||
<textarea name="address" rows="2" class="textarea textarea-bordered w-full">{{ address }}</textarea>
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label class="label"><span class="label-text">{{ t(key="about-phone", lang=lang) }}</span></label>
|
||||
<input name="phone" value="{{ phone }}" class="input input-bordered w-full">
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label class="label"><span class="label-text">{{ t(key="about-email", lang=lang) }}</span></label>
|
||||
<input name="email" type="email" value="{{ email }}" class="input input-bordered w-full">
|
||||
</div>
|
||||
<div class="flex items-center gap-2 pt-2">
|
||||
<button class="btn btn-neutral">{{ t(key="save", lang=lang) }}</button>
|
||||
<a href="/about" class="btn btn-ghost">{{ t(key="cancel", lang=lang) }}</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
@@ -93,6 +93,7 @@
|
||||
<!-- Page links — inline on desktop, tucked into a menu on mobile. -->
|
||||
<div class="hidden items-center gap-1 md:flex">
|
||||
<a href="/" class="btn btn-ghost btn-sm">{{ t(key="nav-calendar", lang=lang) }}</a>
|
||||
<a href="/about" class="btn btn-ghost btn-sm">{{ t(key="nav-about", lang=lang) }}</a>
|
||||
{% if logged_in | default(value=false) %}
|
||||
<a href="/admin" class="btn btn-ghost btn-sm">{{ t(key="admin-title", lang=lang) }}</a>
|
||||
<a href="/admin/courts" class="btn btn-ghost btn-sm">{{ t(key="manage-courts", lang=lang) }}</a>
|
||||
@@ -115,6 +116,7 @@
|
||||
<div tabindex="0"
|
||||
class="dropdown-content z-50 mt-3 flex w-52 flex-col gap-1 rounded-box border border-base-300 bg-base-100 p-2 shadow-lg">
|
||||
<a href="/" class="btn btn-ghost btn-sm justify-start">{{ t(key="nav-calendar", lang=lang) }}</a>
|
||||
<a href="/about" class="btn btn-ghost btn-sm justify-start">{{ t(key="nav-about", lang=lang) }}</a>
|
||||
{% if logged_in | default(value=false) %}
|
||||
<a href="/admin" class="btn btn-ghost btn-sm justify-start">{{ t(key="admin-title", lang=lang) }}</a>
|
||||
<a href="/admin/courts" class="btn btn-ghost btn-sm justify-start">{{ t(key="manage-courts", lang=lang) }}</a>
|
||||
|
||||
Reference in New Issue
Block a user