Skip to content

Commit 40955c1

Browse files
Merge branch 'master' into patch-14
2 parents e08f43d + bbd9ae9 commit 40955c1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1619
-1214
lines changed

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"tabWidth": 4,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ user@example:~$ tarantool
202202
We are using _[Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)_ with some modifications (see .eslintrc).
203203
Please run _eslint_ in the working directory before committing your changes and make sure you didn't introduce any new styling issues.
204204

205+
We use prettier to autofromat the code. Run `yarn run fmt` to format everything in `src/`, or `yarn exec -- prettier --config .prettierrc --write src/whatever/file.js` for a specific file.
206+
205207
##### CSS & SCSS
206208
If a component requires a css rule, please use its uppercase name for the class, e.g. "Header" class for the header's root div.
207209
We adhere to BEM methodology with exception for Foundation classes, here is an example for the Header component:

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"test:watch:all": "npm test -- --watch --watch-extensions jsx",
1515
"test:watch": "npm run mocha -- --watch --watch-extensions jsx",
1616
"eslint": "LIST=`git diff-index --name-only HEAD | grep .*\\.js | grep -v json`; if [ \"$LIST\" ]; then eslint $LIST; fi",
17+
"fmt": "prettier --config .prettierrc --write src",
1718
"production": "NODE_ENV=production node lib/server/index.js",
1819
"start": "NODE_ENV=development ./node_modules/babel-cli/bin/babel-node.js ./webpack/dev-server.js",
1920
"webpush": "./node_modules/babel-cli/bin/babel-node.js ./scripts/webpush_notify.js",
@@ -23,6 +24,7 @@
2324
"license": "MIT",
2425
"dependencies": {
2526
"@steem/crypto-session": "git+https://github.com/steemit/crypto-session.git#83a90b319ce5bc6a70362d52a15a815de7e729bb",
27+
"@steemit/steem-js": "0.6.7",
2628
"assert": "^1.3.0",
2729
"autoprefixer-loader": "^3.2.0",
2830
"babel-cli": "^6.22.2",
@@ -117,7 +119,6 @@
117119
"react-timeago": "^3.1.2",
118120
"redux": "^3.3.1",
119121
"redux-form": "5.3.4",
120-
"redux-modules": "0.0.5",
121122
"redux-saga": "^0.9.5",
122123
"remarkable": "^1.7.1",
123124
"sanitize-html": "^1.11.4",
@@ -128,7 +129,6 @@
128129
"sequelize-cli": "^2.3.1",
129130
"speakingurl": "^9.0.0",
130131
"sqlite3": "^3.1.8",
131-
"@steemit/steem-js": "0.6.7",
132132
"store": "^1.3.20",
133133
"style-loader": "^0.18.2",
134134
"svg-inline-loader": "^0.8.0",
@@ -170,6 +170,7 @@
170170
"mocha": "^2.4.5",
171171
"node-watch": "^0.5.5",
172172
"pre-commit": "^1.2.2",
173+
"prettier": "1.8.2",
173174
"react-addons-perf": "15.4.2",
174175
"react-addons-test-utils": "15.4.2",
175176
"react-transform-catch-errors": "^1.0.1",
@@ -185,9 +186,5 @@
185186
"engines": {
186187
"node": ">=8.7.0",
187188
"npm": ">=5.4.2"
188-
},
189-
"pre-commit": [
190-
"eslint",
191-
"checktranslations"
192-
]
189+
}
193190
}

src/app/assets/stylesheets/_themes.scss

Lines changed: 63 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ $themes: (
55
colorAccentReverse: $color-blue-original-light,
66
colorWhite: $color-white,
77
backgroundColor: $color-background-off-white,
8+
backgroundColorEmphasis: $color-background-almost-white,
89
backgroundColorOpaque: $color-background-off-white,
910
backgroundTransparent: transparent,
1011
moduleBackgroundColor: $color-white,
@@ -30,15 +31,16 @@ $themes: (
3031
buttonText: $color-text-white,
3132
buttonTextShadow: 0 1px 0 rgba(0,0,0,0.20),
3233
buttonTextHover: $color-text-white,
33-
buttonBoxShadow: $color-transparent,
34+
buttonBoxShadow: $color-transparent,
3435
),
3536
light: (
3637
colorAccent: $color-teal,
3738
colorAccentHover: $color-teal-dark,
3839
colorAccentReverse: $color-blue-black,
3940
colorWhite: $color-white,
4041
backgroundColor: $color-background-off-white,
41-
backgroundColorOpaque: $color-background-off-white,
42+
backgroundColorEmphasis: $color-background-almost-white,
43+
backgroundColorOpaque: $color-background-off-white,
4244
backgroundTransparent: transparent,
4345
moduleBackgroundColor: $color-white,
4446
menuBackgroundColor: $color-background-dark,
@@ -54,8 +56,8 @@ $themes: (
5456
iconColorSecondary: #cacaca,
5557
textColorPrimary: $color-text-dark,
5658
textColorSecondary: $color-text-gray,
57-
textColorAccent: $color-text-teal,
58-
textColorAccentHover: $color-teal,
59+
textColorAccent: $color-text-teal,
60+
textColorAccentHover: $color-teal,
5961
textColorError: $color-text-red,
6062
contentBorderAccent: $color-teal,
6163
buttonBackground: $color-blue-black,
@@ -64,14 +66,15 @@ $themes: (
6466
buttonTextShadow: 0 1px 0 rgba(0,0,0,0.20),
6567
buttonTextHover: $color-white,
6668
buttonBoxShadow: $color-teal,
67-
buttonBoxShadowHover: $color-blue-black,
69+
buttonBoxShadowHover: $color-blue-black,
6870
),
6971
dark: (
7072
colorAccent: $color-teal,
7173
colorAccentHover: $color-teal,
7274
colorAccentReverse: $color-white,
7375
colorWhite: $color-white,
7476
backgroundColor: $color-background-dark,
77+
backgroundColorEmphasis: $color-background-super-dark,
7578
backgroundColorOpaque: $color-blue-dark,
7679
moduleBackgroundColor: $color-background-dark,
7780
backgroundTransparent: transparent,
@@ -125,74 +128,74 @@ $themes: (
125128

126129

127130
.theme-original {
128-
background-color: $white;
131+
background-color: $white;
129132
color: $color-text-dark;
130133
@include MQ(M) {
131-
background-color: $color-background-off-white;
134+
background-color: $color-background-off-white;
132135
}
133136
}
134137
.theme-light {
135-
background-color: $white;
138+
background-color: $white;
136139
color: $color-text-dark;
137140
@include MQ(M) {
138-
background-color: $color-background-off-white;
139-
}
141+
background-color: $color-background-off-white;
142+
}
140143
}
141144
.theme-dark {
142-
background-color: $color-background-dark;
145+
background-color: $color-background-dark;
143146
color: $color-text-white;
144147
}
145148

146149

147-
// Utility classes to be used with @extend
150+
// Utility classes to be used with @extend
148151

149152
.link {
150153
text-decoration: none;
151154
transition: 0.2s all ease-in-out;
152155
&--primary {
153156
@include themify($themes) {
154-
color: themed('textColorPrimary');
157+
color: themed('textColorPrimary');
155158
}
156159
&:visited, &:active {
157160
@include themify($themes) {
158-
color: themed('textColorPrimary');
159-
}
160-
}
161+
color: themed('textColorPrimary');
162+
}
163+
}
161164
&:hover, &:focus {
162165
@include themify($themes) {
163-
color: themed('textColorAccent');
164-
}
166+
color: themed('textColorAccent');
167+
}
165168
}
166169
}
167170
&--secondary {
168171
@include themify($themes) {
169-
color: themed('textColorSecondary');
172+
color: themed('textColorSecondary');
170173
}
171174
&:visited, &:active {
172175
@include themify($themes) {
173-
color: themed('textColorSecondary');
174-
}
175-
}
176+
color: themed('textColorSecondary');
177+
}
178+
}
176179
&:hover, &:focus {
177180
@include themify($themes) {
178-
color: themed('textColorAccent');
179-
}
180-
}
181+
color: themed('textColorAccent');
182+
}
183+
}
181184
}
182185
&--accent {
183186
@include themify($themes) {
184-
color: themed('textColorAccent');
187+
color: themed('textColorAccent');
185188
}
186189
&:visited, &:active {
187190
@include themify($themes) {
188-
color: themed('textColorAccent');
189-
}
190-
}
191+
color: themed('textColorAccent');
192+
}
193+
}
191194
&:hover, &:focus {
192195
@include themify($themes) {
193-
color: themed('textColorAccentHover');
194-
}
195-
}
196+
color: themed('textColorAccentHover');
197+
}
198+
}
196199
}
197200
}
198201

@@ -201,15 +204,15 @@ $themes: (
201204
transition: 0.2s all ease-in-out;
202205
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0);
203206
@include themify($themes) {
204-
border: themed('borderAccent');
205-
color: themed('textColorAccent');
206-
}
207+
border: themed('borderAccent');
208+
color: themed('textColorAccent');
209+
}
207210
&:hover {
208211
@include themify($themes) {
209-
border: themed('borderDark');
210-
color: themed('textColorPrimary');
211-
}
212-
}
212+
border: themed('borderDark');
213+
color: themed('textColorPrimary');
214+
}
215+
}
213216
}
214217

215218
.e-btn {
@@ -220,76 +223,76 @@ $themes: (
220223
border-radius: 0;
221224
text-decoration: none;
222225
text-transform: capitalize;
223-
@include font-size(18px);
226+
@include font-size(18px);
224227
@include themify($themes) {
225-
background-color: themed('buttonBackground');
226-
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0), 5px 5px 0 0 themed('buttonBoxShadow');
228+
background-color: themed('buttonBackground');
229+
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0), 5px 5px 0 0 themed('buttonBoxShadow');
227230
color: themed('buttonText');
228231
}
229232
&:hover, &:focus {
230233
@include themify($themes) {
231-
background-color: themed('buttonBackgroundHover');
232-
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.1), 7px 7px 0 0 themed('buttonBoxShadowHover');
234+
background-color: themed('buttonBackgroundHover');
235+
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.1), 7px 7px 0 0 themed('buttonBoxShadowHover');
233236
color: themed('buttonTextHover');
234237
text-shadow: themed('buttonTextShadow');
235238
}
236239
}
237240
&:visited, &:active {
238241
@include themify($themes) {
239-
color: themed('buttonText');
242+
color: themed('buttonText');
240243
}
241244
&:hover, &:focus {
242245
@include themify($themes) {
243-
color: themed('buttonTextHover');
246+
color: themed('buttonTextHover');
244247
}
245-
}
246-
}
248+
}
249+
}
247250
}
248251

249252
.button.disabled, .button[disabled] {
250253
opacity: 0.25;
251254
cursor: not-allowed;
252255
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0);
253256
@include themify($themes) {
254-
background-color: themed('buttonBackground');
257+
background-color: themed('buttonBackground');
255258
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0);
256259
color: themed('buttonText');
257-
}
260+
}
258261
&:hover {
259262
@include themify($themes) {
260-
background-color: themed('buttonBackground');
263+
background-color: themed('buttonBackground');
261264
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0);
262265
color: themed('buttonText');
263-
}
266+
}
264267
}
265268
}
266269

267270
// This button class doesn't applying theming (just straight styles). To be used when there are no theming classes available (e.g. in modals and static server pages in signup)
268271

269-
.e-btn {
272+
.e-btn {
270273
&--black {
271274
background-color: $color-blue-black;
272-
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0), 5px 5px 0 0 $color-teal;
275+
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0), 5px 5px 0 0 $color-teal;
273276
color: $color-white;
274277
&:hover, &:focus {
275278
background-color: $color-teal;
276-
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.1), 7px 7px 0 0 $color-blue-black;
279+
box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.1), 7px 7px 0 0 $color-blue-black;
277280
color: $color-white;
278281
text-shadow: 0 1px 0 rgba(0,0,0,0.20);
279282
}
280283
&:visited, &:active {
281284
background-color: $color-blue-black;
282-
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0), 5px 5px 0 0 $color-teal;
285+
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0), 5px 5px 0 0 $color-teal;
283286
color: $color-white;
284-
}
287+
}
285288
&.disabled, &[disabled] {
286289
opacity: 0.25;
287290
cursor: not-allowed;
288291
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0);
289292
&:hover, &:focus {
290293
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0);
291294
background-color: $color-blue-black;
292-
color: $color-white;
295+
color: $color-white;
293296
}
294297
}
295298
&.hollow {
@@ -303,15 +306,15 @@ $themes: (
303306
background-color: transparent;
304307
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0);
305308
color: $color-blue-dark;
306-
font-weight: normal;
309+
font-weight: normal;
307310
text-shadow: 0 1px 0 rgba(0,0,0,0.0);
308311
}
309312
&:visited, &:active {
310313
background-color: transparent;
311314
box-shadow: 0px 0px 0px 0 rgba(0,0,0,0);
312315
color: $color-text-gray;
313316
font-weight: normal;
314-
}
317+
}
315318
}
316319
}
317320
}

src/app/assets/stylesheets/_variables.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ $color-teal-dark:#049173;
1616
$color-yellow: #fce76c;
1717
$color-transparent: transparent;
1818

19+
$color-background-almost-white:#fefefe;
1920
$color-background-off-white: #fcfcfc;
2021
$color-background-dark: #1C252B;
22+
$color-background-super-dark: #10151b;
2123

2224
$color-text-dark: #333;
2325
$color-text-white: #fcfcfc;
@@ -34,4 +36,4 @@ $color-border-dark-lightest: #2B3A45;
3436

3537
$font-primary: helvetica, sans-serif;
3638

37-
$alert-color: $color-red;
39+
$alert-color: $color-red;

src/app/assets/stylesheets/app.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,6 @@ a.ptc {
169169
}
170170
}
171171

172-
.anchor {
173-
padding-top: 68px;
174-
margin-top: -68px;
175-
position: relative;
176-
display: block;
177-
cursor: default;
178-
}
179-
180172
h1, h2, h3, h4, h5, h6 {
181173
line-height: 1.2 !important;
182174
}

0 commit comments

Comments
 (0)