Files
timebank-cc-public/resources/views/logos
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00
..
2026-03-23 21:37:59 +01:00
2026-03-23 21:37:59 +01:00
2026-03-23 21:37:59 +01:00
2026-03-23 21:37:59 +01:00
2026-03-23 21:37:59 +01:00

Theme Logo Files

This directory contains SVG logo files for each theme. These logos are used throughout the application in navigation, authentication pages, and other UI components.

Files

  • timebank_cc.blade.php - Default Timebank.cc theme logo
  • uuro.blade.php - Uuro theme logo
  • vegetable.blade.php - Vegetable theme logo
  • yellow.blade.php - Yellow theme logo

Customization

To Customize a Logo for Your Theme:

  1. Edit the appropriate theme logo file (e.g., your_theme.blade.php)
  2. Replace the SVG content with your custom logo
  3. Ensure the SVG includes:
    • class="fill-theme-logo w-full h-full" for theme-aware coloring and responsive sizing
    • Dynamic title tag: <title>{{ $logoTitle ?? config('app.name') . ' ' . __('logo') }}</title>
    • The viewBox attribute for aspect ratio (no fixed width/height)
  1. Copy an existing logo file:

    cp timebank_cc.blade.php my_new_theme.blade.php
    
  2. Edit the SVG content in my_new_theme.blade.php

  3. Update theme configuration in config/themes.php:

    'my_new_theme' => [
        'name' => 'My New Theme',
        'logos' => [
            'svg_inline' => 'logos.my_new_theme',
            'email_logo' => 'app-images/my_new_theme_mail_logo.png',
        ],
        // ... other theme settings
    ],
    
  4. Add corresponding email logo to storage/app/public/app-images/my_new_theme_mail_logo.png

Important Notes

  • SVG logos in this directory are tracked in git
  • Email/PDF logos (PNG files) are stored in storage/app/public/app-images/ and are gitignored
  • When deploying, SVG logos may be overwritten by git pull, but email logos in storage are safe
  • Use the theme_logo() helper function to access logo paths in code

Usage in Code

// Get SVG inline view name
$svgView = theme_logo('svg_inline'); // Returns: 'logos.timebank_cc'

// Include in Blade template (uses default tooltip)
@include(theme_logo('svg_inline'))

// Include with custom tooltip text
@include(theme_logo('svg_inline'), ['logoTitle' => __('Go to homepage')])

// Include with context-specific tooltip
@include(theme_logo('svg_inline'), ['logoTitle' => __('Search') . ' - ' . config('app.name')])

// Get email logo path
$emailLogo = theme_logo('email_logo'); // Returns: 'app-images/timebank_cc_mail_logo.png'

Dynamic Tooltip Text

All logo files support dynamic tooltip text via the $logoTitle variable:

  • Default behavior: If no $logoTitle is provided, the tooltip defaults to config('app.name') . ' ' . __('logo')
  • Custom tooltips: Pass ['logoTitle' => 'Your custom text'] when including the logo
  • Context-aware: Different components can use different tooltips (e.g., "Go to homepage" on login, "Search" on dashboard)

White-Label Deployment

The logo system is designed to support white-label deployments:

  • Each installation sets TIMEBANK_THEME=your_theme in .env
  • Theme-specific logos are automatically loaded
  • Email logos in storage/ persist through git updates
  • No conflicts when pulling latest code from repository

For more information, see references/THEME_IMPLEMENTATION.md.