32 lines
1.5 KiB
Plaintext
32 lines
1.5 KiB
Plaintext
<a href="/view/<%= model.slug %>"
|
|
class="group bg-surface-900 border border-gray-800 hover:border-gray-600 rounded-2xl overflow-hidden transition-all duration-200 hover:shadow-2xl hover:shadow-black/30 hover:-translate-y-0.5 flex flex-col">
|
|
|
|
<!-- Thumbnail / placeholder -->
|
|
<div class="aspect-video bg-surface-800 flex items-center justify-center overflow-hidden">
|
|
<% if (model.thumbnail_path) { %>
|
|
<img src="/files/thumbnail/<%= model.id %>"
|
|
alt="<%= model.name %>"
|
|
class="w-full h-full object-cover group-hover:scale-105 transition-transform duration-300" />
|
|
<% } else { %>
|
|
<svg class="w-10 h-10 text-gray-700 group-hover:text-gray-600 transition-colors" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M21 7.5l-9-5.25L3 7.5m18 0l-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9" />
|
|
</svg>
|
|
<% } %>
|
|
</div>
|
|
|
|
<!-- Info -->
|
|
<div class="p-4 flex-1 flex flex-col gap-1">
|
|
<p class="text-sm font-medium text-white group-hover:text-accent transition-colors leading-snug">
|
|
<%= model.name %>
|
|
</p>
|
|
<% if (model.description) { %>
|
|
<p class="text-xs text-gray-500 line-clamp-2 leading-relaxed"><%= model.description %></p>
|
|
<% } %>
|
|
<div class="flex items-center gap-2 mt-auto pt-2">
|
|
<span class="text-xs font-mono bg-surface-800 border border-gray-700 text-gray-500 px-1.5 py-0.5 rounded">
|
|
<%= model.file_type.toUpperCase() %>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</a>
|