feat: add news section with admin editor and public article view

- NewsSection with animated grid background, category filters, featured cards
- AdminNews list page with toggle publish/featured, pagination
- AdminNewsCreate with TipTap rich text editor, URL validation
- NewsArticle detail page with DOMPurify sanitization, Telegram back button
- Toggle component with WCAG 44px touch targets, role=switch
- Prose styles for highlight marks and responsive iframes
- i18n translations (en, ru, zh, fa)
This commit is contained in:
Fringg
2026-03-23 10:49:46 +03:00
parent 5b12784ab8
commit 99fc33625e
17 changed files with 7750 additions and 70 deletions

View File

@@ -981,6 +981,14 @@ img.twemoji {
@apply my-4 max-w-full rounded-xl;
}
.prose mark {
@apply rounded bg-warning-500/30 px-1 text-dark-100;
}
.prose iframe {
@apply my-4 block aspect-video w-full max-w-2xl rounded-xl;
}
/* Light theme prose styles */
.light .prose {
@apply text-champagne-800;
@@ -1054,6 +1062,14 @@ img.twemoji {
@apply border-champagne-300 text-champagne-700;
}
.light .prose mark {
@apply bg-warning-400/30 text-champagne-900;
}
.light .prose iframe {
@apply border border-champagne-300;
}
/* Support for plain text with line breaks */
.prose-plain {
@apply whitespace-pre-line;
@@ -1522,6 +1538,19 @@ input[type='checkbox']:hover:not(:checked) {
}
}
/* News section shimmer */
@keyframes newsShimmer {
0%,
100% {
opacity: 0.3;
transform: scaleX(0.5);
}
50% {
opacity: 1;
transform: scaleX(1);
}
}
/* User preference: reduce motion */
.reduce-motion,
.reduce-motion * {