feat(layout): hide the element when the page title is empty

Hide the element when the page title is empty
This commit is contained in:
Plain 2021-03-26 15:37:54 +08:00 committed by GitHub
parent 0697bf90f8
commit edbc0f666f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -80,9 +80,9 @@ module.exports = class extends Component {
</div>
</div> : null}
{/* Title */}
<h1 class="title is-3 is-size-4-mobile">
{page.title !== '' ? <h1 class="title is-3 is-size-4-mobile">
{index ? <a class="link-muted" href={url_for(page.link || page.path)}>{page.title}</a> : page.title}
</h1>
</h1> : null}
{/* Content/Excerpt */}
<div class="content" dangerouslySetInnerHTML={{ __html: index && page.excerpt ? page.excerpt : page.content }}></div>
{/* Licensing block */}