Merge pull request #852 from plain-dev/patch-1

feat(layout): hide the element when the page title is empty
This commit is contained in:
Ruipeng Zhang 2021-03-26 12:02:36 -04:00 committed by GitHub
commit 652e08af4a
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 */}