feat(content): public Blog + Learn sections and static CMS pages (full-stack)

Adds the missing public-facing content pages and their admin authoring, all
powered by the existing content-svc Blog entity discriminated by `kind`.

Backend (content-svc):
- BlogKind enum += Learn, Page (reuses Blog CRUD/SEO/slug/publish for all three).
- SQL migration services/content/migrations/001_blog_kind_learn_page.sql
  (ALTER TYPE content.blog_kind ADD VALUE 'Learn','Page').

Frontend (public, Next.js):
- lib/content-api.ts: fetchArticles(kind) / fetchArticle(slug) / fetchPage(slug)
  with safe empty/null fallbacks.
- components/content: article-ui (card/list/detail + RTL prose), CmsPageContent,
  CmsRoute (admin-authored page or localized built-in fallback copy).
- Routes: /blog, /blog/[slug], /learn, /learn/[slug] and static pages
  /about /contact /careers /privacy /terms /cookies /help.
- Navbar "tutorials" → /learn; all footer links now resolve.

Admin:
- AdminResource: new `fixedValues` option (injects kind on create/update).
- learnConfig (kind=Learn) + pagesConfig (kind=Page) reuse the /v1/blogs endpoint;
  /admin/learn + /admin/pages routes + nav items.

i18n: blog, learn and 7 *Page namespaces added to both fa.json and en.json
(verified key parity); admin nav labels learn/pages. Frontend tsc clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-11 22:43:25 +03:30
parent 6cf8716d7e
commit c92de06c28
25 changed files with 802 additions and 3 deletions
+55
View File
@@ -187,6 +187,59 @@
"socialLinkedIn": "LinkedIn",
"socialYouTube": "YouTube"
},
"blog": {
"metaTitle": "FlatRender Blog",
"metaDescription": "Articles, news and guides on making videos and images.",
"pageTitle": "Blog",
"pageDescription": "The latest articles, news and ideas on creating videos and images.",
"readMore": "Read more",
"views": "views",
"empty": "No articles have been published yet."
},
"learn": {
"metaTitle": "Learn FlatRender",
"metaDescription": "Step-by-step tutorials for making professional videos and images.",
"pageTitle": "Learn",
"pageDescription": "Step-by-step tutorials and practical guides for getting the most out of FlatRender.",
"readMore": "View tutorial",
"views": "views",
"empty": "No tutorials have been published yet."
},
"aboutPage": {
"title": "About Us",
"lead": "FlatRender makes professional video and image creation simple for everyone.",
"body": "FlatRender is an online platform for creating videos and images with ready-made templates and smart tools.\n\nOur mission is to let anyone create professional content in minutes — no design or motion-graphics expertise required."
},
"contactPage": {
"title": "Contact Us",
"lead": "We'd love to hear from you.",
"body": "Reach out for support, partnerships, or any questions.\n\nEmail: support@flatrender.com"
},
"careersPage": {
"title": "Careers",
"lead": "Join the FlatRender team.",
"body": "We're always looking for talented, passionate people.\n\nTo learn about open positions, send your resume to jobs@flatrender.com."
},
"privacyPage": {
"title": "Privacy Policy",
"lead": "How we store and use your information.",
"body": "Your privacy matters to us. This page explains how we collect, use and protect your information.\n\nThis is placeholder text and should be completed by an administrator before final publication."
},
"termsPage": {
"title": "Terms of Service",
"lead": "The rules for using FlatRender.",
"body": "By using FlatRender you agree to the following terms.\n\nThis is placeholder text and should be completed by an administrator before final publication."
},
"cookiesPage": {
"title": "Cookie Policy",
"lead": "How we use cookies.",
"body": "We use cookies to improve your experience on the site.\n\nThis is placeholder text and should be completed by an administrator before final publication."
},
"helpPage": {
"title": "Help Center",
"lead": "Answers to common questions and usage guides.",
"body": "Welcome to the FlatRender Help Center.\n\nFor more questions, check the Learn section or contact support."
},
"auth": {
"signIn": "Sign In",
"signUp": "Sign Up",
@@ -324,6 +377,8 @@
"tags": "Tags",
"fonts": "Fonts",
"blogs": "Blog",
"learn": "Tutorials",
"pages": "Pages",
"slides": "Slides",
"users": "Users",
"plans": "Plans",