feat: latest posts on the home card

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
protokeyandClaude Opus 5.5 committed 2026-10-11 00:04:44 +04:00
1 parent 04a09961e7
commit bb26176277
4 files changed
+39

No files matched your search

+22
View File
@@ -65,3 +65,25 @@ h1, h2, h3 { letter-spacing: -0.02em; }
.vcard__more { display: inline-block; margin-top: 1.5rem; font-size: .9rem; color: rgba(var(--color-primary-400), 1); text-decoration: none; } .vcard__more { display: inline-block; margin-top: 1.5rem; font-size: .9rem; color: rgba(var(--color-primary-400), 1); text-decoration: none; }
.vcard__more:hover { text-decoration: underline; } .vcard__more:hover { text-decoration: underline; }
.vcard__heading {
margin: 1.75rem 0 0; font-size: .8rem; font-weight: 600;
text-transform: uppercase; letter-spacing: .08em;
color: rgba(var(--color-neutral-400), 1);
}
.vcard__posts { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .5rem; }
.vcard__posts a {
display: flex; flex-direction: column; gap: .15rem;
padding: .6rem 1rem; border-radius: .75rem;
text-align: left; text-decoration: none; color: #fff;
background: rgba(255,255,255,.04);
border: 1px solid rgba(255,255,255,.08);
transition: background .15s, border-color .15s, transform .15s;
}
.vcard__posts a:hover {
background: rgba(var(--color-primary-600), .2);
border-color: rgba(var(--color-primary-500), .35);
transform: translateY(-1px);
}
.vcard__post-title { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.vcard__post-date { font-size: .8rem; color: rgba(var(--color-neutral-400), 1); }
+1
View File
@@ -1 +1,2 @@
moreAboutMe: "More about me →" moreAboutMe: "More about me →"
recentPosts: "Latest posts"
+1
View File
@@ -1 +1,2 @@
moreAboutMe: "Подробнее обо мне →" moreAboutMe: "Подробнее обо мне →"
recentPosts: "Свежие записи"
+15
View File
@@ -32,6 +32,21 @@
{{ end }} {{ end }}
</ul> </ul>
{{ $posts := first 3 (where site.RegularPages "Section" "in" site.Params.mainSections).ByDate.Reverse }}
{{ with $posts }}
<h2 class="vcard__heading">{{ i18n "recentPosts" }}</h2>
<ul class="vcard__posts">
{{ range . }}
<li>
<a href="{{ .RelPermalink }}">
<span class="vcard__post-title">{{ .Title }}</span>
<time class="vcard__post-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date | time.Format site.Params.dateFormat }}</time>
</a>
</li>
{{ end }}
</ul>
{{ end }}
{{ with $p.more }}<a class="vcard__more" href="{{ . | relLangURL }}">{{ i18n "moreAboutMe" }}</a>{{ end }} {{ with $p.more }}<a class="vcard__more" href="{{ . | relLangURL }}">{{ i18n "moreAboutMe" }}</a>{{ end }}
</div> </div>
</section> </section>