diff --git a/make_post_sell/static/css/common.css b/make_post_sell/static/css/common.css index 85d1c14..b184863 100644 --- a/make_post_sell/static/css/common.css +++ b/make_post_sell/static/css/common.css @@ -211,6 +211,7 @@ section { input[type="text"], input[type="tel"], +input[type="email"], input[type="password"], input[type="number"], input[type="date"] { @@ -2064,6 +2065,127 @@ section.checkout-page .well { color: white; } +/* Content card — material-style elevated panel for product page sections + (description, file info, comments). Subtle elevation-1 shadow + light + border gives clear layering against the page surface; generous padding + replaces the loose

separators these sections used to rely + on. Grid only — no flex. */ +.content-card { + background-color: var(--surface-base, #FFFFFF); + border-radius: var(--radius-lg, 12px); + border: 1px solid var(--border-light, #eeeeee); + box-shadow: var(--elevation-1); + padding: var(--space-5, 20px); + margin-bottom: var(--space-4, 16px); + display: grid; + gap: var(--space-3, 12px); +} + +.content-card-header { + margin: 0; + font-size: var(--text-sm, 0.875rem); + font-weight: 700; + letter-spacing: 0.04em; + text-transform: uppercase; + color: var(--text-muted, #777); +} + +.content-card-body { margin: 0; } + +.content-card-meta { + margin: 0; + color: var(--text-muted, #777); + font-size: var(--text-sm, 0.875rem); +} + +[data-theme="dark"] .content-card { + background-color: var(--surface-container, #161b22); + border-color: var(--border-default, #30363d); +} + +/* Comment form polish — applied inside .content-card so it inherits the + panel chrome. Stacked label / control / hint with proper spacing, + inputs and textarea fill the width consistently. Grid only. */ +.comment-form { + display: grid; + gap: var(--space-3, 12px); +} +.comment-form h4 { + margin: 0; + font-size: var(--text-md, 1.125rem); + font-weight: 600; +} +.comment-form form { + display: grid; + gap: var(--space-3, 12px); +} +.comment-form-field { + display: grid; + gap: var(--space-1, 4px); +} +.comment-form label { + margin: 0; + font-weight: 600; +} +.comment-form input[type="text"], +.comment-form input[type="email"], +.comment-form textarea { + width: 100%; + box-sizing: border-box; + padding: var(--space-2, 8px) var(--space-3, 12px); +} +.comment-form textarea { + min-height: 6rem; + resize: vertical; +} +.comment-form .mps-comment-form-button { + justify-self: start; + padding: var(--space-2, 8px) var(--space-4, 16px); +} + +/* Comments list polish — each comment is a soft inset surface within + the parent .content-card so the depth reads clearly. Replies inherit + the same chrome with a left accent. */ +.comments-section { display: grid; gap: var(--space-4, 16px); } +.comments-section h3 { margin: 0; } +#comments-list { display: grid; gap: var(--space-3, 12px); } +.comments-section .comment { + background-color: var(--surface-dim, #f9f9fa); + border-radius: var(--radius-md, 8px); + padding: var(--space-3, 12px) var(--space-4, 16px); + /* The inline `style="margin-left: Npx"` on .comment in the snippet + gives nested replies a stair-step indent; keep that working but + drop the legacy 20px bottom-margin (we use grid gap above). */ + margin-bottom: 0 !important; +} +.comments-section .comment-reply { + border-left: 3px solid var(--color-navy, #5871ad); +} +.comments-section .comment-header { + display: grid; + grid-template-columns: auto auto 1fr; + gap: var(--space-2, 8px); + align-items: baseline; + margin-bottom: var(--space-2, 8px); +} +.comments-section .comment-date { + color: var(--text-muted, #777); + font-size: var(--text-sm, 0.875rem); +} +.comments-section .comment-title { + font-weight: 600; +} +.comments-section .comment-content { + margin-bottom: var(--space-2, 8px); +} + +/* Back-to-shop link on the product page: small secondary link below the + comments card, left-aligned, not stretched to the full row. */ +.product-back-link { + margin-top: var(--space-3, 12px); + justify-self: start; +} + [data-theme="dark"] .one-column.well.well-green, [data-theme="dark"] .action-columns.well.well-green { background-color: var(--dark-button-bg, #2d3748); diff --git a/make_post_sell/templates/product.j2 b/make_post_sell/templates/product.j2 index a23ad5f..bd7cc62 100644 --- a/make_post_sell/templates/product.j2 +++ b/make_post_sell/templates/product.j2 @@ -136,50 +136,45 @@
-
-
- Description -
{{ product.description_html | safe }}
- -
-
+
+

Description

+
{{ product.description_html | safe }}
+ {% if request.shop.show_dates %} +

+ Created {{ product.human_created_timestamp }}{% if product.human_created_timestamp != product.human_updated_timestamp %} · Updated {{ product.human_updated_timestamp }}{% endif %}{% if product.human_view_count %} · {{ product.human_view_count }}{% endif %} +

+ {% endif %} +
{% if product.is_bundle %} {% if product.products_in_this_bundle %} - Bundle Contents - +
+

Bundle Contents

+
    + {% for p in product.products_in_this_bundle %} +
  • {{p.title}}
  • + {% endfor %} +
+
{% endif %} {% elif product.has_product_file %} - File Type -
- {{ product.get_content_type("product") }} {{ product_size }} -
- Please make sure you have an application to open this file type. +
+

File

+

{{ product.get_content_type("product") }} · {{ product_size }}

+

Make sure you have an application to open this file type.

+
{% endif %} - {% if request.shop.show_dates %} -
- Created {{ product.human_created_timestamp }}{% if product.human_created_timestamp != product.human_updated_timestamp %} · Updated {{ product.human_updated_timestamp }}{% endif %}{% if product.human_view_count %} · {{ product.human_view_count }}{% endif %} -
- {% endif %}
-
-
- - {% include 'snippets/comments.j2' %} +
+ {% include 'snippets/comments.j2' %} +
-
- Back to shop + ← Back to shop
diff --git a/make_post_sell/templates/snippets/comments.j2 b/make_post_sell/templates/snippets/comments.j2 index 039c79d..4af6d24 100644 --- a/make_post_sell/templates/snippets/comments.j2 +++ b/make_post_sell/templates/snippets/comments.j2 @@ -85,13 +85,11 @@ -
- - +
+ +
-
-
@@ -107,16 +105,17 @@ -
- - +
+ +
-
- - +
+ +
+ {# Honeypot for spam bots. #} -
-
diff --git a/make_post_sell/templates/styleguide.j2 b/make_post_sell/templates/styleguide.j2 index 11c7dae..2eb897c 100644 --- a/make_post_sell/templates/styleguide.j2 +++ b/make_post_sell/templates/styleguide.j2 @@ -730,6 +730,20 @@ Grid only — no flex.
Coupon container with dotted border. border: 3px dotted #bbb, border-radius: 4px, padding: 20px.
+ +
+
Content card (elevated panel, layered above page)
+
+

Description

+

Reusable elevated card. Layered above the page surface with --elevation-1 and --radius-lg. Used on the product page for description, file info, and the comments panel — each section reads as its own chunk instead of floating in raw text with <br/> separators.

+

Stacked tokens-only: --surface-base background, --border-light border, --elevation-1 shadow, --space-5 padding.

+
+
.content-card — surface-base, border-light, elevation-1, radius-lg +.content-card-header — small uppercase label, var(--text-muted) +.content-card-body — content (paragraphs / lists / forms) +.content-card-meta — small muted meta line (dates, hints) +Dark mode: surface-container + border-default override (auto).
+
@@ -908,6 +922,59 @@ Checkout page: .delete-link — red text, red border on hover .moderate-link — same as reply Dark mode: uses theme background images on hover + +
+
Comment form (inside .content-card)
+
+
+

Leave a Comment

+
+
+ + +
+
+ + +
+
+ +
+
+
+
+
.comment-form — grid, gap var(--space-3) +.comment-form-field — label + control stacked, gap var(--space-1) +inputs / textarea — width:100%, box-sizing:border-box +.mps-comment-form-button — justify-self:start (doesn't span full width) +Hosted inside a .content-card so the panel chrome handles padding/elevation.
+
+ +
+
Sample rendered comment (depth 0 + reply)
+
+
+
+
+ jane-doe + 2 days ago +
+

Great product, fast download. Will recommend.

+
+
+
+ shop-owner + 1 day ago +
+

Thanks for the review, jane-doe!

+
+
+
+
.comments-section .comment — soft surface-dim card, radius-md +.comments-section .comment-reply — left accent in --color-navy +.comment-header — grid auto auto 1fr, baseline-aligned +The snippet sets inline margin-left for depth-N replies (depth * 20px).
+