Make entire homepage post card clickable
This commit is contained in:
@@ -15,30 +15,20 @@
|
||||
|
||||
<div class="hx:mt-16" id="post-list">
|
||||
{{- range $i, $p := $pages }}
|
||||
<div
|
||||
class="hx:mb-8 home-post-item{{ if ge $i $batch }} hx:hidden{{ end }}"
|
||||
{{- /* 整块卡片即一个链接:框内任意位置点击都进入文章 */}}
|
||||
<a
|
||||
href="{{ $p.RelPermalink }}"
|
||||
class="home-post-item{{ if ge $i $batch }} hx:hidden{{ end }}"
|
||||
data-index="{{ $i }}"
|
||||
>
|
||||
<h3>
|
||||
<a
|
||||
style="color: inherit; text-decoration: none"
|
||||
class="hx:block hx:font-semibold hx:text-xl"
|
||||
href="{{ $p.RelPermalink }}"
|
||||
>{{ $p.Title }}</a
|
||||
>
|
||||
</h3>
|
||||
<h3 class="hx:text-xl">{{ $p.Title }}</h3>
|
||||
<p class="hx:opacity-50 hx:text-sm hx:mt-1 hx:leading-7">
|
||||
{{ partial "utils/format-date" $p.Date }}
|
||||
</p>
|
||||
<a
|
||||
href="{{ $p.RelPermalink }}"
|
||||
style="color: inherit; text-decoration: none"
|
||||
>
|
||||
<p class="hx:opacity-80 hx:mt-2 hx:leading-7">
|
||||
{{- partial "utils/page-description" $p -}}
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
<p class="hx:opacity-80 hx:mt-2 hx:leading-7">
|
||||
{{- partial "utils/page-description" $p -}}
|
||||
</p>
|
||||
</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user