Restyle homepage

This commit is contained in:
Hippo 2019-09-28 11:09:39 +05:30
parent abf2cde607
commit 32d6c06568
2 changed files with 12 additions and 2 deletions

View file

@ -39,12 +39,14 @@ const DefaultLayout = ({ data, children, bodyClass, isHome, hasFeatureImage }) =
<div className="container">
<div className="site-mast">
<div className="site-mast-left">
{ !isHome &&
<Link to="/">
{site.logo ?
<img className="site-logo" src={site.logo} alt={site.title} />
: <Img fixed={data.file.childImageSharp.fixed} alt={site.title} />
}
</Link>
}
</div>
<div className="site-mast-right">
{ site.twitter && <a href={ twitterUrl } className="site-nav-item" target="_blank" rel="noopener noreferrer"><img className="site-nav-icon" src="/images/icons/twitter.svg" alt="Twitter" /></a>}
@ -54,7 +56,10 @@ const DefaultLayout = ({ data, children, bodyClass, isHome, hasFeatureImage }) =
</div>
{ isHome ?
<div className="site-banner">
<h1 className="site-banner-title">{site.title}</h1>
{site.logo ?
<h1 className="site-banner-title"><img className="site-logo-home" src={site.logo} alt={site.title} /></h1>
: <h1 className="site-banner-title">{site.title}</h1>
}
<p className="site-banner-desc">{site.description}</p>
</div> :
null}
@ -64,7 +69,7 @@ const DefaultLayout = ({ data, children, bodyClass, isHome, hasFeatureImage }) =
<Navigation data={site.navigation} navClass="site-nav-item" />
</div>
<div className="site-nav-right">
<Link className="site-nav-button" to="/about">About</Link>
<Link className="site-nav-button" to="/subscribe">Subscribe</Link>
</div>
</nav>
</div>

View file

@ -698,6 +698,11 @@ h6 {
height: 25px;
}
.site-logo-home {
height: 6rem;
margin: 1rem;
}
.site-mast {
display: flex;
align-items: center;