')
373 | .append(i.clone())
374 | .remove()
375 | .html()
376 | .replace(/type="password"/i, 'type="text"')
377 | .replace(/type=password/i, 'type=text')
378 | );
379 |
380 | if (i.attr('id') != '')
381 | x.attr('id', i.attr('id') + '-polyfill-field');
382 |
383 | if (i.attr('name') != '')
384 | x.attr('name', i.attr('name') + '-polyfill-field');
385 |
386 | x.addClass('polyfill-placeholder')
387 | .val(x.attr('placeholder')).insertAfter(i);
388 |
389 | if (i.val() == '')
390 | i.hide();
391 | else
392 | x.hide();
393 |
394 | i
395 | .on('blur', function(event) {
396 |
397 | event.preventDefault();
398 |
399 | var x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');
400 |
401 | if (i.val() == '') {
402 |
403 | i.hide();
404 | x.show();
405 |
406 | }
407 |
408 | });
409 |
410 | x
411 | .on('focus', function(event) {
412 |
413 | event.preventDefault();
414 |
415 | var i = x.parent().find('input[name=' + x.attr('name').replace('-polyfill-field', '') + ']');
416 |
417 | x.hide();
418 |
419 | i
420 | .show()
421 | .focus();
422 |
423 | })
424 | .on('keypress', function(event) {
425 |
426 | event.preventDefault();
427 | x.val('');
428 |
429 | });
430 |
431 | });
432 |
433 | // Events.
434 | $this
435 | .on('submit', function() {
436 |
437 | $this.find('input[type=text],input[type=password],textarea')
438 | .each(function(event) {
439 |
440 | var i = $(this);
441 |
442 | if (i.attr('name').match(/-polyfill-field$/))
443 | i.attr('name', '');
444 |
445 | if (i.val() == i.attr('placeholder')) {
446 |
447 | i.removeClass('polyfill-placeholder');
448 | i.val('');
449 |
450 | }
451 |
452 | });
453 |
454 | })
455 | .on('reset', function(event) {
456 |
457 | event.preventDefault();
458 |
459 | $this.find('select')
460 | .val($('option:first').val());
461 |
462 | $this.find('input,textarea')
463 | .each(function() {
464 |
465 | var i = $(this),
466 | x;
467 |
468 | i.removeClass('polyfill-placeholder');
469 |
470 | switch (this.type) {
471 |
472 | case 'submit':
473 | case 'reset':
474 | break;
475 |
476 | case 'password':
477 | i.val(i.attr('defaultValue'));
478 |
479 | x = i.parent().find('input[name=' + i.attr('name') + '-polyfill-field]');
480 |
481 | if (i.val() == '') {
482 | i.hide();
483 | x.show();
484 | }
485 | else {
486 | i.show();
487 | x.hide();
488 | }
489 |
490 | break;
491 |
492 | case 'checkbox':
493 | case 'radio':
494 | i.attr('checked', i.attr('defaultValue'));
495 | break;
496 |
497 | case 'text':
498 | case 'textarea':
499 | i.val(i.attr('defaultValue'));
500 |
501 | if (i.val() == '') {
502 | i.addClass('polyfill-placeholder');
503 | i.val(i.attr('placeholder'));
504 | }
505 |
506 | break;
507 |
508 | default:
509 | i.val(i.attr('defaultValue'));
510 | break;
511 |
512 | }
513 | });
514 |
515 | });
516 |
517 | return $this;
518 |
519 | };
520 |
521 | /**
522 | * Moves elements to/from the first positions of their respective parents.
523 | * @param {jQuery} $elements Elements (or selector) to move.
524 | * @param {bool} condition If true, moves elements to the top. Otherwise, moves elements back to their original locations.
525 | */
526 | $.prioritize = function($elements, condition) {
527 |
528 | var key = '__prioritize';
529 |
530 | // Expand $elements if it's not already a jQuery object.
531 | if (typeof $elements != 'jQuery')
532 | $elements = $($elements);
533 |
534 | // Step through elements.
535 | $elements.each(function() {
536 |
537 | var $e = $(this), $p,
538 | $parent = $e.parent();
539 |
540 | // No parent? Bail.
541 | if ($parent.length == 0)
542 | return;
543 |
544 | // Not moved? Move it.
545 | if (!$e.data(key)) {
546 |
547 | // Condition is false? Bail.
548 | if (!condition)
549 | return;
550 |
551 | // Get placeholder (which will serve as our point of reference for when this element needs to move back).
552 | $p = $e.prev();
553 |
554 | // Couldn't find anything? Means this element's already at the top, so bail.
555 | if ($p.length == 0)
556 | return;
557 |
558 | // Move element to top of parent.
559 | $e.prependTo($parent);
560 |
561 | // Mark element as moved.
562 | $e.data(key, $p);
563 |
564 | }
565 |
566 | // Moved already?
567 | else {
568 |
569 | // Condition is true? Bail.
570 | if (condition)
571 | return;
572 |
573 | $p = $e.data(key);
574 |
575 | // Move element back to its original location (using our placeholder).
576 | $e.insertAfter($p);
577 |
578 | // Unmark element as moved.
579 | $e.removeData(key);
580 |
581 | }
582 |
583 | });
584 |
585 | };
586 |
587 | })(jQuery);
--------------------------------------------------------------------------------
/v1/assets/sass/base/_page.scss:
--------------------------------------------------------------------------------
1 | /* Basic */
2 |
3 | // MSIE: Required for IEMobile.
4 | @-ms-viewport {
5 | width: device-width;
6 | }
7 |
8 | // MSIE: Prevents scrollbar from overlapping content.
9 | body {
10 | -ms-overflow-style: scrollbar;
11 | }
12 |
13 | // Ensures page width is always >=320px.
14 | @include breakpoint(xsmall) {
15 | html, body {
16 | min-width: 320px;
17 | }
18 | }
19 |
20 | body {
21 | background: _palette(bg);
22 |
23 | // Prevents animation/transition "flicker" on page load.
24 | // Automatically added/removed by js/main.js.
25 | &.is-loading {
26 | *, *:before, *:after {
27 | @include vendor('animation', 'none !important');
28 | @include vendor('transition', 'none !important');
29 | }
30 | }
31 |
32 | }
--------------------------------------------------------------------------------
/v1/assets/sass/base/_typography.scss:
--------------------------------------------------------------------------------
1 | /* Type */
2 |
3 | body {
4 | background-color: _palette(bg);
5 | color: _palette(fg);
6 | }
7 |
8 | body, input, select, textarea {
9 | font-family: _font(family);
10 | font-size: 13pt;
11 | font-weight: _font(weight);
12 | line-height: 1.65;
13 |
14 | @include breakpoint(xlarge) {
15 | font-size: 11pt;
16 | }
17 |
18 | @include breakpoint(large) {
19 | font-size: 11pt;
20 | }
21 |
22 | @include breakpoint(medium) {
23 | font-size: 12pt;
24 | }
25 |
26 | @include breakpoint(small) {
27 | font-size: 12pt;
28 | }
29 |
30 | @include breakpoint(xsmall) {
31 | font-size: 12pt;
32 | }
33 | }
34 |
35 | a {
36 | text-decoration: underline;
37 |
38 | &:hover {
39 | text-decoration: none;
40 | }
41 | }
42 |
43 | strong, b {
44 | font-weight: _font(weight-bold);
45 | }
46 |
47 | em, i {
48 | font-style: italic;
49 | }
50 |
51 | p {
52 | margin: 0 0 _size(element-margin) 0;
53 | }
54 |
55 | h1, h2, h3, h4, h5, h6 {
56 | font-weight: _font(weight-bold);
57 | line-height: 1.5;
58 | margin: 0 0 (_size(element-margin) * 0.5) 0;
59 |
60 | a {
61 | color: inherit;
62 | text-decoration: none;
63 | }
64 | }
65 |
66 | h2 {
67 | font-size: 1.75em;
68 | }
69 |
70 | h3 {
71 | font-size: 1.35em;
72 | }
73 |
74 | h4 {
75 | font-size: 1.1em;
76 | }
77 |
78 | h5 {
79 | font-size: 0.9em;
80 | }
81 |
82 | h6 {
83 | font-size: 0.7em;
84 | }
85 |
86 | sub {
87 | font-size: 0.8em;
88 | position: relative;
89 | top: 0.5em;
90 | }
91 |
92 | sup {
93 | font-size: 0.8em;
94 | position: relative;
95 | top: -0.5em;
96 | }
97 |
98 | blockquote {
99 | border-left: solid (_size(border-width) * 4);
100 | font-style: italic;
101 | margin: 0 0 _size(element-margin) 0;
102 | padding: (_size(element-margin) / 4) 0 (_size(element-margin) / 4) _size(element-margin);
103 | }
104 |
105 | code {
106 | border-radius: _size(border-radius);
107 | border: solid _size(border-width);
108 | font-family: _font(family-fixed);
109 | font-size: 0.9em;
110 | margin: 0 0.25em;
111 | padding: 0.25em 0.65em;
112 | }
113 |
114 | pre {
115 | -webkit-overflow-scrolling: touch;
116 | font-family: _font(family-fixed);
117 | font-size: 0.9em;
118 | margin: 0 0 _size(element-margin) 0;
119 |
120 | code {
121 | display: block;
122 | line-height: 1.75;
123 | padding: 1em 1.5em;
124 | overflow-x: auto;
125 | }
126 | }
127 |
128 | hr {
129 | border: 0;
130 | border-bottom: solid _size(border-width);
131 | margin: _size(element-margin) 0;
132 |
133 | &.major {
134 | margin: (_size(element-margin) * 1.5) 0;
135 | }
136 | }
137 |
138 | .align-left {
139 | text-align: left;
140 | }
141 |
142 | .align-center {
143 | text-align: center;
144 | }
145 |
146 | .align-right {
147 | text-align: right;
148 | }
149 |
150 | @mixin color-typography($p: null) {
151 | $highlight: _palette($p, highlight);
152 |
153 | @if $p != null {
154 | background-color: _palette($p, bg);
155 | color: _palette($p, fg);
156 | }
157 |
158 | input, select, textarea {
159 | color: _palette($p, fg-bold);
160 | }
161 |
162 | a {
163 | @if $p == $highlight {
164 | color: _palette($p, fg-bold);
165 | }
166 | @else {
167 | color: _palette(accent1, bg);
168 | }
169 | }
170 |
171 | strong, b {
172 | color: _palette($p, fg-bold);
173 | }
174 |
175 | h1, h2, h3, h4, h5, h6 {
176 | color: _palette($p, fg-bold);
177 | }
178 |
179 | blockquote {
180 | border-left-color: _palette($p, border);
181 | }
182 |
183 | code {
184 | background: _palette($p, border-bg);
185 | border-color: _palette($p, border);
186 | }
187 |
188 | hr {
189 | border-bottom-color: _palette($p, border);
190 | }
191 | }
192 |
193 | @include color-typography;
--------------------------------------------------------------------------------
/v1/assets/sass/components/_box.scss:
--------------------------------------------------------------------------------
1 | /* Box */
2 |
3 | .box {
4 | border-radius: _size(border-radius);
5 | border: solid _size(border-width);
6 | margin-bottom: _size(element-margin);
7 | padding: 1.5em;
8 |
9 | > :last-child,
10 | > :last-child > :last-child,
11 | > :last-child > :last-child > :last-child {
12 | margin-bottom: 0;
13 | }
14 |
15 | &.alt {
16 | border: 0;
17 | border-radius: 0;
18 | padding: 0;
19 | }
20 | }
21 |
22 | @mixin color-box($p: null) {
23 | .box {
24 | border-color: _palette($p, border);
25 | }
26 | }
27 |
28 | @include color-box;
--------------------------------------------------------------------------------
/v1/assets/sass/components/_button.scss:
--------------------------------------------------------------------------------
1 | /* Button */
2 |
3 | input[type="submit"],
4 | input[type="reset"],
5 | input[type="button"],
6 | button,
7 | .button {
8 | @include vendor('appearance', 'none');
9 | @include vendor('transition', 'background-color #{_duration(transition)} ease-in-out, color #{_duration(transition)} ease-in-out');
10 | border-radius: _size(border-radius);
11 | border: 0;
12 | cursor: pointer;
13 | display: inline-block;
14 | font-weight: _font(weight-bold);
15 | height: 2.85em;
16 | line-height: 2.95em;
17 | padding: 0 1.5em;
18 | text-align: center;
19 | text-decoration: none;
20 | white-space: nowrap;
21 |
22 | &.icon {
23 | padding-left: 1.35em;
24 |
25 | &:before {
26 | margin-right: 0.5em;
27 | }
28 | }
29 |
30 | &.fit {
31 | display: block;
32 | margin: 0 0 (_size(element-margin) * 0.5) 0;
33 | width: 100%;
34 | }
35 |
36 | &.small {
37 | font-size: 0.8em;
38 | }
39 |
40 | &.big {
41 | font-size: 1.35em;
42 | }
43 |
44 | &.disabled,
45 | &:disabled {
46 | @include vendor('pointer-events', 'none');
47 | opacity: 0.25;
48 | }
49 |
50 | @include breakpoint(small) {
51 | width: 100%;
52 | }
53 |
54 | @include breakpoint(xsmall) {
55 | padding: 0;
56 |
57 | }
58 | }
59 |
60 | @mixin color-button($p: null) {
61 | $highlight: _palette($p, highlight);
62 |
63 | input[type="submit"],
64 | input[type="reset"],
65 | input[type="button"],
66 | button,
67 | .button {
68 | @if $p == accent2 {
69 | background-color: _palette($p, fg-bold);
70 | color: _palette($p, bg) !important;
71 | }
72 | @else {
73 | background-color: _palette(accent2, bg);
74 | color: _palette(accent2, fg-bold) !important;
75 |
76 | &:hover {
77 | background-color: lighten(_palette(accent2, bg), 5);
78 | }
79 |
80 | &:active {
81 | background-color: darken(_palette(accent2, bg), 5);
82 | }
83 | }
84 |
85 | &.alt {
86 | background-color: transparent;
87 | box-shadow: inset 0 0 0 (_size(border-width) * 2) _palette($p, border);
88 | color: _palette($p, fg-bold) !important;
89 |
90 | &:hover {
91 | background-color: _palette($p, border-bg);
92 | }
93 |
94 | &:active {
95 | background-color: _palette($p, border2-bg);
96 | }
97 |
98 | &.icon {
99 | &:before {
100 | color: _palette($p, fg-light);
101 | }
102 | }
103 | }
104 |
105 | &.special {
106 | @if $p == $highlight {
107 | background-color: _palette($p, fg-bold);
108 | color: _palette($p, bg) !important;
109 | }
110 | @else {
111 | background-color: _palette($highlight, bg);
112 | color: _palette($highlight, fg-bold) !important;
113 |
114 | &:hover {
115 | background-color: lighten(_palette($highlight, bg), 5);
116 | }
117 |
118 | &:active {
119 | background-color: darken(_palette($highlight, bg), 5);
120 | }
121 | }
122 | }
123 | }
124 | }
125 |
126 | @include color-button;
--------------------------------------------------------------------------------
/v1/assets/sass/components/_form.scss:
--------------------------------------------------------------------------------
1 | /* Form */
2 |
3 | form {
4 | margin: 0 0 _size(element-margin) 0;
5 | }
6 |
7 | label {
8 | display: block;
9 | font-size: 0.9em;
10 | font-weight: _font(weight-bold);
11 | margin: 0 0 (_size(element-margin) * 0.5) 0;
12 | }
13 |
14 | input[type="text"],
15 | input[type="password"],
16 | input[type="email"],
17 | select,
18 | textarea {
19 | @include vendor('appearance', 'none');
20 | border-radius: _size(border-radius);
21 | border: none;
22 | border: solid _size(border-width);
23 | color: inherit;
24 | display: block;
25 | outline: 0;
26 | padding: 0 1em;
27 | text-decoration: none;
28 | width: 100%;
29 |
30 | &:invalid {
31 | box-shadow: none;
32 | }
33 | }
34 |
35 | .select-wrapper {
36 | @include icon;
37 | display: block;
38 | position: relative;
39 |
40 | &:before {
41 | content: '\f078';
42 | display: block;
43 | height: _size(element-height);
44 | line-height: _size(element-height);
45 | pointer-events: none;
46 | position: absolute;
47 | right: 0;
48 | text-align: center;
49 | top: 0;
50 | width: _size(element-height);
51 | }
52 |
53 | select::-ms-expand {
54 | display: none;
55 | }
56 | }
57 |
58 | input[type="text"],
59 | input[type="password"],
60 | input[type="email"],
61 | select {
62 | height: _size(element-height);
63 | }
64 |
65 | textarea {
66 | padding: 0.75em 1em;
67 | }
68 |
69 | input[type="checkbox"],
70 | input[type="radio"], {
71 | @include vendor('appearance', 'none');
72 | display: block;
73 | float: left;
74 | margin-right: -2em;
75 | opacity: 0;
76 | width: 1em;
77 | z-index: -1;
78 |
79 | & + label {
80 | @include icon;
81 | cursor: pointer;
82 | display: inline-block;
83 | font-size: 1em;
84 | font-weight: _font(weight);
85 | padding-left: (_size(element-height) * 0.6) + 0.75em;
86 | padding-right: 0.75em;
87 | position: relative;
88 |
89 | &:before {
90 | border-radius: _size(border-radius);
91 | border: solid _size(border-width);
92 | content: '';
93 | display: inline-block;
94 | height: (_size(element-height) * 0.6);
95 | left: 0;
96 | line-height: (_size(element-height) * 0.575);
97 | position: absolute;
98 | text-align: center;
99 | top: 0;
100 | width: (_size(element-height) * 0.6);
101 | }
102 | }
103 |
104 | &:checked + label {
105 | &:before {
106 | content: '\f00c';
107 | }
108 | }
109 | }
110 |
111 | input[type="checkbox"] {
112 | & + label {
113 | &:before {
114 | border-radius: _size(border-radius);
115 | }
116 | }
117 | }
118 |
119 | input[type="radio"] {
120 | & + label {
121 | &:before {
122 | border-radius: 100%;
123 | }
124 | }
125 | }
126 |
127 | ::-webkit-input-placeholder {
128 | opacity: 1.0;
129 | }
130 |
131 | :-moz-placeholder {
132 | opacity: 1.0;
133 | }
134 |
135 | ::-moz-placeholder {
136 | opacity: 1.0;
137 | }
138 |
139 | :-ms-input-placeholder {
140 | opacity: 1.0;
141 | }
142 |
143 | .formerize-placeholder {
144 | opacity: 1.0;
145 | }
146 |
147 | @mixin color-form($p: null) {
148 | $highlight: _palette($p, highlight);
149 |
150 | label {
151 | color: _palette($p, fg-bold);
152 | }
153 |
154 | input[type="text"],
155 | input[type="password"],
156 | input[type="email"],
157 | select,
158 | textarea {
159 | background: _palette($p, border-bg);
160 | border-color: _palette($p, border);
161 |
162 | &:focus {
163 | @if $p == $highlight {
164 | border-color: _palette($p, fg-bold);
165 | box-shadow: 0 0 0 _size(border-width) _palette($p, fg-bold);
166 | }
167 | @else {
168 | border-color: _palette(accent1, bg);
169 | box-shadow: 0 0 0 _size(border-width) _palette(accent1, bg);
170 | }
171 | }
172 | }
173 |
174 | .select-wrapper {
175 | &:before {
176 | color: _palette($p, border);
177 | }
178 | }
179 |
180 | input[type="checkbox"],
181 | input[type="radio"], {
182 | & + label {
183 | color: _palette($p, fg);
184 |
185 | &:before {
186 | background: _palette($p, border-bg);
187 | border-color: _palette($p, border);
188 | }
189 | }
190 |
191 | &:checked + label {
192 | &:before {
193 | @if $p == $highlight {
194 | background-color: _palette($p, fg-bold);
195 | border-color: _palette($p, fg-bold);
196 | color: _palette($p, bg);
197 | }
198 | @else {
199 | background-color: _palette(accent1, bg);
200 | border-color: _palette(accent1, bg);
201 | color: _palette(accent1, fg-bold);
202 | }
203 | }
204 | }
205 |
206 | &:focus + label {
207 | &:before {
208 | @if $p == $highlight {
209 | border-color: _palette($p, fg-bold);
210 | box-shadow: 0 0 0 _size(border-width) _palette($p, fg-bold);
211 | }
212 | @else {
213 | border-color: _palette(accent1, bg);
214 | box-shadow: 0 0 0 _size(border-width) _palette(accent1, bg);
215 | }
216 | }
217 | }
218 | }
219 |
220 | ::-webkit-input-placeholder {
221 | color: _palette($p, fg-light) !important;
222 | }
223 |
224 | :-moz-placeholder {
225 | color: _palette($p, fg-light) !important;
226 | }
227 |
228 | ::-moz-placeholder {
229 | color: _palette($p, fg-light) !important;
230 | }
231 |
232 | :-ms-input-placeholder {
233 | color: _palette($p, fg-light) !important;
234 | }
235 |
236 | .formerize-placeholder {
237 | color: _palette($p, fg-light) !important;
238 | }
239 | }
240 |
241 | @include color-form;
--------------------------------------------------------------------------------
/v1/assets/sass/components/_icon.scss:
--------------------------------------------------------------------------------
1 | /* Icon */
2 |
3 | .icon {
4 | @include icon;
5 | border-bottom: none;
6 | position: relative;
7 |
8 | > .label {
9 | display: none;
10 | }
11 | }
--------------------------------------------------------------------------------
/v1/assets/sass/components/_image.scss:
--------------------------------------------------------------------------------
1 | /* Image */
2 |
3 | .video-wrapper {
4 | position: relative;
5 | padding-bottom: 40%; /* 16:9 */
6 | padding-top: 0;
7 |
8 | iframe {
9 | position: absolute;
10 | top: 0;
11 | left: 0;
12 | width: 100%!important;
13 | height: 100%!important;
14 | max-width: 100%;
15 | }
16 |
17 | @include breakpoint(large) {
18 | padding-bottom: 60%;
19 | }
20 |
21 | @include breakpoint(medium) {
22 | padding-bottom: 82%;
23 | }
24 |
25 | @include breakpoint(small) {
26 | display: block;
27 | padding-bottom: 0;
28 | iframe {
29 | top: initial;
30 | left: initial;
31 | position: relative;
32 | height: 528px!important;
33 | max-width: 100%!important;
34 | }
35 | }
36 |
37 | }
38 |
39 | .image {
40 | border-radius: _size(border-radius);
41 | border: 0;
42 | display: inline-block;
43 | position: relative;
44 |
45 | img {
46 | border-radius: _size(border-radius);
47 | display: block;
48 | }
49 |
50 | &.left,
51 | &.right {
52 | max-width: 40%;
53 |
54 | img {
55 | width: 100%;
56 | }
57 | }
58 |
59 | &.left {
60 | float: left;
61 | margin: 0 1.5em 1em 0;
62 | top: 0.25em;
63 | }
64 |
65 | &.right {
66 | float: right;
67 | margin: 0 0 1em 1.5em;
68 | top: 0.25em;
69 | }
70 |
71 | &.fit {
72 | display: block;
73 | margin: 0 0 _size(element-margin) 0;
74 | width: 100%;
75 |
76 | img {
77 | width: 100%;
78 | }
79 | }
80 |
81 | &.main {
82 | display: block;
83 | margin: 0 0 (_size(element-margin) * 1.5) 0;
84 | width: 100%;
85 |
86 | img {
87 | width: 100%;
88 | }
89 | }
90 | }
--------------------------------------------------------------------------------
/v1/assets/sass/components/_list.scss:
--------------------------------------------------------------------------------
1 | /* List */
2 |
3 | ol {
4 | list-style: decimal;
5 | margin: 0 0 _size(element-margin) 0;
6 | padding-left: 1.25em;
7 |
8 | li {
9 | padding-left: 0.25em;
10 | }
11 | }
12 |
13 | ul {
14 | list-style: disc;
15 | margin: 0 0 _size(element-margin) 0;
16 | padding-left: 1em;
17 |
18 | li {
19 | padding-left: 0.5em;
20 | }
21 |
22 | &.alt {
23 | list-style: none;
24 | padding-left: 0;
25 |
26 | li {
27 | border-top: solid _size(border-width);
28 | padding: 0.5em 0;
29 |
30 | &:first-child {
31 | border-top: 0;
32 | padding-top: 0;
33 | }
34 | }
35 | }
36 |
37 | &.icons {
38 | cursor: default;
39 | list-style: none;
40 | padding-left: 0;
41 |
42 | li {
43 | display: inline-block;
44 | padding: 0 1em 0 0;
45 |
46 | &:last-child {
47 | padding-right: 0;
48 | }
49 |
50 | .icon {
51 | &:before {
52 | font-size: 2em;
53 | }
54 | }
55 | }
56 | }
57 |
58 | &.actions {
59 | cursor: default;
60 | list-style: none;
61 | padding-left: 0;
62 |
63 | li {
64 | display: inline-block;
65 | padding: 0 (_size(element-margin) * 0.5) 0 0;
66 | vertical-align: middle;
67 |
68 | &:last-child {
69 | padding-right: 0;
70 | }
71 | }
72 |
73 | &.small {
74 | li {
75 | padding: 0 (_size(element-margin) * 0.25) 0 0;
76 | }
77 | }
78 |
79 | &.vertical {
80 | li {
81 | display: block;
82 | padding: (_size(element-margin) * 0.5) 0 0 0;
83 |
84 | &:first-child {
85 | padding-top: 0;
86 | }
87 |
88 | > * {
89 | margin-bottom: 0;
90 | }
91 | }
92 |
93 | &.small {
94 | li {
95 | padding: (_size(element-margin) * 0.25) 0 0 0;
96 |
97 | &:first-child {
98 | padding-top: 0;
99 | }
100 | }
101 | }
102 | }
103 |
104 | &.fit {
105 | display: table;
106 | margin-left: (_size(element-margin) * -0.5);
107 | padding: 0;
108 | table-layout: fixed;
109 | width: calc(100% + #{(_size(element-margin) * 0.5)});
110 |
111 | li {
112 | display: table-cell;
113 | padding: 0 0 0 (_size(element-margin) * 0.5);
114 |
115 | > * {
116 | margin-bottom: 0;
117 | }
118 | }
119 |
120 | &.small {
121 | margin-left: (_size(element-margin) * -0.25);
122 | width: calc(100% + #{(_size(element-margin) * 0.25)});
123 |
124 | li {
125 | padding: 0 0 0 (_size(element-margin) * 0.25);
126 | }
127 | }
128 | }
129 |
130 | @include breakpoint(xsmall) {
131 | margin: 0 0 _size(element-margin) 0;
132 |
133 | li {
134 | padding: (_size(element-margin) * 0.5) 0 0 0;
135 | display: block;
136 | text-align: center;
137 | width: 100%;
138 |
139 | &:first-child {
140 | padding-top: 0;
141 | }
142 |
143 | > * {
144 | width: 100%;
145 | margin: 0 !important;
146 |
147 | &.icon {
148 | &:before {
149 | margin-left: -2em;
150 | }
151 | }
152 | }
153 | }
154 |
155 | &.small {
156 | li {
157 | padding: (_size(element-margin) * 0.25) 0 0 0;
158 |
159 | &:first-child {
160 | padding-top: 0;
161 | }
162 | }
163 | }
164 | }
165 | }
166 | }
167 |
168 | dl {
169 | margin: 0 0 _size(element-margin) 0;
170 |
171 | dt {
172 | display: block;
173 | font-weight: _font(weight-bold);
174 | margin: 0 0 (_size(element-margin) * 0.5) 0;
175 | }
176 |
177 | dd {
178 | margin-left: _size(element-margin);
179 | }
180 | }
181 |
182 | @mixin color-list($p: null) {
183 | ul {
184 | &.alt {
185 | li {
186 | border-top-color: _palette($p, border);
187 | }
188 | }
189 | }
190 | }
191 |
192 | @include color-list;
--------------------------------------------------------------------------------
/v1/assets/sass/components/_pager.scss:
--------------------------------------------------------------------------------
1 | /* Pagination */
2 |
3 | .cb_pager {
4 | text-align:center;
5 | margin: 2em auto;
6 |
7 | .button {
8 | margin: .25em;
9 | }
10 |
11 | @include breakpoint(xsmall) {
12 | .button {
13 | width: 90%;
14 | margin: .25em auto;
15 | display: block;
16 | }
17 |
18 | }
19 |
20 | }
--------------------------------------------------------------------------------
/v1/assets/sass/components/_section.scss:
--------------------------------------------------------------------------------
1 | /* Section/Article */
2 |
3 | section, article {
4 | &.special {
5 | text-align: center;
6 | }
7 | }
8 |
9 | header {
10 | p {
11 | position: relative;
12 | margin: 0 0 (_size(element-margin) * 0.75) 0;
13 | }
14 |
15 | h2 + p {
16 | font-size: 1.25em;
17 | margin-top: (_size(element-margin) * -0.5);
18 | }
19 |
20 | h3 + p {
21 | font-size: 1.1em;
22 | margin-top: (_size(element-margin) * -0.4);
23 | }
24 |
25 | h4 + p,
26 | h5 + p,
27 | h6 + p {
28 | font-size: 0.9em;
29 | margin-top: (_size(element-margin) * -0.3);
30 | }
31 | }
32 |
33 | @mixin color-section($p: null) {
34 | header {
35 | p {
36 | color: _palette($p, fg-light);
37 | }
38 | }
39 | }
40 |
41 | @include color-section;
--------------------------------------------------------------------------------
/v1/assets/sass/components/_table.scss:
--------------------------------------------------------------------------------
1 | /* Table */
2 |
3 | .table-wrapper {
4 | -webkit-overflow-scrolling: touch;
5 | overflow-x: auto;
6 | }
7 |
8 | table {
9 | margin: 0 0 _size(element-margin) 0;
10 | width: 100%;
11 |
12 | tbody {
13 | tr {
14 | border: solid _size(border-width);
15 | border-left: 0;
16 | border-right: 0;
17 | }
18 | }
19 |
20 | td {
21 | padding: 0.75em 0.75em;
22 | }
23 |
24 | th {
25 | font-size: 0.9em;
26 | font-weight: _font(weight-bold);
27 | padding: 0 0.75em 0.75em 0.75em;
28 | text-align: left;
29 | }
30 |
31 | thead {
32 | border-bottom: solid (_size(border-width) * 2);
33 | }
34 |
35 | tfoot {
36 | border-top: solid (_size(border-width) * 2);
37 | }
38 |
39 | &.alt {
40 | border-collapse: separate;
41 |
42 | tbody {
43 | tr {
44 | td {
45 | border: solid _size(border-width);
46 | border-left-width: 0;
47 | border-top-width: 0;
48 |
49 | &:first-child {
50 | border-left-width: _size(border-width);
51 | }
52 | }
53 |
54 | &:first-child {
55 | td {
56 | border-top-width: _size(border-width);
57 | }
58 | }
59 | }
60 | }
61 |
62 | thead {
63 | border-bottom: 0;
64 | }
65 |
66 | tfoot {
67 | border-top: 0;
68 | }
69 | }
70 | }
71 |
72 | @mixin color-table($p: null) {
73 | table {
74 | tbody {
75 | tr {
76 | border-color: _palette($p, border);
77 |
78 | &:nth-child(2n + 1) {
79 | background-color: _palette($p, border-bg);
80 | }
81 | }
82 | }
83 |
84 | th {
85 | color: _palette($p, fg-bold);
86 | }
87 |
88 | thead {
89 | border-bottom-color: _palette($p, border);
90 | }
91 |
92 | tfoot {
93 | border-top-color: _palette($p, border);
94 | }
95 |
96 | &.alt {
97 | tbody {
98 | tr {
99 | td {
100 | border-color: _palette($p, border);
101 | }
102 | }
103 | }
104 | }
105 | }
106 | }
107 |
108 | @include color-table;
--------------------------------------------------------------------------------
/v1/assets/sass/components/_thumbnail.scss:
--------------------------------------------------------------------------------
1 | /* Thumbnail */
2 |
3 | .thumbnail {
4 | position: relative;
5 | overflow: hidden;
6 |
7 | &:hover .overlay {
8 | top: 0;
9 | left: 0;
10 | }
11 |
12 | .image {
13 | margin: 0;
14 | border-radius: 0;
15 |
16 | img {
17 | border-radius: 0;
18 | }
19 |
20 | }
21 |
22 | .overlay {
23 | @include vendor('transition', 'all #{_duration(transition)} ease-in-out');
24 | position: absolute;
25 | width: 100%;
26 | height: 100%;
27 | text-align: center;
28 | background: rgba(0,0,0,0.8);
29 | color: _palette(bg);
30 |
31 | &:before {
32 | content: '';
33 | display: inline-block;
34 | height: 100%;
35 | vertical-align: middle;
36 | margin-right: -0.25em; /* Adjusts for spacing */
37 | }
38 |
39 | .content {
40 | display: inline-block;
41 | vertical-align: middle;
42 |
43 | .button {
44 | @include breakpoint(small) {
45 | padding: 0 2em;
46 | }
47 | }
48 |
49 | }
50 |
51 | h3 {
52 | margin-bottom: .5em;
53 | color: _palette(bg);
54 | }
55 | }
56 |
57 | .slideleft {
58 | left: 100%;
59 | top: 0;
60 | }
61 |
62 | .slideright {
63 | left: -100%;
64 | top: 0;
65 | }
66 |
67 | .slidedown {
68 | left: 0;
69 | top: -100%;
70 | }
71 |
72 | .slideup {
73 | left: 0;
74 | top: 100%;
75 | }
76 |
77 | @include breakpoint(xlarge) {
78 |
79 | }
80 |
81 | @include breakpoint(large) {
82 |
83 | }
84 |
85 | @include breakpoint(medium) {
86 |
87 | }
88 |
89 | @include breakpoint(small) {
90 |
91 | }
92 |
93 | @include breakpoint(xsmall) {
94 |
95 | }
96 | }
--------------------------------------------------------------------------------
/v1/assets/sass/components/_wrapper.scss:
--------------------------------------------------------------------------------
1 | /* Wrapper */
2 |
3 | .wrapper {
4 | position: relative;
5 |
6 | > .inner {
7 | margin: 0 auto;
8 | width: 60em;
9 | }
10 |
11 | &.style1 {
12 | @include color(accent1);
13 | }
14 |
15 | &.style2 {
16 | @include color(accent2);
17 | }
18 |
19 | @include breakpoint(large) {
20 | > .inner {
21 | width: 65em;
22 | }
23 | }
24 |
25 | @include breakpoint(medium) {
26 | > .inner {
27 | width: 100%;
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/v1/assets/sass/ie8.scss:
--------------------------------------------------------------------------------
1 | @import 'libs/vars';
2 | @import 'libs/functions';
3 | @import 'libs/mixins';
4 | @import 'libs/skel';
5 |
6 | /* baseline-alt */
7 |
8 |
--------------------------------------------------------------------------------
/v1/assets/sass/ie9.scss:
--------------------------------------------------------------------------------
1 | @import 'libs/vars';
2 | @import 'libs/functions';
3 | @import 'libs/mixins';
4 | @import 'libs/skel';
5 |
6 | /* baseline-alt */
7 |
8 |
--------------------------------------------------------------------------------
/v1/assets/sass/layout/_banner.scss:
--------------------------------------------------------------------------------
1 | /* Banner */
2 |
3 | #banner {
4 | position: relative;
5 | background-color: #f6f6f6;
6 | text-align: center;
7 | background-size: cover;
8 | background-repeat: no-repeat;
9 | background-position: top center;
10 | height: 100vh;
11 | white-space: nowrap;
12 |
13 | &:before {
14 | content: '';
15 | display: inline-block;
16 | height: 100%;
17 | vertical-align: middle;
18 | margin-right: -0.25em; /* Adjusts for spacing */
19 | }
20 |
21 | &:after{
22 | content: '';
23 | position: absolute;
24 | top: 0;
25 | left: 0;
26 | width: 100%;
27 | height: 100%;
28 | display: block;
29 | background: rgba(0,0,0,0.75);
30 | z-index: 10;
31 | }
32 |
33 | .content {
34 | position: relative;
35 | display: inline-block;
36 | vertical-align: middle;
37 | padding: 0 2em;
38 | z-index: 11;
39 | width: 100%;
40 | white-space: normal;
41 | }
42 |
43 | h2 {
44 | font-size: 4em;
45 | line-height: 1em;
46 | margin: 0 0 0.5em 0;
47 | padding: 0;
48 | color: _palette(bg);
49 | }
50 |
51 | p {
52 | font-size: 1.5em;
53 | margin-bottom: 1.75em;
54 | color: _palette(bg);
55 | }
56 |
57 | @include breakpoint(xlarge) {
58 |
59 | }
60 |
61 | @include breakpoint(large) {
62 |
63 | h2 {
64 | font-size: 3.5em;
65 | }
66 | }
67 |
68 | @include breakpoint(medium) {
69 |
70 | }
71 |
72 | @include breakpoint(small) {
73 | h2 {
74 | font-size: 2em;
75 | }
76 |
77 | p {
78 | font-size: 1.25em;
79 | }
80 | }
81 |
82 | @include breakpoint(xsmall) {
83 | height: 30em;
84 | }
85 | }
--------------------------------------------------------------------------------
/v1/assets/sass/layout/_footer.scss:
--------------------------------------------------------------------------------
1 | /* Footer */
2 |
3 | #footer {
4 | @include padding(4em, 0);
5 | background: #f2f2f2;
6 |
7 |
8 | @include breakpoint(small) {
9 | @include padding(3em, 0);
10 | text-align:center;
11 |
12 | }
13 | }
--------------------------------------------------------------------------------
/v1/assets/sass/layout/_header.scss:
--------------------------------------------------------------------------------
1 | /* Header */
2 |
3 | body {
4 | padding-top: 3.125em;
5 | }
6 |
7 | #header {
8 | background: darken(_palette(accent2, bg), 12);
9 | color: _palette(accent2, fg);
10 | cursor: default;
11 | height: 3.25em;
12 | left: 0;
13 | line-height: 3.25em;
14 | position: fixed;
15 | text-align: right;
16 | top: 0;
17 | width: 100%;
18 | z-index: _misc(z-index-base) + 1;
19 |
20 | > h1 {
21 | color: _palette(accent2, fg-bold);
22 | display: inline-block;
23 | height: inherit;
24 | left: 1.25em;
25 | line-height: inherit;
26 | margin: 0;
27 | padding: 0;
28 | position: absolute;
29 | top: 0;
30 |
31 | a {
32 | font-size: 1.25em;
33 | }
34 | }
35 |
36 | > a {
37 | @include vendor('transition', 'color #{_duration(transition)} ease-in-out');
38 | display: inline-block;
39 | padding: 0 0.75em;
40 | color: inherit;
41 | text-decoration: none;
42 |
43 | &:hover {
44 | color: _palette(accent2, fg-bold);
45 | }
46 |
47 | &[href="#menu"] {
48 | @include icon('\f0c9');
49 | -webkit-tap-highlight-color: rgba(0,0,0,0);
50 |
51 | &:before {
52 | margin: 0 0.5em 0 0;
53 | }
54 | }
55 |
56 | & + a[href="#menu"]:last-child {
57 | border-left: solid 1px _palette(accent2, border);
58 | padding-left: 1.25em;
59 | margin-left: 0.5em;
60 | }
61 |
62 | &:last-child {
63 | padding-right: 1.25em;
64 | }
65 |
66 | @include breakpoint(small) {
67 | padding: 0 0.5em;
68 |
69 | & + a[href="#menu"]:last-child {
70 | padding-left: 1em;
71 | margin-left: 0.25em;
72 | }
73 |
74 | &:last-child {
75 | padding-right: 1em;
76 | }
77 | }
78 | }
79 | }
80 |
81 | @include breakpoint(medium) {
82 | body {
83 | padding-top: 44px;
84 | }
85 |
86 | #header {
87 | height: 44px;
88 | line-height: 44px;
89 |
90 | > h1 {
91 | left: 1em;
92 |
93 | a {
94 | font-size: 1em;
95 | }
96 | }
97 | }
98 | }
99 |
100 | @include breakpoint(small) {
101 | #header {
102 | max-width: 100%;
103 | }
104 | }
105 |
106 | @include breakpoint(xsmall) {
107 | #header {
108 | min-width: 320px;
109 | }
110 | }
--------------------------------------------------------------------------------
/v1/assets/sass/layout/_main.scss:
--------------------------------------------------------------------------------
1 | /* Main */
2 |
3 | #main {
4 |
5 | @include breakpoint(small) {
6 |
7 | }
8 |
9 | }
10 |
11 | #content {
12 | padding: 6em 0;
13 |
14 | @include breakpoint(small) {
15 | padding: 2em 0;
16 | }
17 | }
18 |
19 | #related {
20 | header {
21 | background: _palette(accent2,bg);
22 | text-align:center;
23 | padding: 2em;
24 | h2 {
25 | color: _palette(bg);
26 | margin: 0;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/v1/assets/sass/layout/_menu.scss:
--------------------------------------------------------------------------------
1 | /* Menu */
2 |
3 | #menu {
4 | @include vendor('transform', 'translateX(20em)');
5 | @include vendor('transition', ('transform #{_duration(menu)} ease', 'box-shadow #{_duration(menu)} ease', 'visibility #{_duration(menu)}'));
6 | -webkit-overflow-scrolling: touch;
7 | background: darken(_palette(accent2, bg), 12);
8 | box-shadow: none;
9 | color: _palette(accent2, fg-bold);
10 | height: 100%;
11 | max-width: 80%;
12 | overflow-y: auto;
13 | padding: 3em 2em;
14 | position: fixed;
15 | right: 0;
16 | top: 0;
17 | visibility: hidden;
18 | width: 20em;
19 | z-index: _misc(z-index-base) + 2;
20 |
21 | > ul {
22 | margin: 0 0 (_size(element-margin) * 0.5) 0;
23 |
24 | &.links {
25 | list-style: none;
26 | padding: 0;
27 |
28 | > li {
29 | padding: 0;
30 |
31 | > a:not(.button) {
32 | border: 0;
33 | border-top: solid 1px _palette(accent2, border);
34 | color: inherit;
35 | display: block;
36 | letter-spacing: _size(letter-spacing-alt);
37 | line-height: 3.5em;
38 | text-decoration: none;
39 | }
40 |
41 | > .button {
42 | display: block;
43 | margin: 0.5em 0 0 0;
44 | }
45 |
46 | &:first-child {
47 | > a:not(.button) {
48 | border-top: 0 !important;
49 | }
50 | }
51 | }
52 | }
53 | }
54 |
55 | .close {
56 | @include icon('\f00d');
57 | @include vendor('transition', 'color #{_duration(transition)} ease-in-out');
58 | -webkit-tap-highlight-color: rgba(0,0,0,0);
59 | border: 0;
60 | color: _palette(accent2, fg-light);
61 | cursor: pointer;
62 | display: block;
63 | height: 3.25em;
64 | line-height: 3.25em;
65 | padding-right: 1.25em;
66 | position: absolute;
67 | right: 0;
68 | text-align: right;
69 | top: 0;
70 | vertical-align: middle;
71 | width: 7em;
72 |
73 | &:before {
74 | font-size: 1.25em;
75 | }
76 |
77 | &:hover {
78 | color: _palette(accent2, fg-bold);
79 | }
80 |
81 | @include breakpoint(small) {
82 | height: 4em;
83 | line-height: 4em;
84 | }
85 | }
86 |
87 | &.visible {
88 | @include vendor('transform', 'translateX(0)');
89 | box-shadow: 0 0 1.5em 0 rgba(0,0,0,0.2);
90 | visibility: visible;
91 | }
92 |
93 | @include breakpoint(small) {
94 | padding: 2.5em 1.75em;
95 | }
96 | }
--------------------------------------------------------------------------------
/v1/assets/sass/libs/_functions.scss:
--------------------------------------------------------------------------------
1 | /// Gets a duration value.
2 | /// @param {string} $keys Key(s).
3 | /// @return {string} Value.
4 | @function _duration($keys...) {
5 | @return val($duration, $keys...);
6 | }
7 |
8 | /// Gets a font value.
9 | /// @param {string} $keys Key(s).
10 | /// @return {string} Value.
11 | @function _font($keys...) {
12 | @return val($font, $keys...);
13 | }
14 |
15 | /// Gets a misc value.
16 | /// @param {string} $keys Key(s).
17 | /// @return {string} Value.
18 | @function _misc($keys...) {
19 | @return val($misc, $keys...);
20 | }
21 |
22 | /// Gets a palette value.
23 | /// @param {string} $keys Key(s).
24 | /// @return {string} Value.
25 | @function _palette($keys...) {
26 | @return val($palette, $keys...);
27 | }
28 |
29 | /// Gets a size value.
30 | /// @param {string} $keys Key(s).
31 | /// @return {string} Value.
32 | @function _size($keys...) {
33 | @return val($size, $keys...);
34 | }
--------------------------------------------------------------------------------
/v1/assets/sass/libs/_mixins.scss:
--------------------------------------------------------------------------------
1 | /// Makes an element's :before pseudoelement a FontAwesome icon.
2 | /// @param {string} $content Optional content value to use.
3 | @mixin icon($content: false) {
4 |
5 | text-decoration: none;
6 |
7 | &:before {
8 |
9 | @if $content {
10 | content: $content;
11 | }
12 |
13 | -moz-osx-font-smoothing: grayscale;
14 | -webkit-font-smoothing: antialiased;
15 | font-family: FontAwesome;
16 | font-style: normal;
17 | font-weight: normal;
18 | text-transform: none !important;
19 |
20 | }
21 |
22 | }
23 |
24 | /// Applies padding to an element, taking the current element-margin value into account.
25 | /// @param {mixed} $tb Top/bottom padding.
26 | /// @param {mixed} $lr Left/right padding.
27 | /// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)
28 | @mixin padding($tb, $lr, $pad: (0,0,0,0)) {
29 | padding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max(0.1em, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4));
30 | }
--------------------------------------------------------------------------------
/v1/assets/sass/libs/_skel.scss:
--------------------------------------------------------------------------------
1 | // skel.scss v3.0.0 | (c) n33 | skel.io | MIT licensed */
2 |
3 | // Vars.
4 |
5 | /// Breakpoints.
6 | /// @var {list}
7 | $breakpoints: () !global;
8 |
9 | /// Vendor prefixes.
10 | /// @var {list}
11 | $vendor-prefixes: (
12 | '-moz-',
13 | '-webkit-',
14 | '-ms-',
15 | ''
16 | );
17 |
18 | /// Properties that should be vendorized.
19 | /// @var {list}
20 | $vendor-properties: (
21 | 'align-content',
22 | 'align-items',
23 | 'align-self',
24 | 'animation',
25 | 'animation-delay',
26 | 'animation-direction',
27 | 'animation-duration',
28 | 'animation-fill-mode',
29 | 'animation-iteration-count',
30 | 'animation-name',
31 | 'animation-play-state',
32 | 'animation-timing-function',
33 | 'appearance',
34 | 'backface-visibility',
35 | 'box-sizing',
36 | 'filter',
37 | 'flex',
38 | 'flex-basis',
39 | 'flex-direction',
40 | 'flex-flow',
41 | 'flex-grow',
42 | 'flex-shrink',
43 | 'flex-wrap',
44 | 'justify-content',
45 | 'order',
46 | 'perspective',
47 | 'pointer-events',
48 | 'transform',
49 | 'transform-origin',
50 | 'transform-style',
51 | 'transition',
52 | 'transition-delay',
53 | 'transition-duration',
54 | 'transition-property',
55 | 'transition-timing-function'
56 | );
57 |
58 | /// Values that should be vendorized.
59 | /// @var {list}
60 | $vendor-values: (
61 | 'filter',
62 | 'flex',
63 | 'linear-gradient',
64 | 'radial-gradient',
65 | 'transform'
66 | );
67 |
68 | // Functions.
69 |
70 | /// Removes a specific item from a list.
71 | /// @author Hugo Giraudel
72 | /// @param {list} $list List.
73 | /// @param {integer} $index Index.
74 | /// @return {list} Updated list.
75 | @function remove-nth($list, $index) {
76 |
77 | $result: null;
78 |
79 | @if type-of($index) != number {
80 | @warn "$index: #{quote($index)} is not a number for `remove-nth`.";
81 | }
82 | @else if $index == 0 {
83 | @warn "List index 0 must be a non-zero integer for `remove-nth`.";
84 | }
85 | @else if abs($index) > length($list) {
86 | @warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
87 | }
88 | @else {
89 |
90 | $result: ();
91 | $index: if($index < 0, length($list) + $index + 1, $index);
92 |
93 | @for $i from 1 through length($list) {
94 |
95 | @if $i != $index {
96 | $result: append($result, nth($list, $i));
97 | }
98 |
99 | }
100 |
101 | }
102 |
103 | @return $result;
104 |
105 | }
106 |
107 | /// Replaces a substring within another string.
108 | /// @author Hugo Giraudel
109 | /// @param {string} $string String.
110 | /// @param {string} $search Substring.
111 | /// @param {string} $replace Replacement.
112 | /// @return {string} Updated string.
113 | @function str-replace($string, $search, $replace: '') {
114 |
115 | $index: str-index($string, $search);
116 |
117 | @if $index {
118 | @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
119 | }
120 |
121 | @return $string;
122 |
123 | }
124 |
125 | /// Replaces a substring within each string in a list.
126 | /// @param {list} $strings List of strings.
127 | /// @param {string} $search Substring.
128 | /// @param {string} $replace Replacement.
129 | /// @return {list} Updated list of strings.
130 | @function str-replace-all($strings, $search, $replace: '') {
131 |
132 | @each $string in $strings {
133 | $strings: set-nth($strings, index($strings, $string), str-replace($string, $search, $replace));
134 | }
135 |
136 | @return $strings;
137 |
138 | }
139 |
140 | /// Gets a value from a map.
141 | /// @author Hugo Giraudel
142 | /// @param {map} $map Map.
143 | /// @param {string} $keys Key(s).
144 | /// @return {string} Value.
145 | @function val($map, $keys...) {
146 |
147 | @if nth($keys, 1) == null {
148 | $keys: remove-nth($keys, 1);
149 | }
150 |
151 | @each $key in $keys {
152 | $map: map-get($map, $key);
153 | }
154 |
155 | @return $map;
156 |
157 | }
158 |
159 | // Mixins.
160 |
161 | /// Sets the global box model.
162 | /// @param {string} $model Model (default is content).
163 | @mixin boxModel($model: 'content') {
164 |
165 | $x: $model + '-box';
166 |
167 | *, *:before, *:after {
168 | -moz-box-sizing: #{$x};
169 | -webkit-box-sizing: #{$x};
170 | box-sizing: #{$x};
171 | }
172 |
173 | }
174 |
175 | /// Wraps @content in a @media block using a given breakpoint.
176 | /// @param {string} $breakpoint Breakpoint.
177 | /// @param {map} $queries Additional queries.
178 | @mixin breakpoint($breakpoint: null, $queries: null) {
179 |
180 | $query: 'screen';
181 |
182 | // Breakpoint.
183 | @if $breakpoint and map-has-key($breakpoints, $breakpoint) {
184 | $query: $query + ' and ' + map-get($breakpoints, $breakpoint);
185 | }
186 |
187 | // Queries.
188 | @if $queries {
189 | @each $k, $v in $queries {
190 | $query: $query + ' and (' + $k + ':' + $v + ')';
191 | }
192 | }
193 |
194 | @media #{$query} {
195 | @content;
196 | }
197 |
198 | }
199 |
200 | /// Wraps @content in a @media block targeting a specific orientation.
201 | /// @param {string} $orientation Orientation.
202 | @mixin orientation($orientation) {
203 | @media screen and (orientation: #{$orientation}) {
204 | @content;
205 | }
206 | }
207 |
208 | /// Utility mixin for containers.
209 | /// @param {mixed} $width Width.
210 | @mixin containers($width) {
211 |
212 | // Locked?
213 | $lock: false;
214 |
215 | @if length($width) == 2 {
216 | $width: nth($width, 1);
217 | $lock: true;
218 | }
219 |
220 | // Modifiers.
221 | .container.\31 25\25 { width: 100%; max-width: $width * 1.25; min-width: $width; }
222 | .container.\37 5\25 { width: $width * 0.75; }
223 | .container.\35 0\25 { width: $width * 0.5; }
224 | .container.\32 5\25 { width: $width * 0.25; }
225 |
226 | // Main class.
227 | .container {
228 | @if $lock {
229 | width: $width !important;
230 | }
231 | @else {
232 | width: $width;
233 | }
234 | }
235 |
236 | }
237 |
238 | /// Utility mixin for grid.
239 | /// @param {list} $gutters Column and row gutters (default is 40px).
240 | /// @param {string} $breakpointName Optional breakpoint name.
241 | @mixin grid($gutters: 40px, $breakpointName: null) {
242 |
243 | // Gutters.
244 | @include grid-gutters($gutters);
245 | @include grid-gutters($gutters, \32 00\25, 2);
246 | @include grid-gutters($gutters, \31 50\25, 1.5);
247 | @include grid-gutters($gutters, \35 0\25, 0.5);
248 | @include grid-gutters($gutters, \32 5\25, 0.25);
249 |
250 | // Cells.
251 | $x: '';
252 |
253 | @if $breakpointName {
254 | $x: '\\28' + $breakpointName + '\\29';
255 | }
256 |
257 | .\31 2u#{$x}, .\31 2u\24#{$x} { width: 100%; clear: none; margin-left: 0; }
258 | .\31 1u#{$x}, .\31 1u\24#{$x} { width: 91.6666666667%; clear: none; margin-left: 0; }
259 | .\31 0u#{$x}, .\31 0u\24#{$x} { width: 83.3333333333%; clear: none; margin-left: 0; }
260 | .\39 u#{$x}, .\39 u\24#{$x} { width: 75%; clear: none; margin-left: 0; }
261 | .\38 u#{$x}, .\38 u\24#{$x} { width: 66.6666666667%; clear: none; margin-left: 0; }
262 | .\37 u#{$x}, .\37 u\24#{$x} { width: 58.3333333333%; clear: none; margin-left: 0; }
263 | .\36 u#{$x}, .\36 u\24#{$x} { width: 50%; clear: none; margin-left: 0; }
264 | .\35 u#{$x}, .\35 u\24#{$x} { width: 41.6666666667%; clear: none; margin-left: 0; }
265 | .\34 u#{$x}, .\34 u\24#{$x} { width: 33.3333333333%; clear: none; margin-left: 0; }
266 | .\33 u#{$x}, .\33 u\24#{$x} { width: 25%; clear: none; margin-left: 0; }
267 | .\32 u#{$x}, .\32 u\24#{$x} { width: 16.6666666667%; clear: none; margin-left: 0; }
268 | .\31 u#{$x}, .\31 u\24#{$x} { width: 8.3333333333%; clear: none; margin-left: 0; }
269 |
270 | .\31 2u\24#{$x} + *,
271 | .\31 1u\24#{$x} + *,
272 | .\31 0u\24#{$x} + *,
273 | .\39 u\24#{$x} + *,
274 | .\38 u\24#{$x} + *,
275 | .\37 u\24#{$x} + *,
276 | .\36 u\24#{$x} + *,
277 | .\35 u\24#{$x} + *,
278 | .\34 u\24#{$x} + *,
279 | .\33 u\24#{$x} + *,
280 | .\32 u\24#{$x} + *,
281 | .\31 u\24#{$x} + * {
282 | clear: left;
283 | }
284 |
285 | .\-11u#{$x} { margin-left: 91.6666666667% }
286 | .\-10u#{$x} { margin-left: 83.3333333333% }
287 | .\-9u#{$x} { margin-left: 75% }
288 | .\-8u#{$x} { margin-left: 66.6666666667% }
289 | .\-7u#{$x} { margin-left: 58.3333333333% }
290 | .\-6u#{$x} { margin-left: 50% }
291 | .\-5u#{$x} { margin-left: 41.6666666667% }
292 | .\-4u#{$x} { margin-left: 33.3333333333% }
293 | .\-3u#{$x} { margin-left: 25% }
294 | .\-2u#{$x} { margin-left: 16.6666666667% }
295 | .\-1u#{$x} { margin-left: 8.3333333333% }
296 |
297 | }
298 |
299 | /// Utility mixin for grid.
300 | /// @param {list} $gutters Gutters.
301 | /// @param {string} $class Optional class name.
302 | /// @param {integer} $multiplier Multiplier (default is 1).
303 | @mixin grid-gutters($gutters, $class: null, $multiplier: 1) {
304 |
305 | // Expand gutters if it's not a list.
306 | @if length($gutters) == 1 {
307 | $gutters: ($gutters, 0);
308 | }
309 |
310 | // Get column and row gutter values.
311 | $c: nth($gutters, 1);
312 | $r: nth($gutters, 2);
313 |
314 | // Get class (if provided).
315 | $x: '';
316 |
317 | @if $class {
318 | $x: '.' + $class;
319 | }
320 |
321 | // Default.
322 | .row#{$x} > * { padding: ($r * $multiplier) 0 0 ($c * $multiplier); }
323 | .row#{$x} { margin: ($r * $multiplier * -1) 0 -1px ($c * $multiplier * -1); }
324 |
325 | // Uniform.
326 | .row.uniform#{$x} > * { padding: ($c * $multiplier) 0 0 ($c * $multiplier); }
327 | .row.uniform#{$x} { margin: ($c * $multiplier * -1) 0 -1px ($c * $multiplier * -1); }
328 |
329 | }
330 |
331 | /// Wraps @content in vendorized keyframe blocks.
332 | /// @param {string} $name Name.
333 | @mixin keyframes($name) {
334 |
335 | @-moz-keyframes #{$name} { @content; }
336 | @-webkit-keyframes #{$name} { @content; }
337 | @-ms-keyframes #{$name} { @content; }
338 | @keyframes #{$name} { @content; }
339 |
340 | }
341 |
342 | ///
343 | /// Sets breakpoints.
344 | /// @param {map} $x Breakpoints.
345 | ///
346 | @mixin skel-breakpoints($x: ()) {
347 | $breakpoints: $x !global;
348 | }
349 |
350 | ///
351 | /// Initializes layout module.
352 | /// @param {map} config Config.
353 | ///
354 | @mixin skel-layout($config: ()) {
355 |
356 | // Config.
357 | $configPerBreakpoint: ();
358 |
359 | $z: map-get($config, 'breakpoints');
360 |
361 | @if $z {
362 | $configPerBreakpoint: $z;
363 | }
364 |
365 | // Reset.
366 | $x: map-get($config, 'reset');
367 |
368 | @if $x {
369 |
370 | /* Reset */
371 |
372 | @include reset($x);
373 |
374 | }
375 |
376 | // Box model.
377 | $x: map-get($config, 'boxModel');
378 |
379 | @if $x {
380 |
381 | /* Box Model */
382 |
383 | @include boxModel($x);
384 |
385 | }
386 |
387 | // Containers.
388 | $containers: map-get($config, 'containers');
389 |
390 | @if $containers {
391 |
392 | /* Containers */
393 |
394 | .container {
395 | margin-left: auto;
396 | margin-right: auto;
397 | }
398 |
399 | // Use default is $containers is just "true".
400 | @if $containers == true {
401 | $containers: 960px;
402 | }
403 |
404 | // Apply base.
405 | @include containers($containers);
406 |
407 | // Apply per-breakpoint.
408 | @each $name in map-keys($breakpoints) {
409 |
410 | // Get/use breakpoint setting if it exists.
411 | $x: map-get($configPerBreakpoint, $name);
412 |
413 | // Per-breakpoint config exists?
414 | @if $x {
415 | $y: map-get($x, 'containers');
416 |
417 | // Setting exists? Use it.
418 | @if $y {
419 | $containers: $y;
420 | }
421 |
422 | }
423 |
424 | // Create @media block.
425 | @media screen and #{map-get($breakpoints, $name)} {
426 | @include containers($containers);
427 | }
428 |
429 | }
430 |
431 | }
432 |
433 | // Grid.
434 | $grid: map-get($config, 'grid');
435 |
436 | @if $grid {
437 |
438 | /* Grid */
439 |
440 | // Use defaults if $grid is just "true".
441 | @if $grid == true {
442 | $grid: ();
443 | }
444 |
445 | // Sub-setting: Gutters.
446 | $grid-gutters: 40px;
447 | $x: map-get($grid, 'gutters');
448 |
449 | @if $x {
450 | $grid-gutters: $x;
451 | }
452 |
453 | // Rows.
454 | .row {
455 | border-bottom: solid 1px transparent;
456 | -moz-box-sizing: border-box;
457 | -webkit-box-sizing: border-box;
458 | box-sizing: border-box;
459 | }
460 |
461 | .row > * {
462 | float: left;
463 | -moz-box-sizing: border-box;
464 | -webkit-box-sizing: border-box;
465 | box-sizing: border-box;
466 | }
467 |
468 | .row:after, .row:before {
469 | content: '';
470 | display: block;
471 | clear: both;
472 | height: 0;
473 | }
474 |
475 | .row.uniform > * > :first-child {
476 | margin-top: 0;
477 | }
478 |
479 | .row.uniform > * > :last-child {
480 | margin-bottom: 0;
481 | }
482 |
483 | // Gutters (0%).
484 | @include grid-gutters($grid-gutters, \30 \25, 0);
485 |
486 | // Apply base.
487 | @include grid($grid-gutters);
488 |
489 | // Apply per-breakpoint.
490 | @each $name in map-keys($breakpoints) {
491 |
492 | // Get/use breakpoint setting if it exists.
493 | $x: map-get($configPerBreakpoint, $name);
494 |
495 | // Per-breakpoint config exists?
496 | @if $x {
497 | $y: map-get($x, 'grid');
498 |
499 | // Setting exists?
500 | @if $y {
501 |
502 | // Sub-setting: Gutters.
503 | $x: map-get($y, 'gutters');
504 |
505 | @if $x {
506 | $grid-gutters: $x;
507 | }
508 |
509 | }
510 |
511 | }
512 |
513 | // Create @media block.
514 | @media screen and #{map-get($breakpoints, $name)} {
515 | @include grid($grid-gutters, $name);
516 | }
517 |
518 | }
519 |
520 | }
521 |
522 | }
523 |
524 | /// Resets browser styles.
525 | /// @param {string} $mode Mode (default is 'normalize').
526 | @mixin reset($mode: 'normalize') {
527 |
528 | @if $mode == 'normalize' {
529 |
530 | // normalize.css v3.0.2 | MIT License | git.io/normalize
531 | html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}
532 |
533 | }
534 | @else if $mode == 'full' {
535 |
536 | // meyerweb.com/eric/tools/css/reset v2.0 | 20110126 | License: none (public domain)
537 | html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}table{border-collapse:collapse;border-spacing:0;}body{-webkit-text-size-adjust:none}
538 |
539 | }
540 |
541 | }
542 |
543 | /// Vendorizes a declaration's property and/or value(s).
544 | /// @param {string} $property Property.
545 | /// @param {mixed} $value String/list of value(s).
546 | @mixin vendor($property, $value) {
547 |
548 | // Determine if property should expand.
549 | $expandProperty: index($vendor-properties, $property);
550 |
551 | // Determine if value should expand (and if so, add '-prefix-' placeholder).
552 | $expandValue: false;
553 |
554 | @each $x in $value {
555 | @each $y in $vendor-values {
556 | @if $y == str-slice($x, 1, str-length($y)) {
557 |
558 | $value: set-nth($value, index($value, $x), '-prefix-' + $x);
559 | $expandValue: true;
560 |
561 | }
562 | }
563 | }
564 |
565 | // Expand property?
566 | @if $expandProperty {
567 | @each $vendor in $vendor-prefixes {
568 | #{$vendor}#{$property}: #{str-replace-all($value, '-prefix-', $vendor)};
569 | }
570 | }
571 |
572 | // Expand just the value?
573 | @elseif $expandValue {
574 | @each $vendor in $vendor-prefixes {
575 | #{$property}: #{str-replace-all($value, '-prefix-', $vendor)};
576 | }
577 | }
578 |
579 | // Neither? Treat them as a normal declaration.
580 | @else {
581 | #{$property}: #{$value};
582 | }
583 |
584 | }
--------------------------------------------------------------------------------
/v1/assets/sass/libs/_vars.scss:
--------------------------------------------------------------------------------
1 | // Misc.
2 | $misc: (
3 | z-index-base: 10000
4 | );
5 |
6 | // Duration.
7 | $duration: (
8 | menu: 0.5s,
9 | transition: 0.2s
10 | );
11 |
12 | // Size.
13 | $size: (
14 | border-radius: 4px,
15 | border-width: 1px,
16 | element-height: 2.75em,
17 | element-margin: 2em
18 | );
19 |
20 | // Font.
21 | $font: (
22 | family: ('Open Sans', sans-serif),
23 | family-fixed: ('Courier New', monospace),
24 | weight: normal,
25 | weight-bold: bold
26 | );
27 |
28 | // Palette.
29 | $palette: (
30 | bg: #fff,
31 | fg: #444,
32 | fg-bold: #555,
33 | fg-light: #bbb,
34 | border: rgba(144,144,144,0.25),
35 | border-bg: rgba(144,144,144,0.075),
36 | border2: rgba(144,144,144,0.5),
37 | border2-bg: rgba(144,144,144,0.2),
38 | highlight: accent1,
39 |
40 | accent1: (
41 | bg: #5AA6ED,
42 | fg: mix(#5AA6ED, #ffffff, 25%),
43 | fg-bold: #ffffff,
44 | fg-light: mix(#5AA6ED, #ffffff, 40%),
45 | border: rgba(255,255,255,0.25),
46 | border-bg: rgba(255,255,255,0.075),
47 | border2: rgba(255,255,255,0.5),
48 | border2-bg: rgba(255,255,255,0.2),
49 | highlight: accent1
50 | ),
51 |
52 | accent2: (
53 | bg: #3a3a3a,
54 | fg: mix(#3a3a3a, #ffffff, 25%),
55 | fg-bold: #ffffff,
56 | fg-light: mix(#3a3a3a, #ffffff, 40%),
57 | border: rgba(255,255,255,0.15),
58 | border-bg: rgba(255,255,255,0.075),
59 | border2: rgba(255,255,255,0.5),
60 | border2-bg: rgba(255,255,255,0.2),
61 | highlight: accent1
62 | )
63 | );
--------------------------------------------------------------------------------
/v1/assets/sass/main.scss:
--------------------------------------------------------------------------------
1 | @import 'libs/vars';
2 | @import 'libs/functions';
3 | @import 'libs/mixins';
4 | @import 'libs/skel';
5 | @import 'font-awesome.css';
6 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800);
7 |
8 | /* baseline-alt */
9 |
10 | @include skel-breakpoints((
11 | xlarge: '(max-width: 1680px)',
12 | large: '(max-width: 1280px)',
13 | medium: '(max-width: 980px)',
14 | small: '(max-width: 736px)',
15 | xsmall: '(max-width: 480px)'
16 | ));
17 |
18 | @include skel-layout((
19 | reset: 'full',
20 | boxModel: 'border',
21 | containers: 80em,
22 | grid: ( gutters: 2em ),
23 | breakpoints: (
24 | large: (
25 | containers: 65em,
26 | grid: ( gutters: 1.5em )
27 | ),
28 | medium: (
29 | containers: 90%
30 | ),
31 | small: (
32 | containers: (90%, true),
33 | grid: ( gutters: 1.25em )
34 | )
35 | )
36 | ));
37 |
38 | @mixin color($p) {
39 | @include color-typography($p);
40 | @include color-box($p);
41 | @include color-button($p);
42 | @include color-form($p);
43 | @include color-list($p);
44 | @include color-section($p);
45 | @include color-table($p);
46 | }
47 |
48 | // Base.
49 |
50 | @import 'base/page';
51 | @import 'base/typography';
52 |
53 | // Component.
54 |
55 | @import 'components/box';
56 | @import 'components/button';
57 | @import 'components/form';
58 | @import 'components/icon';
59 | @import 'components/image';
60 | @import 'components/list';
61 | @import 'components/pager';
62 | @import 'components/section';
63 | @import 'components/table';
64 | @import 'components/thumbnail';
65 | @import 'components/wrapper';
66 |
67 | // Layout.
68 |
69 | @import 'layout/header';
70 | @import 'layout/menu';
71 | @import 'layout/banner';
72 | @import 'layout/main';
73 | @import 'layout/footer';
--------------------------------------------------------------------------------
/v1/classes/arix.class.php:
--------------------------------------------------------------------------------
1 | commands = array();
12 |
13 | }
14 |
15 | function setHeaderFunc($func)
16 | {
17 | $this->headerFunc = $func;
18 | return true;
19 | }
20 |
21 | function setFooterFunc($func)
22 | {
23 | $this->footerFunc = $func;
24 | return true;
25 | }
26 |
27 | function start()
28 | {
29 | $cmd = isset($_GET['cmd']) ? $_GET['cmd'] : 'home';
30 |
31 | $args = array();
32 |
33 | if (isset($_GET['arg1']))
34 | $args[0] = $_GET['arg1'];
35 |
36 | if (isset($_GET['arg2']))
37 | $args[1] = $_GET['arg2'];
38 |
39 | if (!isset($this->commands[$cmd]))
40 | {
41 | header('HTTP/1.0 404 Not Found');
42 | $this->outputHeader('404', '404 - File Not Found', 'You have reached our error page', '404 error');
43 | echo '
';
44 | echo '
File not found
';
45 | echo '
';
46 |
47 |
48 | echo '
';
49 | echo '
';
50 | $this->outputFooter();
51 | return false;
52 | }
53 |
54 | $c = $this->commands[$cmd];
55 |
56 | if ($c[3])
57 | {
58 | $this->outputHeader($cmd, $c[1], $c[2], $c[3]);
59 | call_user_func($c[0], $args);
60 | $this->outputFooter();
61 | }
62 | else
63 | call_user_func($c[0], $args);
64 |
65 | return true;
66 | }
67 |
68 |
69 | function outputHeader($cmd, $title, $des, $kw)
70 | {
71 | if (isset($this->headerFunc))
72 | return call_user_func($this->headerFunc, $cmd, $title, $des, $kw);
73 |
74 | return false;
75 | }
76 |
77 | function outputFooter()
78 | {
79 | if (isset($this->footerFunc))
80 | return call_user_func($this->footerFunc);
81 |
82 | return false;
83 | }
84 |
85 | function addCommand($cmd, $function, $title=NULL, $des=NULL, $kw=NULL)
86 | {
87 | $this->commands[$cmd] = array($function, $title, $des, $kw);
88 | return true;
89 | }
90 | }
91 |
92 | ?>
--------------------------------------------------------------------------------
/v1/images/chaturbatelogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hillipino/BongaCash-API/cecd1c294a8e3743286a3d9c6b21c54303071b6a/v1/images/chaturbatelogo.png
--------------------------------------------------------------------------------
/v1/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hillipino/BongaCash-API/cecd1c294a8e3743286a3d9c6b21c54303071b6a/v1/images/logo.png
--------------------------------------------------------------------------------
/v1/includes/cron.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/v1/includes/functions.php:
--------------------------------------------------------------------------------
1 | \n";
29 |
30 | }
31 |
32 | }
33 |
34 | function get_banner() {
35 |
36 | $cams = new SimpleXMLElement(FLATFILE, null, true);
37 | $count = 0;
38 |
39 | foreach( $cams as $cam ){
40 |
41 | if ( $count == 0 ) {
42 |
43 | echo '
44 |
45 |
46 |
';
47 |
48 | random_banner_title( $cam->display_name );
49 |
50 | echo '
51 |
52 |
53 | ';
54 |
55 | random_banner_text( );
56 |
57 | echo '
58 |
59 |
62 |
63 |
64 | ';
65 | }
66 |
67 | $count++;
68 |
69 | }
70 |
71 |
72 | }
73 |
74 |
75 | // Process the XML Request
76 |
77 | function get_cams( $gender, $limit ){
78 |
79 | $arg1 = array_key_exists('arg1', $_GET) ? $_GET['arg1'] : null;
80 | $arg2 = array_key_exists('arg2', $_GET) ? $_GET['arg2'] : null;
81 |
82 | if ( $arg1 ) {
83 |
84 | if ( is_numeric( $arg1 ) ) {
85 |
86 | $page = $arg1;
87 | $targetpage = 'cams/';
88 |
89 | } else {
90 |
91 | $targetpage = 'cams/' . $arg1 . '/';
92 |
93 | if ( $arg2 ) {
94 |
95 | if ( is_numeric( $arg2 ) ) {
96 |
97 | $page = $arg2;
98 |
99 | }
100 |
101 | } else {
102 |
103 | $page = 1;
104 |
105 | }
106 |
107 | }
108 |
109 | } else {
110 |
111 | $targetpage = 'cams/';
112 | $page = 1;
113 |
114 | }
115 |
116 | $end = $page * $limit;
117 | $start = $end - $limit;
118 | $cams = new SimpleXMLElement(FLATFILE, null, true);
119 |
120 | // Count the total cams
121 |
122 | if ( $gender != '' ) {
123 |
124 | $doc = new DOMDocument();
125 | $doc->load(FLATFILE);
126 | $totalCams = 0;
127 |
128 | if ( $gender == 'hd' ) {
129 |
130 | foreach( $doc->getElementsByTagName('is_hd') as $is_hd ) {
131 |
132 | if( $is_hd->nodeValue == 'True' )
133 | $totalCams++;
134 |
135 | }
136 |
137 | } elseif ( $gender == 'new' ) {
138 |
139 | foreach( $doc->getElementsByTagName('is_new') as $is_new ) {
140 |
141 | if( $is_new->nodeValue == 'True' )
142 | $totalCams++;
143 |
144 | }
145 |
146 | } else {
147 |
148 | foreach( $doc->getElementsByTagName('gender') as $tag ) {
149 | // to iterate the children
150 | foreach( $tag->childNodes as $child ) {
151 | // outputs the xml of the child nodes. Of course, there are any number of
152 | // things that you could do instead!
153 | $i = $doc->saveXML($child);
154 |
155 | if ($i == $gender )
156 | $totalCams++;
157 | }
158 | }
159 |
160 | }
161 |
162 |
163 |
164 | } else {
165 |
166 | $totalCams = count($cams);
167 |
168 | }
169 |
170 |
171 | echo '
';
172 |
173 | $count = 0;
174 |
175 | foreach( $cams as $cam ){
176 |
177 | if ( $gender == $cam->gender ) {
178 | cam_rows( $cam, $count, $start, $end );
179 | $count++;
180 | }
181 |
182 | elseif ( $gender == '' ) {
183 | cam_rows( $cam, $count, $start, $end );
184 | $count++;
185 | }
186 |
187 |
188 | }
189 |
190 | echo '
';
191 |
192 | if ( PAGINATE )
193 | paginate($page, $totalCams, $limit, $targetpage);
194 |
195 | }
196 |
197 | // Get Related Cams
198 |
199 | function get_related( $gender, $limit ){
200 |
201 | $arg1 = array_key_exists('arg1', $_GET) ? $_GET['arg1'] : null;
202 | $arg2 = array_key_exists('arg2', $_GET) ? $_GET['arg2'] : null;
203 |
204 | if ( $arg1 ) {
205 |
206 | if ( is_numeric( $arg1 ) ) {
207 |
208 | $page = $arg1;
209 | $targetpage = 'cams/';
210 |
211 | } else {
212 |
213 | $targetpage = 'cams/' . $arg1 . '/';
214 |
215 | if ( $arg2 ) {
216 |
217 | if ( is_numeric( $arg2 ) ) {
218 |
219 | $page = $arg2;
220 |
221 | }
222 |
223 | } else {
224 |
225 | $page = 1;
226 |
227 | }
228 |
229 | }
230 |
231 | } else {
232 |
233 | $targetpage = 'cams/';
234 | $page = 1;
235 |
236 | }
237 |
238 | $end = $page * $limit;
239 | $start = $end - $limit;
240 | $cams = new SimpleXMLElement(FLATFILE, null, true);
241 |
242 | // Count the total cams
243 |
244 | if ( $gender != '' ) {
245 |
246 | $doc = new DOMDocument();
247 | $doc->load($xml);
248 | $totalCams = 0;
249 | foreach( $doc->getElementsByTagName('gender') as $tag )
250 | {
251 | // to iterate the children
252 | foreach( $tag->childNodes as $child )
253 | {
254 | // outputs the xml of the child nodes. Of course, there are any number of
255 | // things that you could do instead!
256 | $i = $doc->saveXML($child);
257 |
258 | if ($i == $gender )
259 | $totalCams++;
260 | }
261 | }
262 |
263 |
264 | } else {
265 |
266 | $totalCams = count($cams);
267 |
268 | }
269 |
270 | echo '
';
271 |
272 | $count = 0;
273 |
274 | foreach( $cams as $cam ){
275 |
276 | if ( $cam->gender == $gender ) {
277 |
278 | if ( $count >= $start && $count < $end ) {
279 |
280 | print_cams($cam);
281 |
282 | }
283 |
284 |
285 | $count++;
286 |
287 | }
288 |
289 | if ( $gender == '' ) {
290 |
291 | if ( $count >= $start && $count < $end ) {
292 | print_cams($cam);
293 | }
294 |
295 | $count++;
296 |
297 | }
298 |
299 |
300 | }
301 |
302 | echo '
';
303 |
304 | }
305 |
306 |
307 | // Print each individual cam
308 |
309 | function print_cams($cam) {
310 |
311 | switch ( $cam->gender) {
312 |
313 | case 'Female':
314 | $gender = 'female';
315 | break;
316 | case 'Males':
317 | $gender = 'male';
318 | break;
319 | case 'Couple Female + Male':
320 | $gender = 'couple';
321 | break;
322 | case 'Couple Female + Female':
323 | $gender = 'lesbian';
324 | break;
325 | case 'Couple Male + Memale':
326 | $gender = 'gay';
327 | break;
328 | case 'Trans':
329 | $gender = 'tranny';
330 | break;
331 |
332 | default:
333 | $gender = '';
334 | }
335 |
336 | echo '
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
' . limit_chars( $cam->display_name, 20 ) . '
345 |
346 | - ' . $cam->members_count . '
347 | - ' . ago( $cam->online_time ) . '
348 |
349 |
Watch Live Stream
350 |
351 |
352 |
353 |
354 |
355 |
356 | ';
357 |
358 | }
359 |
360 | // Print Solo Cams
361 |
362 | function solo_cams( $user ) {
363 |
364 | $arg1 = array_key_exists('arg1', $_GET) ? $_GET['arg1'] : null;
365 | $cams = new SimpleXMLElement(FLATFILE, null, true);
366 | $online = false;
367 |
368 | foreach( $cams as $cam ){
369 |
370 | switch ( $cam->gender) {
371 |
372 | case 'Female':
373 | $gender = 'female';
374 | break;
375 | case 'Males':
376 | $gender = 'male';
377 | break;
378 | case 'Couple Female + Male':
379 | $gender = 'couple';
380 | break;
381 | case 'Couple Female + Female':
382 | $gender = 'lesbian';
383 | break;
384 | case 'Couple Male + Memale':
385 | $gender = 'gay';
386 | break;
387 | case 'Trans':
388 | $gender = 'Tranny';
389 | break;
390 |
391 | default:
392 | $gender = '';
393 | }
394 |
395 |
396 | if ( $cam->username == $user ) {
397 |
398 | $online = true;
399 |
400 | echo '
401 |
448 |
449 |
450 | ';
451 |
452 | }
453 |
454 | }
455 |
456 | if ( !$online ) { // Display this if user is offline
457 |
458 | echo '
459 |