Skip to content

Commit 706f70c

Browse files
authored
Add a title to the homepage link (npm#253)
* Add a title to the homepage link
1 parent d4ce7e1 commit 706f70c

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

theme/src/components/header.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ function Header({location, isSearchEnabled = true}) {
3131
const [isMobileSearchOpen, setIsMobileSearchOpen] = React.useState(false)
3232
const siteMetadata = useSiteMetadata()
3333

34-
const logoStyle = { 'color': '#cb0000' };
35-
const titleStyle = { 'color': '#dddddd', 'fontWeight': '600' };
34+
const logoStyle = { 'color': '#cb0000', 'marginRight': '16px' };
35+
const titleStyle = { 'color': '#dddddd', 'fontWeight': '600', 'display': 'flex', 'alignItems': 'center' };
3636

3737
return (
3838
<Sticky>
@@ -45,10 +45,8 @@ function Header({location, isSearchEnabled = true}) {
4545
bg="#333333"
4646
>
4747
<Flex alignItems="center">
48-
<Link as={GatsbyLink} to="/" style={logoStyle} mr={3}>
49-
<NpmLogo size="32" />
50-
</Link>
5148
<Link as={GatsbyLink} to="/" style={titleStyle} mr={4}>
49+
<NpmLogo size="32" style={logoStyle} />
5250
{siteMetadata.title}
5351
</Link>
5452

theme/src/components/npm-logo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default class NpmLogo extends React.Component {
66
const fgcolor = this.props.fg || "#ffffff";
77

88
return (
9-
<svg height={this.props.size} width={this.props.size} viewBox="0 0 700 700" fill="currentColor">
9+
<svg height={this.props.size} width={this.props.size} viewBox="0 0 700 700" fill="currentColor" style={this.props.style} aria-hidden="true">
1010
<polygon fill={bgcolor} points="0,700 700,700 700,0 0,0" />
1111
<polygon fill={fgcolor} points="150,550 350,550 350,250 450,250 450,550 550,550 550,150 150,150 "/>
1212
</svg>

0 commit comments

Comments
 (0)