{{define "partials/document-list.html"}}
{{if .}}
<div class="divide-y divide-gray-100 dark:divide-gray-700">
    {{range .}}
    <a href="/document/{{.ID}}" class="flex items-center px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
        <span class="text-lg mr-3">{{categoryIcon .Category}}</span>
        <div class="flex-1 min-w-0">
            <p class="font-medium text-gray-900 dark:text-white truncate text-sm">{{.Title}}</p>
            <p class="text-xs text-gray-500 dark:text-gray-400 truncate">{{truncate .Summary 50}}</p>
        </div>
        <span class="ml-2 text-xs text-gray-400">{{title .Category}}</span>
    </a>
    {{end}}
</div>
{{end}}
{{end}}
