Skip to content

Commit fc8f17f

Browse files
authored
Faster styles (#120)
* separate dynamic and static styles to decrease load time * back to standard names
1 parent 5fba778 commit fc8f17f

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

renderer/components/eyelogo.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,38 @@ import * as globalStyles from '../globalStyles';
33
export default props => {
44
return (
55
<div className="holder">
6-
<img className="eyelogo" src="/static/icons/splish-eyelogo.png" />
6+
<img
7+
className="eyelogo"
8+
src="/static/icons/splish-eyelogo.png"
9+
height={props.height}
10+
/>
711
{props.withText ? <span className="text">splish</span> : null}
812
<style jsx>{`
913
.holder {
1014
display: flex;
11-
height: ${props.height}px;
1215
flex-direction: row;
1316
align-items: center;
1417
justify-content: center;
1518
}
1619
.eyelogo {
17-
height: ${props.height}px;
1820
margin-right: 7px;
1921
}
2022
2123
.text {
22-
font-size: ${props.height - 5}px;
2324
font-weight: bold;
2425
}
2526
`}</style>
27+
<style jsx>{`
28+
.text {
29+
font-size: ${props.height - 5}px;
30+
}
31+
.holder {
32+
height: ${props.height}px;
33+
}
34+
.text {
35+
height: ${props.height}px;
36+
}
37+
`}</style>
2638
</div>
2739
);
2840
};

renderer/containers/login/login.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,8 @@ class Login extends React.Component {
247247
overflow: 'visible',
248248
}}
249249
>
250-
<div className="eye-logo">
251-
<EyeLogo height={30} withText={true} />
252-
</div>
253-
254250
<div className="logo">
255-
<Logo size={170} />
251+
<EyeLogo height={40} withText={true} />
256252
</div>
257253
{this.renderLogin()}
258254
{this.renderSignUp()}

renderer/containers/mainMenu/mainMenu.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class MainMenu extends React.Component {
5454
<Link href="/movingStill" prefetch>
5555
<div className="action-button">
5656
<img className="icon" src="/static/icons/splish-liquidlogo.png" />
57-
<span>liquigrapher</span>
57+
<span>animagrapher</span>
5858
</div>
5959
</Link>
6060
</div>
@@ -82,11 +82,11 @@ class MainMenu extends React.Component {
8282
}
8383
8484
.action-button {
85-
height: 80px;
85+
height: 100px;
8686
font-size: 24px;
8787
font-weight: normal;
8888
cursor: pointer;
89-
line-height: 80px;
89+
line-height: 100px;
9090
display: flex;
9191
flex-direction: row;
9292
align-items: center;

renderer/containers/profile/profile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class Profile extends React.Component {
242242
.export-holder {
243243
display: inline-flex;
244244
box-sizing: border-box;
245-
padding: 40px 20px;
245+
padding: 80px 20px;
246246
width: 69%;
247247
height: 100%;
248248
overflow: scroll;

0 commit comments

Comments
 (0)