product page
This commit is contained in:
@@ -191,6 +191,8 @@
|
|||||||
[data-theme="dark"] .rich-content a { color: var(--color-primary-dark); }
|
[data-theme="dark"] .rich-content a { color: var(--color-primary-dark); }
|
||||||
.rich-content :first-child { margin-top: 0; }
|
.rich-content :first-child { margin-top: 0; }
|
||||||
.rich-content :last-child { margin-bottom: 0; }
|
.rich-content :last-child { margin-bottom: 0; }
|
||||||
|
.rich-summary :where(p) { display: inline; margin: 0; }
|
||||||
|
.rich-summary .product-more-link { margin-left: 0.25rem; }
|
||||||
|
|
||||||
/* Compact rich blurb for product cards: neutralize block spacing so the
|
/* Compact rich blurb for product cards: neutralize block spacing so the
|
||||||
* line-clamp truncation stays tidy regardless of the authored markup. */
|
* line-clamp truncation stays tidy regardless of the authored markup. */
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ artist = Artist
|
|||||||
release-date = Release date
|
release-date = Release date
|
||||||
cover-image = Cover image
|
cover-image = Cover image
|
||||||
description = Description
|
description = Description
|
||||||
|
product-more = more
|
||||||
songs-in-album = Songs in this album
|
songs-in-album = Songs in this album
|
||||||
admin-new-album-desc = Fill in the details, then tick the songs to include.
|
admin-new-album-desc = Fill in the details, then tick the songs to include.
|
||||||
cover-help = Optional - png, jpg, webp or gif; shown on the album page.
|
cover-help = Optional - png, jpg, webp or gif; shown on the album page.
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ artist = Artist
|
|||||||
release-date = Release date
|
release-date = Release date
|
||||||
cover-image = Cover image
|
cover-image = Cover image
|
||||||
description = Description
|
description = Description
|
||||||
|
product-more = more
|
||||||
short-description = Short description
|
short-description = Short description
|
||||||
short-description-hint = Shown on product cards. Keep it short.
|
short-description-hint = Shown on product cards. Keep it short.
|
||||||
songs-in-album = Songs in this album
|
songs-in-album = Songs in this album
|
||||||
|
|||||||
@@ -172,6 +172,7 @@ artist = Interpret
|
|||||||
release-date = Dátum vydania
|
release-date = Dátum vydania
|
||||||
cover-image = Obrázok obalu
|
cover-image = Obrázok obalu
|
||||||
description = Popis
|
description = Popis
|
||||||
|
product-more = viac
|
||||||
short-description = Krátky popis
|
short-description = Krátky popis
|
||||||
short-description-hint = Zobrazuje sa na kartách produktov. Najlepšie krátke.
|
short-description-hint = Zobrazuje sa na kartách produktov. Najlepšie krátke.
|
||||||
songs-in-album = Skladby v albume
|
songs-in-album = Skladby v albume
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -4,6 +4,7 @@
|
|||||||
{% block title %}{{ product.name }}{% endblock title %}
|
{% block title %}{{ product.name }}{% endblock title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
<div class="space-y-12">
|
||||||
<div class="grid gap-10 lg:grid-cols-2">
|
<div class="grid gap-10 lg:grid-cols-2">
|
||||||
<!-- gallery — prev/next arrows + opacity transitions adapted from
|
<!-- gallery — prev/next arrows + opacity transitions adapted from
|
||||||
penguinui/carousel/default-carousel.html; kept our product thumbnail strip
|
penguinui/carousel/default-carousel.html; kept our product thumbnail strip
|
||||||
@@ -67,9 +68,15 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<h1 class="text-3xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong">{{ product.name }}</h1>
|
<h1 class="text-3xl font-bold text-on-surface-strong dark:text-on-surface-dark-strong">{{ product.name }}</h1>
|
||||||
|
|
||||||
{% if product.description %}
|
{% if product.short_description %}
|
||||||
{# Authored as rich text (Quill) in the admin; render the stored HTML. #}
|
<div class="rich-content rich-summary text-on-surface/80 dark:text-on-surface-dark/80">
|
||||||
<div class="rich-content text-on-surface/80 dark:text-on-surface-dark/80">{{ product.description | safe }}</div>
|
{{ 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 %}
|
{% endif %}
|
||||||
|
|
||||||
<template x-if="current">
|
<template x-if="current">
|
||||||
@@ -129,4 +136,12 @@
|
|||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</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 %}
|
{% endblock content %}
|
||||||
|
|||||||
@@ -473,6 +473,7 @@ async fn show(
|
|||||||
"name": product.name,
|
"name": product.name,
|
||||||
"slug": product.slug,
|
"slug": product.slug,
|
||||||
"description": product.description,
|
"description": product.description,
|
||||||
|
"short_description": product.short_description,
|
||||||
"variant_count": 0,
|
"variant_count": 0,
|
||||||
"has_options": false,
|
"has_options": false,
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user