Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show siteTitle if no logo #785

Merged
merged 1 commit into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 12 additions & 1 deletion layout/common/footer.jsx
Expand Up @@ -15,12 +15,23 @@ class Footer extends Component {
visitorCounterTitle
} = this.props;

let footerLogo = '';
if (logo) {
if (logo.text) {
footerLogo = logo.text;
} else {
footerLogo = <img src={logoUrl} alt={siteTitle} height="28" />;
}
} else {
footerLogo = siteTitle;
}

return <footer class="footer">
<div class="container">
<div class="level">
<div class="level-start">
<a class="footer-logo is-block mb-2" href={siteUrl}>
{logo && logo.text ? logo.text : <img src={logoUrl} alt={siteTitle} height="28" />}
{footerLogo}
</a>
<p class="size-small">
<span dangerouslySetInnerHTML={{ __html: `&copy; ${siteYear} ${author || siteTitle}` }}></span>
Expand Down
13 changes: 12 additions & 1 deletion layout/common/navbar.jsx
Expand Up @@ -28,11 +28,22 @@ class Navbar extends Component {
searchTitle
} = this.props;

let navbarLogo = '';
if (logo) {
if (logo.text) {
navbarLogo = logo.text;
} else {
navbarLogo = <img src={logoUrl} alt={siteTitle} height="28" />;
}
} else {
navbarLogo = siteTitle;
}

return <nav class="navbar navbar-main">
<div class="container">
<div class="navbar-brand justify-content-center">
<a class="navbar-item navbar-logo" href={siteUrl}>
{logo && logo.text ? logo.text : <img src={logoUrl} alt={siteTitle} height="28" />}
{navbarLogo}
</a>
</div>
<div class="navbar-menu">
Expand Down