mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-05-15 15:08:51 +02:00
feat: add essential h-card properties to blog sidebar
Compact author card now includes p-author, u-uid, p-locality, p-country-name, and p-note (hidden) for microformat completeness.
This commit is contained in:
@@ -1,22 +1,28 @@
|
|||||||
{# Blog Sidebar - Shown on individual post pages #}
|
{# Blog Sidebar - Shown on individual post pages #}
|
||||||
{# Contains: Author compact card, Related posts, Categories, Recent posts #}
|
{# Contains: Author compact card, Related posts, Categories, Recent posts #}
|
||||||
|
|
||||||
{# Author Compact Card #}
|
{# Author Compact Card - h-card microformat (compact version) #}
|
||||||
<div class="widget">
|
<div class="widget">
|
||||||
<div class="h-card flex items-center gap-3">
|
<div class="h-card p-author flex items-center gap-3">
|
||||||
|
<a href="{{ site.author.url }}" class="u-url u-uid" rel="me">
|
||||||
<img
|
<img
|
||||||
src="{{ site.author.avatar }}"
|
src="{{ site.author.avatar }}"
|
||||||
alt="{{ site.author.name }}"
|
alt="{{ site.author.name }}"
|
||||||
class="u-photo w-12 h-12 rounded-full object-cover"
|
class="u-photo w-12 h-12 rounded-full object-cover"
|
||||||
loading="lazy"
|
loading="lazy"
|
||||||
>
|
>
|
||||||
|
</a>
|
||||||
<div>
|
<div>
|
||||||
<a href="{{ site.author.url }}" class="u-url p-name font-medium text-surface-900 dark:text-surface-100 hover:text-primary-600 dark:hover:text-primary-400">
|
<a href="{{ site.author.url }}" class="u-url p-name font-medium text-surface-900 dark:text-surface-100 hover:text-primary-600 dark:hover:text-primary-400">
|
||||||
{{ site.author.name }}
|
{{ site.author.name }}
|
||||||
</a>
|
</a>
|
||||||
<p class="p-job-title text-xs text-surface-500">{{ site.author.title }}</p>
|
<p class="p-job-title text-xs text-surface-500">{{ site.author.title }}</p>
|
||||||
|
{% if site.author.locality %}
|
||||||
|
<p class="p-locality text-xs text-surface-500">{{ site.author.locality }}{% if site.author.country %}, <span class="p-country-name">{{ site.author.country }}</span>{% endif %}</p>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<p class="p-note text-sm text-surface-600 dark:text-surface-400 mt-2 hidden">{{ site.author.bio }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# Post Navigation Widget - Previous/Next #}
|
{# Post Navigation Widget - Previous/Next #}
|
||||||
|
|||||||
Reference in New Issue
Block a user