div(class="container mx-auto px-4 py-8")
    h1(class="text-3xl font-bold mb-8") Блог
    
    div(v-if="loading" class="text-center") Загрузка...
    
    div(v-else-if="error" class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded") {{ error }}
    
    div(v-else)
        div(v-for="post in posts" :key="post._id" class="bg-white rounded-lg shadow-md p-6 mb-6")
            h2(class="text-2xl font-semibold mb-2")
                app-link(:to="'/blog/'+post._id") {{ post.title }}
            
            p(class="text-gray-600 mb-4") {{ post.excerpt }}
            
            div(class="flex justify-between items-center text-sm text-gray-500")
                span {{ new Date(post.created_at).toLocaleDateString() }}
                span Автор: {{ post.author }}
            
            div(v-if="post.tags" class="mt-4")
                span(v-for="tag in post.tags" :key="tag" class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded mr-2") {{ tag }}
