Add AdminLTE-style CSS framework to app.css
- Introduced AdminLTE CSS variables for color palette, body colors, card styles, and button styles. - Implemented card components with variants for primary, success, warning, danger, and info. - Added button styles including sizes and outline variants. - Created form controls, select inputs, and input groups with consistent styling. - Included utility classes for text and background colors, gradients, and shadows. - Developed components for badges, alerts, callouts, progress bars, tables, small boxes, and info boxes. - Integrated modal, dropdown, spinner, tooltip, and direct chat styles. - Established timeline and close button styles, with dark mode support for specific components.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{{--
|
||||
Section Header Component - TailAdmin style
|
||||
Section Header Component - AdminLTE style
|
||||
|
||||
Usage:
|
||||
<x-proxmox::ui.section-header title="Section Title" />
|
||||
@@ -14,7 +14,7 @@
|
||||
'title',
|
||||
'subtitle' => null,
|
||||
'icon' => null,
|
||||
'iconColor' => 'text-brand-500',
|
||||
'iconColor' => null,
|
||||
'actions' => null,
|
||||
'helpText' => null,
|
||||
'size' => 'lg',
|
||||
@@ -22,30 +22,32 @@
|
||||
|
||||
@php
|
||||
$titleSizes = [
|
||||
'sm' => 'text-base font-semibold',
|
||||
'md' => 'text-lg font-semibold',
|
||||
'lg' => 'text-xl font-semibold',
|
||||
'xl' => 'text-2xl font-bold',
|
||||
'sm' => 'font-size: .875rem; font-weight: 600;',
|
||||
'md' => 'font-size: 1rem; font-weight: 600;',
|
||||
'lg' => 'font-size: 1.125rem; font-weight: 600;',
|
||||
'xl' => 'font-size: 1.25rem; font-weight: 700;',
|
||||
];
|
||||
$titleClass = $titleSizes[$size] ?? $titleSizes['lg'];
|
||||
$titleStyle = $titleSizes[$size] ?? $titleSizes['lg'];
|
||||
@endphp
|
||||
|
||||
<div {{ $attributes->class(['flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between']) }}>
|
||||
<div class="flex items-start gap-3.5">
|
||||
@if($icon)
|
||||
<div class="flex size-11 flex-shrink-0 items-center justify-center rounded-xl bg-brand-50 dark:bg-brand-500/10">
|
||||
<x-dynamic-component :component="$icon" class="size-5 {{ $iconColor }} dark:text-brand-400" />
|
||||
<div style="width: 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: .5rem; background: rgba(13, 110, 253, 0.1);">
|
||||
<x-dynamic-component :component="$icon" class="size-5" style="color: #0d6efd;" />
|
||||
</div>
|
||||
@endif
|
||||
<div class="space-y-1">
|
||||
<div style="display: flex; flex-direction: column; gap: .25rem;">
|
||||
<div class="flex min-w-0 items-center gap-2">
|
||||
<h2 class="{{ $titleClass }} text-gray-800 dark:text-white/90">{{ $title }}</h2>
|
||||
<h2 style="{{ $titleStyle }} color: #212529; margin: 0;">{{ $title }}</h2>
|
||||
@if($helpText)
|
||||
<div class="relative" x-data="{ open: false }" x-cloak>
|
||||
<button
|
||||
type="button"
|
||||
@click="open = true"
|
||||
class="text-gray-400 transition-colors duration-150 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300"
|
||||
style="color: #6c757d; transition: color .2s ease;"
|
||||
onmouseover="this.style.color='#495057'"
|
||||
onmouseout="this.style.color='#6c757d'"
|
||||
>
|
||||
<x-ri-question-line class="size-4.5" />
|
||||
</button>
|
||||
@@ -60,8 +62,8 @@
|
||||
x-transition:leave-end="opacity-0"
|
||||
@click="open = false"
|
||||
@keydown.escape.window="open = false"
|
||||
class="fixed inset-0 z-99999 bg-gray-900/50 backdrop-blur-sm dark:bg-gray-900/80"
|
||||
style="display: none;"
|
||||
class="fixed inset-0"
|
||||
style="z-index: 99999; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(2px); display: none;"
|
||||
></div>
|
||||
<div
|
||||
x-show="open"
|
||||
@@ -72,22 +74,22 @@
|
||||
x-transition:leave-start="opacity-100 scale-100"
|
||||
x-transition:leave-end="opacity-0 scale-95"
|
||||
@click.away="open = false"
|
||||
class="fixed inset-0 z-99999 flex items-center justify-center p-4"
|
||||
style="display: none;"
|
||||
class="fixed inset-0 flex items-center justify-center p-4"
|
||||
style="z-index: 99999; display: none;"
|
||||
>
|
||||
<div class="relative max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl border border-gray-200 bg-white p-6 shadow-theme-lg dark:border-gray-800 dark:bg-gray-900">
|
||||
<button @click="open = false" class="absolute right-4 top-4 flex size-9 items-center justify-center rounded-lg text-gray-500 transition-colors duration-150 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300">
|
||||
<div class="modal-lte" style="max-height: 90vh; width: 100%; max-width: 32rem; overflow-y: auto; padding: 1.5rem; background: #fff; border-radius: .375rem; box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);">
|
||||
<button @click="open = false" style="position: absolute; right: 1rem; top: 1rem; width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; border-radius: .25rem; color: #6c757d; border: none; background: transparent; cursor: pointer; transition: background .2s ease, color .2s ease;" onmouseover="this.style.background='#f8f9fa'; this.style.color='#212529'" onmouseout="this.style.background='transparent'; this.style.color='#6c757d'">
|
||||
<x-ri-close-line class="size-5" />
|
||||
</button>
|
||||
<div class="mb-5 flex items-center gap-3.5 pr-8">
|
||||
<div style="margin-bottom: 1.25rem; display: flex; align-items: center; gap: .875rem; padding-right: 2rem;">
|
||||
@if($icon)
|
||||
<div class="flex size-11 items-center justify-center rounded-xl bg-brand-50 dark:bg-brand-500/10">
|
||||
<x-dynamic-component :component="$icon" class="size-5 {{ $iconColor }} dark:text-brand-400" />
|
||||
<div style="width: 2.75rem; height: 2.75rem; display: flex; align-items: center; justify-content: center; border-radius: .5rem; background: rgba(13, 110, 253, 0.1);">
|
||||
<x-dynamic-component :component="$icon" class="size-5" style="color: #0d6efd;" />
|
||||
</div>
|
||||
@endif
|
||||
<h3 class="text-lg font-semibold text-gray-800 dark:text-white/90">{{ $title }}</h3>
|
||||
<h3 style="font-size: 1.125rem; font-weight: 600; color: #212529; margin: 0;">{{ $title }}</h3>
|
||||
</div>
|
||||
<div class="text-theme-sm text-gray-500 dark:text-gray-400">
|
||||
<div style="font-size: .875rem; color: #6c757d; line-height: 1.5;">
|
||||
{{ $helpText }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -96,7 +98,7 @@
|
||||
@endif
|
||||
</div>
|
||||
@if($subtitle)
|
||||
<p class="text-theme-sm text-gray-500 dark:text-gray-400">{{ $subtitle }}</p>
|
||||
<p style="font-size: .875rem; color: #6c757d; margin: 0;">{{ $subtitle }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user