Skip to main content

Overview

The Nudj platform provides extensive branding and theming capabilities that enable complete visual customization of your community platform. From colors and logos to fonts and layouts, you can create a fully white-labeled experience that aligns with your brand identity.

Key Capabilities

  • Visual Identity - Complete logo, color, and typography control
  • Dual-Mode Theming - Full light and dark mode support
  • Component Customization - Granular control over UI elements
  • Mobile Optimization - Responsive design considerations
  • Real-Time Preview - Live theme updates without page refresh
  • Version Management - Theme versioning and rollback capabilities

Accessing Branding Settings

Navigate to your branding configuration:
  1. Go to AdminSettingsOrganisation
  2. Click the Branding tab
  3. Configure your visual identity settings
Theme changes apply immediately across your platform. The system uses real-time updates via React context for instant preview without page refresh.

Core Branding Elements

Logo Management

Configure your organization’s visual identity:

Color Schemes

Define your brand’s color palette:
{
  light: {
    primary: "#1e40af",        // Primary brand color
    secondary: "#64748b",      // Secondary actions
    accent: "#f59e0b",         // Highlights/CTAs
    background: "#ffffff",     // Main background
    surface: "#f8fafc",        // Card backgrounds
    text: {
      primary: "#0f172a",      // Main text
      secondary: "#64748b",    // Muted text
      inverse: "#ffffff"       // Text on dark backgrounds
    },
    border: "#e2e8f0",         // Border colors
    error: "#dc2626",          // Error states
    warning: "#f59e0b",        // Warning states
    success: "#16a34a",        // Success states
    info: "#0ea5e9"            // Info states
  }
}

Typography

Customize fonts and text styles:
{
  typography: {
    fonts: {
      heading: "Inter, system-ui, sans-serif",
      body: "Inter, system-ui, sans-serif",
      mono: "JetBrains Mono, monospace"
    },
    sizes: {
      xs: "0.75rem",     // 12px
      sm: "0.875rem",    // 14px
      base: "1rem",      // 16px
      lg: "1.125rem",    // 18px
      xl: "1.25rem",     // 20px
      "2xl": "1.5rem",   // 24px
      "3xl": "1.875rem", // 30px
      "4xl": "2.25rem",  // 36px
      "5xl": "3rem"      // 48px
    },
    weights: {
      normal: 400,
      medium: 500,
      semibold: 600,
      bold: 700
    },
    lineHeights: {
      tight: 1.2,
      normal: 1.5,
      relaxed: 1.75
    }
  }
}

Advanced Customization

Component Styling

Override specific component styles:
{
  buttons: {
    borderRadius: "0.375rem",
    padding: {
      sm: "0.5rem 1rem",
      md: "0.625rem 1.25rem",
      lg: "0.75rem 1.5rem"
    },
    transitions: "all 0.2s ease-in-out"
  }
}
{
  cards: {
    borderRadius: "0.5rem",
    shadow: "0 1px 3px rgba(0,0,0,0.1)",
    padding: "1.5rem",
    border: "1px solid var(--border)"
  }
}
{
  forms: {
    inputBorderRadius: "0.375rem",
    inputPadding: "0.625rem 0.75rem",
    labelMarginBottom: "0.5rem",
    focusRingColor: "var(--primary)"
  }
}

Custom CSS

Add custom CSS for advanced styling:
/* Custom CSS Editor */
.custom-class {
  /* Your custom styles */
}

/* Override existing styles */
:root {
  --custom-variable: value;
}

/* Target specific components */
[data-component="challenge-card"] {
  /* Component-specific overrides */
}
Custom CSS is powerful but use sparingly. Excessive custom CSS can break responsive design and cause maintenance issues.

Icon Customization

Configure custom icons using Iconify:
{
  icons: {
    // Custom icon mappings
    achievement: "mdi:trophy",
    challenge: "mdi:target",
    reward: "mdi:gift",
    leaderboard: "mdi:podium",
    
    // Override system icons
    chevronDown: "custom:chevron-down",
    close: "custom:close-icon",
    menu: "custom:hamburger"
  }
}

Theme Application

Where Themes Apply

Your branding configuration affects:

User Interface

  • Main application
  • Login/signup pages
  • User profiles
  • Community pages

Communications

  • Email templates
  • Push notifications
  • In-app messages
  • PDF exports

Mobile Experience

  • Responsive web
  • PWA appearance
  • Mobile navigation
  • Touch interfaces

Embedded Content

  • Widgets
  • Iframe embeds
  • API responses
  • Share cards

Theme Inheritance

Understanding theme cascading:

Implementation Guide

Setting Up Your Brand

1

Upload Assets

Upload logos, favicon, and any custom images
2

Define Colors

Set primary, secondary, and accent colors for both light and dark modes
3

Configure Typography

Choose fonts and set size scales
4

Test Responsiveness

Preview on different screen sizes
5

Apply Custom CSS

Add any additional styling requirements
6

Save and Publish

Save configuration and publish to all users

Best Practices

Contrast Ratios

Maintain WCAG AA compliance (4.5:1 for normal text)

Brand Consistency

Use your brand guidelines for color and typography

Performance

Optimize images and limit custom fonts

Testing

Test themes across devices and browsers

Theme Management

Version Control

Track and manage theme versions:
{
  version: "2.1.0",
  createdAt: "2024-01-15T10:00:00Z",
  updatedAt: "2024-01-20T14:30:00Z",
  author: "admin@company.com",
  changelog: "Updated primary colors and navigation styles"
}

Import/Export

Share themes across organizations:
curl -X GET https://your-subdomain.nudj.cx/api/v2/admin/themes/export \
  -H "x-api-token: YOUR_API_TOKEN" \
  -o theme-export.json

Theme Preview

Test themes before publishing:
// Enable preview mode
{
  previewMode: true,
  previewUsers: ["user1@example.com", "user2@example.com"],
  previewExpiry: "2024-02-01T00:00:00Z"
}

Performance Considerations

Optimization Tips

AspectRecommendationImpact
ImagesUse SVG for logos, optimize PNGsFaster load times
FontsLimit to 2-3 font familiesReduced bandwidth
ColorsUse CSS variablesEfficient theming
Custom CSSMinimize specificityBetter maintainability
IconsUse icon fonts or SVGsSmaller file sizes

Caching Strategy

Theme assets are cached with these policies:
  • Static Assets: 1 year cache with versioning
  • Theme Config: 5 minute cache for updates
  • Custom CSS: Real-time updates
  • Fonts: Browser cache with preloading

Troubleshooting

  • Check file format and size limits
  • Verify URL is accessible
  • Clear browser cache
  • Check console for loading errors
  • Ensure valid hex color codes
  • Check for CSS specificity conflicts
  • Verify theme is published
  • Try hard refresh (Ctrl+Shift+R)
  • Verify dark mode colors are configured
  • Check system theme detection
  • Test manual theme toggle
  • Ensure sufficient contrast ratios
  • Check CSS syntax validity
  • Avoid !important unless necessary
  • Use specific selectors
  • Test in browser dev tools first
  • Verify font URLs are valid
  • Check CORS headers for external fonts
  • Use web-safe fallback fonts
  • Consider self-hosting fonts

API Reference

Theme Endpoints

curl -X GET https://your-subdomain.nudj.cx/api/v2/admin/themes \
  -H "x-api-token: YOUR_API_TOKEN"

Security Considerations

SVG Sanitization

All SVG uploads are sanitized to prevent XSS attacks:
  • Script tags removed
  • Event handlers stripped
  • External references blocked
  • Safe attributes whitelist applied

Permission Controls

Theme management requires admin permissions:
  • View: All authenticated users
  • Edit: Admin role required
  • Publish: Organization owner only
  • Custom CSS: Super admin approval
I