fix(storefront): premium UX polish for static pages
- faq-{ru,en,hy}.component.html: convert each FAQ entry from an always-
expanded <div>/<h3> block into a native <details class="faq-item">/
<summary> disclosure, reusing the global expander-chevron pattern
already defined in styles.scss (no bespoke accordion component built);
answer body wrapped in .faq-answer for spacing
- faq.component.scss: restyle .faq-item for the details/summary shape
(summary uses tokenized font-size/weight, focus-visible ring, [open]
state gets a stronger shadow instead of the old always-on hover-lift);
hardcoded `all 0.3s ease` replaced with --transition-normal on the
specific properties that change; added a reduced-motion override
- shared-legal.scss: hardcoded `transition: all 0.3s ease` (4 call sites:
info-card, features-list feature, contact-item/contact-link,
contact-email) normalized to --transition-normal on transform/
box-shadow/background; paragraphs and lists get max-width: 70ch so
long-form legal/info text keeps a readable line length within the
wider 900px .legal-container
- static-page.component.scss (CMS-driven static-page renderer): spacing
converted to --space-* tokens; prose now capped at 70ch; added actual
content styling (headings, lists, links, images, blockquote, table)
for arbitrary CMS-authored HTML rendered via [innerHTML], since the
previous rules only styled h2/h3 margins and left every other tag
unstyled; line-height moved to --line-height-relaxed token
Build verified green via `npm run build`.
Out of scope / skipped:
- info/contacts has no contact form (plain link list) - no app-input/
app-form-field polish applicable
- no breadcrumbs/anchor nav exist on any page in scope - nothing to
align focus-visible on
- legal-page/info scss files (about, delivery, guarantee, company-
details, payment-terms, privacy-policy, public-offer, return-policy)
already used design tokens with no hex literals and had no accordion/
form elements - left untouched
- shared-legal.scss's border-left accent on .legal-section/.info-box/
.highlight and the fadeIn entrance animation durations left as-is;
pre-existing sitewide pattern, not a new introduction, changing it is
a redesign call outside this pass's scope
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
.static-page {
|
||||
min-height: 45vh;
|
||||
padding-block: var(--space-lg);
|
||||
}
|
||||
|
||||
.static-page__state {
|
||||
padding: 2rem 0;
|
||||
padding: var(--space-xl) 0;
|
||||
display: grid;
|
||||
gap: 0.75rem;
|
||||
gap: var(--space-sm);
|
||||
max-width: 70ch;
|
||||
}
|
||||
|
||||
.static-page__content {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
gap: var(--space-md);
|
||||
max-width: 70ch;
|
||||
|
||||
h1 {
|
||||
color: var(--text-primary, #1e3c38);
|
||||
@@ -18,12 +21,67 @@
|
||||
}
|
||||
}
|
||||
|
||||
// Prose styling for arbitrary CMS-authored HTML rendered via [innerHTML].
|
||||
// Keeps a readable line length and consistent rhythm regardless of what
|
||||
// tags the page editor produced, without touching the sanitized markup.
|
||||
.static-page__html {
|
||||
color: var(--text-primary, #1e3c38);
|
||||
line-height: 1.6;
|
||||
line-height: var(--line-height-relaxed);
|
||||
|
||||
h2,
|
||||
h3 {
|
||||
> * + * {
|
||||
margin-top: var(--space-md);
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: var(--space-lg);
|
||||
margin-bottom: var(--space-sm);
|
||||
}
|
||||
|
||||
h2, h3 {
|
||||
margin-top: 1.25rem;
|
||||
}
|
||||
|
||||
p, ul, ol {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
padding-left: var(--space-lg);
|
||||
}
|
||||
|
||||
li + li {
|
||||
margin-top: var(--space-xs);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--primary-color);
|
||||
|
||||
&:hover {
|
||||
text-decoration-thickness: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 0;
|
||||
padding: var(--space-sm) var(--space-md);
|
||||
border-left: 3px solid var(--border-color);
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: var(--space-sm);
|
||||
border: 1px solid var(--border-color);
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user