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 @@
|
||||
{{--
|
||||
Server Status Indicator Component - TailAdmin style
|
||||
Server Status Indicator Component - AdminLTE style
|
||||
|
||||
Usage:
|
||||
<x-proxmox::ui.server-status status="running" />
|
||||
@@ -60,77 +60,117 @@
|
||||
|
||||
$config = $statusConfig[strtolower($status)] ?? $statusConfig['unknown'];
|
||||
|
||||
$colorClasses = [
|
||||
'success' => 'text-success-600 dark:text-success-400',
|
||||
'warning' => 'text-warning-600 dark:text-warning-400',
|
||||
'danger' => 'text-error-600 dark:text-error-400',
|
||||
'info' => 'text-blue-light-600 dark:text-blue-light-400',
|
||||
'muted' => 'text-gray-500 dark:text-gray-400',
|
||||
$colorStyles = [
|
||||
'success' => 'color: var(--lte-success, #198754);',
|
||||
'warning' => 'color: #997404;',
|
||||
'danger' => 'color: var(--lte-danger, #dc3545);',
|
||||
'info' => 'color: var(--lte-info, #0dcaf0);',
|
||||
'muted' => 'color: var(--lte-secondary, #6c757d);',
|
||||
];
|
||||
|
||||
$bgClasses = [
|
||||
'success' => 'bg-success-50 dark:bg-success-500/15',
|
||||
'warning' => 'bg-warning-50 dark:bg-warning-500/15',
|
||||
'danger' => 'bg-error-50 dark:bg-error-500/15',
|
||||
'info' => 'bg-blue-light-50 dark:bg-blue-light-500/15',
|
||||
'muted' => 'bg-gray-100 dark:bg-gray-800',
|
||||
$bgStyles = [
|
||||
'success' => 'background-color: rgba(25, 135, 84, 0.1);',
|
||||
'warning' => 'background-color: rgba(255, 193, 7, 0.15);',
|
||||
'danger' => 'background-color: rgba(220, 53, 69, 0.1);',
|
||||
'info' => 'background-color: rgba(13, 202, 240, 0.1);',
|
||||
'muted' => 'background-color: #f8f9fa;',
|
||||
];
|
||||
|
||||
$dotColorClasses = [
|
||||
'success' => 'bg-success-500',
|
||||
'warning' => 'bg-warning-500',
|
||||
'danger' => 'bg-error-500',
|
||||
'info' => 'bg-blue-light-500',
|
||||
'muted' => 'bg-gray-400 dark:bg-gray-500',
|
||||
$dotStyles = [
|
||||
'success' => 'background-color: var(--lte-success, #198754);',
|
||||
'warning' => 'background-color: var(--lte-warning, #ffc107);',
|
||||
'danger' => 'background-color: var(--lte-danger, #dc3545);',
|
||||
'info' => 'background-color: var(--lte-info, #0dcaf0);',
|
||||
'muted' => 'background-color: #adb5bd;',
|
||||
];
|
||||
|
||||
$sizeClasses = [
|
||||
'sm' => 'text-theme-xs px-2 py-1 gap-1.5',
|
||||
'md' => 'text-theme-sm px-2.5 py-1.5 gap-2',
|
||||
'lg' => 'text-base px-3 py-2 gap-2.5',
|
||||
$sizeStyles = [
|
||||
'sm' => 'font-size: 0.75rem; padding: 0.25rem 0.5rem;',
|
||||
'md' => 'font-size: 0.8125rem; padding: 0.375rem 0.625rem;',
|
||||
'lg' => 'font-size: 0.875rem; padding: 0.5rem 0.75rem;',
|
||||
];
|
||||
|
||||
$dotSizes = [
|
||||
'sm' => 'size-1.5',
|
||||
'md' => 'size-2',
|
||||
'lg' => 'size-2.5',
|
||||
];
|
||||
|
||||
$textSizes = [
|
||||
'sm' => 'text-theme-xs',
|
||||
'md' => 'text-theme-sm',
|
||||
'lg' => 'text-base',
|
||||
$dotSizeStyles = [
|
||||
'sm' => 'width: 0.375rem; height: 0.375rem;',
|
||||
'md' => 'width: 0.5rem; height: 0.5rem;',
|
||||
'lg' => 'width: 0.625rem; height: 0.625rem;',
|
||||
];
|
||||
@endphp
|
||||
|
||||
<style>
|
||||
.server-status-lte {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
font-weight: 500;
|
||||
border-radius: 9999px;
|
||||
}
|
||||
.server-status-lte-minimal {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
.server-status-lte-dot-wrapper {
|
||||
position: relative;
|
||||
display: flex;
|
||||
}
|
||||
.server-status-lte-dot {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.server-status-lte-pulse {
|
||||
position: absolute;
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
opacity: 0.6;
|
||||
animation: pulse-lte 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
||||
}
|
||||
@keyframes pulse-lte {
|
||||
0%, 100% {
|
||||
opacity: 0.6;
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
opacity: 0;
|
||||
transform: scale(1.5);
|
||||
}
|
||||
}
|
||||
/* Dark mode */
|
||||
.dark .server-status-lte-muted {
|
||||
background-color: #374151 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@if($minimal)
|
||||
{{-- Minimal dot-only variant --}}
|
||||
<div {{ $attributes->class(['inline-flex items-center', 'gap-1.5' => $showLabel]) }}>
|
||||
<span class="relative flex {{ $dotSizes[$size] ?? $dotSizes['md'] }}">
|
||||
<div
|
||||
{{ $attributes }}
|
||||
class="server-status-lte-minimal"
|
||||
style="gap: {{ $showLabel ? '0.375rem' : '0' }};"
|
||||
>
|
||||
<span class="server-status-lte-dot-wrapper" style="{{ $dotSizeStyles[$size] ?? $dotSizeStyles['md'] }}">
|
||||
@if($config['pulse'])
|
||||
<span class="absolute inline-flex h-full w-full animate-ping rounded-full opacity-60 {{ $dotColorClasses[$config['color']] ?? $dotColorClasses['muted'] }}"></span>
|
||||
<span class="server-status-lte-pulse" style="{{ $dotStyles[$config['color']] ?? $dotStyles['muted'] }}"></span>
|
||||
@endif
|
||||
<span class="relative inline-flex rounded-full {{ $dotSizes[$size] ?? $dotSizes['md'] }} {{ $dotColorClasses[$config['color']] ?? $dotColorClasses['muted'] }}"></span>
|
||||
<span class="server-status-lte-dot" style="{{ $dotSizeStyles[$size] ?? $dotSizeStyles['md'] }} {{ $dotStyles[$config['color']] ?? $dotStyles['muted'] }}"></span>
|
||||
</span>
|
||||
@if($showLabel)
|
||||
<span class="font-medium {{ $colorClasses[$config['color']] ?? $colorClasses['muted'] }} {{ $textSizes[$size] ?? $textSizes['md'] }}">{{ $config['label'] }}</span>
|
||||
<span style="font-weight: 500; {{ $colorStyles[$config['color']] ?? $colorStyles['muted'] }}">{{ $config['label'] }}</span>
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
{{-- Full badge variant --}}
|
||||
<div
|
||||
{{ $attributes->class([
|
||||
'inline-flex items-center font-medium rounded-full',
|
||||
$bgClasses[$config['color']] ?? $bgClasses['muted'],
|
||||
$colorClasses[$config['color']] ?? $colorClasses['muted'],
|
||||
$sizeClasses[$size] ?? $sizeClasses['md'],
|
||||
]) }}
|
||||
{{ $attributes }}
|
||||
class="server-status-lte {{ $config['color'] === 'muted' ? 'server-status-lte-muted' : '' }}"
|
||||
style="{{ $bgStyles[$config['color']] ?? $bgStyles['muted'] }} {{ $colorStyles[$config['color']] ?? $colorStyles['muted'] }} {{ $sizeStyles[$size] ?? $sizeStyles['md'] }} gap: 0.5rem;"
|
||||
>
|
||||
<span class="relative flex {{ $dotSizes[$size] ?? $dotSizes['md'] }}">
|
||||
<span class="server-status-lte-dot-wrapper" style="{{ $dotSizeStyles[$size] ?? $dotSizeStyles['md'] }}">
|
||||
@if($config['pulse'])
|
||||
<span class="absolute inline-flex h-full w-full animate-ping rounded-full bg-current opacity-50"></span>
|
||||
<span class="server-status-lte-pulse" style="background-color: currentColor;"></span>
|
||||
@endif
|
||||
<span class="relative inline-flex rounded-full bg-current {{ $dotSizes[$size] ?? $dotSizes['md'] }}"></span>
|
||||
<span class="server-status-lte-dot" style="{{ $dotSizeStyles[$size] ?? $dotSizeStyles['md'] }} background-color: currentColor;"></span>
|
||||
</span>
|
||||
@if($showLabel)
|
||||
<span>{{ $config['label'] }}</span>
|
||||
|
||||
Reference in New Issue
Block a user