Add a title to the homepage link (#253)
* Add a title to the homepage link
Nurbol Alpysbayev committed
Oct 20, 2022 at 12:00 UTC
706f70c6b3dd9affb0422f8eb4af8b3d8d031c0c
2 files changed
+4
-6
theme/src/components/header.js
+3
-5
@@ -31,8 +31,8 @@ function Header({location, isSearchEnabled = true}) {
31
const [isMobileSearchOpen, setIsMobileSearchOpen] = React.useState(false)
32
const siteMetadata = useSiteMetadata()
33
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' };
36
37
return (
38
<Sticky>
@@ -45,10 +45,8 @@ function Header({location, isSearchEnabled = true}) {
45
bg="#333333"
46
>
47
<Flex alignItems="center">
48
- <Link as={GatsbyLink} to="/" style={logoStyle} mr={3}>
49
- <NpmLogo size="32" />
50
- </Link>
48
<Link as={GatsbyLink} to="/" style={titleStyle} mr={4}>
49
+ <NpmLogo size="32" style={logoStyle} />
50
{siteMetadata.title}
51
</Link>
52
theme/src/components/npm-logo.js
+1
-1
@@ -6,7 +6,7 @@ export default class NpmLogo extends React.Component {
6
const fgcolor = this.props.fg || "#ffffff";
7
8
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">
10
<polygon fill={bgcolor} points="0,700 700,700 700,0 0,0" />
11
<polygon fill={fgcolor} points="150,550 350,550 350,250 450,250 450,550 550,550 550,150 150,150 "/>
12
</svg>