---
layout: default
---

<div class="theme-showcase">
    <!-- Refined Hero Section -->
    <header class="flex items-center justify-between pt-2 pb-6 mb-6 border-b border-slate-100">
        <div class="flex items-center">
            <div class="mr-4 relative">
                <div class="w-10 h-10 rounded-lg bg-slate-50 flex items-center justify-center">
                    <i class="{{ page.icon }} text-{{ page.color }}-600 text-lg"></i>
                </div>
                <div class="absolute -bottom-1 -right-1 w-4 h-4 rounded-full bg-{{ page.color }}-100 flex items-center justify-center">
                    <div class="w-2 h-2 rounded-full bg-{{ page.color }}-500"></div>
                </div>
            </div>
            <div>
                <h1 class="text-2xl font-semibold text-slate-800 tracking-tight mb-0.5">{{ page.title }}</h1>
                <p class="text-sm text-slate-500">{{ page.subtitle }}</p>
            </div>
        </div>
        <div class="hidden sm:flex gap-2">
            <button
                onclick="flasher.use('{{ page.theme_name }}').success('Success! Your changes were saved.', 'Well Done')"
                class="px-3 py-1.5 text-xs bg-white hover:bg-gray-50 text-slate-700 rounded-full border border-slate-200 transition-colors flex items-center"
            >
                <i class="fa-regular fa-circle-check text-green-500 mr-1.5"></i> Try Success
            </button>
            <button
                onclick="flasher.use('{{ page.theme_name }}').error('Something went wrong. Please try again.')"
                class="px-3 py-1.5 text-xs bg-white hover:bg-gray-50 text-slate-700 rounded-full border border-slate-200 transition-colors flex items-center"
            >
                <i class="fa-regular fa-circle-xmark text-red-500 mr-1.5"></i> Try Error
            </button>
        </div>
    </header>

    <div class="container mx-auto px-4">
        <!-- Demo buttons for mobile -->
        <div class="sm:hidden flex gap-2 mb-6">
            <button
                onclick="flasher.use('{{ page.theme_name }}').success('Success! Your changes were saved.', 'Well Done')"
                class="flex-1 py-1.5 px-0 text-xs bg-white text-slate-600 rounded-full border border-slate-200 flex items-center justify-center"
            >
                <i class="fa-regular fa-circle-check text-green-500 mr-1"></i> Success
            </button>
            <button
                onclick="flasher.use('{{ page.theme_name }}').error('Something went wrong. Please try again.')"
                class="flex-1 py-1.5 px-0 text-xs bg-white text-slate-600 rounded-full border border-slate-200 flex items-center justify-center"
            >
                <i class="fa-regular fa-circle-xmark text-red-500 mr-1"></i> Error
            </button>
        </div>

        <!-- Notification Examples with darker background -->
        <section class="bg-slate-50 rounded-lg shadow-sm overflow-hidden mb-8">
            {% include themes/{{ page.theme_name_short }}.html %}
        </section>

        <!-- Configuration Section With Clean Tabs -->
        <section class="mb-10">
            <h2 class="text-lg font-semibold text-slate-800 mb-4 border-b border-slate-100 pb-2">Configuration</h2>

            <div class="bg-white rounded-lg shadow-sm border border-slate-200 overflow-hidden">
                <!-- Framework Tabs with Simple Design -->
                <div class="flex border-b border-slate-100 overflow-x-auto bg-slate-50">
                    <button
                        class="tab-button px-5 py-3 text-sm font-medium text-indigo-600 border-b-2 border-indigo-600 whitespace-nowrap focus:outline-none flex items-center space-x-2"
                        data-framework="laravel"
                    >
                        <i class="fab fa-laravel text-red-500"></i>
                        <span>Laravel</span>
                    </button>
                    <button
                        class="tab-button px-5 py-3 text-sm font-medium text-slate-600 hover:text-slate-800 whitespace-nowrap focus:outline-none flex items-center space-x-2"
                        data-framework="symfony"
                    >
                        <i class="fab fa-symfony text-black"></i>
                        <span>Symfony</span>
                    </button>
                    <button
                        class="tab-button px-5 py-3 text-sm font-medium text-slate-600 hover:text-slate-800 whitespace-nowrap focus:outline-none flex items-center space-x-2"
                        data-framework="javascript"
                    >
                        <i class="fab fa-js text-yellow-500"></i>
                        <span>JavaScript</span>
                    </button>
                </div>

                <!-- Pre-rendered tab contents -->
                <div class="framework-content" id="laravel-content">
                    <pre class="language-php bg-slate-800 text-slate-200 text-sm overflow-x-auto"><code>// config/flasher.php

return [
    'default' => '{{ page.theme_name }}',{% if page.has_assets %}

    'themes' => [
        '{{ page.theme_name_short }}' => [
            'scripts' => [
                '/vendor/flasher/flasher.min.css',
                '/vendor/flasher/themes/{{ page.theme_name }}.min.js',
            ],
            'styles' => [
                '/vendor/flasher/themes/{{ page.theme_name }}.min.css',
            ],
        ],
    ],{% endif %}
];</code></pre>
                </div>

                <div class="framework-content hidden" id="symfony-content">
                    <pre class="language-yaml bg-slate-800 text-slate-200 p-4 text-sm overflow-x-auto"><code># config/packages/flasher.yaml

flasher:
    default: {{ page.theme_name }}{% if page.has_assets %}

    themes:
        {{ page.theme_name_short }}:
            scripts:
                - '/vendor/flasher/themes/{{ page.theme_name }}.min.js'
            styles:
                - '/vendor/flasher/themes/{{ page.theme_name }}.min.css'{% endif %}</code></pre>
                </div>

                <div class="framework-content hidden" id="javascript-content">
                    <pre class="language-javascript bg-slate-800 text-slate-200 p-4 text-sm overflow-x-auto"><code>// Set as default theme
// Then use it
flasher.use('{{ page.theme_name }}').success('Well done!');</code></pre>
                </div>
            </div>
        </section>

        <!-- Usage Section with Minimal Design -->
        <section class="mb-10">
            <h2 class="text-lg font-semibold text-slate-800 mb-4 border-b border-slate-100 pb-2">Usage</h2>

            <!-- Combined Usage Section with Tabs -->
            <div class="bg-white rounded-lg shadow-sm border border-slate-200 overflow-hidden">
                <!-- Tabs -->
                <div class="flex border-b border-slate-100 bg-slate-50">
                    <button
                        class="usage-tab px-5 py-3 text-sm font-medium text-indigo-600 border-b-2 border-indigo-600 whitespace-nowrap focus:outline-none flex items-center space-x-2"
                        data-lang="php"
                    >
                        <i class="fab fa-php text-indigo-500"></i>
                        <span>PHP</span>
                    </button>
                    <button
                        class="usage-tab px-5 py-3 text-sm font-medium text-slate-600 hover:text-slate-800 whitespace-nowrap focus:outline-none flex items-center space-x-2"
                        data-lang="js"
                    >
                        <i class="fab fa-js text-yellow-500"></i>
                        <span>JavaScript</span>
                    </button>
                </div>

                <!-- PHP Content -->
                <div class="p-6 usage-content" id="php-content">
                    <div class="mb-6 bg-slate-50 rounded-lg p-4 border border-slate-200">
                        <div class="flex items-center text-sm text-slate-700 mb-2">
                            <div class="w-6 h-6 rounded-full bg-slate-200 flex items-center justify-center mr-2">
                                <i class="fa-solid fa-lightbulb text-slate-600 text-xs"></i>
                            </div>
                            <span class="font-medium">When <span class="font-semibold text-indigo-600">{{ page.theme_name }}</span> is set as your default theme:</span>
                        </div>
                        <pre class="language-php bg-slate-800 text-slate-200 p-4 rounded-lg text-sm overflow-x-auto"><code>flash()->success('Your changes have been saved!');</code></pre>
                    </div>

                    <div class="bg-slate-50 rounded-lg p-4 border border-slate-200">
                        <div class="flex items-center text-sm text-slate-700 mb-2">
                            <div class="w-6 h-6 rounded-full bg-slate-200 flex items-center justify-center mr-2">
                                <i class="fa-solid fa-code text-slate-600 text-xs"></i>
                            </div>
                            <span class="font-medium">For specific notifications:</span>
                        </div>
                        <pre class="language-php bg-slate-800 text-slate-200 p-4 rounded-lg text-sm overflow-x-auto"><code>flash()->use('{{ page.theme_name }}')->success('This uses {{ page.title }}');</code></pre>
                    </div>
                </div>

                <!-- JavaScript Content -->
                <div class="p-6 usage-content hidden" id="js-content">
                    <div class="mb-6 bg-slate-50 rounded-lg p-4 border border-slate-200">
                        <div class="flex items-center text-sm text-slate-700 mb-2">
                            <div class="w-6 h-6 rounded-full bg-slate-200 flex items-center justify-center mr-2">
                                <i class="fa-solid fa-lightbulb text-slate-600 text-xs"></i>
                            </div>
                            <span class="font-medium">When <span class="font-semibold text-indigo-600">{{ page.theme_name }}</span> is set as your default theme:</span>
                        </div>
                        <pre class="language-javascript bg-slate-800 text-slate-200 p-4 rounded-lg text-sm overflow-x-auto"><code>flasher.success('Your changes have been saved!');</code></pre>
                    </div>

                    <div class="bg-slate-50 rounded-lg p-4 border border-slate-200">
                        <div class="flex items-center text-sm text-slate-700 mb-2">
                            <div class="w-6 h-6 rounded-full bg-slate-200 flex items-center justify-center mr-2">
                                <i class="fa-solid fa-code text-slate-600 text-xs"></i>
                            </div>
                            <span class="font-medium">For specific notifications:</span>
                        </div>
                        <pre class="language-javascript bg-slate-800 text-slate-200 p-4 rounded-lg text-sm overflow-x-auto"><code>flasher.use('{{ page.theme_name }}').success('This uses {{ page.title }}');</code></pre>
                    </div>
                </div>
            </div>
        </section>

        <!-- Features Grid with Clean Design -->
        <section class="mb-10">
            <h2 class="text-lg font-semibold text-slate-800 mb-4 border-b border-slate-100 pb-2">Key Features</h2>

            <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                <!-- Visual Design Features -->
                <div class="bg-white rounded-lg shadow-sm border border-slate-200 overflow-hidden">
                    <div class="px-6 py-4 border-b border-slate-100 flex items-center">
                        <div class="w-8 h-8 rounded-lg bg-slate-100 flex items-center justify-center mr-3">
                            <i class="fa-solid fa-palette text-indigo-600"></i>
                        </div>
                        <h3 class="font-medium text-slate-800">Visual Design</h3>
                    </div>
                    <div class="p-6">
                        <ul class="space-y-3">
                            {% for feature in page.visual_features %}
                            <li class="flex items-start">
                                <div class="w-5 h-5 rounded-full bg-green-50 flex-shrink-0 flex items-center justify-center mr-3 mt-0.5">
                                    <i class="fa-solid fa-check text-green-500 text-xs"></i>
                                </div>
                                <span class="text-sm text-slate-600">{{ feature }}</span>
                            </li>
                            {% endfor %}
                        </ul>
                    </div>
                </div>

                <!-- Accessibility Features -->
                <div class="bg-white rounded-lg shadow-sm border border-slate-200 overflow-hidden">
                    <div class="px-6 py-4 border-b border-slate-100 flex items-center">
                        <div class="w-8 h-8 rounded-lg bg-slate-100 flex items-center justify-center mr-3">
                            <i class="fa-solid fa-universal-access text-indigo-600"></i>
                        </div>
                        <h3 class="font-medium text-slate-800">Accessibility</h3>
                    </div>
                    <div class="p-6">
                        <ul class="space-y-3">
                            {% for feature in page.accessibility_features %}
                            <li class="flex items-start">
                                <div class="w-5 h-5 rounded-full bg-green-50 flex-shrink-0 flex items-center justify-center mr-3 mt-0.5">
                                    <i class="fa-solid fa-check text-green-500 text-xs"></i>
                                </div>
                                <span class="text-sm text-slate-600">{{ feature }}</span>
                            </li>
                            {% endfor %}
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Customization Section with Tab System -->
        <section class="mb-10">
            <h2 class="text-lg font-semibold text-slate-800 mb-4 border-b border-slate-100 pb-2">Customization</h2>

            <!-- CSS Variables Tab -->
            <div class="bg-white rounded-lg shadow-sm border border-slate-200 overflow-hidden">
                <div class="flex border-b border-slate-100">
                    <button class="customization-tab px-5 py-3 text-sm font-medium text-indigo-600 border-b-2 border-indigo-600 focus:outline-none" data-tab="css">
                        <i class="fas fa-palette text-indigo-600 mr-2"></i> CSS Variables
                    </button>
                    <button class="customization-tab px-5 py-3 text-sm font-medium text-slate-600 hover:text-slate-800 focus:outline-none" data-tab="html">
                        <i class="fas fa-code text-slate-600 mr-2"></i> HTML Structure
                    </button>
                </div>

                <!-- CSS Variables Content -->
                <div id="css-content" class="customization-content">
                    <div class="bg-slate-800 overflow-hidden">
                        <pre class="language-css text-sm p-4 overflow-x-auto text-slate-200"><code>{{ page.css_variables }}</code></pre>
                    </div>
                </div>

                <!-- HTML Structure Content -->
                <div id="html-content" class="customization-content hidden">
                    <div class="bg-slate-800 overflow-hidden">
                        <pre class="language-html text-sm p-4 overflow-x-auto text-slate-200"><code>{{ page.html_structure | escape }}</code></pre>
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>

<script>
// Simple tab system using show/hide rather than content rendering
document.addEventListener('DOMContentLoaded', function() {
    // Framework tabs
    setupTabs('.tab-button', function(framework) {
        // Hide all framework content divs
        document.querySelectorAll('.framework-content').forEach(content => {
            content.classList.add('hidden');
        });

        // Show the selected framework content
        document.getElementById(framework + '-content').classList.remove('hidden');
    });

    // Language usage tabs
    setupTabs('.usage-tab', function(lang) {
        document.querySelectorAll('.usage-content').forEach(content => {
            content.classList.add('hidden');
        });
        document.getElementById(lang + '-content').classList.remove('hidden');
    });

    // Customization tabs
    setupTabs('.customization-tab', function(tabId) {
        document.querySelectorAll('.customization-content').forEach(content => {
            content.classList.add('hidden');
        });
        document.getElementById(tabId + '-content').classList.remove('hidden');
    });
});

// Simple tab functionality
function setupTabs(tabSelector, callback) {
    const tabs = document.querySelectorAll(tabSelector);

    tabs.forEach(tab => {
        tab.addEventListener('click', function() {
            // Update active state
            tabs.forEach(t => {
                t.classList.remove('text-indigo-600', 'border-b-2', 'border-indigo-600');
                t.classList.add('text-slate-600');
            });

            this.classList.remove('text-slate-600');
            this.classList.add('text-indigo-600', 'border-b-2', 'border-indigo-600');

            // Get id and execute callback
            const id = this.getAttribute('data-framework') ||
                     this.getAttribute('data-lang') ||
                     this.getAttribute('data-tab');

            if (callback) callback(id);
        });
    });
}
</script>
