# Teknav Frontend Design System — Complete Reference (v6226) > **Disclaimer**: This document is a complete design reference for the Teknav frontend (a Persian RTL React SPA at teknav.ir). Every color, spacing, typography, component state, animation, responsive breakpoint, and layout pattern is documented below. After reading this document, the reader should be able to reconstruct the entire UI verbatim without ever seeing the live site. --- ## 1. IDENTITY & BRAND ### 1.1 Brand Overview - **Name (Persian)**: تکناو (Teknav) - **Tagline (Persian)**: روایت عمیق فناوری / تحلیل فناوری، هوش مصنوعی و امنیت سایبری - **Tagline (English)**: Deep technology narrative - **English Sub-brand**: TEKNAV (all-caps, letter-spacing 0.15em–0.32em) - **Domain**: teknav.ir - **Language**: fa-IR (Persian), RTL; secondary LTR for TekRAG English article - **Category**: Technology analysis media — AI, data science, cybersecurity, software, hardware, startups, future tech - **Year Established**: Static copyright reads "۱۴۰۵" (2026) ### 1.2 Brand Voice - Authoritative, data-driven, academic yet accessible - Persian-first RTL, technical Persian terminology - Uses formal Persian greetings ("صبح بخیر", "شب بخیر") with time-based greeting on login - "Learner" tone — content is deep analysis, not breaking news ### 1.3 Logo & Wordmark **Header Logo:** - Wordmark "تکناو" in Vazirmatn 900 weight, 22px font size, color #0F6B73 - Sub-label "TEKNAV" below in sans-serif 9px, letter-spacing 0.15em, color #5F6B6D - Clickable (navigates to /) - Hamburger menu icon on mobile (3 horizontal lines, SVG 20x20, stroke #263238, strokeWidth 2) **Footer Logo:** - "تکناو" in PelakFA 900, 28px, color #0F2A2E - "TEKNAV" below in 11px, letter-spacing 0.18em, color #C46A4D, weight 700 **Auth Page Logo (Brand Panel):** - Gold gradient square (26px radius) with "ت" character in center on dark background - Dashed and solid orbiting rings around logo with animation - Gradient: linear-gradient(145deg, #C8951C 0%, #F4C36A 50%, #C8951C 100%) - Character: color #0B2226, font-size 44px, weight 900 **Auth Page Mobile Logo:** - Same gold gradient square 44x44px, boxShadow '0 4px 14px rgba(200,149,28,0.3)' - "ت" character at 21px, #0F2A2E - Wordmark "تکناو" at 24px, PelakFA, #0F2A2E **Favicon:** - /favicon.ico (ICO format) - /favicon.png 512x512 (PNG, apple-touch-icon and PWA) --- ## 2. COLOR SYSTEM ### 2.1 Primary Palette | Token | Hex | Usage | Shade Name | |---|---|---|---| | `--tek-teal` | `#0F6B73` | Primary brand, links, buttons, active states, header logo, borders | Deep Teal | | `--tek-teal-dark` | `#0F2A2E` | Headings, premium banners, dark brand text | Dark Teal | | `--tek-teal-light` | `#0F6B7318` | Background tints (18% opacity) | Light Teal Tint | | `--tek-terracotta` | `#C46A4D` | Login button, stats accent, profile primary | Terracotta | | `--tek-terracotta-light` | `#C46A4D18` | Background tints | Light Terracotta | | `--tek-gold` | `#D49A2A` | Shimmer text, badges, premium, brand panel | Gold | | `--tek-gold-light` | `#D49A2A0A` | Blockquote backgrounds, tints | Light Gold | | `--tek-gold-dark` | `#A8761B` | Gold gradient endpoints | Dark Gold | | `--tek-green` | `#2F8F6B` | Success, published status, positive metrics | Warm Green | | `--tek-green-light` | `#E8F4EF` | Profile expertise tags, follow states | Light Green | | `--tek-cream` | `#FAF7F0` | Page body background, splash bg | Cream | | `--tek-cream-dark` | `#F4EFE6` | Panels, secondary backgrounds, hover states | Dark Cream | | `--tek-sand` | `#ebe3d2` | Footer background, stats bar, newsletter box | Sand | | `--tek-line` | `#E4DDD2` | Borders, dividers, scrollbar thumb | Border Line | | `--tek-ink` | `#263238` | Body text, headings primary | Ink | | `--tek-muted` | `#5F6B6D` | Secondary text, metadata | Muted | | `--tek-muted-light` | `#9AA5A6` | Tertiary text, hints, placeholders in auth | Muted Light | | `--tek-white` | `#fff` | Card backgrounds, code blocks, contrast surfaces | White | | `--tek-red` | `#C94C4C` | Error, danger, breaking news badge, delete | Red | | `--tek-red-light` | `#C94C4D0A` | Error backgrounds, security alerts | Light Red | ### 2.2 Article Type Color Map (Badges) | Type | Background | Text | |---|---|---| | تحلیل عمیق (Deep Analysis) | `#0F6B73` | `#fff` | | راهنمای فنی (Technical Guide) | `#D49A2A` | `#fff` | | داده‌نما (Data Visualization) | `#C76D4A` | `#fff` | | پژوهش (Research) | `#2F8F6B` | `#fff` | | راستی‌آزمایی‌شده (Fact-checked) | `#263238` | `#fff` | | خبر فوری (Breaking News) | `#C94C4C` | `#fff` | | خبر تحلیلی (Analytical News) | `#5F6B6D` | `#fff` | | پرونده (Dossier) | `#20343A` | `#FAF7F0` | | default | `#E4DDD2` | `#263238` | ### 2.3 Status Color Map | Status | Color | |---|---| | منتشرشده (Published) | `#2F8F6B` | | پیش‌نویس (Draft) | `#5F6B6D` | | در انتظار بررسی (Pending Review) | `#D49A2A` | | نیازمند اصلاح (Needs Revision) | `#C94C4C` | | زمان‌بندی‌شده (Scheduled) | `#0F6B73` | ### 2.4 Role Color Map | Role | Color | Persian Label | |---|---|---| | admin | `#C76D4A` | مدیر کل | | editor | `#0F6B73` | سردبیر | | writer | `#D49A2A` | نویسنده | | reviewer | `#2F8F6B` | بازبین | | reader | `#5F6B6D` | خواننده | ### 2.5 Profile Page Color Palette (Terracotta-oriented) The profile page (`teknav-profile.jsx`) uses its own color system separate from main site teal: | Token | Hex | Usage | |---|---|---| | terracotta | `#C45C3D` | Primary action color (buttons, links, accent bars) | | orange | `#E07A3A` | Secondary accent (counters, analytics) | | green | `#3A7D5E` | Success states, expertise tags, toggle on | | greenLight | `#E8F4EF` | Background for green-tagged elements | | ink | `#263238` | Headings, body text | | muted | `#5F6B6D` | Secondary text, metadata | | cream | `#FAF7F0` | Page background | | panel | `#F4EFE6` | Card/panel background | | line | `#E4DDD2` | Borders | | white | `#fff` | Card surfaces | ### 2.6 Category Colors | Category slug | Color | Usage | |---|---|---| | ai | `#0F6B73` | Teal — AI / هوش مصنوعی | | data | `#2F8F6B` | Green — Data Science / علم داده | | security | `#C62828` | Red — Security / امنیت سایبری | | software | `#1565C0` | Blue — Software / نرم‌افزار | | hardware | `#6A1B9A` | Purple — Hardware / سخت‌افزار | | startup | `#C76D4A` | Terracotta — Startup / استارتاپ | | future | `#D49A2A` | Gold — Future Tech / آینده فناوری | Category badges use the color at 18% opacity for background (via `color + '18'` CSS) and the full color for text, with a 30% opacity border. ### 2.7 Gradient Definitions - **Hero background glows**: `radial-gradient(circle, rgba(15,107,115,0.10) 0%, transparent 70%)` and `radial-gradient(circle, rgba(196,106,77,0.10) 0%, transparent 70%)` - **Gold shimmer text**: `linear-gradient(90deg, #A8761B 0%, #D49A2A 30%, #F4C36A 50%, #D49A2A 70%, #A8761B 100%)` - **Footer accent bar**: `linear-gradient(90deg, transparent 0%, #0F6B73 25%, #D49A2A 50%, #C46A4D 75%, transparent 100%)` - **Streak widget**: `linear-gradient(135deg, #FF9D6C 0%, #C46A4D 100%)` - **Premium gate**: `linear-gradient(135deg, #0F2A2E 0%, #1A3A40 100%)` - **Gold button (auth)**: `linear-gradient(135deg, #C8951C 0%, #D49A2A 60%, #C8951C 100%)` - **Profile banner**: `linear-gradient(145deg, #FDF6EE 0%, #F7EDE0 55%, #EEF5F0 100%)` - **Verdict section (comparison)**: `#0F3540` (solid dark teal background) - **Newsletter box**: `#ebe3d2` solid with radial gradient decorative circles - **Category page**: `linear-gradient(135deg, ${cat.color}18 0%, #F4EFE6 100%)` - **CVE summary card**: `linear-gradient(135deg, #EEF6F7 0%, #E8F3F4 100%)` - **Article diagram card**: `linear-gradient(135deg, #F4EFE6 0%, #FFFFFF 100%)` - **TekRAG diagram card**: `#FAFAFA` solid with `#E8E8E8` border - **Gold logo glow (auth)**: logoGlow animation shadow `0 10px 36px rgba(200,149,28,0.35)` -> `0 10px 56px rgba(200,149,28,0.6)` --- ## 3. TYPOGRAPHY ### 3.1 Font Families **Primary (Body) — Vazirmatn:** - Font family: `'Vazirmatn', system-ui, sans-serif` - 6 weights loaded (all TrueType): 400 (Regular), 500 (Medium), 600 (SemiBold), 700 (Bold), 800 (ExtraBold), 900 (Black) - Source: `/fonts/Vazirmatn-{weight}.ttf` (self-hosted, zero CDN) - `font-display: swap` **Display (Headlines) — PelakFA:** - Font family: `'PelakFA', 'Vazirmatn', sans-serif` - 2 weights loaded (WOFF): 700 (Bold), 800 (ExtraBold) - Source: `/fonts/PelakFA-{weight}.woff` (self-hosted, zero CDN) - Used for: hero headlines, auth brand wordmark, footer headings, section titles, stats numbers **TekRAG Article — Inter/Arial:** - English article pages use `'Inter', Arial, sans-serif` - Fallback for code blocks: `'Courier New', Consolas, monospace` - LTR direction ### 3.2 Font Sizes & Line Heights **Body Scale:** - Article content body: 16px, line-height 2.0 - Body paragraph (general): 14px–16px - Small/secondary: 13px, line-height 1.7–1.9 - X-small/metadata: 12px, line-height 1.7 - Tiny/labels: 11px - Micro/badges: 10px–11px **Heading Scale:** - Hero H1 (homepage): `clamp(34px, 5.4vw, 58px)`, line-height 1.25, PelakFA 800 - Article H1: `clamp(22px, 4vw, 34px)`, line-height 1.4, Vazirmatn 900 - Section H2 (homepage): 22px, Vazirmatn 800 - Article H2: 22px, Vazirmatn 800 - Article H3: 18px, Vazirmatn 700 - Category page H1: `clamp(28px, 5vw, 42px)`, Vazirmatn 900 - Featured headline: 18px (homepage sidebar card), PelakFA 700 - Article header subtitle: 18px, color #5F6B6D, weight 400 **Article Content Typography:** - Lead paragraph: 18px, line-height 2.05, color #1A3035, weight 500 - Body: 16px, line-height 2.0, color #263238 - Blockquote: 16px, line-height 2.0, color #263238 - Code inline: 13px (code:not(pre code)) - Code block: 13.5px, line-height 1.85, monospace ### 3.3 Font Weights Usage | Weight | CSS Variable | Usage | |---|---|---| | 400 (Regular) | `font-weight: 400` | Body text, paragraphs, meta | | 500 (Medium) | `font-weight: 500` | Lead paragraphs, some labels | | 600 (SemiBold) | `font-weight: 600` | Buttons, category badges, active filters | | 700 (Bold) | `font-weight: 700` | H3, subheadings, type badges, filter chips | | 800 (ExtraBold) | `font-weight: 800` | H1, H2, section titles, stat values, article titles | | 900 (Black) | `font-weight: 900` | Hero headlines, prominent numbers, stat counters | ### 3.4 CSS Class-Based Typography | Class | Properties | |---|---| | `.lead` | 18px, line-height 2.05, #1A3035, weight 500, white bg, 1px #E4DDD2 border, 4px #0F6B73 right border, 12px radius, 20px 22px padding | | `.gold-shimmer` | Animated gold gradient text via background-clip | | `.ltr` | direction: ltr, unicode-bidi: isolate, display inline-block, font-family Inter/Arial | --- ## 4. SPACING & LAYOUT ### 4.1 Page Structure - **Page max-width**: 1280px (centered with `margin: 0 auto`) - **Article max-width content**: 760px (Persian), 860px (TekRAG English) - **Header height**: 64px (desktop), 56px (mobile <560px) - **Header padding**: 0 24px (desktop), 0 14px (mobile) - **Footer padding**: 56px 24px 28px, margin-top 80px - **Page padding-top**: 64px (to offset fixed header) - **Article list page padding-top**: 80px - **Auth page**: split-panel, no header/footer ### 4.2 Grid Systems **Homepage grids:** - Article cards: `repeat(auto-fill, minmax(280px, 1fr))`, gap 20px - Featured article: `1fr 1fr` (two-column), min-height 280px - Authors: `repeat(auto-fill, minmax(200px, 1fr))`, gap 16px - Categories: `repeat(auto-fill, minmax(200px, 1fr))`, gap 12px - Stats bar: `repeat(auto-fit, minmax(180px, 1fr))`, gap 16px - Newsletter box: single column centered, max-width 520px for text **Article list grids:** - Article rows: `1fr 140px` (text column + thumbnail column), gap 24px - Related articles: `repeat(auto-fill, minmax(220px, 1fr))`, gap 16px **Article detail grids:** - Layout: `200px 1fr` (TOC sidebar + article content), gap 48px - Author box: flex row with gap 16px - Series nav banner: flex space-between, gap 12px **Search layout:** - Two-column: `240px 1fr`, gap 32px (filters sidebar + results) **Category page:** - Hero: `1fr 320px`, gap 40px (text + diagram) **Profile page:** - Own profile grid: `1fr 1fr`, gap 16px (reading history + followed writers) - Analytics cards: `repeat(3, 1fr)`, gap 14px - Badges: horizontal flex wrap, gap 10px **Comparison page:** - Cards: flex `1 1 300px`, gap 20px - Use cases: flex `1 1 280px`, gap 20px **Directory page:** - Companies: `repeat(auto-fill, minmax(280px, 1fr))`, gap 16px **Stories list page:** - Grid: `repeat(auto-fill, minmax(160px, 1fr))`, gap 14px - Aspect ratio: padding-bottom 177% (portrait phone ratio) **Footer grid:** - `repeat(auto-fit, minmax(200px, 1fr))`, gap 40px (5 sections) ### 4.3 Border Radii | Radius | Usage | |---|---| | 3px | Type badges (small), role badges | | 4px | Category badges, inline code blocks, tag pills | | 6px | Skill tags, progress bars, skeleton loaders, small buttons | | 8px | Buttons (pillBtn), inputs, cards, thumbnails, icons, search bar | | 10px | Article hero diagram, notification dropdown, comment cards, filter chips, search results | | 12px | Article cards, featured card, category cards, profile cards, modals, auth form sections, sendBeacon sections | | 14px | Stories cards | | 16px | Featured article (homepage hero), newsletter box, comparison verdict, premium gate, company profile header, reading list modal | | 18px | Forgot password modal | | 20px | Newsletter box, some containers | | 999px | Pill badges, verified expert badges, status badges with dot | ### 4.4 Shadows | Shadow | Usage | |---|---| | `0 2px 12px rgba(0,0,0,0.04)` | Default article card | | `0 8px 32px rgba(0,0,0,0.1)` | Article card hover | | `0 4px 24px rgba(0,0,0,0.06)` | Featured article default | | `0 12px 48px rgba(0,0,0,0.12)` | Featured article hover | | `0 14px 40px rgba(15,42,46,0.08)` | Hero sidebar featured card | | `0 6px 22px rgba(15,107,115,0.28)` | Hero CTA button | | `0 10px 28px rgba(15,107,115,0.35)` | Hero CTA button hover | | `0 4px 20px rgba(0,0,0,0.06)` | Category hero diagram card | | `0 4px 20px rgba(196,92,61,0.15)` | Profile avatar | | `0 20px 60px rgba(0,0,0,0.2)` | Confirm modal | | `0 24px 64px rgba(0,0,0,0.22)` | Profile settings modal | | `0 32px 80px rgba(0,0,0,0.24)` | Forgot password modal | | `0 4px 16px rgba(200,149,28,0.22)` | Auth gold button | | `0 12px 40px rgba(0,0,0,0.22)` | Push notification prompt | | `0 4px 16px rgba(0,0,0,0.4)` | Quote sharer tooltip | | `0 16px 44px rgba(0,0,0,0.14)` | Notification dropdown | | `0 12px 34px rgba(15,42,46,0.06)` | Article diagram card | | `0 4px 15px rgba(196,106,77,0.3)` | Streak widget | | `-4px 0 24px rgba(0,0,0,0.12)` | Mobile drawer | | `0 1px 4px rgba(0,0,0,0.05)` | Badge pills | | `0 8px 24px rgba(0,0,0,0.08)` | Author card hover | | `0 4px 16px rgba(0,0,0,0.09)` | Comparison card hover | | `0 8px 24px rgba(0,0,0,0.07)` | Article mini-card hover (profile) | | `0 4px 14px rgba(200,149,28,0.3)` | Auth mobile logo | ### 4.5 Gap / Padding Scale | Value | Common Usage | |---|---| | 4px | Very tight spacing (verified badge inner) | | 6px | Badge wrapping, tight element groups | | 8px | Button icon spacing, filter chip gaps, tight sections | | 10px | Toast gaps, icon-text spacing | | 12px | Element clusters, tag wrapping, breadcrumb gaps | | 14px | Input padding, button padding (auth) | | 16px | General card padding, section spacing, grid gaps | | 18px | Code block padding, some card padding | | 20px | Card padding, grid gaps, section padding | | 24px | Page padding, card padding, section margins | | 28px | Toast bottom position, large margins | | 32px | Page sections, padding, gaps | | 40px | Section spacing, hero padding | | 44px | Auth form padding (mobile) | | 48px | Section spacing, auth padding desktop | | 52px | Profile hero padding | | 56px | Footer padding top | | 60px | Empty state padding | | 64px | Header offset | --- ## 5. COMPONENT DESIGN SYSTEM ### 5.1 Header **Structure:** - Fixed position, top:0, right:0, left:0, z-index:100 - Background: `rgba(250,247,240,0.95)` (scrolled) or `rgba(250,247,240,0.85)` (default), backdrop-filter blur(12px) - Border-bottom: 1px solid #E4DDD2 (scrolled) or transparent (default) - Height: 64px (desktop), 56px (<560px) - Inner max-width: 1280px, margin auto, padding 0 24px - Flex layout: logo | nav | actions **Navigation Items (desktop):** 1. خانه (/) — Home 2. هوش مصنوعی (/category/ai) — AI 3. علم داده (/category/data) — Data Science 4. استارتاپ (/category/startup) — Startup 5. امنیت (/category/security) — Security 6. سخت‌افزار (/category/hardware) — Hardware 7. نرم‌افزار (/category/software) — Software 8. آینده فناوری (/category/future) — Future Tech 9. نویسندگان (/authors) — Authors **Nav Item States:** - Default: font-size 13px, color #263238, weight 400 - Active (current page): color #0F6B73, weight 700, border-bottom 2px solid #0F6B73 - Hover: no explicit hover (transition on all 0.15s) **Action Buttons (right side):** - Search icon: SVG circle + path magnifying glass, 18x18px, stroke #263238, strokeWidth 2 - Notification bell: SVG bell icon, 18x18px, with badge counter (red #C94C4C circle, 17px min-width, 9px radius, white text) - Admin button: pillBtn, background #0F6B73, color #fff - Profile button: pillBtn, background #F4EFE6, color #263238, shows @username - Logout button: pillBtn, background #F4EFE6, color #263238 - Login button: pillBtn, background #C46A4D, color #fff, text "ورود / ثبت‌نام" **Search Bar (expandable):** - Toggled by search icon button - Full-width strip below header, borderTop 1px solid #E4DDD2, background #FAF7F0, padding 12px 24px - Form max-width 600px, centered, flex gap 8px - Input: inputStyle, placeholder "جستجو در مقاله‌ها، نویسندگان و دسته‌بندی‌ها..." - Submit button: pillBtn, background #0F6B73, color #fff, text "جستجو" ### 5.2 Mobile Drawer - Trigger: hamburger button (display:none on desktop, flex on <768px) - Overlay: fixed inset 0, background rgba(0,0,0,0.4) - Panel: absolute, top 0, right 0, width 280px (or min(84vw, 300px) on mobile), height 100%, background #FAF7F0, padding 24px, boxShadow '-4px 0 24px rgba(0,0,0,0.12)' - Close button: top-right, "✕" - Nav items: block, width 100%, text-align right, padding 12px 0, font-size 15px, borderBottom 1px solid #E4DDD2, active color #0F6B73 - Auth section: follows same pattern as desktop action buttons but stacked vertically ### 5.3 Footer - Background: #ebe3d2, color #4A5A5C - Decorative top accent bar: 3px height, gradient across full width - 5-column grid: About, Categories, Tools, Links, Contact - About section: "تکناو" headline 28px PelakFA 900, #0F2A2E; "TEKNAV" sub-label 11px, #C46A4D; description paragraph 13px, line-height 1.9 - Link sections (Categories, Tools, Links): 14px headings in PelakFA, #0F2A2E; link items 13px, #5F6B6D with hover effect (color #0F6B73 + translateX(-4px) with transition) - Social buttons: background rgba(15,107,115,0.08), border 1px rgba(15,107,115,0.25), color #0F6B73, padding 7px 14px, radius 8px, 12px font weight 600; hover: fill #0F6B73, text white, translateY(-2px) - Support badges: "🌊 حامی خلیج فارس" and "🌐 حامی اینترنت آزاد برای عموم" — amber background, dark text - Bottom bar: copyright "© ۱۴۰۵ تکناو — تمام حقوق محفوظ است" + "Designed By Coaxys" with #0F6B73 accent ### 5.4 Article Card (Grid — Homepage & Related) **Structure:** White card, 12px radius, 1px #E4DDD2 border, 24px padding, cursor pointer - `opacity: 0` -> 1 with `translateY(24px)` -> 0 on intersection (staggered delay) - Hover: boxShadow 0 8px 32px rgba(0,0,0,0.1) **Sections (top to bottom):** 1. **Diagram thumbnail**: 120px height, #F4EFE6 background, 8px radius, centered DiagramRenderer scaled to 0.7 - Continue-reading overlay: bottom progress bar (4px, #0F6B73) + badge ("ادامه مطالعه" in #0F6B73 bg, white text, 10px) 2. **Badge row**: TypeBadge + CategoryBadge (+ optional "Promoted Content" amber or "Premium" dark badge), flex wrap gap 6px 3. **Title**: 15px, weight 700, color #263238, line-height 1.5 4. **Summary**: 12px, color #5F6B6D, line-height 1.7, truncated to 100 chars 5. **Meta row**: flex space-between, 11px, color #5F6B6D - Left: date - Right: AuthorAvatar (22px) + read time + bookmark button ### 5.5 Featured Article (Homepage Hero) - Two-column grid: `1fr 1fr`, min-height 280px - Left column: padding 32px (right side padding 24px) - Badge row: TypeBadge + CategoryBadge - Title: 22px, weight 800, #263238, line-height 1.5, Vazirmatn - Summary: 14px, #5F6B6D, line-height 1.8 - Author line: borderTop 1px solid #E4DDD2, avatar 36px + name + date/read time - Right column: #F4EFE6 background, DiagramRenderer centered - Hover: boxShadow 0 12px 48px rgba(0,0,0,0.12) ### 5.6 Article Row (List — Article List Page) - Grid: `1fr 140px`, gap 24px, padding 32px 0, borderBottom 1px solid #E4DDD2 - Staggered entry animation (opacity 0->1, translateY 16px->0, 0.4s, idx*60ms delay) - Hover: opacity 0.85 **Text column:** - Meta: date · TypeBadge · CategoryBadge, 12px, gap 8px - Title: 19px, weight 800, #263238, line-height 1.5 - Subtitle (optional): 14px, #0F6B73, weight 600 - Author: 13px clickable name (#0F6B73 if clickable), specialty, separator · - Summary: 14px, #5F6B6D, line-height 1.8 - Stats: type, read time, views, tags (2 max, #F4EFE6 bg) **Thumbnail column:** - 140px wide, 120px height, #F4EFE6 bg, 10px radius - DiagramRenderer at 0.5 scale, 280px container width - Hidden on mobile (<560px) ### 5.7 Article Detail Page **Breadcrumb (sticky-aware):** - Background #F4EFE6, borderBottom 1px solid #E4DDD2, padding 12px 24px - Font 12px, color #5F6B6D - Home › Category › Article title (truncated to 40 chars) - Clickable: home (#0F6B73), category (#0F6B73) **Layout:** - Two-column: TOC sidebar (200px) + article content (max-width 760px), gap 48px - For TekRAG: TOC 220px + content max-width 860px, gap 52px, centered with justify-content center **Article Header:** - badge row (TypeBadge, CategoryBadge, StatusBadge, optional promoted/premium) - H1: clamp(22px,4vw,34px), 900 weight, #263238, line-height 1.4 - Subtitle: 18px, #5F6B6D, weight 400, line-height 1.6 - Author byline: avatar 40px + clickable name + specialty + verified badge - Meta: date · type · read time · comment count, 13px, #5F6B6D - Action row: Save button + Share buttons (Telegram blue #0088cc, WhatsApp green #25D366, X dark #14171A, LinkedIn blue #0A66C2, copy link) **Author Box (bottom of article):** - Background #F4EFE6, 12px radius, 24px padding - Flex row, gap 16px - Avatar 64px, author name 16px 700 weight, specialty #0F6B73, bio 13px - Social links as pill buttons (white bg, 1px #0F6B7330 border) **Reaction Row:** - Label: "واکنش شما به این مقاله؟" - 5 reaction buttons: مفید (thumbsUpIcon), عالی (starIcon), عاشقانه (heartIcon), داغ (flameIcon), تأمل‌برانگیز (lightbulbIcon) - Each: pillBtn style, bg #F4EFE6 / #0F6B7318 (active), border #E4DDD2 / #0F6B7340 (active) - TekRAG English: Helpful, Excellent, Valuable, Important, Thought-provoking **Series Banner (if part of series):** - Background #0F6B7308, border 1px #0F6B7330, 10px radius, 16px padding - "سری مقاله" badge (#0F6B73 bg, white text) + series title + position - "مشاهده همه قسمت‌ها ←" link **Correction Notice:** - Background #FFF8EA, border 1px #D49A2A55, 12px radius, 18px padding - Title "اصلاحیه و به‌روزرسانی" 14px, 900 weight **Tags:** - Flex wrap, gap 8px - "برچسب‌ها:" label 12px, #5F6B6D - Tag buttons: bg #F4EFE6, border 1px #E4DDD2, 3px 10px padding, 4px radius, 12px, #5F6B6D **Related Articles:** - Section below comments - H3 "مقاله‌های مرتبط" 18px 700 - Grid of ArticleCard components ### 5.8 Table of Contents (Sidebar) - Sticky position, top 90px, max-height calc(100vh - 100px), overflow-y auto - Header: "فهرست مطالب" 11px, 700 weight, #5F6B6D, letter-spacing 0.08em - Headings: block items with padding - H2 level: 5px 0, font-size 13px - H3 level: 4px 12px, font-size 12px - Active state: color #0F6B73, weight 700, right border 2px solid #0F6B73 - Inactive: color #5F6B6D, weight 400, transparent right border - Smooth scroll on click via scrollIntoView - Hidden on <900px screens ### 5.9 Article Content Styling (articleContentStyle) - font-size 16px, line-height 2.0, color #263238, direction rtl - H2: 22px, 800 weight, #263238, margin 40px 0 16px, padding-bottom 8px, border-bottom 2px solid #E4DDD2 - H3: 18px, 700 weight, #263238, margin 32px 0 12px - P: margin 0 0 20px - .lead: 18px, line-height 2.05, #1A3035, 500 weight, white bg, border 1px #E4DDD2, right border 4px #0F6B73, 12px radius, 20px 22px padding - Blockquote: right border 4px #D49A2A, margin 28px 0, padding 16px 20px, bg #D49A2A0A, radius 0 8px 8px 0 - .security-quote blockquote: right border color #C94C4D, bg #C94C4D08 - Strong: color #263238, weight 700 - Em: color #0F6B73, font-style normal, weight 600 - Inline code: bg #0F6B7316, border 1px #0F6B7328, 4px radius, padding 1px 6px, font-size 13px, monospace, color #0A5060, direction ltr, unicode-bidi isolate, white-space nowrap - Pre/code blocks: bg #131F22, 10px radius, padding 40px 18px 18px, margin 24px 0, border 1px #1E3035, direction ltr; code: color #A8D8DC, font-size 13.5px, line-height 1.85, display block - .code-copy-btn: absolute top 8px left 10px, bg #1E3035, border 1px #2A4048, color #6AACB5, 6px radius, 4px 10px padding, 11px font; hover bg #2A4048 color #A8D8DC - [data-lang]::before: language label, absolute top 10px right 14px, 10px, color #4A7A82, monospace, uppercase - UL: padding-right 0, list-style none, grid gap 6px; li::before — "›" character, #0F6B73, 17px, position absolute right 4px - OL: counter-reset, padding-right 0, grid gap 8px; li::before — circled number, 24x24px, #0F6B73 bg, white text, 11px 800 weight - .ltr: direction ltr, unicode-bidi isolate, inline-block, Inter/Arial - .metric-grid: repeat(auto-fit, minmax(150px, 1fr)), gap 12px, margin 28px 0 - .metric-card: white bg, 1px #E4DDD2, top border 3px #0F6B73, 10px radius, 14px 16px padding - .metric-value: #0F6B73, 900 weight, 22px - .metric-label: #5F6B6D, 12px - Table: width 100%, collapse borders, margin 24px 0, white bg, 1px #E4DDD2, 10px radius overflow hidden; th: bg #F4EFE6, 800 weight; td/th: 12px 14px padding, min-width 130px - .comparison-template: bg #fffaf1, border 1px #E4DDD2, 12px radius, 18px padding - .risk-box: bg #C46A4D10, border 1px #C46A4D35, 12px radius, 18px 22px padding - .agent-steps: counter-reset, gap 10px; .agent-step: white bg, 1px #E4DDD2, 10px radius, 14px 48px 14px 16px; ::before circled counter number - .article-diagram-card: bg gradient #F4EFE6→#FFFFFF, border 1px #E4DDD2, 12px radius, 22px padding, shadow 0 12px 34px rgba(15,42,46,0.06) - .insight-box: bg #0F6B7310, border 1px #0F6B7330, 10px radius, 20px 24px padding; .insight-title: 13px, #0F6B73, 700 weight - .footnote-box: bg #F4EFE6, 8px radius, 16px 20px padding, 12px, #5F6B6D - .cve-summary-card: gradient #EEF6F7→#E8F3F4, 1px rgba(15,107,115,0.18), 12px radius, 20px 24px padding, grid repeat(auto-fit, minmax(120px, 1fr)) - .security-alert: bg #C94C4D0A, border 1px #C94C4D30, right border 4px #C94C4D, radius 0 10px 10px 0, 16px 20px padding; .alert-title: 13px, 800 weight, #C94C4D ### 5.10 Premium Content Gating - Article content with mask: `maskImage: linear-gradient(to bottom, black 40%, transparent 100%)`, max-height 320px, overflow hidden - PremiumGateCard: gradient #0F2A2E→#1A3A40, 16px radius, 36px 32px padding, border 1px #D49A2A40 - Crown icon SVG - Title "این مقاله برای اعضای ویژه" — 18px, #D49A2A, 700 weight - Description text #A8B8BA - Features list with checkmarks - CTA button: gradient #D49A2A→#B8821E, white text, rounded - Secondary login button: transparent, #A8B8BA border ### 5.11 Filter Bar (Article List) - Category chips: "همه" + 7 category buttons - Type chips: همه + تحلیل عمیق + راهنمای فنی + داده‌نما + پژوهش + راستی‌آزمایی‌شده + پرونده - Sort chips: جدیدترین / پربازدیدترین / زمان مطالعه - Chip states: - Active: border 1.5px solid #0F6B73, bg #0F6B7312, color #0F6B73, weight 700 - Inactive: border 1px solid #E4DDD2, bg #fff, color #5F6B6D, weight 400 - Border-radius 20px (pill), padding 5px 12px, 12px font - Scrollable horizontally on mobile (overflow-x auto, no scrollbar) ### 5.12 Newsletters - NewsletterForm: max-width 460px, centered - Email input + TeknavCAP captcha + submit button (#C46A4D bg) - Success state: checkmark ✓ + "عضویت شما ثبت شد!" in #2F8F6B ### 5.13 Empty State - Center alignment, padding 60px 24px - Large circle icon "◎" 48px, 0.4 opacity - Title 16px 600 weight, #263238 - Subtitle 13px, #5F6B6D ### 5.14 Skeleton Loader - Multiple lines (configurable count), 16px default height - Gradient shimmer: linear-gradient(90deg, #E4DDD2 0%, #F4EFE6 50%, #E4DDD2 100%) - Background-size 200% 100%, shimmer animation 1.4s infinite - Last line: 60% width for visual variety - Inline `@keyframes shimmer` style tag for portability ### 5.15 Confirm Modal - Fixed inset 0, z-index 500, centered flex - Backdrop: rgba(0,0,0,0.45) - Card: bg #FAF7F0, 12px radius, 32px padding, max-width 380px, 90% width, boxShadow 0 20px 60px rgba(0,0,0,0.2) - Title "تأیید عملیات" 15px 600 - Message 13px, #5F6B6D - Buttons: "انصراف" (#F4EFE6) + "تأیید و حذف" (#C94C4C) — right aligned, gap 10px - ESC key to close ### 5.16 Toast System - Fixed position: bottom 28px, left 24px, z-index 9999 - Stack: column gap 10px - Each toast: padding 11px 20px, 8px radius, #fff text, 14px Vazirmatn - Backgrounds: success #2F8F6B, error #C94C4C, warning #D08A22 - boxShadow 0 4px 20px rgba(0,0,0,0.18) - Animation: slideUp 0.25s ease - Auto-dismiss after 3200ms - Direction rtl ### 5.17 Reading Progress Bar - Fixed position: top 64px (below header), full-width, height 3px, z-index 99 - Track: #E4DDD2 - Fill: #0F6B73 with transition width 0.1s linear - Synced to `(scrollTop / (scrollHeight - clientHeight)) * 100` ### 5.18 Author Avatar - Circle, default size 40px - Background: author's color or #0F6B73 fallback - White text at size*0.32, weight 700 - Shows initials (author.initials || name.slice(0,2)) - Flex shrink 0 ### 5.19 Badges **CategoryBadge:** - Inline-block, padding 3px 10px (small: 2px 8px) - 4px radius, 12px font (small: 11px), weight 600 - Background: color + '18' opacity - Color: full hex or #0F6B73 default - Border: 1px solid (color + '30' opacity default) **TypeBadge:** - Inline-block, padding 3px 10px (small: 2px 8px) - 3px radius, 11px font (small: 10px), weight 700, letter-spacing 0.03em - Background + text from TYPE_COLORS map **StatusBadge:** - Inline-flex, gap 5px, padding 3px 10px - 20px radius (pill), 11px, weight 600 - Dots: 6px circle, same color - Background: color + '15', border: color + '30' **RoleBadge:** - Padding 2px 9px, 3px radius, 11px font, 700 weight - Background: color + '18', text color **RolePill (Profile page):** - Inline-block, padding 3px 12px, 20px radius, 11px, 700 weight - Colors per role (terracotta for admin, green for editor, gold for writer, blue for reviewer, muted for reader) ### 5.20 Button Styles **iconBtnStyle:** - background: none, border: none, cursor pointer - Flex center, 36x36px, 8px radius - Transition background 0.15s **pillBtn:** - border: none, cursor pointer - padding 8px 18px, 8px radius - 13px, Vazirmatn, weight 600 - Transition all 0.15s - Inline-flex, gap 6px, align-items center **inputStyle:** - border 1px solid #E4DDD2, 8px radius - padding 9px 14px, 13px font, Vazirmatn - background #fff, color #263238 - outline none, width 100% **Auth goldBtn:** - width 100%, padding 13px 0, 10px radius - Gold gradient background, #0F2A2E text - 14px 700 weight, boxShadow 0 4px 16px rgba(200,149,28,0.22) - Loaded state: bg #E8E2D8, color #B0B8BA, cursor not-allowed, no shadow - CSS class .auth-gold-btn hover: opacity 0.91, translateY(-1px), stronger shadow **Auth oauthBtnStyle:** - Flex center, gap 10px, width 100% - padding 11px 0, 10px radius - border 1.5px solid #E4DDD2, bg #fff - 13px weight 600, color #1A2E30 - CSS hover: border-color #C46A4D, bg #FFFCFB **Auth cancelBtn:** - flex 1, padding 12px 0, border 1.5px solid #E4DDD2 - 10px radius, transparent bg - color #7B8C8E, 13px 600 weight **Gold Buttons (auth page):** - class .auth-gold-btn: hover opacity 0.91, translateY(-1px), boxShadow 0 7px 22px rgba(200,149,28,0.38) - Disabled: cursor not-allowed ### 5.21 Input Fields **AuthInput component:** - Label: 12px, 600 weight, color #7B8C8E (error: #C94C4C), margin-bottom 6px - Input wrapper: position relative - Input: border 1.5px #E4DDD2 (error: #C94C4C), 10px radius, padding 13px 16px (or 13px 16px 13px 46px with suffix), 14px, bg #FAFAF8, color #1A2E30 - Focus: border-color #C8951C, bg #fff, boxShadow 0 0 0 3px rgba(200,149,28,0.1) - Suffix: absolute left 14px, top 50%, transform translateY(-50%), color #9AA5A6 - Hint: 11px, color #9AA5A6 - Error: 11px, color #C94C4C **PasswordStrength component:** - 5-segment bar: 3px height, 2px radius per segment, color varies by score (≤2: #C94C4C, 3: #D08A22, ≥4: #2F8F6B) - Chips: flex wrap, 10px font, 20px radius, 2px 8px padding - Passed: bg rgba(47,143,107,0.09), color #2F8F6B, ✓ prefix - Failed: bg #F2EFE9, color #9AA5A6, · prefix - Criteria: ۸+ کاراکتر, حرف کوچک, حرف بزرگ, عدد, نماد --- ## 6. ANIMATIONS & TRANSITIONS ### 6.1 Keyframe Animations | Name | Details | Usage | |---|---|---| | `fadeIn` | 0→1 opacity | Generic fade-in | | `slideUp` | translateY(20px) + opacity 0 → 0 + 1 | Toast, modals, push prompts | | `shimmer` | background-position 200%→-200% | Skeleton loader, diagram skeleton | | `spin` | 0→360deg rotate | Loading spinner | | `float-y` | translateY(0)→(-6)→(0), 3s | Gold star, streak widget, word bubbles | | `goldShimmer` | background-position -200%→200%, 5s linear | Gold shimmer text | | `pulseRing` | boxShadow expand from 0 to 14px to 0, 2.2s | Live indicator dot, hero badge pulse | | `heroReveal` | opacity 0→1, filter blur(6px)→0, translateY(18px)→0 | Homepage hero elements (staggered 0.1s–1.35s delays) | | `orbit` | 0→360deg rotate | Auth brand panel outer/inner rings | | `orbitR` | 0→-360deg rotate | Auth brand panel middle ring | | `tickerUp` | translateY(0)→(-50%), linear 22s | Auth brand topic ticker | | `bgGrid` | background-position loop, 38s linear | Auth form grid background | | `logoGlow` | boxShadow pulse, 4.5s ease-in-out | Auth logo glow | | `fadeSlideUp` | opacity 0→1, translateY(16px)→0, 0.45s/0.25s | Auth cards and modals | | `statReveal` | scale 0.75→1.05→1 + translateY, cubic-bezier | Brand panel stat numbers | | `dividerExpand` | width 0→48px, opacity 0→1 | Brand panel divider | | `blink` | opacity 1→0.3→1 | Cursor/indicator blink | ### 6.2 Transition Timings | Duration | Easing | Usage | |---|---|---| | 0.15s | ease | Button hovers, nav items, link colors, chip states, filter changes | | 0.18s | ease | Social button hovers, auth tab toggles, OAuth buttons | | 0.2s | ease | Card shadows, hero CTA, general hovers, icon buttons | | 0.22s | ease | Auth tab buttons | | 0.25s | ease, cubic-bezier(.2,.8,.2,1) | Lift-on-hover, toast entrance, hero-tilt | | 0.3s | linear/ease | Loading bar, scroll progress, header backdrop, card opacity | | 0.4s | cubic-bezier(.2,.8,.2,1) | Hero tilt, stagger article row entrance | | 0.5s | ease | Staggered card entrance (homepage) | | 0.6s | cubic-bezier(.2,.8,.2,1) | Hero reveal animations | | 0.7s | linear | Loading bar tick | | 0.8s–3.2s | various | Auth brand panel parallax, delayed animations | | 0.9s | cubic-bezier(.2,.8,.2,1) | Auth brand parallax glow | ### 6.3 Hover Effects Summary - Cards: shadow elevation increase + translateY(-2px to -4px) - Buttons: background fill, opacity change, slight lift - Links: color change to #0F6B73, translateX(-4px) in footer - Featured card: parallax tilt (perspective 900px, rotateX/Y up to ±6deg) - Article rows: opacity 0.85 - Category cards: background tint - Comparison/comany cards: shadow on hover - Story cards: scale(1.03) + shadow --- ## 7. HOMEPAGE LAYOUT (Detailed) Structure in order (top to bottom): 1. **Personalized Bar** (logged-in only): background #F4EFE6, borderBottom 1px #E4DDD2, flex wrap - StreakWidget: gradient orange, 8px 14px padding, 12px radius, white text, float-y animation - ContinueReadingBar: dark #263238 bg, horizontal scroll of in-progress articles with progress bars 2. **Hero Section**: light bg #F4F1EC, min-height 560px - Neural network Canvas background (32 nodes, teal/terracotta/green palette, pulsing connections up to 130px distance) - Radial gradient glows + subtle grid overlay (48px squares, 4% opacity lines, masked radial) - Tagline badge "روایت عمیق فناوری" with pulse dot - H1 "درک عمیق‌تر" (PelakFA) + gold-shimmer "دنیای فناوری" - Subtitle "تحلیل‌های علمی، تخصصی و مستقل..." - CTA buttons: "مشاهده همه مقاله‌ها →" (teal, shadow) + "هوش مصنوعی" (terracotta outline) - Featured card sidebar: white, 4px gold gradient left accent, "مقاله ویژه" label + title + author/type/read time - Mouse parallax tilt effect on featured card - SVG wave divider (#ebe3d2 fill) at bottom for transition 3. **Stats Bar**: bg #ebe3d2, 40px padding - 4 stats: مقالات منتشرشده ۱۸۰+, نویسنده فعال ۳, خواننده ماهانه ۴۵۰۰۰+, میانگین زمان مطالعه ۸ دقیقه - CountUp animation (cubic ease-out, 1400ms) with Persian digit formatting + thousands separator - Gold (#A8761B) numbers in PelakFA 900, 30px - Vertical dividers between items 4. **Personalized Feed** (logged-in): "پیشنهاد برای شما" section 5. **Featured Article**: "مقاله منتخب" — FeaturedArticle component (two-column layout) 6. **Latest Articles**: "تازه‌ترین خبرها" with "مشاهده همه ←" link — 6 ArticleCards in grid 7. **Deep Analyses**: "تحلیل‌های عمیق" — ArticleRowCompact list items 8. **Popular**: "محبوب‌ترین‌ها" — 4 ArticleCards in grid 9. **Categories**: "دسته‌بندی‌ها" — category cards with 3px colored right border, description, article count 10. **Authors**: "نویسندگان تکناو" — author cards with avatar 56px, name, specialty, article count 11. **Newsletter**: "عضو خبرنامه تکناو شوید" — sand box with radial glows, form --- ## 8. ARTICLE IMAGES & THUMBNAILS ### 8.1 Diagram System Articles do NOT use photographic images. Instead, every article has a `diagram` field (string type identifier) that maps to a `DiagramRenderer` or `LazyDiagram` component. These are interactive SVG/Canvas-based diagrams rendered inline. **Diagram types observed:** - `"pipeline"` — data/agent pipeline flow - `"diagram-12"` — architecture diagram - `"cyber"` — cybersecurity risk map - `"orbit"` — market movement diagram - Various category-specific diagrams per article **Thumbnail rendering:** - Homepage ArticleCard: 120px height container, #F4EFE6 bg, DiagramRenderer scaled to 0.7 - ArticleRow (list): 140px wide × 120px height, DiagramRenderer at 0.5 scale - ArticleRowCompact (homepage deep analysis): 80×80px thumbnail, 0.55 scale - Article hero diagram: full width, #F4EFE6 background, 12px radius, 24px padding **Hero diagram (article detail):** - Placed below article header - Background #F4EFE6, 12px radius, 24px padding, 32px margin-bottom - Label "نمودار تعاملی — با موس روی عناصر بروید" in 11px, #5F6B6D - LazyDiagram loads on demand with lazy chunk loading **Diagram skeleton (loading):** - 100% width, min-height 120px - 8px radius - Shimmer gradient: #ebe3d2 → #f4efe6 → #ebe3d2 - shimmer animation 1.4s infinite ### 8.2 OG Images & Discover Hero - OG images generated at build time: `/images/og/{slug}.jpg` (1200×630px) - Optional `ogImage` field in article data for custom images - Discover Hero image (optional): displayed as `
` with 1200×630 aspect ratio, borderRadius 12px, border 1px #E4DDD2, object-fit cover - Stories: article thumbnails use ogImage or `/images/og/{slug}.jpg`, shown at `filter: brightness(0.55)` with gradient overlay ### 8.3 Article Diagrams (Embedded Cards) - `EmbeddedDiagramCard` component: title + subtitle + LazyDiagram - Title: 13px (Persian) / 15px (English), 800 weight, #0F6B73 - Subtitle: 12px, #5F6B6D, line-height 1.8 - Card background: gradient #F4EFE6→#FFFFFF (Persian) or #FAFAFA solid (English) - Border: 1px #E4DDD2 (Persian) or #E8E8E8 (English) - Box-shadow: 0 12px 34px rgba(15,42,46,0.06) (Persian) or 0 2px 8px rgba(0,0,0,0.06) (English) ### 8.4 Quote Sharer Canvas Card - Canvas 1080×1080px - Dark gradient background: #0C1E22 → #0F3540 - Corner accent: #0F6B73 triangle (top-right, 220px) - Subtle grid overlay: 60px grid lines at 3% opacity white - Gold separator bar (#D49A2A): 5px wide, 80px tall, positioned at (80, 90) - Logo: "تکناو" in 32px 700 weight, right-aligned at (W-60, 80) - Tagline: "teknav.ir" in 16px, rgba(212,154,42,0.55), at (W-60, 106) - Large quotation mark: "«" in 280px, rgba(212,154,42,0.18), at (W-40, 420) - Quote text: white, 38px, 400 weight, RTL, wrapped at W-160 max width, 60px line-height - Gold divider line after quote: 2px height, W-160 width - Article title: rgba(255,255,255,0.65), 26px, 400 weight - Author name: rgba(255,255,255,0.45), 22px, 400 weight, positioned at bottom ### 8.5 Story Pages (Generated Static) - Full-screen CSS scroll-snap story format - Each story has OG + Twitter Card meta - Keyboard navigation supported - Generated at build time into `dist/stories/{slug}/index.html` ### 8.6 Comparison Page Images - No images — purely text-based comparison with pros/cons lists - Item names in colored badges: first item green (#E8F5E9 bg, #2E7D32 text), second item orange (#FFF3E0 bg, #E65100 text) - Arrow separator: "در برابر" text in #5F6B6D ### 8.7 Company Directory Images - No images — company cards are text-only - Company name, description (truncated 100 chars), tech stack tags, verified badge --- ## 9. AUTH PAGE DESIGN ### 9.1 Layout - Full-viewport flex split: form column (flex:1) + brand panel (440px fixed width) - Hidden at <880px (brand panel disappears, mobile logo appears) - The auth-layout has class `auth-layout` (flex, min-height 100vh, rtl) ### 9.2 Form Column - Background #FAF7F0 with subtle grid pattern (terracotta lines at 2.8% opacity, 52px grid size, bgGrid animation 38s) - Radial vignette: `radial-gradient(ellipse 80% 55% at 50% 5%, transparent → rgba(250,247,240,0.55))` - Content max-width 420px, centered, position relative z-index 1 - Heading with vertical accent bar (3.5px width, 30px height, gradient #C46A4D→rgba(200,149,28,0.6)) - Time-based greeting in PelakFA 800, 25px, #0F2A2E ### 9.3 Tab Switcher (Login / Signup) - Background #EDE9E2, 12px radius, 4px padding - Two tabs: "ورود" (login) / "ثبت‌نام" (signup) - Active tab: white bg, boxShadow 0 1px 6px rgba(0,0,0,0.1), color #0F2A2E - Inactive: transparent bg, color #9AA5A6 - CSS class `.auth-tab-btn`: flex 1, padding 10px 0, 13px 700 weight, 9px radius, transition 0.22s ### 9.4 Login Form - Fields: identifier (email/username) + password + CAPTCHA - Identifier: AuthInput with label "نام کاربری یا ایمیل", placeholder "@username یا you@example.com", LTR direction - Password: AuthInput with label "رمز عبور", show/hide toggle (EyeIcon), "فراموشی رمز؟" link - CAPTCHA: TeknavCAP custom component - Submit: goldBtn "ورود به حساب" with loading spinner - Forgot password link opens modal ### 9.5 Signup Form - Fields: name + username + email/phone toggle + password + confirm password - Name: "نام نمایشی", placeholder "مثال: علی رضایی" - Username: English only, LTR, auto-lowercase, hint shows profile URL - Identifier toggle: email/phone pill switcher (#F0EDE6 bg, white active pill) - Password: EyeIcon toggle + PasswordStrength bar - Confirm: checkmark icon when match (#2F8F6B) - CAPTCHA + terms acceptance - Submit: goldBtn "ایجاد حساب کاربری" ### 9.6 OAuth Buttons Section - Conditionally rendered based on `GET /api/v1/auth/oauth/providers` - Google button with SVG icon: "ادامه با Google" - GitHub button with SVG icon: "ادامه با GitHub" - Divider: "یا با ایمیل" text between lines - CSS hover: border-color #C46A4D, bg #FFFCFB ### 9.7 Brand Panel (Dark Theme) - Background: `#0B2226` (very dark teal) - Giant watermark letter "ت" in 360px, 1.6% opacity, PelakFA - Dot grid pattern (white dots at 3.2% opacity, 28px spacing) - Parallax gold glow that follows cursor (300px circle, 14% opacity gold, transforms with mouse position) - Terracotta accent glow at bottom-left - Floating Persian tech words (هوش مصنوعی, ابر, امنیت, متن‌باز, پردازش, شبکه, داده, زیرساخت) at various positions with float-y animation - Orbital logo: 100px square with dashed/solid orbiting rings (44s, 17s, 9s durations), gold gradient center with "ت" character - Wordmark "تکناو" in 50px PelakFA, #FAF7F0, with "TEKNAV · IR" sub-label - Animated divider line (gold gradient, expands from center) - Tagline: "آخرین دانش فناوری، اول به فارسی" - Live stats count-up: ۲۳+ مقاله, ۸۴۰۰ خواننده, ۶ سری - Topic ticker: scrolling text list (8 Persian tech topics, 22s linear infinite, masked with linear gradient) - Online pulse indicator: green dot with pulseRing animation + "در حال حاضر آنلاین" ### 9.8 Forgot Password Modal - Centered modal with dark overlay (rgba(11,34,38,0.62)) - Card: bg #FAF7F0, 18px radius, 36px 32px padding, max-width 400px - "بازیابی رمز عبور" title in PelakFA 18px 800, #1A2E30 - Email input + cancel/send buttons - Sent state: message + close button --- ## 10. PROFILE PAGE DESIGN ### 10.1 Color Identity Uses terracotta-centric palette (P object): terracotta #C45C3D, orange #E07A3A, green #3A7D5E. No teal on this page. ### 10.2 Hero Banner - Gradient background: #FDF6EE → #F7EDE0 → #EEF5F0 - Border-bottom 1px #E4DDD2 - 3 decorative circles (terracotta 6%, green 7%, gold 6% opacity) - Flex layout: avatar (110px) + info + action buttons - AvatarUpload component: 110px circle, 3px terracotta border, boxShadow, upload overlay at bottom - Name with verified expert badge (terracotta outline pill), RolePill - @username in terracotta 13px 600 - Bio paragraph 14px, #5F6B6D, max-width 580px - Education/credential info with graduation cap and scroll icons - Expertise tags: green bg, green text, 20px radius pills - Join date, article count, follower count, social links (X, LinkedIn) - Follow/Edit buttons ### 10.3 Stats Bar (Writers) - Background #F4EFE6 panel - 3 stats with left borders: articles count, total views, total reactions - Numbers in 22px 900 weight, terracotta ### 10.4 Badges Section - White background, border-bottom - Badge pills: gradient #F4EFE6→#FDFAF5, 1px #E4DDD2, 24px radius, 6px 14px padding, 12px 600 weight - 8 types: ai_reader, data_reader, security_reader, hardware_reader, weekly_streak, monthly_streak, power_reader, early_adopter ### 10.5 Content Tabs - "مقالات" (Articles) and "آمار و تحلیل" (Analytics) tabs - Underline style: active has 2px terracotta bottom border - Tab content: grid of ArticleMiniCard components (4px terracotta left border, white bg, title 15px 700, summary, views/reactions) ### 10.6 Writer Analytics Tab - 3 summary cards: total views, reactions, comments — each with 3px colored top border - 30-day sparkline SVG chart (terracotta line, 12% opacity fill) - Per-article table with columns: title, views (terracotta), reactions (orange), comments, saved ### 10.7 Profile Settings Modal - Full-screen overlay (rgba 0,0,0,0.5) - Card: cream bg, 16px radius, 32px padding, max-width 440px, max-height 88vh scrollable - Sections: display name, username (conditionally editable), bio, password change, email verification, phone OTP, 2FA toggle, browser push notifications, notification preferences (expandable table) ### 10.8 Notification Preferences Table - Expandable panel (toggle open/close) - Table with columns: event type | push | email | sms - Events: comment, comment_reply, new_article, review_approved, review_revision, review_rejected, review_submitted, system - Toggle buttons: 28×16px pill switches, green (#3A7D5E) when enabled, #CCC when disabled --- ## 11. COMPARISON PAGES ### 11.1 ComparisonsListPage - Breadcrumb: تکناو › مقایسه‌ها - Title "مقایسه‌های فنی تکناو" — 32px 800 weight, #0C1E22 - Search input (max-width 400px) - Comparison cards: white bg, 12px radius, 1px #E4DDD2, 20px 24px padding, hover shadow - Category badge colored pill (#fff text) - Title 17px 700 - Item names: green pill (item1) + "در برابر" (in #5F6B6D) + orange pill (item2) - Arrow "←" in #0F6B73 ### 11.2 ComparisonPage (Detail) - Card layout: flex wrap, two cards side by side - Each card: white bg, 12px radius, 24px padding, border 1px #E4DDD2, flex 1 1 300px - Item name: 20px 700, #0F6B73 - Summary paragraph 14px - Pros (✓ green #2E7D32) and Cons (✗ red #C62828) - Use cases: sand bg (#F8F5F0), flex row of two white bordered cards with item name labels - Verdict: dark teal bg (#0F3540), #D49A2A title, white text - Related glossary: white cards with teal border, term + english - Related articles: white bordered cards with title + summary + arrow - Vote widget (ComparisonVoteBar): localStorage-based, two-button layout for item1 vs item2 --- ## 12. SEARCH PAGE - Advanced search layout: 240px sidebar + results area - Filters: category (dropdown), author (dropdown), content type (dropdown), clear button - Search results: fade-in staggered animation, 24px padding, borderBottom - Highlighted query terms: `` with background #D49A2A30, #263238 text --- ## 13. LOADING & ERROR STATES ### 13.1 Splash Loader (index.html) - Full-screen fixed overlay (#FAF7F0 bg, z-index 9999) - "تکناو" in 36px 900 weight, #0F6B73 - "TEKNAV" sub-label 11px, #5F6B6D, letter-spacing 0.15em - Loading bar: 40px wide, 3px height, #E4DDD2 track, #0F6B73 fill, transition width 0.3s - Auto-progress from 0→90% (8% every 120ms), then jumps to 100% on JS mount - `window.__doneLoading()` called from main.jsx after React renders - Class `.hidden` sets opacity 0 + pointer-events none (0.4s transition) - HTML class `js` toggles visibility; no-JS fallback shows static content ### 13.2 Static Fallback (no-JS) - Class `.static-fallback`: min-height 100vh, bg #FAF7F0, color #263238, rtl, padding 72px 20px, Vazirmatn - Max-width 920px inner container - Eyebrow "رسانه فارسی تحلیل فناوری" — #C45C3D, 13px, 800 weight - H1 in #0F6B73, 36px - H2 in #263238, 22px - Lead paragraph #5F6B6D - Link list items: border 1px #E4DDD2, 8px radius, white bg, 12px 14px padding; links in #C45C3D 800 weight - Section "تکناو چیست؟" with explanatory paragraph ### 13.3 Network/API Error States - Article 404: EmptyState + back-to-articles button - Comments error: EmptyState "نظرها از API دریافت نشد" - Article not found: EmptyState + return button - Search empty: EmptyState "نتیجه‌ای یافت نشد" - Category not found: EmptyState "دسته‌بندی یافت نشد" - Profile not found: EmptyState "پروفایل یافت نشد" - Comparison not found: EmptyState - Company not found: EmptyState - Generic loading: "در حال بارگذاری…" or SkeletonLoader ### 13.4 Auth Error States - 401: invalid credentials message - 429: rate limit warning - 403: account suspended message - 400: captcha invalid + refresh instruction - 409: duplicate email/phone/username - Rate limit: "تعداد تلاش‌های ناموفق از حد مجاز گذشت" - OAuth errors: red error box (#FEF2F2 bg, #991B1B text) with "account_suspended" handling --- ## 14. WIDGET SYSTEM (Embed) ### 14.1 Architecture - Separate Vite entry: `embed.html` → `src/embed.jsx` → `src/widgets/` - URL routing: `/embed/{type}/{slug}` - Types: `glossary`, `article-card`, `company` - Third-party loader: `public/embed-loader.js` — creates sandboxed `