fix: 插件/主题卡片网格改用内联 grid(auto-fill 多列),修复自定义视图 Tailwind 类未编译导致单列的问题
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<x-filament-panels::page>
|
||||
<x-filament::section heading="主题列表">
|
||||
<div class="grid gap-5 sm:grid-cols-2 lg:grid-cols-3">
|
||||
<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1.25rem">
|
||||
@forelse($this->themes as $theme)
|
||||
<x-filament::section :compact="true" class="!p-0">
|
||||
<div class="flex flex-col">
|
||||
{{-- 主题预览图 --}}
|
||||
<div class="relative aspect-[4/3] overflow-hidden rounded-t-lg bg-gray-100 dark:bg-white/5">
|
||||
<div style="position:relative;aspect-ratio:4/3;overflow:hidden;border-top-left-radius:0.75rem;border-top-right-radius:0.75rem;background:rgba(128,128,128,.08)">
|
||||
@if($theme['screenshot'])
|
||||
<img src="{{ theme('asset', $theme['screenshot'], $theme['name']) }}"
|
||||
alt="{{ $theme['title'] }} 预览"
|
||||
class="h-full w-full object-cover object-top transition-transform duration-300 hover:scale-105">
|
||||
style="width:100%;height:100%;object-fit:cover;object-position:top;transition:transform .3s" onmouseover="this.style.transform='scale(1.05)'" onmouseout="this.style.transform='scale(1)'">
|
||||
@else
|
||||
<div class="flex h-full items-center justify-center text-gray-400">
|
||||
<x-filament::icon icon="heroicon-o-photo" class="h-10 w-10" />
|
||||
|
||||
Reference in New Issue
Block a user