5htp-core 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/package.json +1 -1
  2. package/src/client/assets/css/components/button.less +47 -44
  3. package/src/client/assets/css/components/card.less +43 -21
  4. package/src/client/assets/css/components/components.less +25 -0
  5. package/src/client/assets/css/components/lists.less +30 -15
  6. package/src/client/assets/css/components/other.less +9 -5
  7. package/src/client/assets/css/core.less +1 -0
  8. package/src/client/assets/css/layouts.less +25 -10
  9. package/src/client/assets/css/medias.less +3 -1
  10. package/src/client/assets/css/spacing.less +2 -1
  11. package/src/client/assets/css/text/icons.less +1 -1
  12. package/src/client/assets/css/text/text.less +17 -11
  13. package/src/client/assets/css/text/titres.less +5 -5
  14. package/src/client/assets/css/theme.less +15 -13
  15. package/src/client/components/Dialog/card.tsx +1 -1
  16. package/src/client/components/Dialog/index.less +4 -3
  17. package/src/client/components/Form/index.tsx +2 -2
  18. package/src/client/components/Select/index.tsx +58 -0
  19. package/src/client/components/button.tsx +1 -1
  20. package/src/client/components/chart/base.tsx +1 -1
  21. package/src/client/components/containers/Scrollbar/index.less +1 -1
  22. package/src/client/components/containers/tabs/index.tsx +2 -2
  23. package/src/client/components/data/progressbar/circular/index.tsx +1 -1
  24. package/src/client/components/data/progressbar/index.less +5 -3
  25. package/src/client/components/data/progressbar/index.tsx +3 -3
  26. package/src/client/components/dropdown/index.tsx +12 -21
  27. package/src/client/components/input/BaseV2/index.less +4 -3
  28. package/src/client/components/input/BaseV2/index.tsx +4 -2
  29. package/src/client/components/input/Slider/index.less +1 -1
  30. package/src/client/components/input/UploadImage/index.less +1 -1
  31. package/src/client/context/index.ts +45 -41
  32. package/src/client/router/component.tsx +1 -0
  33. package/src/client/router/index.tsx +10 -3
  34. package/src/client/router/request/index.ts +0 -0
  35. package/src/common/data/input/validate.ts +2 -2
  36. package/src/common/data/input/validators/basic.ts +18 -18
  37. package/src/common/data/input/validators/build.ts +2 -2
  38. package/src/common/data/number/percentage.ts +4 -2
  39. package/src/common/errors/index.ts +17 -13
  40. package/src/common/router/index.ts +1 -1
  41. package/src/server/app/index.ts +70 -17
  42. package/src/server/data/Cache.ts +10 -4
  43. package/src/server/data/Token.olg.ts +2 -2
  44. package/src/server/data/aes.ts +2 -2
  45. package/src/server/patch.ts +0 -11
  46. package/src/server/routes/auth.ts +6 -0
  47. package/src/server/services/auth/base.ts +20 -12
  48. package/src/server/services/console/bugReporter.ts +31 -27
  49. package/src/server/services/console/html.ts +0 -0
  50. package/src/server/services/console/index.ts +1 -1
  51. package/src/server/services/cron/index.ts +2 -2
  52. package/src/server/services/database/index.ts +9 -11
  53. package/src/server/services/email/index.ts +2 -5
  54. package/src/server/services/router/index.ts +2 -2
  55. package/src/server/services/router/request/index.ts +1 -1
  56. package/src/server/services/router/request/services/auth.ts +5 -5
  57. package/src/server/services/router/request/services/detect.ts +4 -4
  58. package/src/server/services/router/request/services/tracking.ts +2 -2
  59. package/src/server/services/router/response/index.ts +3 -3
  60. package/src/server/services/socket/index.ts +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "5htp-core",
3
3
  "description": "5-HTP, scientifically called 5-Hydroxytryptophan, is the precursor of happiness neurotransmitter.",
4
- "version": "0.0.8",
4
+ "version": "0.1.0",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/5htp-core.git",
7
7
  "license": "MIT",
@@ -1,3 +1,12 @@
1
+ /*----------------------------------
2
+ - CONFIG
3
+ ----------------------------------*/
4
+
5
+ @sizeActiveIndicator: 0.3rem;
6
+
7
+ /*----------------------------------
8
+ - BUTTON
9
+ ----------------------------------*/
1
10
  .btn {
2
11
 
3
12
  // Layout
@@ -18,8 +27,26 @@
18
27
  font-weight: 600;
19
28
 
20
29
  // Colors
21
- background: transparent;
22
- color: var(--cTxtBase);
30
+ color: var(--cTxtAccent);
31
+
32
+ // Hover
33
+ transition: all .5s linear;
34
+ &:hover,
35
+ &.selected,
36
+ li:hover > & {
37
+
38
+ color: var(--cTxtImportant);
39
+ transition: all .1s linear;
40
+
41
+ > i {
42
+ color: var(--cAccent)
43
+ }
44
+ }
45
+
46
+ // Click
47
+ &.pressed {
48
+ transform: scale(0.9);
49
+ }
23
50
 
24
51
  &,
25
52
  > .label {
@@ -44,12 +71,9 @@
44
71
  }
45
72
  }
46
73
 
47
- &:not(.color):not(.icon) > i {
48
- color: var(--c2);
49
- }
50
-
51
74
  > i {
52
75
  font-size: 1.2em;
76
+ color: inherit;
53
77
  }
54
78
 
55
79
  > img {
@@ -68,36 +92,11 @@
68
92
  /*----------------------------------
69
93
  - THEME
70
94
  ----------------------------------*/
71
-
72
- // Hover / Click
73
- transition: all .5s linear;
74
- &:not([disabled]) {
75
-
76
- &:hover,
77
- &.selected,
78
- li:hover > & {
79
- background: var(--cBgHover);
80
- color: var(--cTxtImportant);
81
- transition: all .1s linear;
82
- }
83
-
84
- &.pressed {
85
- transform: scale(0.9);
86
- }
87
- }
88
-
89
- // On donne moins d'importance à chaque bouton lorsqu'ils sont dans une liste (ex: menu)
90
- /*li > &,
91
- .menu > & {
92
-
93
- &:not(.primary):not(.selected) {
94
- color: inherit;
95
- }
96
- }*/
97
95
 
98
- &.primary {
96
+ &.bg {
99
97
 
100
98
  background: var(--cBg);
99
+ color: var(--cTxtBase);
101
100
 
102
101
  &:not(:disabled) {
103
102
  &:hover,
@@ -126,13 +125,6 @@
126
125
 
127
126
  cursor: pointer;
128
127
 
129
- &:not(.primary):hover,
130
- &:not(.primary).selected {
131
- &, & > i {
132
- color: var(--cTxtImportant);
133
- }
134
- }
135
-
136
128
  &:not(.primary).selected {
137
129
 
138
130
  &.col {
@@ -206,7 +198,7 @@
206
198
  }
207
199
 
208
200
  /*----------------------------------
209
- - sHOW BUBBLE ON HOVER
201
+ - BUTTON IN LISTS
210
202
  ----------------------------------*/
211
203
 
212
204
  ul.col,
@@ -215,9 +207,20 @@ ul.row {
215
207
  &.menu > .btn,
216
208
  &.menu > li > .btn {
217
209
 
210
+ // Give less imortance to buttons which are in lists
211
+ color: var(--cTxtBase);
218
212
  box-shadow: none;
213
+ border: none;
219
214
  width: 100%;
215
+ background: transparent;
216
+
217
+ &.selected,
218
+ &:hover {
219
+ background: var(--cBg2);
220
+ color: var(--cTxtImportant);
221
+ }
220
222
 
223
+ // All the list items label must be aligned
221
224
  > .label {
222
225
  justify-content: flex-start;
223
226
  }
@@ -327,8 +330,8 @@ ul.col {
327
330
  position: absolute;
328
331
 
329
332
  top: -@sizeComponent;
330
- left: calc(0em - @spacingComponent);
331
- right: calc(0em - @spacingComponent);
333
+ left: calc(0em - @spacing);
334
+ right: calc(0em - @spacing);
332
335
 
333
336
  height: 100%;
334
337
  }
@@ -345,7 +348,7 @@ ul.col {
345
348
  left: auto;
346
349
  margin-left: 0;
347
350
  right: 100%;
348
- margin-right: @spacingComponent;
351
+ margin-right: @spacing;
349
352
  }
350
353
  }
351
354
  }
@@ -1,18 +1,25 @@
1
- .card {
2
-
1
+ @import (reference) "../theme.less";
2
+
3
+ .card,
4
+ .msg {
3
5
  position: relative; // For .overlay
4
- padding: @spacing;
5
- background-color: var(--cBg);
6
6
  color: var(--cTxtBase);
7
7
  border-radius: @radius;
8
+ }
9
+
10
+ .card {
11
+
12
+ background-color: var(--cBg);
13
+ padding: @spacing;
8
14
 
9
- &.clickable {
10
- cursor: pointer;
15
+ &.bg {
16
+ --cBg: difference(@cBgPage, #0a0a0a);
17
+ --cBg2: difference(@cBgPage, #111);
18
+ background: var(--cBg);
11
19
 
12
- &:hover {
13
- > * {
14
- --cTxtImportant: @c1;
15
- }
20
+ &.img {
21
+ background-position: center;
22
+ background-size: cover;
16
23
  }
17
24
  }
18
25
 
@@ -52,25 +59,25 @@
52
59
 
53
60
  > .cov-t {
54
61
 
55
- margin-top: calc( -1 * @spacingComponent );
62
+ margin-top: calc( -1 * @spacing );
56
63
  }
57
64
 
58
65
  > .cover,
59
66
  > .table {
60
67
 
61
- margin-left: calc( -1 * @spacingComponent );
62
- margin-right: calc( -1 * @spacingComponent );
68
+ margin-left: calc( -1 * @spacing );
69
+ margin-right: calc( -1 * @spacing );
63
70
 
64
71
  &:first-child {
65
72
  border-top-left-radius: @radius;
66
73
  border-top-right-radius: @radius;
67
- margin-top: calc( -1 * @spacingComponent );
74
+ margin-top: calc( -1 * @spacing );
68
75
  }
69
76
 
70
77
  &:last-child {
71
78
  border-bottom-left-radius: @radius;
72
79
  border-bottom-right-radius: @radius;
73
- margin-bottom: calc( -1 * @spacingComponent );
80
+ margin-bottom: calc( -1 * @spacing );
74
81
  }
75
82
  }
76
83
 
@@ -81,15 +88,30 @@
81
88
  }
82
89
  }
83
90
 
84
- iframe {
85
- border: none;
91
+ .msg, .card.bg.info {
92
+
93
+ padding: @spacing @spacing * 2;
94
+
95
+ .build-theme( lighten(@cInfo, 35%), darken(@cInfo, 20%));
96
+
86
97
  }
87
98
 
88
- header.card {
89
- > i {
90
- font-size: 3em;
91
- line-height: 1em;
99
+ .msg, .card.bg {
100
+ &.error {
101
+ .build-theme( lighten(@cInfo, 35%), darken(@cInfo, 20%));
92
102
  }
103
+
104
+ &.warn {
105
+ .build-theme( lighten(@cWarn, 25%), darken(@cWarn, 30%));
106
+ }
107
+
108
+ &.success {
109
+ .build-theme( lighten(@cSuccess, 50%), darken(@cSuccess, 30%));
110
+ }
111
+ }
112
+
113
+ iframe {
114
+ border: none;
93
115
  }
94
116
 
95
117
  .dropArea {
@@ -0,0 +1,25 @@
1
+ .card,
2
+ .input.text,
3
+ .btn,
4
+ i.solid {
5
+
6
+ .build-theme( #fff, #8E8E8E);
7
+
8
+ &:not(.bg) {
9
+ background: white;
10
+ box-shadow: 0 10px 20px fade(#000, 10%);
11
+ border: solid 1px fade(#000, 10%);
12
+ border-radius: @radius;
13
+ }
14
+
15
+ .bg & {
16
+ box-shadow: none;
17
+ border: none;
18
+ }
19
+ }
20
+
21
+ .btn:hover,
22
+ .input.text.focus {
23
+ z-index: 5;
24
+ box-shadow: 0 10px 50px fade(#000, 15%);
25
+ }
@@ -1,4 +1,14 @@
1
- ul {
1
+ /*----------------------------------
2
+ - CONFIG
3
+ ----------------------------------*/
4
+
5
+ @sizeStep: 2.2em;
6
+ @itemLineHeight: 1.5em;
7
+
8
+ /*----------------------------------
9
+ - BASIC LISTS
10
+ ----------------------------------*/
11
+ ul, ol {
2
12
  list-style: none;
3
13
  margin: 0;
4
14
  padding: 0;
@@ -10,11 +20,8 @@ ul {
10
20
  }*/
11
21
  }
12
22
 
13
- /*----------------------------------
14
- - Liste classique
15
- ----------------------------------*/
16
23
  ul.liste,
17
- ol.liste {
24
+ ol.steps {
18
25
  // Doit hériter des parents
19
26
  //line-height: 1.5em;
20
27
  text-align: left;
@@ -41,7 +48,7 @@ ul.liste {
41
48
  &:before {
42
49
  content: '➜';
43
50
  font-size: 1.4em;
44
- color: var(--c2);
51
+ color: var(--cAccent);
45
52
  }
46
53
  }
47
54
 
@@ -71,7 +78,6 @@ ul.liste {
71
78
  }
72
79
  }
73
80
 
74
- @sizeStep: 3rem;
75
81
  ol.steps {
76
82
 
77
83
  counter-reset: step-counter;
@@ -81,11 +87,19 @@ ol.steps {
81
87
 
82
88
  &:before {
83
89
  content: counter(step-counter);
90
+ font-size: 0.8em;
84
91
  }
85
92
 
86
- li.row {
93
+ &.active::before {
94
+ background-color: var(--cAccent);
95
+ }
96
+
97
+ // Stepnumber = at the left
98
+ &:not(.col) {
87
99
 
88
- padding-left: 30px;
100
+ padding-left: @sizeStep + (@spacing / 2);
101
+ padding-top: (@sizeStep - @itemLineHeight) / 2;
102
+ line-height: @itemLineHeight;
89
103
  margin: 5px 0;
90
104
 
91
105
  &:before {
@@ -93,7 +107,8 @@ ol.steps {
93
107
  }
94
108
  }
95
109
 
96
- li.col {
110
+ // Step number = at the top
111
+ &.col {
97
112
 
98
113
  /*padding-left: 30px;
99
114
  margin: 5px 0;*/
@@ -107,14 +122,14 @@ ol.steps {
107
122
 
108
123
  ol.steps > li:before,
109
124
  strong.step {
110
- color: var(--c1);
111
- font-weight: 700;
125
+
112
126
  background: @c1SuperLight;
127
+ color: @c1;
113
128
 
114
129
  text-align: center;
115
- width: @sizeStep;
116
- height: @sizeStep;
117
- line-height: @sizeStep;
130
+ width: @sizeStep * 1.2;
131
+ height: @sizeStep * 1.2;
132
+ line-height: @sizeStep * 1.2;
118
133
  border-radius: 50%;
119
134
  }
120
135
 
@@ -52,9 +52,8 @@ img.bg-cover {
52
52
  height: @t_pastille;
53
53
  border-radius: 50%;
54
54
 
55
- --color: #e243bc;
56
- background: var(--color);
57
- box-shadow: 0 0 25px var(--color);
55
+ background: var(--cBg);
56
+ box-shadow: 0 0 25px var(--cBg);
58
57
 
59
58
  &.l {
60
59
  width: 2rem;
@@ -117,7 +116,12 @@ strong.placeholder {
117
116
  }
118
117
 
119
118
  hr {
119
+
120
120
  border: none;
121
- border-top: solid 1px var(--cLine2);
122
- margin: 1.65rem 0;
121
+
122
+ &::before {
123
+ display: block;
124
+ content: '• • •';
125
+ color: var(--cTxtDesc);
126
+ }
123
127
  }
@@ -7,6 +7,7 @@
7
7
  @import './text/icons.less';
8
8
  @import './text/titres.less';
9
9
 
10
+ @import './components/components.less';
10
11
  @import './components/input.less';
11
12
  @import './components/button.less';
12
13
  @import './components/lists.less';
@@ -83,6 +83,20 @@
83
83
  }
84
84
  }
85
85
  }
86
+
87
+ &.unibody {
88
+
89
+ gap: 0;
90
+
91
+ > :not(:first-child) {
92
+ border-top-left-radius: 0;
93
+ border-bottom-left-radius: 0;
94
+ }
95
+ > :not(:last-child) {
96
+ border-top-right-radius: 0;
97
+ border-bottom-right-radius: 0;
98
+ }
99
+ }
86
100
  }
87
101
 
88
102
  .row.champs {
@@ -217,6 +231,7 @@
217
231
  Déclarer une grid: grid x-3
218
232
  Placer un element: x1-3
219
233
  */
234
+ @gridUnit: 6.66rem;
220
235
  .zones(@nb, @i: 1) when (@i <= @nb) {
221
236
  /*----------------------------------
222
237
  - ZONES DE LA GRILLE
@@ -287,23 +302,23 @@
287
302
  // Automatique
288
303
  .taille-auto(@min, @max) when (@min <= @max) {
289
304
  &.xa@{min}-@{max} {
290
- grid-template-columns: repeat(auto-fit, minmax(@min * 100px, @max * 100px))
305
+ grid-template-columns: repeat(auto-fit, minmax(@min * @gridUnit, @max * @gridUnit))
291
306
  }
292
307
  &.ya@{min}-@{max} {
293
- grid-template-rows: repeat(auto-fit, minmax(@min * 100px, @max * 100px))
308
+ grid-template-rows: repeat(auto-fit, minmax(@min * @gridUnit, @max * @gridUnit))
294
309
  }
295
310
  .taille-auto(@min + 1, @max);
296
311
  }
297
312
  &.xa@{i} {
298
- grid-template-columns: repeat(auto-fit, minmax(@i * 100px, 1fr));
313
+ grid-template-columns: repeat(auto-fit, minmax(@i * @gridUnit, 1fr));
299
314
  &5 {
300
- grid-template-columns: repeat(auto-fit, minmax(@i * 100px + 4.15rem, 1fr));
315
+ grid-template-columns: repeat(auto-fit, minmax(@i * @gridUnit + 4.15rem, 1fr));
301
316
  }
302
317
  }
303
318
  &.ya@{i} {
304
- grid-template-rows: repeat(auto-fit, minmax(@i * 100px, 1fr));
319
+ grid-template-rows: repeat(auto-fit, minmax(@i * @gridUnit, 1fr));
305
320
  &5 {
306
- grid-template-rows: repeat(auto-fit, minmax(@i * 100px + 4.15rem, 1fr));
321
+ grid-template-rows: repeat(auto-fit, minmax(@i * @gridUnit + 4.15rem, 1fr));
307
322
  }
308
323
  }
309
324
  .taille-auto(1, @i);
@@ -347,10 +362,10 @@
347
362
  break-inside: avoid;
348
363
  }
349
364
 
350
- &.xa1 { column-width: 100px; }
351
- &.xa2 { column-width: 200px; }
365
+ &.xa1 { column-width: @gridUnit; }
366
+ &.xa2 { column-width: @gridUnit * 2; }
352
367
  &,
353
- &.xa3 { column-width: 300px; }
354
- &.xa4 { column-width: 400px; }
368
+ &.xa3 { column-width: @gridUnit * 3; }
369
+ &.xa4 { column-width: @gridUnit * 4; }
355
370
 
356
371
  }
@@ -4,8 +4,10 @@ img {
4
4
  max-width: 100%;
5
5
  display: block;
6
6
 
7
- &.image {
7
+ &.img {
8
8
  border-radius: @radius;
9
9
  background: @cBgPage - #101010;
10
+ object-fit: cover;
11
+ object-position: center;
10
12
  }
11
13
  }
@@ -6,8 +6,9 @@
6
6
  &.sp-0 { gap: 0px; }
7
7
  &.sp-05 { gap: @spacing / 2; }
8
8
  &, &.sp-1 { gap: @spacing }
9
- &.sp-2 { gap: @spacingLayout; }
9
+ &.sp-2 { gap: @spacing * 2; }
10
10
  &.sp-3 { gap: @spacing * 3; }
11
+ &.sp-4 { gap: @spacing * 4; }
11
12
  }
12
13
 
13
14
  .pd { padding: @spacing; }
@@ -32,7 +32,7 @@ i {
32
32
  }
33
33
 
34
34
  &.solid {
35
- color: var(--c2);
35
+ color: var(--cAccent2);
36
36
 
37
37
  width: @sizeComponent;
38
38
  flex: 0 0 @sizeComponent;
@@ -5,6 +5,7 @@ a {
5
5
  color: inherit;
6
6
  cursor: pointer;
7
7
  text-decoration: underline;
8
+ text-decoration: none;
8
9
 
9
10
  &:not([disabled]):hover,
10
11
  &.active {
@@ -12,12 +13,16 @@ a {
12
13
  }
13
14
 
14
15
  &.super {
15
- position: absolute;
16
- top: 0; left: 0; right: 0; bottom: 0;
17
- z-index: 5;
18
-
19
- ~ a, ~ * a, ~ button, ~ * button {
20
- z-index: 6;
16
+ text-decoration: none;
17
+ &::after {
18
+ content: ' ';
19
+ position: absolute;
20
+ top: 0; left: 0; right: 0; bottom: 0;
21
+ z-index: 5;
22
+
23
+ ~ a, ~ * a, ~ button, ~ * button {
24
+ z-index: 6;
25
+ }
21
26
  }
22
27
  }
23
28
  }
@@ -27,7 +32,7 @@ a {
27
32
  }
28
33
 
29
34
  p, .p {
30
- text-align: center;
35
+ text-align: justify;
31
36
  line-height: 1.8em;
32
37
  margin: 0; // Overwrite browser defaults
33
38
  }
@@ -70,10 +75,10 @@ p, .p {
70
75
  .txt-blanc { color: #fff !important; }
71
76
 
72
77
  .txtPrimary, .txtC1 {
73
- color: var(--c1);
78
+ color: var(--cAccent);
74
79
  }
75
80
 
76
- .txtC2 { color: var(--c2); }
81
+ .txtC2 { color: var(--cAccent2); }
77
82
 
78
83
  /*----------------------------------
79
84
  - TAILLE
@@ -142,11 +147,12 @@ em {
142
147
  content: ' ';
143
148
  display: block;
144
149
  height: 0.5em;
145
- background: var(--c2);
150
+ border-radius: 0.25em;
151
+ background: var(--cAccent2);
146
152
 
147
153
  position: absolute;
148
154
  z-index: -1;
149
- bottom: 0.15em;
155
+ bottom: 0.05em;
150
156
  left: -0.1em;
151
157
  right: -0.1em;
152
158
  }
@@ -18,24 +18,24 @@ h3 {
18
18
  }
19
19
 
20
20
  strong {
21
- color: var(--c1);
21
+ color: var(--cAccent);
22
22
  font-weight: inherit;
23
23
  }
24
24
  }
25
25
 
26
26
  // sans input.h1, .h1 seul ne peut pas override le style par défaut des champs
27
27
  h1, .h1 {
28
- font-size: 1.8rem;
28
+ font-size: @h1Size;
29
29
  line-height: 1.3em;
30
30
  }
31
31
 
32
32
  h2, .h2 {
33
- font-size: 1.3rem;
33
+ font-size: @h2Size;
34
34
  line-height: 1.6em;
35
35
  }
36
36
 
37
37
  h3,
38
38
  fieldset > legend {
39
- font-size: 1.16rem;
40
- line-height: 2rem;
39
+ font-size: @h3Size;
40
+ line-height: 2em;
41
41
  }
@@ -4,21 +4,30 @@
4
4
  .build-theme(
5
5
  @bg,
6
6
  @fg: if( lightness(@bg) >= 80%, @bg - @fgDelta, @bg + @fgDelta),
7
- @apply: true,
8
-
9
- @bgChild: @bg + @bgDelta,
10
- @fgChild: if( lightness(@bgChild) >= 80%, @bgChild - @fgDelta, @bgChild + @fgDelta)
7
+ @cAccent: @c1,
8
+ @cAccent2: @c2,
9
+ @apply: true
11
10
  ) {
12
11
 
13
12
  @isLight: boolean( lightness(@bg) >= 80% );
14
13
 
14
+ --cAccent: @cAccent;
15
+ --cAccent2: @cAccent2;
16
+
15
17
  // Background
18
+ // TODO: Nettoyer
19
+ @bg2: @bg - #121212;
16
20
  @bgDark: darken(@bg, 5%);
17
21
  @bgDarkPlus: darken(@bg, 10%);
18
22
  --cBg: @bg;
23
+ --cBg2: @bg2;
19
24
  --cBgAccent: @bgDark;
20
25
  --cBgAccentPlus: @bgDarkPlus;
21
26
  --cBgControl: if( @bg = #fff, @cBgPage, #fff );
27
+ --cBgHover: #f5f5f5;
28
+
29
+ @cBgHighlight: @bg + #111;
30
+ --cBgHighlight: @cBgHighlight;
22
31
 
23
32
  // Other
24
33
  @cLine: if( @isLight, @bg - #151515, @bg + #151515);
@@ -26,10 +35,6 @@
26
35
  --cLine: @cLine;
27
36
  --cLine2: @cLine2;
28
37
 
29
- > * {
30
- --c1: if( @isLight, @c1, #ffffff );
31
- }
32
-
33
38
  // Text
34
39
  .build-theme-txt(@fg, @bg, @apply);
35
40
 
@@ -50,18 +55,15 @@
50
55
 
51
56
  @isLight: boolean( lightness(@bg) >= 70% );
52
57
 
53
-
54
58
  // Text
55
59
  @cTxtDiscret: if( @isLight, @bg - #444, @bg + #444);
56
60
  @cTxtDesc: if( @isLight, @cTxtBase + #222, @cTxtBase - #222);
57
61
  @cTxtImportant: if( @isLight, @cDark, #fff);
62
+ @cTxtAccent: if( @bg = @c1, @cTxtImportant, @c1);
58
63
 
59
64
  --cTxtDiscret: @cTxtDiscret;
60
65
  --cTxtDesc: @cTxtDesc;
61
66
  --cTxtBase: @cTxtBase;
62
67
  --cTxtImportant: @cTxtImportant;
63
-
64
- /*& when (lightness(@bg) < 90%) {
65
- --c1: @cTxtImportant;
66
- }*/
68
+ --cTxtAccent: @cTxtAccent;
67
69
  }