fix: prevent homepage hero identity fallback mixing
This commit is contained in:
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
{% set heroConfig = homepageConfig.hero or {} %}
|
{% set heroConfig = homepageConfig.hero or {} %}
|
||||||
{% set id = homepageConfig.identity if (homepageConfig and homepageConfig.identity) else {} %}
|
{% set id = homepageConfig.identity if (homepageConfig and homepageConfig.identity) else {} %}
|
||||||
{% set authorName = id.name or site.author.name %}
|
{% set authorName = id.name if (id.name is defined) else site.author.name %}
|
||||||
{% set authorAvatar = id.avatar or site.author.avatar %}
|
{% set authorAvatar = id.avatar if (id.avatar is defined) else site.author.avatar %}
|
||||||
{% set authorTitle = id.title or site.author.title %}
|
{% set authorTitle = id.title if (id.title is defined) else site.author.title %}
|
||||||
{% set authorBio = id.bio or site.author.bio %}
|
{% set authorBio = id.bio if (id.bio is defined) else site.author.bio %}
|
||||||
{% set siteDescription = id.description or site.description %}
|
{% set siteDescription = id.description if (id.description is defined) else site.description %}
|
||||||
{% set socialLinks = id.social if (id.social and id.social.length) else site.social %}
|
{% set socialLinks = id.social if (id.social is defined) else site.social %}
|
||||||
|
|
||||||
<section class="mb-8 sm:mb-12">
|
<section class="mb-8 sm:mb-12">
|
||||||
<div class="flex flex-col sm:flex-row gap-6 sm:gap-8 items-start">
|
<div class="flex flex-col sm:flex-row gap-6 sm:gap-8 items-start">
|
||||||
@@ -31,9 +31,11 @@
|
|||||||
<h1 class="text-2xl sm:text-3xl md:text-4xl font-bold text-surface-900 dark:text-surface-100 mb-2">
|
<h1 class="text-2xl sm:text-3xl md:text-4xl font-bold text-surface-900 dark:text-surface-100 mb-2">
|
||||||
{{ authorName }}
|
{{ authorName }}
|
||||||
</h1>
|
</h1>
|
||||||
|
{% if authorTitle %}
|
||||||
<p class="text-lg sm:text-xl text-accent-600 dark:text-accent-400 mb-3 sm:mb-4">
|
<p class="text-lg sm:text-xl text-accent-600 dark:text-accent-400 mb-3 sm:mb-4">
|
||||||
{{ authorTitle }}
|
{{ authorTitle }}
|
||||||
</p>
|
</p>
|
||||||
|
{% endif %}
|
||||||
{% if authorBio %}
|
{% if authorBio %}
|
||||||
<p class="text-base sm:text-lg text-surface-700 dark:text-surface-300 mb-4">
|
<p class="text-base sm:text-lg text-surface-700 dark:text-surface-300 mb-4">
|
||||||
{{ authorBio }}
|
{{ authorBio }}
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
{% set heroConfig = homepageConfig.hero or {} %}
|
{% set heroConfig = homepageConfig.hero or {} %}
|
||||||
{% set id = homepageConfig.identity if (homepageConfig and homepageConfig.identity) else {} %}
|
{% set id = homepageConfig.identity if (homepageConfig and homepageConfig.identity) else {} %}
|
||||||
{% set authorName = id.name or site.author.name %}
|
{% set authorName = id.name if (id.name is defined) else site.author.name %}
|
||||||
{% set authorAvatar = id.avatar or site.author.avatar %}
|
{% set authorAvatar = id.avatar if (id.avatar is defined) else site.author.avatar %}
|
||||||
{% set authorTitle = id.title or site.author.title %}
|
{% set authorTitle = id.title if (id.title is defined) else site.author.title %}
|
||||||
{% set authorBio = id.bio or site.author.bio %}
|
{% set authorBio = id.bio if (id.bio is defined) else site.author.bio %}
|
||||||
{% set siteDescription = id.description or site.description %}
|
{% set siteDescription = id.description if (id.description is defined) else site.description %}
|
||||||
{% set socialLinks = id.social if (id.social and id.social.length) else site.social %}
|
{% set socialLinks = id.social if (id.social is defined) else site.social %}
|
||||||
|
|
||||||
<section class="mb-8 sm:mb-12">
|
<section class="mb-8 sm:mb-12">
|
||||||
<div class="flex flex-col sm:flex-row gap-6 sm:gap-8 items-start">
|
<div class="flex flex-col sm:flex-row gap-6 sm:gap-8 items-start">
|
||||||
@@ -29,9 +29,11 @@
|
|||||||
<h1 class="text-2xl sm:text-3xl md:text-4xl font-bold text-surface-900 dark:text-surface-100 mb-2">
|
<h1 class="text-2xl sm:text-3xl md:text-4xl font-bold text-surface-900 dark:text-surface-100 mb-2">
|
||||||
{{ authorName }}
|
{{ authorName }}
|
||||||
</h1>
|
</h1>
|
||||||
|
{% if authorTitle %}
|
||||||
<p class="text-lg sm:text-xl text-accent-600 dark:text-accent-400 mb-3 sm:mb-4">
|
<p class="text-lg sm:text-xl text-accent-600 dark:text-accent-400 mb-3 sm:mb-4">
|
||||||
{{ authorTitle }}
|
{{ authorTitle }}
|
||||||
</p>
|
</p>
|
||||||
|
{% endif %}
|
||||||
{% if authorBio %}
|
{% if authorBio %}
|
||||||
<p class="text-base sm:text-lg text-surface-700 dark:text-surface-300 mb-4">
|
<p class="text-base sm:text-lg text-surface-700 dark:text-surface-300 mb-4">
|
||||||
{{ authorBio }}
|
{{ authorBio }}
|
||||||
|
|||||||
Reference in New Issue
Block a user