Change homepage splash image to background image that keeps its place before loading.
This commit is contained in:
parent
312818d71a
commit
e9a052870c
|
@ -96,11 +96,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&-illustration {
|
&-illustration {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
max-width: 640px;
|
max-width: 640px;
|
||||||
|
background-size: contain;
|
||||||
|
|
||||||
img {
|
&:after {
|
||||||
width: 100%;
|
content: '';
|
||||||
height: auto;
|
display: block;
|
||||||
|
padding-top: 86.3%; // Aspect ratio of img
|
||||||
}
|
}
|
||||||
|
|
||||||
@media @thin-query {
|
@media @thin-query {
|
||||||
|
|
|
@ -32,9 +32,10 @@ const HomeIntro: React.SFC<Props> = ({ t, authUser }) => (
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="HomeIntro-illustration">
|
<div
|
||||||
<img src={HomeIllustration} />
|
className="HomeIntro-illustration"
|
||||||
</div>
|
style={{ backgroundImage: `url(${HomeIllustration})` }}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue