You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.3 KiB
34 lines
1.3 KiB
extends /layouts/empty.pug
|
|
|
|
block pageContent
|
|
.container.mx-auto.px-4.py-8
|
|
.mb-8
|
|
h1.text-3xl.font-bold.mb-4
|
|
span.text-gray-600 搜索结果:
|
|
= keyword
|
|
p.text-gray-500 找到 #{articles.length} 篇相关文章
|
|
|
|
.grid.grid-cols-1.md:grid-cols-2.lg:grid-cols-3.gap-6
|
|
each article in articles
|
|
.bg-white.shadow-md.rounded-lg.overflow-hidden
|
|
if article.featured_image
|
|
img.w-full.h-48.object-cover(src=article.featured_image alt=article.title)
|
|
.p-6
|
|
h2.text-xl.font-semibold.mb-2
|
|
a.hover:text-blue-600(href=`/articles/${article.slug}`)= article.title
|
|
if article.excerpt
|
|
p.text-gray-600.mb-4= article.excerpt
|
|
.flex.justify-between.items-center
|
|
.text-sm.text-gray-500
|
|
span.mr-4
|
|
i.fas.fa-calendar-alt.mr-1
|
|
= new Date(article.published_at).toLocaleDateString()
|
|
span
|
|
i.fas.fa-eye.mr-1
|
|
= article.view_count + " 阅读"
|
|
if article.category
|
|
a.text-sm.bg-blue-100.text-blue-600.px-3.py-1.rounded-full.hover:bg-blue-200(href=`/articles/category/${article.category}`)= article.category
|
|
|
|
if !articles.length
|
|
.text-center.py-8
|
|
p.text-gray-500 未找到相关文章
|
|
|