Skip to content
Snippets Groups Projects
Select Git revision
  • 8701a5f6feceb356055347c20f725ed0cab44a1c
  • master default protected
2 results

sidebar.blade.php

Blame
  • Sofiane Lasri-Trienpont's avatar
    Sofiane Lasri authored
    - Changed the retrieval of the website name in the sidebar component to use the `DbConfig` model for dynamic configuration.
    - Updated the `set` method in the `DbConfig` model to allow null values for configuration.
    - Refactored the public layout to use the website name from `DbConfig` instead of a hardcoded value.
    - Adjusted the default value for maintenance mode and website name in the settings view to match the new configuration method.
    - Modified the middleware to check the maintenance mode from the `DbConfig` model.
    - Updated the `SettingsController` to use `has` instead of `filled` for checking request inputs related to maintenance mode and website name.
    8701a5f6
    History
    sidebar.blade.php 3.00 KiB
    <div class="sidebar">
        <!-- Website Name -->
        <div class="header">
            <button type="button" class="sidebar-button d-lg-none" onclick="toggleSidebar()">
                <x-font-awesome icon="bars" type="regular"/>
            </button>
    
            <a class="website-name" href="{{ route('admin.home') }}">
                <img class="logo" src="{{ asset('favicon.svg') }}" alt="Website Logo"/>
                <span>
                    {{ \App\Models\DbConfig::get('website_name', "Rann Graphic Design") }}
                </span>
            </a>
        </div>
        <!-- End Website Name -->
    
        <!-- Sidebar Navigation -->
        <div class="menu">
            <ul>
                @foreach(config('admin.navbar.items') as $item)
                    <li>
                        <a href="{{ route($item['route']) }}"
                           class="sidebar-button {{ request()->routeIs($item['route']) ? 'active' : '' }}">
                            <x-font-awesome icon="{{ $item['icon'] }}" type="regular"/>
                            <span class="truncate">{{ $item['title'] }}</span>
                        </a>
                    </li>
                @endforeach
            </ul>
        </div>
        <!-- End Sidebar Navigation -->
    
        <div class="bottom">
            <a href="{{ route('admin.settings.users') }}" class="sidebar-button">
                <x-font-awesome icon="plus" type="regular"/>
                <span class="truncate">Ajouter un utilisateur</span>
            </a>
            <div class="d-flex flex-column py-2 border-top">
                <div class="sidebar-button">
                    <div class="upper-dropdown">
                        <div class="content">
                            <div class="section">
                                <div class="small muted">Connecté en tant que</div>
                                <div class="small muted fw-bold">{{ auth()->user()?->email }}</div>
                            </div>
                            <div class="section">
                                <a href="{{ route('admin.settings.general') }}" class="sidebar-button">
                                    <x-font-awesome icon="gear" type="regular"/>
                                    <span class="truncate">Paramètres</span>
                                </a>
                                <a href="#" class="sidebar-button">
                                    <x-font-awesome icon="block-question" type="regular"/>
                                    <span class="truncate">Aide & Support</span>
                                </a>
                            </div>
                            <div class="section">
                                <a href="{{ route('logout') }}" class="sidebar-button">
                                    <x-font-awesome icon="left-from-bracket" type="regular"/>
                                    <span class="truncate">Se déconnecter</span>
                                </a>
                            </div>
                        </div>
                    </div>
                    <x-font-awesome icon="circle-user" type="solid"/>
                    <span class="truncate">{{ auth()->user()?->name }}</span>
                </div>
            </div>
        </div>
    </div>