Skip to content

Commit 15bd8bc

Browse files
Update fonts
1 parent 87228ed commit 15bd8bc

15 files changed

+127
-39
lines changed

public/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />-->
2626
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,1,0" />-->
2727

28+
<!-- <link rel="preconnect" href="https://fonts.googleapis.com">-->
29+
<!-- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>-->
30+
<!-- <link href="https://fonts.googleapis.com/css2?family=Titillium+Web:wght@200&display=swap" rel="stylesheet">-->
31+
2832
<link rel="shortcut icon" type="image/png" href="images/favicon.png">
2933
<link rel="manifest" href="manifest.json">
3034

public/red2.png

530 KB
Loading

src/components/Mobile.tsx

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, {FC, useState} from "react";
22

33
import '../css/mobile.css'
44
import {texts} from "./mobile/texts";
5+
import Stats from "./mobile/Stats";
56

67
interface MobileProps {}
78

@@ -32,23 +33,11 @@ const Mobile: FC<MobileProps> = ({}) => {
3233
return (
3334
<div className={'mobile'}>
3435
<div className={'list'}>
35-
<img src={'./red1.png'}/>
36+
37+
<img rel={'preload'} src={'./red2.png'}/>
3638
<div className={'form'}>
3739

38-
<div className={'stats ' + (isStats ? 'active' : '')}>
39-
<div>
40-
<div>4</div>
41-
<div>LUCK</div>
42-
</div>
43-
<div>
44-
<div>7</div>
45-
<div>SENTIENT</div>
46-
</div>
47-
<div>
48-
<div>1</div>
49-
<div>FEAR</div>
50-
</div>
51-
</div>
40+
<Stats isStats={isStats}/>
5241

5342
<div className={'text'}>{texts.first}</div>
5443

src/components/mobile/Stats.tsx

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import React, {FC, useEffect, useState} from "react";
2+
3+
interface Props {
4+
isStats: boolean
5+
}
6+
7+
const statsList = {
8+
luck: 4,
9+
sentient: 7,
10+
fear: 1
11+
}
12+
13+
const Stats: FC<Props> = ({isStats}) => {
14+
15+
const [luck, setLuck] = useState(4)
16+
const [sentient, setSentient] = useState(0)
17+
const [fear, setFear] = useState(1)
18+
19+
const setDigitsGrow = () => {
20+
setOneGrow()
21+
}
22+
23+
const setOneGrow = () => {
24+
setTimeout(() => {
25+
setSentient(sentient => {
26+
if (sentient < statsList.sentient) {
27+
setOneGrow()
28+
return sentient + 1
29+
} else return sentient
30+
})
31+
}, 100)
32+
}
33+
34+
useEffect(() => {
35+
if (isStats) {
36+
setSentient(0)
37+
setDigitsGrow()
38+
}
39+
}, [isStats])
40+
41+
return (
42+
<div className={'stats ' + (isStats ? 'active' : '')}>
43+
<div>
44+
<div>0 / 100</div>
45+
<div className={'value'}>{luck}</div>
46+
<div>LUCK</div>
47+
</div>
48+
<div>
49+
<div>Estimate</div>
50+
<div className={'value'}>{sentient}</div>
51+
<div>SENTIENT</div>
52+
</div>
53+
<div>
54+
<div>Growing</div>
55+
<div className={'value'}>{fear}</div>
56+
<div>FEAR</div>
57+
</div>
58+
{/*<div>*/}
59+
{/* <div>Always</div>*/}
60+
{/* <div className={'value'}>3</div>*/}
61+
{/* <div>{'anxiety'.toUpperCase()}</div>*/}
62+
{/*</div>*/}
63+
</div>
64+
)
65+
}
66+
67+
export default Stats;

src/components/mobile/texts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export let texts = {
44

55
// desire, wisdom, jealousy, courage, uncertainty, ambition, loyalty, empathy, curiosity, anxiety, tranquility.
66

7-
// Grief, compassion, contentment, pride, indifference, anticipation, apathy, skepticism, inspiration, determination, nostalgia.
7+
// grief, compassion, contentment, pride, indifference, anticipation, apathy, skepticism, inspiration, determination, nostalgia.
88

99
export default {texts}

src/css/index.css

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
1-
@font-face {
2-
font-family: 'Open Sans';
3-
src: url('../fonts/OpenSans/OpenSans-Regular.ttf');
4-
}
1+
/*@font-face {*/
2+
/* font-family: 'Open Sans';*/
3+
/* src: url('../fonts/OpenSans/OpenSans-Regular.ttf');*/
4+
/*}*/
5+
6+
/*@font-face {*/
7+
/* font-family: 'Open Sans';*/
8+
/* src: url('../fonts/OpenSans/OpenSans-Light.ttf');*/
9+
/* font-weight: 300;*/
10+
/*}*/
11+
12+
/*@font-face {*/
13+
/* font-family: 'Open Sans';*/
14+
/* src: url('../fonts/OpenSans/OpenSans-Bold.ttf');*/
15+
/* font-weight: 700;*/
16+
/*}*/
517

618
@font-face {
7-
font-family: 'Open Sans';
8-
src: url('../fonts/OpenSans/OpenSans-Light.ttf');
9-
font-weight: 300;
19+
font-family: 'Titillium Web';
20+
src: url('../fonts/Titillium/TitilliumWeb-ExtraLight.ttf');
21+
font-weight: 200;
1022
}
1123

1224
@font-face {
13-
font-family: 'Open Sans';
14-
src: url('../fonts/OpenSans/OpenSans-Bold.ttf');
15-
font-weight: 700;
25+
font-family: 'Titillium Web';
26+
src: url('../fonts/Titillium/TitilliumWeb-SemiBold.ttf');
27+
font-weight: 600;
1628
}
1729

1830
body {
@@ -31,9 +43,10 @@ body {
3143

3244
/*padding-top: env(safe-area-inset-top) !important;*/
3345

34-
font-family: 'Open Sans', sans-serif;
35-
font-size: 18px;
36-
font-weight: 400;
46+
/*font-family: 'Open Sans', sans-serif;*/
47+
font-family: 'Titillium Web', sans-serif;
48+
font-size: 16px;
49+
/*font-weight: 400;*/
3750
letter-spacing: 1px;
3851

3952
user-select: none; /* supported by Chrome and Opera */

src/css/mobile.css

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@
4040
background: rgba(31, 29, 29, 0.3);
4141
border-radius: 10px;
4242

43+
font-size: 18px;
4344
text-align: left;
4445
line-height: 160%;
45-
letter-spacing: 1px;
46+
/*letter-spacing: 1px;*/
4647

47-
font-weight: 300;
48+
font-weight: 200;
4849

49-
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
50+
/*box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);*/
5051
}
5152

5253
.mobile .controls {
@@ -145,40 +146,54 @@
145146
justify-content: space-around;
146147

147148
width: 80%;
148-
margin: 50px auto 50px;
149+
padding: 0;
150+
margin: auto;
151+
/*margin: 0 auto 0;*/
149152

150153
color: white;
151154

152155
opacity: 0;
153156
height: 0;
154157

155-
transition: all .5s;
158+
transition: opacity .0s, margin .5s;
156159
}
157160

158161
.stats.active {
159162
opacity: 1;
160163
height: auto;
164+
/*margin: 50px auto 50px;*/
165+
padding: 20px 0;
166+
167+
transition: all 1s ease-out;
161168
}
162169

163170
.stats > div {
164171
justify-content: center;
165172
align-items: center;
166173
text-align: center;
167174

168-
width: 30%;
175+
width: 25%;
169176
}
170177

171-
172178
.stats > div > div:first-child {
173-
font-size: 26px;
179+
font-size: 10px;
174180
font-weight: 300;
181+
opacity: .4;
182+
}
183+
184+
.stats > div > div.value {
185+
font-size: 28px;
186+
font-weight: 300;
187+
margin-top: 10px;
175188
margin-bottom: 10px;
176189
/*opacity: .5;*/
177190
}
178191

179192
.stats > div > div:last-child {
180193
font-size: 14px;
181-
font-weight: 700;
194+
font-weight: 600;
195+
196+
opacity: .7;
182197
}
183198

184199
.version {

src/fonts/OpenSans/OpenSans-Bold.ttf

-127 KB
Binary file not shown.
-127 KB
Binary file not shown.

src/fonts/OpenSans/OpenSans-Light.ttf

-127 KB
Binary file not shown.
-127 KB
Binary file not shown.
-127 KB
Binary file not shown.
55.4 KB
Binary file not shown.
55.4 KB
Binary file not shown.

webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = () => {
99
const mode = process.env.NODE_ENV || 'development'
1010
const SOURCE_FOLDER = path.resolve(__dirname, 'src')
1111
const DIST_FOLDER = path.resolve(__dirname, 'dist')
12-
let VERSION = process.env.HEROKU_SLUG_COMMIT
12+
let VERSION = process.env.HEROKU_SLUG_COMMIT || 'DEV'
1313
console.log(VERSION)
1414
VERSION = JSON.stringify(VERSION)
1515

0 commit comments

Comments
 (0)