mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 07:37:19 +02:00
On mobile, hide title if logo exists (#629)
* On mobile, hide title if logo exists * Run Prettier, use ternary, reorder * Rename class for clarity * Update main.css
This commit is contained in:
parent
0fff8788fe
commit
7fa0f910ac
2 changed files with 8 additions and 6 deletions
|
@ -213,6 +213,9 @@ class HeaderNav extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const headerClass = siteConfig.headerIcon
|
||||||
|
? 'headerTitleWithLogo'
|
||||||
|
: 'headerTitle';
|
||||||
const versionsLink =
|
const versionsLink =
|
||||||
this.props.baseUrl +
|
this.props.baseUrl +
|
||||||
(env.translation.enabled
|
(env.translation.enabled
|
||||||
|
@ -235,7 +238,7 @@ class HeaderNav extends React.Component {
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{!this.props.config.disableHeaderTitle && (
|
{!this.props.config.disableHeaderTitle && (
|
||||||
<h2 className="headerTitle">{this.props.title}</h2>
|
<h2 className={headerClass}>{this.props.title}</h2>
|
||||||
)}
|
)}
|
||||||
</a>
|
</a>
|
||||||
{env.versioning.enabled && (
|
{env.versioning.enabled && (
|
||||||
|
|
|
@ -522,14 +522,13 @@ header h2 {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
@media (max-width: 375px) {
|
@media (max-width: 480px) {
|
||||||
.logo {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.headerTitle {
|
.headerTitle {
|
||||||
font-size: 17px;
|
font-size: 17px;
|
||||||
}
|
}
|
||||||
|
.headerTitleWithLogo {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.promoSection {
|
.promoSection {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue