{{define "deck-card"}}
{{/* Expects: . = *models.Deck, with optional .ShowAuthor bool from parent scope */}}
<div class="deck-card card bg-base-100 overflow-hidden group relative">
<a href="{{if .IsPublished}}/deck/{{.ID}}{{else}}/editor/{{.ID}}{{end}}" class="absolute inset-0 z-10"></a>
{{if .CoverImage}}
<figure class="h-full">
<img src="{{.CoverImage}}" alt="{{.Title}}" class="w-full h-full object-cover" />
</figure>
{{else}}
<figure class="h-full bg-gradient-to-br from-primary/20 to-secondary/20 flex items-center justify-center">
<span class="text-4xl font-bold text-white/30">{{slice .Title 0 1}}</span>
</figure>
{{end}}
<div class="card-body absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/90 to-transparent p-4">
<h3 class="card-title text-white text-lg">{{.Title}}</h3>
<div class="flex items-center gap-2 text-sm text-white/70">
{{if .OwnerAvatar}}
<div class="avatar">
<div class="w-5 rounded-full">
<img src="{{.OwnerAvatar}}" alt="{{.OwnerName}}" />
</div>
</div>
<span>@{{.OwnerHandle}}</span>
{{end}}
{{if .IsPublished}}
<span class="badge badge-success badge-sm">Published</span>
{{else}}
<span class="badge badge-ghost badge-sm">Draft</span>
{{end}}
<span class="ml-auto">{{.ViewCount}} views</span>
</div>
</div>
</div>
{{end}}
Add rich text formatting and block styling to editor
Pitch decks to help promote Skyscape Apps