product page

This commit is contained in:
Priec
2026-06-27 22:27:33 +02:00
parent da2c487dc4
commit 269bb15e6f
7 changed files with 25 additions and 4 deletions

View File

@@ -4,6 +4,7 @@
{% block title %}{{ product.name }}{% endblock title %}
{% block content %}
<div class="space-y-12">
<div class="grid gap-10 lg:grid-cols-2">
<!-- gallery — prev/next arrows + opacity transitions adapted from
penguinui/carousel/default-carousel.html; kept our product thumbnail strip
@@ -67,9 +68,15 @@
{% endif %}
<h1 class="text-3xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong">{{ product.name }}</h1>
{% if product.description %}
{# Authored as rich text (Quill) in the admin; render the stored HTML. #}
<div class="rich-content text-on-surface/80 dark:text-on-surface-dark/80">{{ product.description | safe }}</div>
{% if product.short_description %}
<div class="rich-content rich-summary text-on-surface/80 dark:text-on-surface-dark/80">
{{ product.short_description | safe }}
{% if product.description %}
<a href="#product-description" class="product-more-link inline font-medium text-primary underline underline-offset-4 hover:opacity-75 dark:text-primary-dark">{{ t(key="product-more", lang=lang | default(value='sk')) }}</a>
{% endif %}
</div>
{% elif product.description %}
<a href="#product-description" class="inline-flex text-sm font-medium text-primary underline underline-offset-4 hover:opacity-75 dark:text-primary-dark">{{ t(key="product-more", lang=lang | default(value='sk')) }}</a>
{% endif %}
<template x-if="current">
@@ -129,4 +136,12 @@
</template>
</div>
</div>
{% if product.description %}
<section id="product-description" class="scroll-mt-28 border-t border-outline pt-8 dark:border-outline-dark">
<h2 class="mb-4 text-2xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong">{{ t(key="description", lang=lang | default(value='sk')) }}</h2>
{# Authored as rich text (Quill) in the admin; render the stored HTML. #}
<div class="rich-content text-on-surface/80 dark:text-on-surface-dark/80">{{ product.description | safe }}</div>
</section>
{% endif %}
</div>
{% endblock content %}