fix: show hero image only, remove code fallback
Change ternary src check to simple truthy check so image displays when set, otherwise shows nothing instead of code window. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -38,30 +38,7 @@ const d = homepage.data;
|
||||
</div>
|
||||
</div>
|
||||
<div class="hero-visual" {...homepage.edit.hero_image}>
|
||||
{d.hero_image?.src ? (
|
||||
<Image image={d.hero_image} />
|
||||
) : (
|
||||
<div class="code-window">
|
||||
<div class="code-header">
|
||||
<span class="dot red"></span>
|
||||
<span class="dot yellow"></span>
|
||||
<span class="dot green"></span>
|
||||
<span class="code-title">astro.config.mjs</span>
|
||||
</div>
|
||||
<pre class="code-content"><code><span class="keyword">import</span> emdash <span class="keyword">from</span> <span class="string">"emdash/astro"</span>;
|
||||
<span class="keyword">import</span> { betterSqlite } <span class="keyword">from</span> <span class="string">"emdash/db"</span>;
|
||||
|
||||
<span class="keyword">export default</span> defineConfig({
|
||||
<span class="property">integrations</span>: [
|
||||
emdash({
|
||||
<span class="property">database</span>: betterSqlite({
|
||||
<span class="property">databasePath</span>: <span class="string">"./data.db"</span>
|
||||
}),
|
||||
}),
|
||||
],
|
||||
});</code></pre>
|
||||
</div>
|
||||
)}
|
||||
{d.hero_image && <Image image={d.hero_image} />}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user