Skip to content

Commit b00a0eb

Browse files
authored
Merge pull request #5 from PracticumTeam04/feat/fonts_and_config
Feat/fonts and config
2 parents 208e5cd + 36928b9 commit b00a0eb

13 files changed

+42
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"superagent-promise": "^1.1.0"
2424
},
2525
"scripts": {
26-
"start": "cross-env PORT=4100 react-scripts start",
26+
"start": "cross-env PORT=4100 REACT_APP_API_ROOT=http://localhost:3000/api react-scripts start",
2727
"build": "react-scripts build",
2828
"test": "cross-env PORT=4100 react-scripts test --env=jsdom",
2929
"eject": "react-scripts eject"

src/agent.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import superagentPromise from 'superagent-promise';
22
import _superagent from 'superagent';
3+
import { REACT_APP_API_ROOT as API_ROOT } from './config';
34

45
const superagent = superagentPromise(_superagent, global.Promise);
56

6-
const API_ROOT = 'http://localhost:3000/api';
7-
87
const encode = encodeURIComponent;
98
const responseBody = res => res.body;
109

src/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// todo: change build api domain
2+
export const { REACT_APP_API_ROOT = 'buildApiDomain' } = process.env;

src/index.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import url(./vendor/fonts/fonts.css);

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import { ConnectedRouter } from 'react-router-redux';
88

99
import App from './components/App';
1010

11+
import './index.css';
12+
1113
ReactDOM.render((
1214
<Provider store={store}>
1315
<ConnectedRouter history={history}>

src/utils/index.js

Whitespace-only changes.
38.6 KB
Binary file not shown.
28.7 KB
Binary file not shown.
38 KB
Binary file not shown.
28.1 KB
Binary file not shown.
58.9 KB
Binary file not shown.
59.6 KB
Binary file not shown.

src/vendor/fonts/fonts.css

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@font-face {
2+
font-family: 'GolosText';
3+
font-style: normal;
4+
font-weight: 400;
5+
font-display: swap;
6+
src:
7+
url('./Golos-Text_Regular.woff2') format('woff2'),
8+
url('./Golos-Text_Regular.woff') format('woff');
9+
}
10+
11+
@font-face {
12+
font-family: 'GolosText';
13+
font-style: normal;
14+
font-weight: 500;
15+
font-display: swap;
16+
src:
17+
url('./Golos-Text_Medium.woff2') format('woff2'),
18+
url('./Golos-Text_Medium.woff') format('woff');
19+
}
20+
21+
@font-face {
22+
font-family: 'NeueMachina';
23+
font-style: normal;
24+
font-weight: 400;
25+
font-display: swap;
26+
src: url('./PPNeueMachina-Regular.otf') format('opentype');
27+
}
28+
29+
@font-face {
30+
font-family: 'NeueMachina';
31+
font-style: normal;
32+
font-weight: 800;
33+
font-display: swap;
34+
src: url('./PPNeueMachina-Ultrabold.otf') format('opentype');
35+
}

0 commit comments

Comments
 (0)