for an uneven columns grid container
11 |
12 | // Usage with preprocessors : if you're using Sass, you can config grids variables :
13 | // n = number of columns (default = 4) / g = gutter value (default = 1em)
14 | // example : .grid-perso { @include grid(12, 10px); }
15 | // ... or uneven grids :
16 | // left = left ratio column (default = 2) / right = right ratio column (default = 1)
17 | // example : .grid-perso { @include uneven-grid(2, 1, 10px); }
18 |
19 | /* grid container */
20 | [class*="#{$kna-namespace}grid-"] {
21 | display: flex;
22 | flex-direction: row;
23 | flex-wrap: wrap;
24 | margin-left: -$gutter;
25 |
26 | /* inline-block fallback for IE9 generation */
27 | letter-spacing: -0.31em;
28 | }
29 |
30 | /* grid childs */
31 | [class*="#{$kna-namespace}grid-"] > * {
32 | box-sizing: border-box;
33 | flex: 0 0 auto;
34 | width: calc(100% * 1 / #{$number} - #{$gutter} - .01px);
35 | min-width: 0;
36 | margin-left: $gutter;
37 |
38 | /* inline-block fallback for IE9 generation */
39 | display: inline-block;
40 | vertical-align: top;
41 | letter-spacing: normal;
42 | }
43 |
44 | // Sass mixins for *equal* columns grid container
45 | // example : .grid-perso { @include grid(12); }
46 | @mixin grid($number:$number,$newgutter:$gutter) {
47 | @if $newgutter != $gutter {
48 | margin-left: -$newgutter;
49 | }
50 | & > * {
51 | width: calc(100% * 1 / #{$number} - #{$newgutter} - .01px);
52 | @if $newgutter != $gutter {
53 | margin-left: $newgutter;
54 | }
55 | }
56 | & > .#{$kna-namespace}flex-item-double {
57 | width: calc(100% * 2 / #{$number} - #{$newgutter});
58 | }
59 | }
60 |
61 | // Examples : will be compiled in CSS
62 |
63 | [class*="#{$kna-namespace}grid-2"] {
64 | @include grid(2);
65 | }
66 |
67 | [class*="#{$kna-namespace}grid-3"] {
68 | @include grid(3);
69 | }
70 |
71 | [class*="#{$kna-namespace}grid-4"] {
72 | @include grid(4);
73 | }
74 |
75 | [class*="#{$kna-namespace}grid-5"] {
76 | @include grid(5);
77 | }
78 |
79 | [class*="#{$kna-namespace}grid-6"] {
80 | @include grid(6);
81 | }
82 |
83 | [class*="#{$kna-namespace}grid-7"] {
84 | @include grid(7);
85 | }
86 |
87 | [class*="#{$kna-namespace}grid-8"] {
88 | @include grid(8);
89 | }
90 |
91 | [class*="#{$kna-namespace}grid-10"] {
92 | @include grid(10);
93 | }
94 |
95 | [class*="#{$kna-namespace}grid-12"] {
96 | @include grid(12);
97 | }
98 |
99 | /* Responsive grid */
100 | // "small-2" = 2 columns when small screen
101 | // example : .grid-4-small-2 will be 4 then 2 columns
102 | @media (max-width: $small-screen) {
103 | [class*="-small-4"] > * {
104 | width: calc(100% * 1 / 4 - #{$gutter} - .01px);
105 | }
106 | [class*="-small-4"] > .flex-item-double {
107 | width: calc(100% * 1 / 2 - #{$gutter} - .01px);
108 | }
109 | [class*="-small-3"] > * {
110 | width: calc(100% * 1 / 3 - #{$gutter} - .01px);
111 | }
112 | [class*="-small-3"] > .flex-item-double {
113 | width: calc(100% * 2 / 3 - #{$gutter} - .01px);
114 | }
115 | [class*="-small-2"] > * {
116 | width: calc(100% * 1 / 2 - #{$gutter} - .01px);
117 | }
118 | [class*="-small-2"] > .flex-item-double {
119 | width: calc(100% - #{$gutter} - .01px);
120 | }
121 | [class*="-small-1"] > * {
122 | width: calc(100% - #{$gutter} - .01px);
123 | }
124 | [class*="-small-1"] > .flex-item-double {
125 | width: calc(100% - #{$gutter} - .01px);
126 | }
127 | }
128 | // "tiny-1" = 1 column when tiny screen
129 | // example : .grid-4-small-2-tiny-1 will be 4 then 2 columns then 1 column
130 | @media (max-width: $tiny-screen) {
131 | [class*="-tiny-2"] > * {
132 | width: calc(100% * 1 / 2 - #{$gutter} - .01px);
133 | }
134 | [class*="-tiny-2"] > .flex-item-double {
135 | width: calc(100% - #{$gutter} - .01px);
136 | }
137 | [class*="-tiny-1"] > * {
138 | width: calc(100% - #{$gutter} - .01px);
139 | }
140 | [class*="-tiny-1"] > .flex-item-double {
141 | width: calc(100% - #{$gutter} - .01px);
142 | }
143 | }
144 |
145 | // Sass mixins for *unequal* columns grid container
146 | // example : .grid-perso { @include uneven-grid(2, 1); }
147 | @mixin uneven-grid($left:$left, $right:$right, $newgutter:$gutter) {
148 | @if $newgutter != $gutter {
149 | margin-left: -$newgutter;
150 | }
151 | > * {
152 | @if $newgutter != $gutter {
153 | margin-left: $newgutter;
154 | }
155 | &:nth-child(odd) {
156 | $size: ($left / ($left + $right)) * 100%;
157 | width: calc(#{$size} - #{$newgutter});
158 | }
159 | &:nth-child(even) {
160 | $size: ($right / ($left + $right)) * 100%;
161 | width: calc(#{$size} - #{$newgutter});
162 | }
163 | }
164 | @media (max-width: $small-screen) {
165 | & > *:nth-child(n) {
166 | width: calc(100% - #{$newgutter});
167 | }
168 | }
169 | }
170 |
171 |
172 | // Examples : will be compiled in CSS
173 |
174 | .#{$kna-namespace}grid-2-1 {
175 | @include uneven-grid(2,1);
176 | }
177 |
178 | .#{$kna-namespace}grid-1-2 {
179 | @include uneven-grid(1,2);
180 | }
181 |
182 | .#{$kna-namespace}grid-3-1 {
183 | @include uneven-grid(3,1);
184 | }
185 |
186 | .#{$kna-namespace}grid-1-3 {
187 | @include uneven-grid(1,3);
188 | }
189 |
190 | .#{$kna-namespace}grid-3-2 {
191 | @include uneven-grid(3,2);
192 | }
193 |
194 | .#{$kna-namespace}grid-2-3 {
195 | @include uneven-grid(2,3);
196 | }
197 |
198 | .#{$kna-namespace}grid-4-1 {
199 | @include uneven-grid(4,1);
200 | }
201 |
202 | .#{$kna-namespace}grid-1-4 {
203 | @include uneven-grid(1,4);
204 | }
205 |
206 | .#{$kna-namespace}pull {
207 | margin-right: auto;
208 | }
209 | .#{$kna-namespace}push {
210 | margin-left: auto;
211 | }
212 |
--------------------------------------------------------------------------------
/src/styles/_04-tables.scss:
--------------------------------------------------------------------------------
1 | /* ----------------------------- */
2 | /* ==tables */
3 | /* ----------------------------- */
4 |
5 | table,
6 | .#{$kna-namespace}table {
7 | width: 100%;
8 | max-width: 100%;
9 | table-layout: fixed;
10 | border-collapse: collapse;
11 | vertical-align: top;
12 | }
13 |
14 | .#{$kna-namespace}table {
15 | display: table;
16 | }
17 |
18 | #recaptcha_table,
19 | table.#{$kna-namespace}table-auto {
20 | table-layout:auto;
21 | }
22 |
23 | td,
24 | th {
25 | vertical-align: top;
26 | min-width: $medium-value;
27 | cursor: default;
28 | }
29 |
--------------------------------------------------------------------------------
/src/styles/_05-forms.scss:
--------------------------------------------------------------------------------
1 | /* ----------------------------- */
2 | /* ==forms */
3 | /* ----------------------------- */
4 |
5 | /* thanks to HTML5boilerplate,
6 | * github.com/nathansmith/formalize and www.sitepen.com
7 | */
8 |
9 | /* buttons */
10 | .#{$kna-namespace}btn {
11 | display: inline-block;
12 | }
13 |
14 | /* forms items */
15 | form,
16 | fieldset {
17 | border: none;
18 | }
19 |
20 | input,
21 | button,
22 | select,
23 | label,
24 | .#{$kna-namespace}btn {
25 | font-family: inherit;
26 | font-size: inherit;
27 | }
28 |
29 | button,
30 | input,
31 | optgroup,
32 | select,
33 | textarea {
34 | color: $base-color;
35 | }
36 |
37 | label {
38 | vertical-align: middle;
39 | cursor: pointer;
40 | }
41 |
42 | legend {
43 | border: 0;
44 | white-space: normal;
45 | }
46 |
47 | textarea {
48 | min-height: 5em;
49 | vertical-align: top;
50 | font-family: inherit;
51 | font-size: inherit;
52 | resize: vertical;
53 | }
54 |
55 | select {
56 | -webkit-appearance: menulist-button;
57 | }
58 |
59 | /* if select styling bugs on WebKit */
60 | /* select { -webkit-appearance: none; } */
61 |
62 | /* 'x' appears on right of search input when text is entered. This removes it */
63 | input[type="search"]::-webkit-search-decoration,
64 | input[type="search"]::-webkit-search-cancel-button,
65 | input[type="search"]::-webkit-search-results-button,
66 | input[type="search"]::-webkit-search-results-decoration {
67 | display: none;
68 | }
69 |
70 | ::-webkit-input-placeholder {
71 | color: #777;
72 | }
73 |
74 | input:-moz-placeholder,
75 | textarea:-moz-placeholder {
76 | color: #777;
77 | }
78 |
79 | .#{$kna-namespace}btn:focus,
80 | input[type="button"]:focus,
81 | button:focus {
82 | -webkit-tap-highlight-color: transparent;
83 | -webkit-user-select: none;
84 | -moz-user-select: none;
85 | -ms-user-select: none;
86 | user-select: none;
87 | }
88 |
89 | /* unstyled forms */
90 |
91 | button.#{$kna-namespace}unstyled,
92 | input[type="button"].#{$kna-namespace}unstyled,
93 | input[type="submit"].#{$kna-namespace}unstyled,
94 | input[type="reset"].#{$kna-namespace}unstyled {
95 | padding: 0;
96 | border: none;
97 | line-height: 1;
98 | text-align: left;
99 | background: none;
100 | border-radius: 0;
101 | box-shadow: none;
102 | -webkit-appearance: none;
103 | -moz-appearance: none;
104 | appearance: none;
105 |
106 | &:focus {
107 | box-shadow: none;
108 | outline: none;
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/src/styles/_06-helpers.scss:
--------------------------------------------------------------------------------
1 | /* ---------------------------------- */
2 | /* ==state helpers */
3 | /* ---------------------------------- */
4 |
5 | /* invisible for all */
6 | .is-hidden,
7 | [hidden] {
8 | display: none;
9 | }
10 |
11 | /* hidden but not for an assistive technology like a screen reader, Yahoo! method */
12 | .visually-hidden {
13 | position: absolute !important;
14 | border: 0 !important;
15 | height: 1px !important;
16 | width: 1px !important;
17 | padding: 0 !important;
18 | overflow: hidden !important;
19 | clip: rect(0, 0, 0, 0) !important;
20 | }
21 |
22 | .is-disabled,
23 | [disabled] {
24 | opacity: 0.5;
25 | pointer-events: none;
26 | cursor: not-allowed;
27 | filter: grayscale(1);
28 | }
29 |
30 | ul.is-unstyled,
31 | ul.unstyled {
32 | list-style: none;
33 | padding-left: 0;
34 | }
35 |
36 | /* ---------------------------------- */
37 | /* ==visual helpers */
38 | /* .. use them with parcimony ! */
39 | /* ---------------------------------- */
40 |
41 | /* blocks widths (percentage and pixels) */
42 | .#{$kna-namespace}w10 {
43 | width: 10%;
44 | }
45 |
46 | .#{$kna-namespace}w20 {
47 | width: 20%;
48 | }
49 |
50 | .#{$kna-namespace}w25 {
51 | width: 25%;
52 | }
53 |
54 | .#{$kna-namespace}w30 {
55 | width: 30%;
56 | }
57 |
58 | .#{$kna-namespace}w33 {
59 | width: 33.3333%;
60 | }
61 |
62 | .#{$kna-namespace}w40 {
63 | width: 40%;
64 | }
65 |
66 | .#{$kna-namespace}w50 {
67 | width: 50%;
68 | }
69 |
70 | .#{$kna-namespace}w60 {
71 | width: 60%;
72 | }
73 |
74 | .#{$kna-namespace}w66 {
75 | width: 66.6666%;
76 | }
77 |
78 | .#{$kna-namespace}w70 {
79 | width: 70%;
80 | }
81 |
82 | .#{$kna-namespace}w75 {
83 | width: 75%;
84 | }
85 |
86 | .#{$kna-namespace}w80 {
87 | width: 80%;
88 | }
89 |
90 | .#{$kna-namespace}w90 {
91 | width: 90%;
92 | }
93 |
94 | .#{$kna-namespace}w100 {
95 | width: 100%;
96 | }
97 |
98 | .#{$kna-namespace}w50p {
99 | width: 50px;
100 | }
101 |
102 | .#{$kna-namespace}w100p {
103 | width: 100px;
104 | }
105 |
106 | .#{$kna-namespace}w150p {
107 | width: 150px;
108 | }
109 |
110 | .#{$kna-namespace}w200p {
111 | width: 200px;
112 | }
113 |
114 | .#{$kna-namespace}w300p {
115 | width: 300px;
116 | }
117 |
118 | .#{$kna-namespace}w400p {
119 | width: 400px;
120 | }
121 |
122 | .#{$kna-namespace}w500p {
123 | width: 500px;
124 | }
125 |
126 | .#{$kna-namespace}w600p {
127 | width: 600px;
128 | }
129 |
130 | .#{$kna-namespace}w700p {
131 | width: 700px;
132 | }
133 |
134 | .#{$kna-namespace}w800p {
135 | width: 800px;
136 | }
137 |
138 | .#{$kna-namespace}w960p {
139 | width: 960px;
140 | }
141 |
142 | .#{$kna-namespace}mw960p {
143 | max-width: 960px;
144 | }
145 |
146 | .#{$kna-namespace}w1140p {
147 | width: 1140px;
148 | }
149 |
150 | .#{$kna-namespace}mw1140p {
151 | max-width: 1140px;
152 | }
153 |
154 | .#{$kna-namespace}wauto {
155 | width: auto;
156 | }
157 |
158 | /* spacing helpers
159 | p,m = padding,margin
160 | a,t,r,b,l = all,top,right,bottom,left
161 | s,m,l,n = small, medium, large, none
162 | */
163 | .#{$kna-namespace}man,
164 | .#{$kna-namespace}ma0 {
165 | margin: 0;
166 | }
167 |
168 | .#{$kna-namespace}pan,
169 | .#{$kna-namespace}pa0 {
170 | padding: 0;
171 | }
172 |
173 | .#{$kna-namespace}mas {
174 | margin: $small-value;
175 | }
176 |
177 | .#{$kna-namespace}mam {
178 | margin: $medium-value;
179 | }
180 |
181 | .#{$kna-namespace}mal {
182 | margin: $large-value;
183 | }
184 |
185 | .#{$kna-namespace}pas {
186 | padding: $small-value;
187 | }
188 |
189 | .#{$kna-namespace}pam {
190 | padding: $medium-value;
191 | }
192 |
193 | .#{$kna-namespace}pal {
194 | padding: $large-value;
195 | }
196 |
197 | .#{$kna-namespace}mtn,
198 | .#{$kna-namespace}mt0 {
199 | margin-top: 0;
200 | }
201 |
202 | .#{$kna-namespace}mts {
203 | margin-top: $small-value;
204 | }
205 |
206 | .#{$kna-namespace}mtm {
207 | margin-top: $medium-value;
208 | }
209 |
210 | .#{$kna-namespace}mtl {
211 | margin-top: $large-value;
212 | }
213 |
214 | .#{$kna-namespace}mrn,
215 | .#{$kna-namespace}mr0 {
216 | margin-right: 0;
217 | }
218 |
219 | .#{$kna-namespace}mrs {
220 | margin-right: $small-value;
221 | }
222 |
223 | .#{$kna-namespace}mrm {
224 | margin-right: $medium-value;
225 | }
226 |
227 | .#{$kna-namespace}mrl {
228 | margin-right: $large-value;
229 | }
230 |
231 | .#{$kna-namespace}mbn,
232 | .#{$kna-namespace}mb0 {
233 | margin-bottom: 0;
234 | }
235 |
236 | .#{$kna-namespace}mbs {
237 | margin-bottom: $small-value;
238 | }
239 |
240 | .#{$kna-namespace}mbm {
241 | margin-bottom: $medium-value;
242 | }
243 |
244 | .#{$kna-namespace}mbl {
245 | margin-bottom: $large-value;
246 | }
247 |
248 | .#{$kna-namespace}mln,
249 | .#{$kna-namespace}ml0 {
250 | margin-left: 0;
251 | }
252 |
253 | .#{$kna-namespace}mls {
254 | margin-left: $small-value;
255 | }
256 |
257 | .#{$kna-namespace}mlm {
258 | margin-left: $medium-value;
259 | }
260 |
261 | .#{$kna-namespace}mll {
262 | margin-left: $large-value;
263 | }
264 |
265 | .#{$kna-namespace}mauto {
266 | margin: auto;
267 | }
268 |
269 | .#{$kna-namespace}mtauto {
270 | margin-top: auto;
271 | }
272 |
273 | .#{$kna-namespace}mrauto {
274 | margin-right: auto;
275 | }
276 |
277 | .#{$kna-namespace}mbauto {
278 | margin-bottom: auto;
279 | }
280 |
281 | .#{$kna-namespace}mlauto {
282 | margin-left: auto;
283 | }
284 |
285 | .#{$kna-namespace}ptn,
286 | .#{$kna-namespace}pt0 {
287 | padding-top: 0;
288 | }
289 |
290 | .#{$kna-namespace}pts {
291 | padding-top: $small-value;
292 | }
293 |
294 | .#{$kna-namespace}ptm {
295 | padding-top: $medium-value;
296 | }
297 |
298 | .#{$kna-namespace}ptl {
299 | padding-top: $large-value;
300 | }
301 |
302 | .#{$kna-namespace}prn,
303 | .#{$kna-namespace}pr0 {
304 | padding-right: 0;
305 | }
306 |
307 | .#{$kna-namespace}prs {
308 | padding-right: $small-value;
309 | }
310 |
311 | .#{$kna-namespace}prm {
312 | padding-right: $medium-value;
313 | }
314 |
315 | .#{$kna-namespace}prl {
316 | padding-right: $large-value;
317 | }
318 |
319 | .#{$kna-namespace}pbn,
320 | .#{$kna-namespace}pb0 {
321 | padding-bottom: 0;
322 | }
323 |
324 | .#{$kna-namespace}pbs {
325 | padding-bottom: $small-value;
326 | }
327 |
328 | .#{$kna-namespace}pbm {
329 | padding-bottom: $medium-value;
330 | }
331 |
332 | .#{$kna-namespace}pbl {
333 | padding-bottom: $large-value;
334 | }
335 |
336 | .#{$kna-namespace}pln,
337 | .#{$kna-namespace}pl0 {
338 | padding-left: 0;
339 | }
340 |
341 | .#{$kna-namespace}pls {
342 | padding-left: $small-value;
343 | }
344 |
345 | .#{$kna-namespace}plm {
346 | padding-left: $medium-value;
347 | }
348 |
349 | .#{$kna-namespace}pll {
350 | padding-left: $large-value;
351 | }
352 |
--------------------------------------------------------------------------------
/src/styles/_07-responsive.scss:
--------------------------------------------------------------------------------
1 | /* ----------------------------- */
2 | /* ==desktop and HD devices */
3 | /* ----------------------------- */
4 |
5 | @media (min-width: ($medium-screen + 1)) {
6 | /* rules for big resources and big screens like: background-images, font-faces, etc. */
7 | }
8 |
9 | @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx) {
10 | /* style adjustments for high density devices */
11 | }
12 |
13 | /* ---------------------------------- */
14 | /* ==Responsive large */
15 | /* ---------------------------------- */
16 |
17 | @media (min-width: ($medium-screen + 1)) {
18 |
19 | /* layouts for large screens */
20 | .#{$kna-namespace}large-hidden {
21 | display: none !important;
22 | }
23 |
24 | .#{$kna-namespace}large-visible {
25 | display: block !important;
26 | }
27 |
28 | .#{$kna-namespace}large-no-float {
29 | float: none;
30 | }
31 |
32 | .#{$kna-namespace}large-inbl {
33 | display: inline-block;
34 | float: none;
35 | vertical-align: top;
36 | }
37 | .#{$kna-namespace}large-row {
38 | display: table;
39 | table-layout: fixed;
40 | width: 100% !important;
41 | }
42 | .#{$kna-namespace}large-col {
43 | display: table-cell;
44 | vertical-align: top;
45 | }
46 |
47 | /* widths for large screens */
48 | .#{$kna-namespace}large-w25 {
49 | width: 25% !important;
50 | }
51 |
52 | .#{$kna-namespace}large-w33 {
53 | width: 33.3333% !important;
54 | }
55 |
56 | .#{$kna-namespace}large-w50 {
57 | width: 50% !important;
58 | }
59 |
60 | .#{$kna-namespace}large-w66 {
61 | width: 66.6666% !important;
62 | }
63 |
64 | .#{$kna-namespace}large-w75 {
65 | width: 75% !important;
66 | }
67 |
68 | .#{$kna-namespace}large-w100,
69 | .#{$kna-namespace}large-wauto {
70 | display: block !important;
71 | float: none !important;
72 | clear: none !important;
73 | width: auto !important;
74 | margin-left: 0 !important;
75 | margin-right: 0 !important;
76 | border: 0;
77 | }
78 |
79 | /* margins for large screens */
80 | .#{$kna-namespace}large-man,
81 | .#{$kna-namespace}large-ma0 {
82 | margin: 0 !important;
83 | }
84 | }
85 |
86 | /* ---------------------------------- */
87 | /* ==Responsive medium */
88 | /* ---------------------------------- */
89 |
90 | @media (min-width: ($small-screen + 1)) and (max-width: $medium-screen) {
91 |
92 | /* layouts for medium screens */
93 | .#{$kna-namespace}medium-hidden {
94 | display: none !important;
95 | }
96 |
97 | .#{$kna-namespace}medium-visible {
98 | display: block !important;
99 | }
100 |
101 | .#{$kna-namespace}medium-no-float {
102 | float: none;
103 | }
104 |
105 | .#{$kna-namespace}medium-inbl {
106 | display: inline-block;
107 | float: none;
108 | vertical-align: top;
109 | }
110 |
111 | .#{$kna-namespace}medium-row {
112 | display: table;
113 | table-layout: fixed;
114 | width: 100% !important;
115 | }
116 |
117 | .#{$kna-namespace}medium-col {
118 | display: table-cell;
119 | vertical-align: top;
120 | }
121 |
122 | /* widths for medium screens */
123 | .#{$kna-namespace}medium-w25 {
124 | width: 25% !important;
125 | }
126 |
127 | .#{$kna-namespace}medium-w33 {
128 | width: 33.3333% !important;
129 | }
130 |
131 | .#{$kna-namespace}medium-w50 {
132 | width: 50% !important;
133 | }
134 |
135 | .#{$kna-namespace}medium-w66 {
136 | width: 66.6666% !important;
137 | }
138 |
139 | .#{$kna-namespace}medium-w75 {
140 | width: 75% !important;
141 | }
142 |
143 | .#{$kna-namespace}medium-w100,
144 | .#{$kna-namespace}medium-wauto {
145 | display: block !important;
146 | float: none !important;
147 | clear: none !important;
148 | width: auto !important;
149 | margin-left: 0 !important;
150 | margin-right: 0 !important;
151 | border: 0;
152 | }
153 |
154 | /* margins for medium screens */
155 | .#{$kna-namespace}medium-man,
156 | .#{$kna-namespace}medium-ma0 {
157 | margin: 0 !important;
158 | }
159 | }
160 |
161 | /* ---------------------------------- */
162 | /* ==Responsive small */
163 | /* ---------------------------------- */
164 |
165 | @media (min-width: ($tiny-screen + 1)) and (max-width: $small-screen) {
166 |
167 | /* quick reset in small resolution and less */
168 | .#{$kna-namespace}w600p,
169 | .#{$kna-namespace}w700p,
170 | .#{$kna-namespace}w800p,
171 | .#{$kna-namespace}w960p,
172 | .#{$kna-namespace}mw960p {
173 | width: auto;
174 | float: none;
175 | }
176 |
177 | /* layouts for small screens */
178 | .#{$kna-namespace}small-hidden {
179 | display: none !important;
180 | }
181 |
182 | .#{$kna-namespace}small-visible {
183 | display: block !important;
184 | }
185 |
186 | .#{$kna-namespace}small-no-float {
187 | float: none;
188 | }
189 |
190 | .#{$kna-namespace}small-inbl {
191 | display: inline-block;
192 | float: none;
193 | vertical-align: top;
194 | }
195 |
196 | .#{$kna-namespace}small-row {
197 | display: table !important;
198 | table-layout: fixed !important;
199 | width: 100% !important;
200 | }
201 |
202 | .#{$kna-namespace}small-col {
203 | display: table-cell !important;
204 | vertical-align: top !important;
205 | }
206 |
207 | /* widths for small screens */
208 | .#{$kna-namespace}small-w25 {
209 | width: 25% !important;
210 | }
211 |
212 | .#{$kna-namespace}small-w33 {
213 | width: 33.3333% !important;
214 | }
215 |
216 | .#{$kna-namespace}small-w50 {
217 | width: 50% !important;
218 | }
219 |
220 | .#{$kna-namespace}small-w66 {
221 | width: 66.6666% !important;
222 | }
223 |
224 | .#{$kna-namespace}small-w75 {
225 | width: 75% !important;
226 | }
227 |
228 | .#{$kna-namespace}small-w100,
229 | .#{$kna-namespace}small-wauto {
230 | display: block !important;
231 | float: none !important;
232 | clear: none !important;
233 | width: auto !important;
234 | margin-left: 0 !important;
235 | margin-right: 0 !important;
236 | border: 0;
237 | }
238 |
239 | /* margins for small screens */
240 | .#{$kna-namespace}small-man,
241 | .#{$kna-namespace}small-ma0 {
242 | margin: 0 !important;
243 | }
244 |
245 | .#{$kna-namespace}small-pan,
246 | .#{$kna-namespace}small-pa0 {
247 | padding: 0 !important;
248 | }
249 |
250 | }
251 |
252 | /* ---------------------------------- */
253 | /* ==Responsive tiny */
254 | /* ---------------------------------- */
255 |
256 | @media (max-width: $tiny-screen) {
257 |
258 | /* quick small resolution reset */
259 | .#{$kna-namespace}mod,
260 | .#{$kna-namespace}col,
261 | fieldset {
262 | display: block !important;
263 | float: none !important;
264 | clear: none !important;
265 | width: auto !important;
266 | margin-left: 0 !important;
267 | margin-right: 0 !important;
268 | border: 0;
269 | }
270 |
271 | .#{$kna-namespace}flex-container {
272 | flex-direction: column;
273 | }
274 |
275 | .#{$kna-namespace}w300p,
276 | .#{$kna-namespace}w400p,
277 | .#{$kna-namespace}w500p {
278 | width: auto;
279 | float: none;
280 | }
281 |
282 | .#{$kna-namespace}row {
283 | display: block !important;
284 | width: 100% !important;
285 | }
286 |
287 | /* layouts for tiny screens */
288 | .#{$kna-namespace}tiny-hidden {
289 | display: none !important;
290 | }
291 |
292 | .#{$kna-namespace}tiny-visible {
293 | display: block !important;
294 | }
295 |
296 | .#{$kna-namespace}tiny-no-float {
297 | float: none;
298 | }
299 |
300 | .#{$kna-namespace}tiny-inbl {
301 | display: inline-block;
302 | float: none;
303 | vertical-align: top;
304 | }
305 |
306 | .#{$kna-namespace}tiny-row {
307 | display: table !important;
308 | table-layout: fixed !important;
309 | width: 100% !important;
310 | }
311 |
312 | .#{$kna-namespace}tiny-col {
313 | display: table-cell !important;
314 | vertical-align: top !important;
315 | }
316 |
317 | th,
318 | td {
319 | display: block;
320 | width: auto;
321 | text-align: left;
322 | }
323 |
324 | thead {
325 | display: none;
326 | }
327 |
328 | /* widths for tiny screens */
329 | .#{$kna-namespace}tiny-w25 {
330 | width: 25% !important;
331 | }
332 |
333 | .#{$kna-namespace}tiny-w33 {
334 | width: 33.3333% !important;
335 | }
336 |
337 | .#{$kna-namespace}tiny-w50 {
338 | width: 50% !important;
339 | }
340 |
341 | .#{$kna-namespace}tiny-w66 {
342 | width: 66.6666% !important;
343 | }
344 |
345 | .#{$kna-namespace}tiny-w75 {
346 | width: 75% !important;
347 | }
348 |
349 | .#{$kna-namespace}tiny-w100,
350 | .#{$kna-namespace}tiny-wauto {
351 | display: block !important;
352 | float: none !important;
353 | clear: none !important;
354 | width: auto !important;
355 | margin-left: 0 !important;
356 | margin-right: 0 !important;
357 | border: 0;
358 | }
359 |
360 | /* margins for tiny screens */
361 | .#{$kna-namespace}tiny-man,
362 | .#{$kna-namespace}tiny-ma0 {
363 | margin: 0 !important;
364 | }
365 |
366 | .#{$kna-namespace}tiny-pan,
367 | .#{$kna-namespace}tiny-pa0 {
368 | padding: 0 !important;
369 | }
370 |
371 | }
372 |
--------------------------------------------------------------------------------
/src/styles/_08-print.scss:
--------------------------------------------------------------------------------
1 | /* quick print reset */
2 | @media print {
3 | * {
4 | background: transparent !important;
5 | box-shadow: none !important;
6 | text-shadow: none !important;
7 | }
8 |
9 | body {
10 | width: auto;
11 | margin: auto;
12 | font-family: serif;
13 | font-size: 12pt;
14 | }
15 |
16 | p,
17 | .#{$kna-namespace}p-like,
18 | h1,
19 | .#{$kna-namespace}h1-like,
20 | h2,
21 | .#{$kna-namespace}h2-like,
22 | h3,
23 | .#{$kna-namespace}h3-like,
24 | h4,
25 | .#{$kna-namespace}h4-like,
26 | h5,
27 | .#{$kna-namespace}h5-like,
28 | h6,
29 | .#{$kna-namespace}h6-like,
30 | blockquote,
31 | ul,
32 | ol {
33 | color: #000;
34 | margin: auto;
35 | }
36 |
37 | .#{$kna-namespace}print {
38 | display: block;
39 | }
40 |
41 | .#{$kna-namespace}no-print {
42 | display: none;
43 | }
44 |
45 | /* no orphans, no widows */
46 | p,
47 | .#{$kna-namespace}p-like,
48 | blockquote {
49 | orphans: 3;
50 | widows: 3;
51 | }
52 |
53 | /* no breaks inside these elements */
54 | blockquote,
55 | ul,
56 | ol {
57 | page-break-inside: avoid;
58 | }
59 |
60 | /* page break before main headers
61 | h1,
62 | .h1-like {
63 | page-break-before: always;
64 | }
65 | */
66 |
67 | /* no breaks after these elements */
68 | h1,
69 | .#{$kna-namespace}h1-like,
70 | h2,
71 | .#{$kna-namespace}h2-like,
72 | h3,
73 | .#{$kna-namespace}h3-like,
74 | caption {
75 | page-break-after: avoid;
76 | }
77 |
78 | a {
79 | color: #000;
80 | }
81 |
82 | /* displaying URLs
83 | a[href]::after {
84 | content: " (" attr(href) ")";
85 | }
86 | */
87 |
88 | a[href^="javascript:"]::after,
89 | a[href^="#"]::after {
90 | content: "";
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/src/styles/_09-misc.scss:
--------------------------------------------------------------------------------
1 | /* ----------------------------- */
2 | /* ==misc rules */
3 | /* ----------------------------- */
4 |
5 | /* styling skip links */
6 | .#{$kna-namespace}skip-links {
7 | position: absolute;
8 |
9 | & a {
10 | position: absolute;
11 | overflow: hidden;
12 | clip: rect(1px, 1px, 1px, 1px);
13 | padding: 0.5em;
14 | background: black;
15 | color: white;
16 | text-decoration: none;
17 |
18 | &:focus {
19 | position: static;
20 | overflow: visible;
21 | clip: auto;
22 | }
23 | }
24 | }
25 |
26 | // hyphens on small screens
27 | @media (max-width: $small-screen) {
28 | /* you shall not pass */
29 | div,
30 | textarea,
31 | table,
32 | td,
33 | th,
34 | code,
35 | pre,
36 | samp {
37 | word-wrap: break-word;
38 | hyphens: auto;
39 | }
40 | }
41 |
42 | // use .no-wrapping to disallow hyphens on small screens
43 | @media (max-width: $small-screen) {
44 | .no-wrapping {
45 | word-wrap: normal;
46 | hyphens: manual;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/styles/_10-styling.scss:
--------------------------------------------------------------------------------
1 | /* ----------------------------- */
2 | /* ==minor stylings */
3 | /* ----------------------------- */
4 |
5 | /* styling elements */
6 | code, kbd, mark {
7 | border-radius: 2px;
8 | }
9 |
10 | kbd {
11 | padding: 0 2px;
12 | border: 1px solid #999;
13 | }
14 |
15 | code {
16 | padding: 2px 4px;
17 | background: rgba(0,0,0,0.04);
18 | color: #b11;
19 | }
20 |
21 | pre code {
22 | padding: 0;
23 | background: none;
24 | color: inherit;
25 | border-radius: 0;
26 | }
27 |
28 | mark {
29 | padding:2px 4px;
30 | }
31 |
32 | sup,
33 | sub {
34 | vertical-align: 0;
35 | }
36 |
37 | sup {
38 | bottom: 1ex;
39 | }
40 |
41 | sub {
42 | top: 0.5ex;
43 | }
44 |
45 | blockquote {
46 | position: relative;
47 | padding-left: 3em;
48 | }
49 |
50 | blockquote::before {
51 | content: "\201C";
52 | position: absolute;
53 | left: 0;
54 | top: 0;
55 | font-family: georgia, serif;
56 | font-size: 5em;
57 | line-height: 0.9;
58 | color: rgba(0, 0, 0, .3);
59 | }
60 |
61 | blockquote > footer {
62 | margin-top: .75em;
63 | font-size: 0.9em;
64 | color: rgba(0, 0, 0, .7);
65 | }
66 |
67 | blockquote > footer::before {
68 | content: "\2014 \0020";
69 | }
70 |
71 | q {
72 | font-style: normal;
73 | }
74 |
75 | q,
76 | .#{$kna-namespace}q {
77 | quotes: "“\00a0" "\00a0”";
78 | }
79 |
80 | q:lang(fr),
81 | .#{$kna-namespace}q:lang(fr) {
82 | quotes: "«\00a0" "\00a0»";
83 | }
84 |
85 | hr {
86 | display: block;
87 | clear: both;
88 | height: 1px;
89 | margin: 1em 0 2em;
90 | padding: 0;
91 | border: 0;
92 | color: #ccc;
93 | background-color: #ccc;
94 | }
95 |
96 | /* tables */
97 | table,
98 | .#{$kna-namespace}table {
99 | border: 1px solid #ccc;
100 | }
101 |
102 | caption {
103 | padding: $small-value;
104 | color: #555;
105 | font-style: italic;
106 | }
107 |
108 | td,
109 | th {
110 | padding: 0.3em 0.8em;
111 | border: 1px #aaa dotted;
112 | text-align: left;
113 | }
114 |
--------------------------------------------------------------------------------
/src/styles/_11-wordpress.scss:
--------------------------------------------------------------------------------
1 | /* ----------------------------- */
2 | /* ==WordPress reset */
3 | /* ----------------------------- */
4 |
5 | /*
6 | Author: Geoffrey Crofte, Alsacréations
7 | Contributors: Automattic, Geoffrey Crofte
8 | Description: Reset styles for WordPress usage of KNACSS
9 | */
10 |
11 | /* ----------------------------- */
12 | /* ==Menus */
13 | /* ----------------------------- */
14 |
15 | // current menu elements
16 | .current_page_item > a {
17 | }
18 | .current-menu-item > a {
19 | }
20 | .current_page_ancestor > a {
21 | }
22 |
23 | // blocks of content navigation
24 | .comment-navigation,
25 | .paging-navigation,
26 | .post-navigation {
27 | margin: 0 0 1.5em;
28 | overflow: hidden;
29 | }
30 |
31 | .comment-navigation .nav-previous,
32 | .paging-navigation .nav-previous,
33 | .post-navigation .nav-previous {
34 | float: left;
35 | width: 50%;
36 | }
37 |
38 | .comment-navigation .nav-next,
39 | .paging-navigation .nav-next,
40 | .post-navigation .nav-next {
41 | float: right;
42 | text-align: right;
43 | width: 50%;
44 | }
45 |
46 | /* ----------------------------- */
47 | /* ==Alignments */
48 | /* ----------------------------- */
49 |
50 | // class in img elements
51 | .alignnone {
52 | margin: .25em 1.5em 1.5em 0;
53 | }
54 |
55 | .aligncenter {
56 | clear: both;
57 | display: block;
58 | margin: 1.5em auto;
59 | }
60 |
61 | .alignleft {
62 | float: left;
63 | margin: 0 1.5em .25em 0;
64 | }
65 |
66 | .alignright {
67 | float: right;
68 | margin: 0 0 .25em 1.5em;
69 | }
70 |
71 | /* ----------------------------- */
72 | /* ==Clearings */
73 | /* ----------------------------- */
74 |
75 | .entry-content,
76 | .comment-content {
77 | clear: both;
78 |
79 | &::after, &::before {
80 | content: "";
81 | display: table;
82 | }
83 | }
84 |
85 | /* ----------------------------- */
86 | /* ==Widgets */
87 | /* ----------------------------- */
88 |
89 | .widget + .widget {
90 | margin: 1.5em 0 0;
91 | }
92 |
93 | // usage example:
94 | .widget select {
95 | max-width: 100%;
96 | }
97 |
98 | /* ----------------------------- */
99 | /* ==Posts and pages */
100 | /* ----------------------------- */
101 |
102 | /* === 5.1 Posts - post_class === */
103 |
104 | // featured content
105 | .sticky {
106 | }
107 |
108 | // attachment post
109 | .attachment {
110 | }
111 |
112 | // format of post
113 | .format- {
114 | &aside {
115 | }
116 | &gallery {
117 | }
118 | &link {
119 | }
120 | &image {
121 | }
122 | "e {
123 | }
124 | &status {
125 | }
126 | &video {
127 | }
128 | &chat {
129 | }
130 | }
131 |
132 | // class for a tag
133 | .tag- {
134 | &name-of-tag {
135 | }
136 | }
137 |
138 | // class for categorie
139 | .category- {
140 | &name-of-category {
141 | }
142 | }
143 |
144 | /* === 5.2 Pages - body_class === */
145 |
146 | // front page
147 | .home {
148 | // if display posts
149 | &.blog {
150 | }
151 | // if static page
152 | &.page {
153 | }
154 | }
155 |
156 | // page displays posts
157 | .blog {
158 | // if is frontpage
159 | &.home {
160 | }
161 | // if static page
162 | &.page {
163 | }
164 | }
165 |
166 | // simple page
167 | .page {
168 | }
169 |
170 | // page of single post
171 | .single {
172 | }
173 |
174 | // page of archives
175 | .archive {
176 | }
177 |
178 | // page of search
179 | .search {
180 | // if has results
181 | .search-results {
182 | }
183 | // if has no results
184 | .search-no-results {
185 | }
186 | }
187 |
188 | // page 404
189 | .error404 {
190 | }
191 |
192 | // user logged in
193 | .logged-in {
194 | }
195 |
196 | // text direction if right-to-left
197 | // prefer rtl.css: http://codex.wordpress.org/Right-to-Left_Language_Support
198 | .rtl {
199 | }
200 |
201 | /* === 5.3 Posts and Pages - Contents === */
202 |
203 | .hentry {
204 | margin: 0 0 1.5em;
205 | }
206 |
207 | .page-content,
208 | .entry-content,
209 | .entry-summary {
210 | margin: 1.5em 0 0;
211 | }
212 |
213 | .page-links {
214 | clear: both;
215 | margin: 0 0 1.5em;
216 | }
217 |
218 | /* ----------------------------- */
219 | /* ==Comments */
220 | /* ----------------------------- */
221 |
222 | .comment-content a {
223 | word-wrap: break-word;
224 | }
225 |
226 | .bypostauthor {
227 | // some make-the-logo-bigger styles
228 | }
229 |
230 | /* ----------------------------- */
231 | /* ==Media */
232 | /* ----------------------------- */
233 |
234 | img.wp-smiley {
235 | margin-bottom: 0;
236 | margin-top: 0;
237 | padding: 0;
238 | border: none;
239 | }
240 |
241 | /* ----------------------------- */
242 | /* ==Captions */
243 | /* ----------------------------- */
244 |
245 | .wp-caption {
246 | max-width: 100%;
247 | margin-bottom: 1.5em;
248 | }
249 |
250 | .wp-caption img {
251 | display: block;
252 | margin: 0 auto;
253 | }
254 |
255 | .wp-caption-text {
256 | margin: 1em 0;
257 | text-align: center;
258 | }
259 |
260 | /* ----------------------------- */
261 | /* ==Galleries */
262 | /* ----------------------------- */
263 |
264 | .gallery {
265 | margin-bottom: 1.5em;
266 | }
267 |
268 | .gallery-item {
269 | display: inline-block;
270 | width: 100%;
271 | text-align: center;
272 | vertical-align: top;
273 |
274 | @for $i from 2 through 9 {
275 | .gallery-columns-#{$i} & {
276 | $w: floor(10000/$i)/100;
277 | max-width: unquote($w + '%');
278 | }
279 | }
280 | }
281 |
282 | .gallery-caption {
283 | display: block;
284 | }
285 |
--------------------------------------------------------------------------------
/src/styles/_20-rp-config.scss:
--------------------------------------------------------------------------------
1 | /* config, set your color preferences */
2 |
3 | $appbar-color: #20B2AA; // lightseagreen;// * 0.90; /* Turquoise; */
4 | $bar-color: $appbar-color; /* Turquoise; */
5 | $form-color: white;
6 | $header-color: snow; //$appbar-color * 1.1;
7 | $footer-color: lightgray;
8 | $border-color: lightgray;
9 | $tab-color: white;
10 | $hoover-color: #D3D3D3 * 1.1;
11 |
--------------------------------------------------------------------------------
/src/styles/_21-rp-body.scss:
--------------------------------------------------------------------------------
1 | /* reset for header - footer */
2 | html {
3 | height: 100%;
4 | box-sizing: border-box;
5 | }
6 |
7 | *,
8 | *::before,
9 | *::after {
10 | box-sizing: inherit;
11 | }
12 |
13 | body {
14 | position: relative;
15 | margin: 0;
16 | padding-bottom: 2rem;
17 | min-height: 100%;
18 | }
19 |
20 | .rp-appbar {
21 | background-color: $appbar-color;
22 | }
23 |
24 | .rp-appbar a {
25 | color: black;
26 | text-decoration: none;
27 | height: 27px;
28 | font-size: 1.6rem
29 | }
30 | .rp-appbar select {
31 | height: 25px;
32 | font-size: 1.6rem;
33 | background-color: $appbar-color * 1.2;
34 | }
35 | .rp-appbar div {
36 | font-size: 1.6rem;
37 | }
38 |
39 | .rp-appbar a:hover {
40 | color: midnightblue;
41 | }
42 |
43 | .rp-bar {
44 | background-color: $bar-color;
45 | color: white
46 | }
47 |
48 | .rp-rbar-item {
49 | float: right;
50 | padding: 1rem;
51 | }
52 |
53 | .rp-lbar-item {
54 | padding: 1rem;
55 | }
56 | /* */
57 |
58 | .rp-footer {
59 | position: absolute;
60 | right: 0;
61 | bottom: 0;
62 | left: 0;
63 | padding: .2rem;
64 | background-color: $footer-color;
65 | text-align: center;
66 | }
67 | /* */
68 |
--------------------------------------------------------------------------------
/src/styles/_22-rp-popup.scss:
--------------------------------------------------------------------------------
1 | /*
2 | rp-popup-*
3 | */
4 | .rp-popup {
5 | position: absolute;
6 | left: 50%;
7 | top: 100px;
8 | margin: 0 0 0 -25%;
9 | background: white;
10 | z-index: 1000;
11 | }
12 |
13 | .rp-popup-behind {
14 | position: absolute;
15 | left: 0;
16 | top: 0;
17 | z-index: 999;
18 | width: 100%;
19 | background : rgba(255,255,255,0.6);
20 | }
21 |
22 | .rp-popup-header {
23 | background-color: $header-color;
24 | border-style: solid;
25 | border-width: 1px;
26 | height: 27px;
27 | width: 100%;
28 | border-color: $border-color;
29 | padding-top: 2px;
30 | padding-left: 2px;
31 | padding-right: 2px;
32 | font-size: 1.6rem;
33 | }
34 |
35 | .rp-popup-msg {
36 | background-color: white;
37 | border-bottom-style: solid;
38 | border-bottom-width: 1px;
39 | border-bottom-color: $border-color;
40 | height: 80px;
41 | }
42 |
--------------------------------------------------------------------------------
/src/styles/_23-rp-table.scss:
--------------------------------------------------------------------------------
1 | /* ----------------------------- */
2 | /* ==rp-table */
3 | /* ----------------------------- */
4 |
5 | table tbody tr:hover {
6 | background-color: $hoover-color
7 | }
--------------------------------------------------------------------------------
/src/styles/_24-rp-widget.scss:
--------------------------------------------------------------------------------
1 | /*
2 | rp-widget-*
3 | */
4 | .rp-widget {
5 | border-style: solid;
6 | border-width: 1px;
7 | border-color: $border-color;
8 | }
9 |
10 | .rp-widget-icon {
11 | float: right;
12 | margin: 4px;
13 | }
14 |
15 | .rp-widget-header {
16 | background-color: $header-color;
17 | border-style: solid;
18 | border-width: 1px;
19 | height: 27px;
20 | width: 100%;
21 | border-color: $border-color;
22 | padding-top: 2px;
23 | padding-left: 2px;
24 | padding-right: 2px;
25 | font-size: 1.6rem;
26 | }
27 |
28 | .rp-widget-button {
29 | background-color: white;
30 | border-color: gray;
31 | border-style: solid;
32 | border-width: 1px;
33 | }
34 |
35 | .rp-widget-button:hover {
36 | background-color: $hoover-color;
37 | border-color: gray;
38 | border-style: solid;
39 | border-width: 1px;
40 | }
41 |
42 | .rp-widget-tool {
43 | width: 140px;
44 | background-color: $hoover-color;
45 | }
46 |
47 | .react-grid-item.react-grid-placeholder {
48 | background: white !important;
49 | }
50 |
51 | /* */
52 |
--------------------------------------------------------------------------------
/src/styles/_25-rp-dashboard.scss:
--------------------------------------------------------------------------------
1 | /*
2 | rp-dashobard-*
3 | */
4 | .rp-dashboard-button {
5 | background-color: white;
6 | border-color: gray;
7 | border-style: solid;
8 | border-width: 1px;
9 | }
10 |
11 | .rp-dashboard-button:hover {
12 | background-color: $hoover-color;
13 | border-color: gray;
14 | border-style: solid;
15 | border-width: 1px;
16 | }
17 | /* */
18 |
--------------------------------------------------------------------------------
/src/styles/_26-rp-search.scss:
--------------------------------------------------------------------------------
1 | /*
2 | rp-search-*
3 | */
4 | .rp-search-tool {
5 | float: left;
6 | margin-top: 9px;
7 | }
8 |
9 | .rp-search-after {
10 | margin-top: 4px;
11 | float: left;
12 | display: none;
13 | }
14 |
15 | #asearchtool:hover #bsearchtool {
16 | display: block;
17 | margin-right: -350px;
18 | }
19 | /* */
--------------------------------------------------------------------------------
/src/styles/_27-rp-form.scss:
--------------------------------------------------------------------------------
1 | /**/
2 | /* rp-form-small */
3 | /**/
4 | .rp-form-small {
5 | width : 45rem;
6 | background-color: $form-color;
7 | border-color: gray;
8 | border-style: solid;
9 | border-width: 1px;
10 | margin: 4px;
11 | }
12 | .rp-field-error {
13 | color: red;
14 | margin-left : 4px;
15 | }
16 | .rp-form-error {
17 | color: red;
18 | }
19 |
20 | form.rp-form-small label {
21 | @extend .kna-txtright;
22 | display: inline-block;
23 | margin-bottom: 1.2rem;
24 | margin-right: .4rem;
25 | width: 15rem;
26 | }
27 | form.rp-form-small label[required]::after {
28 | content: " *";
29 | color: red;
30 | }
31 | form.rp-form-small input {
32 | width: 28rem;
33 | }
34 | form.rp-form-small select {
35 | height: 27px;
36 | margin-left: 4px;
37 | width: 28rem;
38 | }
39 | form.rp-form-small textarea {
40 | width: 28rem;
41 | }
42 | div.rp-form-button {
43 | margin-top: 4px;
44 | }
45 |
46 | /* end rp-from-small */
47 |
--------------------------------------------------------------------------------
/src/styles/_28-rp-tabbar.scss:
--------------------------------------------------------------------------------
1 | /*
2 | rp-tabbar
3 | */
4 | .rp-tabbar {
5 | display: inline-block;
6 | margin-top: 6px;
7 | margin-left: 20px;
8 | }
9 |
10 | ul.rp-tabbar {
11 | display: table;
12 | list-style-type: none;
13 | margin: 0;
14 | padding: 0;
15 | }
16 |
17 | ul.rp-tabbar>li {
18 | float: left;
19 | padding: 3px;
20 | padding-left: 5px;
21 | padding-right: 5px;
22 | background-color: white;
23 | }
24 |
25 | ul.rp-tabbar>li:hover {
26 | background-color: $hoover-color;
27 | }
28 |
29 | ul.rp-tabbar>li.selected {
30 | background-color: blue;
31 | }
32 |
33 | div.rp-tabbar-content {
34 | border-bottom: 1px;
35 | border-bottom-style: solid;
36 | border-bottom-color: $border-color;
37 | }
38 | /* */
39 |
--------------------------------------------------------------------------------
/src/styles/knacss.scss:
--------------------------------------------------------------------------------
1 | // Sass config file
2 | // -----------------
3 |
4 | // (WARNING : you should comment this line and move config file from vendor/knacss folder to your own folder)
5 | @import "_00-config";
6 |
7 | // normalize include
8 | @import "_01a-normalize"; // normalize
9 |
10 | // Sass base styles
11 | @import "_01b-base"; // reset and basic styles
12 |
13 | // Sass files : chose the ones you need
14 | @import "_02-layout"; // alignment, modules, positionning
15 | @import "_03-grids"; // grids
16 | @import "_04-tables"; // data tables consistency
17 | @import "_05-forms"; // forms consistency
18 | @import "_06-helpers"; // width and spacers visually classes
19 | @import "_07-responsive"; // Responsive Web Design helpers
20 | @import "_08-print"; // print quick reset
21 | @import "_09-misc"; // skip links, google maps and hyphens
22 | @import "_10-styling"; // minor stylings
23 |
24 | // WordPress base styles
25 | // @import "_11-wordpress"; // WordPress reset and basic styles
26 |
27 | /* ----------------------------- */
28 | /* ==own stylesheet */
29 | /* ----------------------------- */
30 |
31 | /* Here should go your own CSS styles */
32 | /* You can also link them with a Sass @import */
33 | /* @import "my-styles"; */
34 | /*
35 | Header body footer
36 | */
37 |
38 | /*
39 | React-portal base color
40 | */
41 |
42 | @import "_20-rp-config"; // color setting
43 | @import "_21-rp-body";
44 | @import "_22-rp-popup";
45 | @import "_23-rp-table";
46 | @import "_24-rp-widget";
47 | @import "_25-rp-dashboard";
48 | // @import "_26_rp_search";
49 | @import "_27-rp-form";
50 | @import "_28-rp-tabbar";
51 |
52 |
--------------------------------------------------------------------------------
/src/types/auth_types.js:
--------------------------------------------------------------------------------
1 | export const AUTH_CHECK_TOKEN = 'auth_check_token'
2 | export const AUTH_SET_AUTHORIZATIONS = 'auth_set_authorizations'
3 | export const AUTH_SIGN_IN_UP = 'auth_sign_in_up'
4 | export const AUTH_SIGN_IN = 'auth_sign_in'
5 | export const AUTH_SIGN_UP = 'auth_sign_up'
6 | export const AUTH_SIGN_OUT = 'auth_sign_out'
7 | export const AUTH_ERROR = 'auth_error'
8 | export const AUTH_VALIDATE_SIGN_UP = 'auth_validate_sign_up'
9 | export const AUTH_VALIDATE_SIGN_IN = 'auth_validate_sign_in'
--------------------------------------------------------------------------------
/src/types/dashboard_types.js:
--------------------------------------------------------------------------------
1 | export const DASHBOARD_ADD = 'dashboard_add'
2 | export const DASHBOARD_DELETE = 'dashboard_delete'
3 | export const DASHBOARD_UPDATE = 'dashboard_update'
4 | export const DASHBOARD_GET_ALL = 'dashboard_get_all'
5 | export const DASHBOARD_REMOVE_WIDGET = 'dashboard_remove_widget'
6 | export const DASHBOARD_ADD_WIDGET = 'dashboard_add_widget'
7 | export const DASHBOARD_ADD_DASHBOARD = 'dashboard_add_dashboard'
8 | export const DASHBOARD_DELETE_DASHBOARD = 'dashboard_delete_dashboard'
9 | export const DASHBOARD_RENAME_DASHBOARD = 'dashboard_rename_dashboard'
10 | export const DASHBOARD_SHOW = 'dashboard_show'
11 | export const DASHBOARD_HIDE = 'dashboard_hide'
--------------------------------------------------------------------------------
/src/types/message_types.js:
--------------------------------------------------------------------------------
1 | export const MESSAGE_FETCH = 'message_fetch';
2 | export const MESSAGE_ERROR = 'message_error';
--------------------------------------------------------------------------------
/src/types/popup_types.js:
--------------------------------------------------------------------------------
1 | export const POPUP_SHOW = 'popup_show'
2 | export const POPUP_CLOSE = 'popup_close'
--------------------------------------------------------------------------------
/src/types/tabbar_types.js:
--------------------------------------------------------------------------------
1 | export const TABBAR_SHOW = 'tabbar_show'
2 | export const TABBAR_CLOSE = 'tabbar_close'
3 | export const TABBAR_CLOSE_ALL = 'tabbar_close_all'
4 | export const TABBAR_SELECT = 'tabbar_select'
--------------------------------------------------------------------------------
/src/types/todo_types.js:
--------------------------------------------------------------------------------
1 | export const TODO_GET_ALL = 'todo_get_all'
2 | export const TODO_DELETE = 'todo_delete'
3 | export const TODO_ADD = 'todo_add'
4 | export const TODO_UPDATE = 'todo_update'
5 | export const TODO_NEXT_PAGE = "todo_next_page"
6 | export const TODO_PREVIOUS_PAGE = "todo_previous_page"
7 | export const TODO_ERROR = "todo_error"
8 | export const TODO_EDIT_FORM = "todo_edit_form"
9 | export const TODO_CANCEL_FORM = "todo_cancel_form"
10 | export const TODO_DONE = "todo_done"
--------------------------------------------------------------------------------
/src/types/user_types.js:
--------------------------------------------------------------------------------
1 | export const USER_GET_ALL = 'user_get_all'
2 | export const USER_DELETE = 'user_delete'
3 | export const USER_NEXT_PAGE = "user_next_page"
4 | export const USER_PREVIOUS_PAGE = "user_previous_page"
5 | export const USER_ERROR = "user_error"
--------------------------------------------------------------------------------
/src/types/widget_types.js:
--------------------------------------------------------------------------------
1 | export const WIDGET_ADD = 'widget_add'
2 | export const WIDGET_DELETE = 'widget_delete'
3 | export const WIDGET_UPDATE = 'widget_update'
4 | export const WIDGET_GET_ALL = 'widget_get_all'
--------------------------------------------------------------------------------
/test/auth_test.js:
--------------------------------------------------------------------------------
1 | import Signin from '../src/components/auth/signin'
2 | import { authStore } from '../src/stores/auth_store'
3 | import { signinForm, signupForm } from '../src/forms/signin_form'
4 | import { renderComponent , expect } from './test_helper';
5 | import AuthService from '../src/services/auth_service';
6 | import MockAuthService from './services/auth_service';
7 | import { setTestFunction } from '../src/resolvers/test_resolver';
8 |
9 | describe('Authentification' , () => {
10 | let component;
11 | let instance;
12 |
13 | beforeEach(() => {
14 | const result = renderComponent(Signin, { store: authStore, form: signinForm});
15 | component = result.component
16 | instance = result.instance
17 | });
18 |
19 | afterEach(() => {
20 | setTestFunction(null)
21 | });
22 |
23 | it('renders something', () => {
24 | expect(component).to.exist;
25 | });
26 |
27 | it('email exist', () => {
28 | expect(component.find('input[name="email"]')).to.exist;
29 | });
30 |
31 | it('password exist', () => {
32 | expect(component.find('input[name="password"]')).to.exist;
33 | });
34 |
35 | it('bad signin with store', () => {
36 | var testPromise = new Promise(function(resolve, reject) {
37 | AuthService.setInstance(new MockAuthService())
38 | component.find('input[name="email"]').simulate('change', 'jyv');
39 | component.find('input[name="password"]').simulate('change', 'sds');
40 | setTestFunction(function() {
41 | resolve(authStore.getError())
42 | })
43 | component.find('button').simulate('click');
44 | });
45 |
46 | return testPromise.then(function(result){
47 | expect(result).to.equal("Unauthorized");
48 | });
49 | });
50 |
51 | it('bad signin with component', () => {
52 | var testPromise = new Promise(function(resolve, reject) {
53 | AuthService.setInstance(new MockAuthService())
54 | component.find('input[name="email"]').simulate('change', 'jyv');
55 | component.find('input[name="password"]').simulate('change', 'sds');
56 | setTestFunction(function() {
57 | resolve(component.find('div[class="rp-field-error"]'))
58 | })
59 | component.find('button').simulate('click');
60 | });
61 |
62 | return testPromise.then(function(result){
63 | expect(result).to.exist
64 | });
65 | });
66 | });
67 |
68 |
--------------------------------------------------------------------------------
/test/base_test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { expect } from 'chai';
3 | import { shallow, mount, render } from 'enzyme';
4 | import Test from '../src/helpers/test';
5 |
6 | describe("Base test with enzyme", function() {
7 | it("contains spec with an expectation", function() {
8 | expect(shallow(
).contains(
)).to.equal(true);
9 | });
10 |
11 | it("contains spec with an expectation", function() {
12 | expect(shallow(
).is('.test')).to.equal(true);
13 | });
14 |
15 | it("contains spec with an expectation", function() {
16 | expect(mount(
).find('.test').length).to.equal(1);
17 | });
18 | });
--------------------------------------------------------------------------------
/test/services/auth_service.js:
--------------------------------------------------------------------------------
1 | import { dispatch } from '../../src/helpers/dispatcher'
2 |
3 | export default class MockAuthService {
4 | signIn({ email, password }, next, err) {
5 | if (email === 'jyvinet@hotmail.ca' && password === 'test') {
6 | dispatch(next('token', 'Jean-Yves'))
7 | } else {
8 | dispatch(err('Unauthorized'));
9 | }
10 | }
11 |
12 | signUp({ email, password, name }, next, err) {
13 | if (email === 'jyvinet@hotmail.ca' && password === 'test') {
14 | dispatch(next('token', 'Jean-Yves'))
15 | } else {
16 | dispatch(err('Unauthorized'));
17 | }
18 | }
19 |
20 | setAuthorizations(render, next, err) {
21 | dispatch(next(render, 'token'))
22 | }
23 | }
--------------------------------------------------------------------------------
/test/test_helper.js:
--------------------------------------------------------------------------------
1 | import _$ from 'jquery';
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import TestUtils from 'react-addons-test-utils';
5 | import jsdom from 'jsdom';
6 | import chai, { expect } from 'chai';
7 | import chaiJquery from 'chai-jquery';
8 | import { addLocaleData, IntlProvider } from 'react-intl'
9 | import { app } from '../src/helpers/translation'
10 |
11 | require('babel-register')();
12 |
13 | var exposedProperties = ['window', 'navigator', 'document'];
14 |
15 | global.document = jsdom.jsdom('');
16 | global.window = global.document.defaultView;
17 | const $ = _$(window);
18 |
19 | var locale = window.navigator.userLanguage || window.navigator.language
20 | var localePrefix = locale.slice(0, locale.indexOf('-'));
21 | if (localePrefix !== 'en' && localePrefix !== 'fr') {
22 | locale = 'en-US'
23 | localePrefix = 'en'
24 | }
25 | const defaultApp = app['en'];
26 | import en from 'react-intl/locale-data/en';
27 | import fr from 'react-intl/locale-data/fr'
28 | addLocaleData([...en, ...fr]);
29 |
30 |
31 | Object.keys(document.defaultView).forEach((property) => {
32 | if (typeof global[property] === 'undefined') {
33 | exposedProperties.push(property);
34 | global[property] = document.defaultView[property];
35 | }
36 | });
37 |
38 | global.navigator = {
39 | userAgent: 'node.js'
40 | };
41 |
42 | chaiJquery(chai, chai.util, $);
43 |
44 | function renderComponent(ComponentClass, props = {}, state = {}) {
45 | const componentInstance = TestUtils.renderIntoDocument(
46 |
47 |
48 |
49 | );
50 |
51 | return { instance: componentInstance, component: $(ReactDOM.findDOMNode(componentInstance)) }
52 | }
53 |
54 | $.fn.simulate = function(eventName, value) {
55 | if (value) {
56 | this.val(value);
57 | }
58 | TestUtils.Simulate[eventName](this[0]);
59 | };
60 |
61 | export {renderComponent, expect};
62 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const webpack = require('webpack');
2 | const path = require('path');
3 |
4 | var isProd = (process.env.NODE_ENV === 'production');
5 | console.log('prod', isProd)
6 | // Conditionally return a list of plugins to use based on the current environment.
7 | // Repeat this pattern for any other config key (ie: loaders, etc).
8 | function getPlugins() {
9 | var plugins = [];
10 | // Always expose NODE_ENV to webpack, you can now use `process.env.NODE_ENV`
11 | // inside your code for any environment checks; UglifyJS will automatically
12 | // drop any unreachable code.
13 |
14 | // Conditionally add plugins for Production builds.
15 | if (isProd === true) {
16 | plugins.push(new webpack.optimize.UglifyJsPlugin(
17 | {
18 | compressor: {
19 | screw_ie8: true,
20 | warnings: false
21 | },
22 | minimize: true
23 | }
24 | )); // plugins.push(new webpack.DefinePlugin({ "process.env": { NODE_ENV: JSON.stringify('production') } }) );
25 | }
26 |
27 | // Conditionally add plugins for Development
28 | //else {
29 | // // ...
30 | //}
31 | ////externals: {'react': 'React', 'react-dom': 'ReactDOM'},
32 |
33 | return plugins;
34 | }
35 |
36 | module.exports = {
37 | devtool: 'cheap-module-source-map',
38 | entry: './src/index.js',
39 | output: {
40 | filename: 'bundle.js',
41 | },
42 |
43 | module: {
44 | loaders: [
45 | {
46 | // JSX REACT transpiler
47 | test: /\.js$/,
48 | include: [
49 | path.join(__dirname, 'src'),
50 | path.join(__dirname, 'test')
51 | ],
52 | loader: 'babel-loader'
53 | },
54 | {
55 | // SASS transpiler
56 | test: /(\.css|\.scss)$/,
57 | loaders: ['style-loader', 'css-loader?sourceMap', 'sass-loader?sourceMap']
58 | },
59 | // file loaders
60 | {test: /.eot(\?v=\d+.\d+.\d+)?$/, loader: "file"},
61 | {test: /.(woff|woff2)$/, loader: "file-loader?prefix=font/&limit=5000"},
62 | {test: /.ttf(\?v=\d+.\d+.\d+)?$/, loader: "file-loader?limit=10000&mimetype=application/octet-stream"},
63 | {test: /.svg(\?v=\d+.\d+.\d+)?$/, loader: "file-loader?limit=10000&mimetype=image/svg+xml"},
64 | {test: /\.(jpe?g|png|gif)$/i, loaders: ['file']},
65 | {test: /\.ico$/, loader: 'file-loader?name=[name].[ext]'},
66 | ]
67 | },
68 | plugins: getPlugins()
69 | }
70 |
71 |
--------------------------------------------------------------------------------