')
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);
--------------------------------------------------------------------------------
/Application/Assets/Template/sass/ie8.scss:
--------------------------------------------------------------------------------
1 | @import 'libs/vars';
2 | @import 'libs/functions';
3 | @import 'libs/mixins';
4 | @import 'libs/skel';
5 |
6 | /*
7 | Landed by HTML5 UP
8 | html5up.net | @ajlkn
9 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
10 | */
11 |
12 | $color-border: mix(_palette(bg), _palette(fg-bold), 70);
13 | $color-border-bg: mix(_palette(bg), _palette(fg-bold), 90);
14 |
15 | /* Basic */
16 |
17 | body {
18 | color: _palette(fg-bold);
19 | }
20 |
21 | body, html, #page-wrapper {
22 | height: 100%;
23 | }
24 |
25 | blockquote {
26 | border-left: solid 4px $color-border;
27 | }
28 |
29 | code {
30 | background: $color-border-bg;
31 | }
32 |
33 | hr {
34 | border-bottom: solid 1px $color-border;
35 | }
36 |
37 | /* Icon */
38 |
39 | .icon {
40 | &.major {
41 | -ms-behavior: url('assets/js/ie/PIE.htc');
42 | }
43 | }
44 |
45 | /* Image */
46 |
47 | .image {
48 | position: relative;
49 | -ms-behavior: url('assets/js/ie/PIE.htc');
50 |
51 | &:before {
52 | display: none;
53 | }
54 |
55 | img {
56 | position: relative;
57 | -ms-behavior: url('assets/js/ie/PIE.htc');
58 | }
59 | }
60 |
61 | /* Form */
62 |
63 | input[type="text"],
64 | input[type="password"],
65 | input[type="email"],
66 | select,
67 | textarea {
68 | position: relative;
69 | -ms-behavior: url('assets/js/ie/PIE.htc');
70 |
71 | &:focus {
72 | -ms-behavior: url('assets/js/ie/PIE.htc');
73 | }
74 | }
75 |
76 | input[type="text"],
77 | input[type="password"],
78 | input[type="email"] {
79 | line-height: _size(element-height);
80 | }
81 |
82 | input[type="checkbox"],
83 | input[type="radio"] {
84 | font-size: 3em;
85 | & + label {
86 | &:before {
87 | display: none;
88 | }
89 | }
90 | }
91 |
92 | /* Table */
93 |
94 | table {
95 | tbody {
96 | tr {
97 | border: solid 1px $color-border;
98 | }
99 | }
100 |
101 | thead {
102 | border-bottom: solid 1px $color-border;
103 | }
104 |
105 | tfoot {
106 | border-top: solid 1px $color-border;
107 | }
108 |
109 | &.alt {
110 | tbody {
111 | tr {
112 | td {
113 | border: solid 1px $color-border;
114 | }
115 | }
116 | }
117 | }
118 | }
119 |
120 | /* Button */
121 |
122 | input[type="submit"],
123 | input[type="reset"],
124 | input[type="button"],
125 | .button {
126 | border: solid 1px _palette(fg-bold) !important;
127 |
128 | &.special {
129 | border: 0 !important;
130 | }
131 | }
132 |
133 | /* Goto Next */
134 |
135 | .goto-next {
136 | display: none;
137 | }
138 |
139 | /* Spotlight */
140 |
141 | .spotlight {
142 | height: 100%;
143 |
144 | .content {
145 | background: _palette(accent2);
146 | }
147 | }
148 |
149 | /* Wrapper */
150 |
151 | .wrapper {
152 | &.style2 {
153 | input[type="text"],
154 | input[type="password"],
155 | input[type="email"],
156 | select,
157 | textarea {
158 | &:focus {
159 | border-color: _palette(fg-bold);
160 | }
161 | }
162 |
163 | input[type="submit"],
164 | input[type="reset"],
165 | input[type="button"],
166 | .button {
167 | &.special {
168 | &:hover, &:active {
169 | color: _palette(accent1) !important;
170 | }
171 | }
172 | }
173 | }
174 | }
175 |
176 | /* Dropotron */
177 |
178 | .dropotron {
179 | background: _palette(accent2);
180 | box-shadow: none !important;
181 | -ms-behavior: url('assets/js/ie/PIE.htc');
182 |
183 | > li {
184 | a, span {
185 | color: _palette(fg-bold) !important;
186 | }
187 | }
188 |
189 | &.level-0 {
190 | margin-top: 0;
191 |
192 | &:before {
193 | display: none;
194 | }
195 | }
196 | }
197 |
198 | /* Header */
199 |
200 | #header {
201 | background: _palette(accent2);
202 | }
203 |
204 | /* Banner */
205 |
206 | #banner {
207 | height: 100%;
208 |
209 | &:before {
210 | height: 100%;
211 | }
212 |
213 | &:after {
214 | background-image: url('images/ie/banner-overlay.png');
215 | }
216 | }
--------------------------------------------------------------------------------
/Application/Assets/Template/sass/ie9.scss:
--------------------------------------------------------------------------------
1 | @import 'libs/vars';
2 | @import 'libs/functions';
3 | @import 'libs/mixins';
4 | @import 'libs/skel';
5 |
6 | /*
7 | Landed by HTML5 UP
8 | html5up.net | @ajlkn
9 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
10 | */
11 |
12 | /* Loader */
13 |
14 | body.landing {
15 | &:before, &:after {
16 | display: none !important;
17 | }
18 | }
19 |
20 | /* Icon */
21 |
22 | .icon {
23 | &.alt {
24 | color: inherit !important;
25 | }
26 |
27 | &.major {
28 | &.alt {
29 | &:before {
30 | color: _palette(fg-bold) !important;
31 | }
32 | }
33 | }
34 | }
35 |
36 | /* Banner */
37 |
38 | #banner {
39 | &:after {
40 | background-color: _palette(bg-transparent);
41 | }
42 | }
43 |
44 | /* Footer */
45 |
46 | #footer {
47 | .icons {
48 | .icon {
49 | &.alt {
50 | &:before {
51 | color: _palette(fg-bold) !important;
52 | }
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/Application/Assets/Template/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 | }
--------------------------------------------------------------------------------
/Application/Assets/Template/sass/libs/_mixins.scss:
--------------------------------------------------------------------------------
1 | /// Makes an element's :before pseudoelement a FontAwesome icon.
2 | /// @param {string} $content Optional content value to use.
3 | /// @param {string} $where Optional pseudoelement to target (before or after).
4 | @mixin icon($content: false, $where: before) {
5 |
6 | text-decoration: none;
7 |
8 | &:#{$where} {
9 |
10 | @if $content {
11 | content: $content;
12 | }
13 |
14 | -moz-osx-font-smoothing: grayscale;
15 | -webkit-font-smoothing: antialiased;
16 | font-family: FontAwesome;
17 | font-style: normal;
18 | font-weight: normal;
19 | text-transform: none !important;
20 |
21 | }
22 |
23 | }
24 |
25 | /// Applies padding to an element, taking the current element-margin value into account.
26 | /// @param {mixed} $tb Top/bottom padding.
27 | /// @param {mixed} $lr Left/right padding.
28 | /// @param {list} $pad Optional extra padding (in the following order top, right, bottom, left)
29 | /// @param {bool} $important If true, adds !important.
30 | @mixin padding($tb, $lr, $pad: (0,0,0,0), $important: null) {
31 |
32 | @if $important {
33 | $important: '!important';
34 | }
35 |
36 | $x: 0.1em;
37 |
38 | @if unit(_size(element-margin)) == 'rem' {
39 | $x: 0.1rem;
40 | }
41 |
42 | padding: ($tb + nth($pad,1)) ($lr + nth($pad,2)) max($x, $tb - _size(element-margin) + nth($pad,3)) ($lr + nth($pad,4)) #{$important};
43 |
44 | }
45 |
46 | /// Encodes a SVG data URL so IE doesn't choke (via codepen.io/jakob-e/pen/YXXBrp).
47 | /// @param {string} $svg SVG data URL.
48 | /// @return {string} Encoded SVG data URL.
49 | @function svg-url($svg) {
50 |
51 | $svg: str-replace($svg, '"', '\'');
52 | $svg: str-replace($svg, '%', '%25');
53 | $svg: str-replace($svg, '<', '%3C');
54 | $svg: str-replace($svg, '>', '%3E');
55 | $svg: str-replace($svg, '&', '%26');
56 | $svg: str-replace($svg, '#', '%23');
57 | $svg: str-replace($svg, '{', '%7B');
58 | $svg: str-replace($svg, '}', '%7D');
59 | $svg: str-replace($svg, ';', '%3B');
60 |
61 | @return url("data:image/svg+xml;charset=utf8,#{$svg}");
62 |
63 | }
64 |
65 | /// Initializes base flexgrid classes.
66 | /// @param {string} $vertical-align Vertical alignment of cells.
67 | /// @param {string} $horizontal-align Horizontal alignment of cells.
68 | @mixin flexgrid-base($vertical-align: null, $horizontal-align: null) {
69 |
70 | // Grid.
71 | @include vendor('display', 'flex');
72 | @include vendor('flex-wrap', 'wrap');
73 |
74 | // Vertical alignment.
75 | @if ($vertical-align == top) {
76 | @include vendor('align-items', 'flex-start');
77 | }
78 | @else if ($vertical-align == bottom) {
79 | @include vendor('align-items', 'flex-end');
80 | }
81 | @else if ($vertical-align == center) {
82 | @include vendor('align-items', 'center');
83 | }
84 | @else {
85 | @include vendor('align-items', 'stretch');
86 | }
87 |
88 | // Horizontal alignment.
89 | @if ($horizontal-align != null) {
90 | text-align: $horizontal-align;
91 | }
92 |
93 | // Cells.
94 | > * {
95 | @include vendor('flex-shrink', '1');
96 | @include vendor('flex-grow', '0');
97 | }
98 |
99 | }
100 |
101 | /// Sets up flexgrid columns.
102 | /// @param {integer} $columns Columns.
103 | @mixin flexgrid-columns($columns) {
104 |
105 | > * {
106 | $cell-width: 100% / $columns;
107 | width: #{$cell-width};
108 | }
109 |
110 | }
111 |
112 | /// Sets up flexgrid gutters.
113 | /// @param {integer} $columns Columns.
114 | /// @param {number} $gutters Gutters.
115 | @mixin flexgrid-gutters($columns, $gutters) {
116 |
117 | // Apply padding.
118 | > * {
119 | $cell-width: 100% / $columns;
120 |
121 | padding: ($gutters * 0.5);
122 | width: $cell-width;
123 | }
124 |
125 | }
126 |
127 | /// Sets up flexgrid gutters (flush).
128 | /// @param {integer} $columns Columns.
129 | /// @param {number} $gutters Gutters.
130 | @mixin flexgrid-gutters-flush($columns, $gutters) {
131 |
132 | // Apply padding.
133 | > * {
134 | $cell-width: 100% / $columns;
135 | $cell-width-pad: $gutters / $columns;
136 |
137 | padding: ($gutters * 0.5);
138 | width: calc(#{$cell-width} + #{$cell-width-pad});
139 | }
140 |
141 | // Clear top/bottom gutters.
142 | > :nth-child(-n + #{$columns}) {
143 | padding-top: 0;
144 | }
145 |
146 | > :nth-last-child(-n + #{$columns}) {
147 | padding-bottom: 0;
148 | }
149 |
150 | // Clear left/right gutters.
151 | > :nth-child(#{$columns}n + 1) {
152 | padding-left: 0;
153 | }
154 |
155 | > :nth-child(#{$columns}n) {
156 | padding-right: 0;
157 | }
158 |
159 | // Adjust widths of leftmost and rightmost cells.
160 | > :nth-child(#{$columns}n + 1),
161 | > :nth-child(#{$columns}n) {
162 | $cell-width: 100% / $columns;
163 | $cell-width-pad: ($gutters / $columns) - ($gutters / 2);
164 |
165 | width: calc(#{$cell-width} + #{$cell-width-pad});
166 | }
167 |
168 | }
169 |
170 | /// Reset flexgrid gutters (flush only).
171 | /// Used to override a previous set of flexgrid gutter classes.
172 | /// @param {integer} $columns Columns.
173 | /// @param {number} $gutters Gutters.
174 | /// @param {integer} $prev-columns Previous columns.
175 | @mixin flexgrid-gutters-flush-reset($columns, $gutters, $prev-columns) {
176 |
177 | // Apply padding.
178 | > * {
179 | $cell-width: 100% / $prev-columns;
180 | $cell-width-pad: $gutters / $prev-columns;
181 |
182 | padding: ($gutters * 0.5);
183 | width: calc(#{$cell-width} + #{$cell-width-pad});
184 | }
185 |
186 | // Clear top/bottom gutters.
187 | > :nth-child(-n + #{$prev-columns}) {
188 | padding-top: ($gutters * 0.5);
189 | }
190 |
191 | > :nth-last-child(-n + #{$prev-columns}) {
192 | padding-bottom: ($gutters * 0.5);
193 | }
194 |
195 | // Clear left/right gutters.
196 | > :nth-child(#{$prev-columns}n + 1) {
197 | padding-left: ($gutters * 0.5);
198 | }
199 |
200 | > :nth-child(#{$prev-columns}n) {
201 | padding-right: ($gutters * 0.5);
202 | }
203 |
204 | // Adjust widths of leftmost and rightmost cells.
205 | > :nth-child(#{$prev-columns}n + 1),
206 | > :nth-child(#{$prev-columns}n) {
207 | $cell-width: 100% / $columns;
208 | $cell-width-pad: $gutters / $columns;
209 |
210 | padding: ($gutters * 0.5);
211 | width: calc(#{$cell-width} + #{$cell-width-pad});
212 | }
213 |
214 | }
215 |
216 | /// Adds debug styles to current flexgrid element.
217 | @mixin flexgrid-debug() {
218 |
219 | box-shadow: 0 0 0 1px red;
220 |
221 | > * {
222 | box-shadow: inset 0 0 0 1px blue;
223 | position: relative;
224 |
225 | > * {
226 | position: relative;
227 | box-shadow: inset 0 0 0 1px green;
228 | }
229 | }
230 |
231 | }
232 |
233 | /// Initializes the current element as a flexgrid.
234 | /// @param {integer} $columns Columns (optional).
235 | /// @param {number} $gutters Gutters (optional).
236 | /// @param {bool} $flush If true, clears padding around the very edge of the grid.
237 | @mixin flexgrid($settings: ()) {
238 |
239 | // Settings.
240 |
241 | // Debug.
242 | $debug: false;
243 |
244 | @if (map-has-key($settings, 'debug')) {
245 | $debug: map-get($settings, 'debug');
246 | }
247 |
248 | // Vertical align.
249 | $vertical-align: null;
250 |
251 | @if (map-has-key($settings, 'vertical-align')) {
252 | $vertical-align: map-get($settings, 'vertical-align');
253 | }
254 |
255 | // Horizontal align.
256 | $horizontal-align: null;
257 |
258 | @if (map-has-key($settings, 'horizontal-align')) {
259 | $horizontal-align: map-get($settings, 'horizontal-align');
260 | }
261 |
262 | // Columns.
263 | $columns: null;
264 |
265 | @if (map-has-key($settings, 'columns')) {
266 | $columns: map-get($settings, 'columns');
267 | }
268 |
269 | // Gutters.
270 | $gutters: 0;
271 |
272 | @if (map-has-key($settings, 'gutters')) {
273 | $gutters: map-get($settings, 'gutters');
274 | }
275 |
276 | // Flush.
277 | $flush: true;
278 |
279 | @if (map-has-key($settings, 'flush')) {
280 | $flush: map-get($settings, 'flush');
281 | }
282 |
283 | // Initialize base grid.
284 | @include flexgrid-base($vertical-align, $horizontal-align);
285 |
286 | // Debug?
287 | @if ($debug) {
288 | @include flexgrid-debug;
289 | }
290 |
291 | // Columns specified?
292 | @if ($columns != null) {
293 |
294 | // Initialize columns.
295 | @include flexgrid-columns($columns);
296 |
297 | // Gutters specified?
298 | @if ($gutters > 0) {
299 |
300 | // Flush gutters?
301 | @if ($flush) {
302 |
303 | // Initialize gutters (flush).
304 | @include flexgrid-gutters-flush($columns, $gutters);
305 |
306 | }
307 |
308 | // Otherwise ...
309 | @else {
310 |
311 | // Initialize gutters.
312 | @include flexgrid-gutters($columns, $gutters);
313 |
314 | }
315 |
316 | }
317 |
318 | }
319 |
320 | }
321 |
322 | /// Resizes a previously-initialized grid.
323 | /// @param {integer} $columns Columns.
324 | /// @param {number} $gutters Gutters (optional).
325 | /// @param {list} $reset A list of previously-initialized grid columns (only if $flush is true).
326 | /// @param {bool} $flush If true, clears padding around the very edge of the grid.
327 | @mixin flexgrid-resize($settings: ()) {
328 |
329 | // Settings.
330 |
331 | // Columns.
332 | $columns: 1;
333 |
334 | @if (map-has-key($settings, 'columns')) {
335 | $columns: map-get($settings, 'columns');
336 | }
337 |
338 | // Gutters.
339 | $gutters: 0;
340 |
341 | @if (map-has-key($settings, 'gutters')) {
342 | $gutters: map-get($settings, 'gutters');
343 | }
344 |
345 | // Previous columns.
346 | $prev-columns: false;
347 |
348 | @if (map-has-key($settings, 'prev-columns')) {
349 | $prev-columns: map-get($settings, 'prev-columns');
350 | }
351 |
352 | // Flush.
353 | $flush: true;
354 |
355 | @if (map-has-key($settings, 'flush')) {
356 | $flush: map-get($settings, 'flush');
357 | }
358 |
359 | // Resize columns.
360 | @include flexgrid-columns($columns);
361 |
362 | // Gutters specified?
363 | @if ($gutters > 0) {
364 |
365 | // Flush gutters?
366 | @if ($flush) {
367 |
368 | // Previous columns specified?
369 | @if ($prev-columns) {
370 |
371 | // Convert to list if it isn't one already.
372 | @if (type-of($prev-columns) != list) {
373 | $prev-columns: ($prev-columns);
374 | }
375 |
376 | // Step through list of previous columns and reset them.
377 | @each $x in $prev-columns {
378 | @include flexgrid-gutters-flush-reset($columns, $gutters, $x);
379 | }
380 |
381 | }
382 |
383 | // Resize gutters (flush).
384 | @include flexgrid-gutters-flush($columns, $gutters);
385 |
386 | }
387 |
388 | // Otherwise ...
389 | @else {
390 |
391 | // Resize gutters.
392 | @include flexgrid-gutters($columns, $gutters);
393 |
394 | }
395 |
396 | }
397 |
398 | }
--------------------------------------------------------------------------------
/Application/Assets/Template/sass/libs/_skel.scss:
--------------------------------------------------------------------------------
1 | // skel.scss v3.0.2-dev | (c) 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 | 'object-fit',
46 | 'object-position',
47 | 'order',
48 | 'perspective',
49 | 'pointer-events',
50 | 'transform',
51 | 'transform-origin',
52 | 'transform-style',
53 | 'transition',
54 | 'transition-delay',
55 | 'transition-duration',
56 | 'transition-property',
57 | 'transition-timing-function',
58 | 'user-select'
59 | );
60 |
61 | /// Values that should be vendorized.
62 | /// @var {list}
63 | $vendor-values: (
64 | 'filter',
65 | 'flex',
66 | 'linear-gradient',
67 | 'radial-gradient',
68 | 'transform'
69 | );
70 |
71 | // Functions.
72 |
73 | /// Removes a specific item from a list.
74 | /// @author Hugo Giraudel
75 | /// @param {list} $list List.
76 | /// @param {integer} $index Index.
77 | /// @return {list} Updated list.
78 | @function remove-nth($list, $index) {
79 |
80 | $result: null;
81 |
82 | @if type-of($index) != number {
83 | @warn "$index: #{quote($index)} is not a number for `remove-nth`.";
84 | }
85 | @else if $index == 0 {
86 | @warn "List index 0 must be a non-zero integer for `remove-nth`.";
87 | }
88 | @else if abs($index) > length($list) {
89 | @warn "List index is #{$index} but list is only #{length($list)} item long for `remove-nth`.";
90 | }
91 | @else {
92 |
93 | $result: ();
94 | $index: if($index < 0, length($list) + $index + 1, $index);
95 |
96 | @for $i from 1 through length($list) {
97 |
98 | @if $i != $index {
99 | $result: append($result, nth($list, $i));
100 | }
101 |
102 | }
103 |
104 | }
105 |
106 | @return $result;
107 |
108 | }
109 |
110 | /// Replaces a substring within another string.
111 | /// @author Hugo Giraudel
112 | /// @param {string} $string String.
113 | /// @param {string} $search Substring.
114 | /// @param {string} $replace Replacement.
115 | /// @return {string} Updated string.
116 | @function str-replace($string, $search, $replace: '') {
117 |
118 | $index: str-index($string, $search);
119 |
120 | @if $index {
121 | @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
122 | }
123 |
124 | @return $string;
125 |
126 | }
127 |
128 | /// Replaces a substring within each string in a list.
129 | /// @param {list} $strings List of strings.
130 | /// @param {string} $search Substring.
131 | /// @param {string} $replace Replacement.
132 | /// @return {list} Updated list of strings.
133 | @function str-replace-all($strings, $search, $replace: '') {
134 |
135 | @each $string in $strings {
136 | $strings: set-nth($strings, index($strings, $string), str-replace($string, $search, $replace));
137 | }
138 |
139 | @return $strings;
140 |
141 | }
142 |
143 | /// Gets a value from a map.
144 | /// @author Hugo Giraudel
145 | /// @param {map} $map Map.
146 | /// @param {string} $keys Key(s).
147 | /// @return {string} Value.
148 | @function val($map, $keys...) {
149 |
150 | @if nth($keys, 1) == null {
151 | $keys: remove-nth($keys, 1);
152 | }
153 |
154 | @each $key in $keys {
155 | $map: map-get($map, $key);
156 | }
157 |
158 | @return $map;
159 |
160 | }
161 |
162 | // Mixins.
163 |
164 | /// Sets the global box model.
165 | /// @param {string} $model Model (default is content).
166 | @mixin boxModel($model: 'content') {
167 |
168 | $x: $model + '-box';
169 |
170 | *, *:before, *:after {
171 | -moz-box-sizing: #{$x};
172 | -webkit-box-sizing: #{$x};
173 | box-sizing: #{$x};
174 | }
175 |
176 | }
177 |
178 | /// Wraps @content in a @media block using a given breakpoint.
179 | /// @param {string} $breakpoint Breakpoint.
180 | /// @param {map} $queries Additional queries.
181 | @mixin breakpoint($breakpoint: null, $queries: null) {
182 |
183 | $query: 'screen';
184 |
185 | // Breakpoint.
186 | @if $breakpoint and map-has-key($breakpoints, $breakpoint) {
187 | $query: $query + ' and ' + map-get($breakpoints, $breakpoint);
188 | }
189 |
190 | // Queries.
191 | @if $queries {
192 | @each $k, $v in $queries {
193 | $query: $query + ' and (' + $k + ':' + $v + ')';
194 | }
195 | }
196 |
197 | @media #{$query} {
198 | @content;
199 | }
200 |
201 | }
202 |
203 | /// Wraps @content in a @media block targeting a specific orientation.
204 | /// @param {string} $orientation Orientation.
205 | @mixin orientation($orientation) {
206 | @media screen and (orientation: #{$orientation}) {
207 | @content;
208 | }
209 | }
210 |
211 | /// Utility mixin for containers.
212 | /// @param {mixed} $width Width.
213 | @mixin containers($width) {
214 |
215 | // Locked?
216 | $lock: false;
217 |
218 | @if length($width) == 2 {
219 | $width: nth($width, 1);
220 | $lock: true;
221 | }
222 |
223 | // Modifiers.
224 | .container.\31 25\25 { width: 100%; max-width: $width * 1.25; min-width: $width; }
225 | .container.\37 5\25 { width: $width * 0.75; }
226 | .container.\35 0\25 { width: $width * 0.5; }
227 | .container.\32 5\25 { width: $width * 0.25; }
228 |
229 | // Main class.
230 | .container {
231 | @if $lock {
232 | width: $width !important;
233 | }
234 | @else {
235 | width: $width;
236 | }
237 | }
238 |
239 | }
240 |
241 | /// Utility mixin for grid.
242 | /// @param {list} $gutters Column and row gutters (default is 40px).
243 | /// @param {string} $breakpointName Optional breakpoint name.
244 | @mixin grid($gutters: 40px, $breakpointName: null) {
245 |
246 | // Gutters.
247 | @include grid-gutters($gutters);
248 | @include grid-gutters($gutters, \32 00\25, 2);
249 | @include grid-gutters($gutters, \31 50\25, 1.5);
250 | @include grid-gutters($gutters, \35 0\25, 0.5);
251 | @include grid-gutters($gutters, \32 5\25, 0.25);
252 |
253 | // Cells.
254 | $x: '';
255 |
256 | @if $breakpointName {
257 | $x: '\\28' + $breakpointName + '\\29';
258 | }
259 |
260 | .\31 2u#{$x}, .\31 2u\24#{$x} { width: 100%; clear: none; margin-left: 0; }
261 | .\31 1u#{$x}, .\31 1u\24#{$x} { width: 91.6666666667%; clear: none; margin-left: 0; }
262 | .\31 0u#{$x}, .\31 0u\24#{$x} { width: 83.3333333333%; clear: none; margin-left: 0; }
263 | .\39 u#{$x}, .\39 u\24#{$x} { width: 75%; clear: none; margin-left: 0; }
264 | .\38 u#{$x}, .\38 u\24#{$x} { width: 66.6666666667%; clear: none; margin-left: 0; }
265 | .\37 u#{$x}, .\37 u\24#{$x} { width: 58.3333333333%; clear: none; margin-left: 0; }
266 | .\36 u#{$x}, .\36 u\24#{$x} { width: 50%; clear: none; margin-left: 0; }
267 | .\35 u#{$x}, .\35 u\24#{$x} { width: 41.6666666667%; clear: none; margin-left: 0; }
268 | .\34 u#{$x}, .\34 u\24#{$x} { width: 33.3333333333%; clear: none; margin-left: 0; }
269 | .\33 u#{$x}, .\33 u\24#{$x} { width: 25%; clear: none; margin-left: 0; }
270 | .\32 u#{$x}, .\32 u\24#{$x} { width: 16.6666666667%; clear: none; margin-left: 0; }
271 | .\31 u#{$x}, .\31 u\24#{$x} { width: 8.3333333333%; clear: none; margin-left: 0; }
272 |
273 | .\31 2u\24#{$x} + *,
274 | .\31 1u\24#{$x} + *,
275 | .\31 0u\24#{$x} + *,
276 | .\39 u\24#{$x} + *,
277 | .\38 u\24#{$x} + *,
278 | .\37 u\24#{$x} + *,
279 | .\36 u\24#{$x} + *,
280 | .\35 u\24#{$x} + *,
281 | .\34 u\24#{$x} + *,
282 | .\33 u\24#{$x} + *,
283 | .\32 u\24#{$x} + *,
284 | .\31 u\24#{$x} + * {
285 | clear: left;
286 | }
287 |
288 | .\-11u#{$x} { margin-left: 91.6666666667% }
289 | .\-10u#{$x} { margin-left: 83.3333333333% }
290 | .\-9u#{$x} { margin-left: 75% }
291 | .\-8u#{$x} { margin-left: 66.6666666667% }
292 | .\-7u#{$x} { margin-left: 58.3333333333% }
293 | .\-6u#{$x} { margin-left: 50% }
294 | .\-5u#{$x} { margin-left: 41.6666666667% }
295 | .\-4u#{$x} { margin-left: 33.3333333333% }
296 | .\-3u#{$x} { margin-left: 25% }
297 | .\-2u#{$x} { margin-left: 16.6666666667% }
298 | .\-1u#{$x} { margin-left: 8.3333333333% }
299 |
300 | }
301 |
302 | /// Utility mixin for grid.
303 | /// @param {list} $gutters Gutters.
304 | /// @param {string} $class Optional class name.
305 | /// @param {integer} $multiplier Multiplier (default is 1).
306 | @mixin grid-gutters($gutters, $class: null, $multiplier: 1) {
307 |
308 | // Expand gutters if it's not a list.
309 | @if length($gutters) == 1 {
310 | $gutters: ($gutters, 0);
311 | }
312 |
313 | // Get column and row gutter values.
314 | $c: nth($gutters, 1);
315 | $r: nth($gutters, 2);
316 |
317 | // Get class (if provided).
318 | $x: '';
319 |
320 | @if $class {
321 | $x: '.' + $class;
322 | }
323 |
324 | // Default.
325 | .row#{$x} > * { padding: ($r * $multiplier) 0 0 ($c * $multiplier); }
326 | .row#{$x} { margin: ($r * $multiplier * -1) 0 -1px ($c * $multiplier * -1); }
327 |
328 | // Uniform.
329 | .row.uniform#{$x} > * { padding: ($c * $multiplier) 0 0 ($c * $multiplier); }
330 | .row.uniform#{$x} { margin: ($c * $multiplier * -1) 0 -1px ($c * $multiplier * -1); }
331 |
332 | }
333 |
334 | /// Wraps @content in vendorized keyframe blocks.
335 | /// @param {string} $name Name.
336 | @mixin keyframes($name) {
337 |
338 | @-moz-keyframes #{$name} { @content; }
339 | @-webkit-keyframes #{$name} { @content; }
340 | @-ms-keyframes #{$name} { @content; }
341 | @keyframes #{$name} { @content; }
342 |
343 | }
344 |
345 | ///
346 | /// Sets breakpoints.
347 | /// @param {map} $x Breakpoints.
348 | ///
349 | @mixin skel-breakpoints($x: ()) {
350 | $breakpoints: $x !global;
351 | }
352 |
353 | ///
354 | /// Initializes layout module.
355 | /// @param {map} config Config.
356 | ///
357 | @mixin skel-layout($config: ()) {
358 |
359 | // Config.
360 | $configPerBreakpoint: ();
361 |
362 | $z: map-get($config, 'breakpoints');
363 |
364 | @if $z {
365 | $configPerBreakpoint: $z;
366 | }
367 |
368 | // Reset.
369 | $x: map-get($config, 'reset');
370 |
371 | @if $x {
372 |
373 | /* Reset */
374 |
375 | @include reset($x);
376 |
377 | }
378 |
379 | // Box model.
380 | $x: map-get($config, 'boxModel');
381 |
382 | @if $x {
383 |
384 | /* Box Model */
385 |
386 | @include boxModel($x);
387 |
388 | }
389 |
390 | // Containers.
391 | $containers: map-get($config, 'containers');
392 |
393 | @if $containers {
394 |
395 | /* Containers */
396 |
397 | .container {
398 | margin-left: auto;
399 | margin-right: auto;
400 | }
401 |
402 | // Use default is $containers is just "true".
403 | @if $containers == true {
404 | $containers: 960px;
405 | }
406 |
407 | // Apply base.
408 | @include containers($containers);
409 |
410 | // Apply per-breakpoint.
411 | @each $name in map-keys($breakpoints) {
412 |
413 | // Get/use breakpoint setting if it exists.
414 | $x: map-get($configPerBreakpoint, $name);
415 |
416 | // Per-breakpoint config exists?
417 | @if $x {
418 | $y: map-get($x, 'containers');
419 |
420 | // Setting exists? Use it.
421 | @if $y {
422 | $containers: $y;
423 | }
424 |
425 | }
426 |
427 | // Create @media block.
428 | @media screen and #{map-get($breakpoints, $name)} {
429 | @include containers($containers);
430 | }
431 |
432 | }
433 |
434 | }
435 |
436 | // Grid.
437 | $grid: map-get($config, 'grid');
438 |
439 | @if $grid {
440 |
441 | /* Grid */
442 |
443 | // Use defaults if $grid is just "true".
444 | @if $grid == true {
445 | $grid: ();
446 | }
447 |
448 | // Sub-setting: Gutters.
449 | $grid-gutters: 40px;
450 | $x: map-get($grid, 'gutters');
451 |
452 | @if $x {
453 | $grid-gutters: $x;
454 | }
455 |
456 | // Rows.
457 | .row {
458 | border-bottom: solid 1px transparent;
459 | -moz-box-sizing: border-box;
460 | -webkit-box-sizing: border-box;
461 | box-sizing: border-box;
462 | }
463 |
464 | .row > * {
465 | float: left;
466 | -moz-box-sizing: border-box;
467 | -webkit-box-sizing: border-box;
468 | box-sizing: border-box;
469 | }
470 |
471 | .row:after, .row:before {
472 | content: '';
473 | display: block;
474 | clear: both;
475 | height: 0;
476 | }
477 |
478 | .row.uniform > * > :first-child {
479 | margin-top: 0;
480 | }
481 |
482 | .row.uniform > * > :last-child {
483 | margin-bottom: 0;
484 | }
485 |
486 | // Gutters (0%).
487 | @include grid-gutters($grid-gutters, \30 \25, 0);
488 |
489 | // Apply base.
490 | @include grid($grid-gutters);
491 |
492 | // Apply per-breakpoint.
493 | @each $name in map-keys($breakpoints) {
494 |
495 | // Get/use breakpoint setting if it exists.
496 | $x: map-get($configPerBreakpoint, $name);
497 |
498 | // Per-breakpoint config exists?
499 | @if $x {
500 | $y: map-get($x, 'grid');
501 |
502 | // Setting exists?
503 | @if $y {
504 |
505 | // Sub-setting: Gutters.
506 | $x: map-get($y, 'gutters');
507 |
508 | @if $x {
509 | $grid-gutters: $x;
510 | }
511 |
512 | }
513 |
514 | }
515 |
516 | // Create @media block.
517 | @media screen and #{map-get($breakpoints, $name)} {
518 | @include grid($grid-gutters, $name);
519 | }
520 |
521 | }
522 |
523 | }
524 |
525 | }
526 |
527 | /// Resets browser styles.
528 | /// @param {string} $mode Mode (default is 'normalize').
529 | @mixin reset($mode: 'normalize') {
530 |
531 | @if $mode == 'normalize' {
532 |
533 | // normalize.css v3.0.2 | MIT License | git.io/normalize
534 | 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}
535 |
536 | }
537 | @else if $mode == 'full' {
538 |
539 | // meyerweb.com/eric/tools/css/reset v2.0 | 20110126 | License: none (public domain)
540 | 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}
541 |
542 | }
543 |
544 | }
545 |
546 | /// Vendorizes a declaration's property and/or value(s).
547 | /// @param {string} $property Property.
548 | /// @param {mixed} $value String/list of value(s).
549 | @mixin vendor($property, $value) {
550 |
551 | // Determine if property should expand.
552 | $expandProperty: index($vendor-properties, $property);
553 |
554 | // Determine if value should expand (and if so, add '-prefix-' placeholder).
555 | $expandValue: false;
556 |
557 | @each $x in $value {
558 | @each $y in $vendor-values {
559 | @if $y == str-slice($x, 1, str-length($y)) {
560 |
561 | $value: set-nth($value, index($value, $x), '-prefix-' + $x);
562 | $expandValue: true;
563 |
564 | }
565 | }
566 | }
567 |
568 | // Expand property?
569 | @if $expandProperty {
570 | @each $vendor in $vendor-prefixes {
571 | #{$vendor}#{$property}: #{str-replace-all($value, '-prefix-', $vendor)};
572 | }
573 | }
574 |
575 | // Expand just the value?
576 | @elseif $expandValue {
577 | @each $vendor in $vendor-prefixes {
578 | #{$property}: #{str-replace-all($value, '-prefix-', $vendor)};
579 | }
580 | }
581 |
582 | // Neither? Treat them as a normal declaration.
583 | @else {
584 | #{$property}: #{$value};
585 | }
586 |
587 | }
--------------------------------------------------------------------------------
/Application/Assets/Template/sass/libs/_vars.scss:
--------------------------------------------------------------------------------
1 | // Misc.
2 | $misc: (
3 | z-index-base: 10000,
4 | z-index-overlay: 100000,
5 | max-spotlight: 20
6 | );
7 |
8 | // Duration.
9 | $duration: (
10 | navPanel: 0.5s,
11 | transition: 0.2s,
12 | landing-fadein: 1.5s
13 | );
14 |
15 | // Size.
16 | $size: (
17 | border-radius: 4px,
18 | element-height: 3em,
19 | element-margin: 2em,
20 | navPanel: 275px
21 | );
22 |
23 | // Font.
24 | $font: (
25 | family: ('Roboto', Helvetica, sans-serif),
26 | family-fixed: ('Courier New', monospace),
27 | weight: 100,
28 | weight-bold: 300
29 | );
30 |
31 | // Palette.
32 | $palette: (
33 | bg: #1c1d26,
34 | bg-transparent: rgba(23,24,32,0.95),
35 | fg-bold: #ffffff,
36 | fg: rgba(255,255,255,0.75),
37 | fg-light: rgba(255,255,255,0.5),
38 | fg-lighter: rgba(255,255,255,0.15),
39 | border: rgba(255,255,255,0.3),
40 | border-bg: rgba(255,255,255,0.075),
41 | border2: rgba(255,255,255,0.5),
42 | border2-bg: rgba(255,255,255,0.25),
43 | accent1: #e44c65,
44 | accent2: #272833,
45 | accent2-transparent:rgba(39,40,51,0.965),
46 | accent3: #5480f1,
47 | accent4: #39c088
48 | );
--------------------------------------------------------------------------------
/Application/Assets/Utils/inputs.css:
--------------------------------------------------------------------------------
1 | input {
2 | text-align: center;
3 | width: 50%;
4 | }
5 |
6 | input .w4 {
7 | width: 100%;
8 | }
9 |
10 | input .w3 {
11 | width: 75%;
12 | }
13 |
14 | input .w2 {
15 | width: 50%;
16 | }
17 |
18 | input .w1 {
19 | width: 25%;
20 | }
--------------------------------------------------------------------------------
/Application/Assets/Utils/messages.css:
--------------------------------------------------------------------------------
1 | .alert {
2 | padding: 20px;
3 | background-color: rgba(255, 82, 65, 0.50); /* Red */
4 | color: white;
5 | margin-bottom: 15px;
6 | }
7 |
8 | .closebtn {
9 | margin-left: 15px;
10 | color: white;
11 | font-weight: bold;
12 | float: right;
13 | font-size: 22px;
14 | line-height: 20px;
15 | cursor: pointer;
16 | transition: 0.3s;
17 | }
18 |
19 | .closebtn:hover {
20 | color: black;
21 | }s
--------------------------------------------------------------------------------
/Application/Assets/images/__tabs-space.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/__tabs-space.gif
--------------------------------------------------------------------------------
/Application/Assets/images/fbutton.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/fbutton.png
--------------------------------------------------------------------------------
/Application/Assets/images/floating-button.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/floating-button.gif
--------------------------------------------------------------------------------
/Application/Assets/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/icon.png
--------------------------------------------------------------------------------
/Application/Assets/images/official-sielo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/official-sielo.png
--------------------------------------------------------------------------------
/Application/Assets/images/tabs-space.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/tabs-space.gif
--------------------------------------------------------------------------------
/Application/Assets/images/tabsspaces.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/tabsspaces.png
--------------------------------------------------------------------------------
/Application/Assets/images/themes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/themes.png
--------------------------------------------------------------------------------
/Application/Assets/images/wiki/compile/win_cmake.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/wiki/compile/win_cmake.jpg
--------------------------------------------------------------------------------
/Application/Assets/images/wiki/themes/addressbar-details.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/wiki/themes/addressbar-details.jpg
--------------------------------------------------------------------------------
/Application/Assets/images/wiki/themes/floating-button-details.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/wiki/themes/floating-button-details.jpg
--------------------------------------------------------------------------------
/Application/Assets/images/wiki/themes/interface-names.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/wiki/themes/interface-names.xcf
--------------------------------------------------------------------------------
/Application/Assets/images/wiki/themes/tabs-details.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/wiki/themes/tabs-details.jpg
--------------------------------------------------------------------------------
/Application/Assets/images/wiki/themes/tabs-details2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/wiki/themes/tabs-details2.jpg
--------------------------------------------------------------------------------
/Application/Assets/images/wiki/themes/temps.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/images/wiki/themes/temps.jpg
--------------------------------------------------------------------------------
/Application/Site/Controller/Home.php:
--------------------------------------------------------------------------------
1 | setLang($lang, 'Site');
25 | $this->lang->addFile('Home');
26 | $this->loadModel('User');
27 | }
28 |
29 | public function invokeHomePage()
30 | {
31 | /*
32 | * Meta & title
33 | */
34 | $this->htmlDocument->header->setTitle($this->lang->getKey('HOME_PAGE_TITLE'));
35 | /*
36 | * View params
37 | */
38 | $account = $this->User->getAccount($_SESSION['nickname']);
39 | $this->setParam($account[0], 'account');
40 | $this->setParam($this->lang, 'lang');
41 | /*
42 | * Render
43 | */
44 | $this->render('Home/home');
45 | /*
46 | * Emitter
47 | */
48 | $this->emitter->emit('Home.viewHome');
49 | }
50 |
51 | public function invokePresentationPage()
52 | {
53 | /*
54 | * Meta & title
55 | */
56 | $this->htmlDocument->header->setTitle($this->lang->getKey('PRESENTATION_PAGE_TITLE'));
57 | /*
58 | * View params
59 | */
60 | $this->setParam($this->lang, 'lang');
61 | /*
62 | * Render
63 | */
64 | $this->render('Home/presentation');
65 | /*
66 | * Emitter
67 | */
68 | $this->emitter->emit('Home.viewPresentation');
69 | }
70 | }
--------------------------------------------------------------------------------
/Application/Site/Controller/THeme.php:
--------------------------------------------------------------------------------
1 | setLang($lang, 'User', 'Site');
23 | $this->loadModel('Theme');
24 | }
25 |
26 |
27 | public function invokeThemeListing()
28 | {
29 |
30 |
31 |
32 | }
33 |
34 | }
--------------------------------------------------------------------------------
/Application/Site/Controller/User.php:
--------------------------------------------------------------------------------
1 | setLang($lang, 'Site');
25 | $this->lang->addFile('User');
26 | $this->loadModel('User');
27 | }
28 |
29 | /**
30 | *
31 | *
32 | * @param array $infos
33 | */
34 | public function createAccount($infos)
35 | {
36 | /*
37 | * Emitter
38 | */
39 | $this->emitter->emit('Account.onCreate');
40 | /*
41 | * Account creation
42 | */
43 | $accountReturn = $this->User->createAccount($infos['name'], $infos['surname'], $infos['nickname'], $infos['password'], $infos['confirm'], $infos['email']);
44 | /*
45 | * Emitter
46 | */
47 | $this->emitter->emit('Account.created');
48 |
49 | /*
50 | * Render & Params
51 | */
52 | if($accountReturn === 'Done')
53 | {
54 | $this->User->login($infos['$nickname'], $infos['password']);
55 | header('Location: /Sielo/account/my');
56 | return;
57 | } else if($accountReturn === 'Already exists')
58 | $this->setParam($this->lang->getKey('JOIN_ERROR_ACCOUNT_ALREADY_EXISTS'), 'returnError');
59 | else if($accountReturn === 'Password does not match')
60 | $this->setParam($this->lang->getKey('JOIN_ERROR_PASSWORD_DOES_NOT_MATCH_CONFIRM'), 'returnError');
61 | $this->setParam(['$nickname' => $infos['$nickname'], 'name' => $infos['name'], 'surname' => $infos['surname'], 'email' => $infos['email']], 'returnInformations');
62 | $this->setParam('register', 'typeOf'); // Typeof
63 | $this->setParam($this->lang, 'lang'); // Lang
64 | $this->render('User/join');
65 | }
66 |
67 | /**
68 | * @param $infos
69 | */
70 | public function login($infos)
71 | {
72 | /*
73 | * Emitter
74 | */
75 | $this->emitter->emit('Account.onLogin');
76 | /*
77 | * Account login
78 | */
79 | $accountReturn = $this->User->login($infos['nickname'], $infos['password']);
80 | /*
81 | * Emitter
82 | */
83 | $this->emitter->emit('Account.loginSuccessful');
84 | /*
85 | * Render & Params
86 | */
87 | if($accountReturn === 'Done')
88 | {
89 | Session::setParam('lang', (Cookie::cookieExists('lang')) ? Cookie::getCookie('lang') : 'en' );
90 | Session::setParam('nickname', $infos['nickname']);
91 | header('Location: /Sielo/account/my');
92 | return;
93 | } else if($accountReturn === 'Account nickname doesn\'t exists')
94 | {
95 | $this->setParam($this->lang->getKey('JOIN_ERROR_ACCOUNT_PASSWORD_DOESNT_MATCH'), 'returnError');
96 | } else if($accountReturn === 'Account password doesn\'t match') {
97 | $this->setParam($this->lang->getKey('JOIN_ERROR_ACCOUNT_NICKNAME_DOESNT_EXIST'), 'returnError');
98 | } else if($accountReturn === 'Account nickname or password is not set')
99 | {
100 | $this->setParam($this->lang->getKey('JOIN_ERROR_ACCOUNT_NICKNAME_OR_PASSWORD_IS_NOT_SET'), 'returnError');
101 | }
102 | $this->setParam(['nickname' => $infos['nickname']], 'returnInformations');
103 | $this->setParam('login', 'typeOf'); // Typeof
104 | $this->setParam($this->lang, 'lang'); // Lang
105 | $this->render('User/join');
106 | }
107 |
108 | public function changeImage($informations)
109 | {
110 | var_dump($informations);
111 | }
112 |
113 | public function changeNickname($informations)
114 | {
115 |
116 | }
117 |
118 | public function changePassword($informations)
119 | {
120 |
121 | }
122 |
123 | /*
124 | *
125 | */
126 | public function disconnect()
127 | {
128 | $this->emitter->emit('Account.onDisconnect');
129 | Session::disconnect();
130 | $this->emitter->emit('Account.disconnected');
131 | header('Location: /Sielo/');
132 | }
133 |
134 | public function lang($lang)
135 | {
136 | if(Session::isConnected())
137 | {
138 | Session::setParam('lang', $lang);
139 | } else {
140 | if(Cookie::cookieExists('lang'))
141 | Cookie::deleteCookie('lang');
142 | Cookie::addCookie('lang', $lang, '/',60*10);
143 | }
144 | // header('Location: /Sielo/');
145 | }
146 |
147 | public function invokeJoinPage()
148 | {
149 | $this->emitter->emit('Render.onRender');
150 | $this->setParam($this->lang, 'lang');
151 | $this->render('User/join');
152 | $this->emitter->emit('Render.joinView');
153 | }
154 |
155 | /**
156 | * @param $name
157 | */
158 | public function invokeAccountPage($name)
159 | {
160 | $account = $this->User->getAccount($name);
161 | $this->setParam($this->lang, 'lang');
162 | if(count($account) !== 0)
163 | {
164 | $this->setParam($account[0], 'account');
165 | $this->htmlDocument->header->addMetaTag(['name' => 'testMeta']);
166 | $this->htmlDocument->header->setTitle($this->lang->getKey('ACCOUNT_PAGE_TITLE').' '.$name);
167 | $this->render('User/account');
168 | $this->emitter->emit('Render.account');
169 | } else {
170 | $this->render('Default/404');
171 | }
172 | }
173 |
174 | public function invokeMyPage()
175 | {
176 | if(Session::isConnected())
177 | {
178 | $account = $this->User->getAccount(Session::getParam('nickname'));
179 | $this->setParam($this->lang, 'lang');
180 | if(count($account) !== 0)
181 | {
182 | $this->setParam($account[0], 'account');
183 | $this->render('User/my');
184 | $this->emitter->emit('Render.myAccount');
185 | } else {
186 | $this->render('Default/404');
187 | }
188 | } else {
189 | header('Location: /Sielo/');
190 | }
191 | }
192 |
193 | public function invokeLangPage()
194 | {
195 | $this->setParam($this->lang, 'lang');
196 | $this->render('User/lang');
197 | }
198 | }
--------------------------------------------------------------------------------
/Application/Site/Datas/User/Kaktus.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Site/Datas/User/Kaktus.jpg
--------------------------------------------------------------------------------
/Application/Site/Langs/en/Home.ini:
--------------------------------------------------------------------------------
1 | # Presentation
2 | HEADER_THISPAGE_PRESENTAION_PROMO="Presentation"
3 | HEADER_THISPAGE_PRESENTAION_TABSPACE="Tabs spaces"
4 | HEADER_THISPAGE_PRESENTAION_FLOATING="Floating Button"
5 | HEADER_THISPAGE_PRESENTAION_DOWNLOAD="Download"
6 | BANNER_TABSPACE="See the web differently with Sielo's tabs spaces."
7 | ONE_TITLE="Sielo, not just a web browser"
8 | ONE_PRESENTATION="Sielo has all the functionnalities of a traditionnal web browser, but that's not the end. No more tabs everywhere, browse differently by using tabs spaces"
9 | ONE_DOWNLOAD="Download"
10 | ONE_YTVIDEO_TAG="DNDkEY5hSf0"
11 | TABSPACE_TITLE="Do more with tabs spaces"
12 | TABSPACE_PRESENTATION="No more tabs everywhere"
13 | TABSPACE_FEATURE="This is the feature that makes Sielo so special. With tabs spaces you can divide your Sielo window into several spaces, as if you had several windows next to each other but still interacting with each others. You can resize your tabs spaces, hide them, mute them... This makes possible, among other things, to have several sessions, for example a session called "social networks", another called "music" and another called "work". Therefore you can hide the "music" tabs space and retrieve it at any time."
14 | FLOATING_TITLE="Floating buttons"
15 | FLOATING_PRESENTATION="Be more efficient and gain place with floating button"
16 | FLOATING_FEATURE="This is another specific feature of Sielo, with it, you can gain space by dematerialising the browser's toolbar. Being a simple mobile button, it gives you access to all the needed controls during your browsing and can adapt itself to your workspace."
17 | CARACTERISTICS_START="Start using Sielo now"
18 | CARACTERISTICS_HELP="A project with the awesome help of Hotaru, LavaPower and Kaktus"
19 | CARACTERISTICS_FREE="Free"
20 | CARACTERISTICS_FREE_PRESENTATION="Sielo is free, now and forever. It's a free open-source project started in 2016, with the purpose of improving your web experience"
21 | CARACTERISTICS_IMPROVED="Improved by Contributors"
22 | CARACTERISTICS_IMPROVED_PRESENTATION="Sielo is open-source. It means people like you can help us with development or design. That way we can all work to improve Sielo every days."
23 | CARACTERISTICS_CUSTOMIZABLE="Customizable"
24 | CARACTERISTICS_CUSTOMIZABLE_PRESENTATION="With its powerful theme API, you can change Sielo's entire design with customizable themes. You can also directly control theme's colors"
25 | CARACTERISTICS_FAST="Fast"
26 | CARACTERISTICS_FAST_PRESENTATION="By using the latest version of the Blink engine, Sielo makes possible to browse quickly on the web."
27 | CARACTERISTICS_HELP_US="Help Us"
28 | CARACTERISTICS_HELP_US_PRESENTATION="There are many ways to help us. You can
donate, help us improve the source code, or simply share and talk about Sielo to your family and friends."
29 | CARACTERISTICS_UPDATE="Updated Regularly"
30 | CARACTERISTICS_UPDATE_PRESENTATION="I am working night and day to improve Sielo and offer you the best updates as quick as possible."
31 | DOWNLOAD_DOWNLOAD="Download"
32 | DOWNLOAD_WINDOWS="Windows (64bits)"
33 | DOWNLOAD_WINDOWSSETUP="Download Setup"
34 | DOWNLOAD_WINDOWSPORTABLE="Windows"
35 | DOWNLOAD_WINDOWSPORTABLESETUP="Download Portable Setup"
36 | DOWNLOAD_LINUX="Linux"
37 | DOWNLOAD_LINUXSETUP="Download AppImage"
38 | DOWNLOAD_ARCH="ArchLinux"
39 | DOWNLOAD_ARCHSETUP="Available in the AUR"
40 | DOWNLOAD_GITHUB="Github"
41 | DOWNLOAD_GITHUBSOURCE="Source code"
42 |
43 | # Home
--------------------------------------------------------------------------------
/Application/Site/Langs/en/Theme.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Site/Langs/en/Theme.ini
--------------------------------------------------------------------------------
/Application/Site/Langs/en/User.ini:
--------------------------------------------------------------------------------
1 | # My
2 | MY_PAGE_TITLE="My account"
3 | MY_ACCOUNT="My account"
4 | MY_WELCOME_INFORMATION="you are in your account page, you can modify all informations about you and your activites"
5 | MY_HEADER_SITEOPT_OVERVIEW="Overview"
6 | MY_HEADER_SITEOPT_CHANGEINFORMATIONS="Change informations"
7 | MY_CHANGE_IMAGE_TITLE="Change image"
8 | MY_CHANGE_IMAGE="Select image"
9 | MY_CHANGE_NICKNAME_TITLE="Change nickname"
10 | MY_CHANGE_NICKNAME="Enter nickname"
11 | MY_CHANGE_PASSWORD_TITLE="Change password"
12 | MY_CHANGE_PASSWORD="Password"
13 | MY_CHANGE_PASSWORD_CONFIRM="Password confirm"
14 | MY_SEND="Send"
15 |
16 | # Join
17 | JOIN_PAGE_TITLE="Join the community"
18 | JOIN_COMMUNITY="Join the Sielo's community"
19 | JOIN_LOGIN="Login"
20 | JOIN_REGISTER="Register"
21 | JOIN_ERROR_PASSWORD_DOES_NOT_MATCH_CONFIRM="We are sorry but the password doesnt match with the confirm"
22 | JOIN_ERROR_ACCOUNT_ALREADY_EXISTS="We are sorry but the account already exists"
23 | JOIN_ERROR_ACCOUNT_PASSWORD_DOESNT_MATCH="We are sorry but the password doesnt match with the account password"
24 | JOIN_ERROR_ACCOUNT_PSEUDO_DOESNT_EXIST="We are sorry but the account doesnt exists"
25 | JOIN_ERROR_ACCOUNT_PSEUDO_OR_PASSWORD_IS_NOT_SET="We are sorry but the password or the username is not set"
26 |
27 | # Account
28 | ACCOUNT_PAGE_TITLE="Account of"
29 |
30 | # Utils
31 | CHOOSE_LANGUAGE="Choose language"
32 | DATE_MONTHS=" January, February, March, April, May, June, July, August, September, October, November, December"
33 | DATE_DAYS=" Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday"
34 | DATE_DELIMITOR="of"
--------------------------------------------------------------------------------
/Application/Site/Langs/en/default.ini:
--------------------------------------------------------------------------------
1 | TITLE="Teste du framework web de Sielo"
2 | PAGENOTFOUND="404, We are sorry but this page doesn't exists"
3 | WELCOME="Welcome"
4 | HEADER_THISPAGE="This page"
5 | HEADER_SITEOPT="Site categories"
6 | HEADER_GALERY="Galleries"
7 | HEADER_GALERY_THEMES="Themes"
8 | HEADER_GALERY_IMAGES="Images"
9 | HEADER_SITEOPT_LANG="Choose language"
10 | HEADER_SITEOPT_PRESENTATION="Presentation page"
11 | HEADER_SITEOPT_HOME="Home page"
12 | HEADER_SITEOPT_LOGIN="Login"
13 | HEADER_SITEOPT_REGISTER="Register"
14 | HEADER_SITEOPT_ACCOUNT="My account"
15 | HEADER_SITEOPT_DISCONNECT="Disconnect"
16 | FORM_SUBMIT_BUTTON="Send"
17 | LANG_LIST="English, Français"
18 | LANG_LIST_SORTED_VALUE="en, fr"
--------------------------------------------------------------------------------
/Application/Site/Langs/fr/Home.ini:
--------------------------------------------------------------------------------
1 | # Presentation
2 | HEADER_THISPAGE_PRESENTAION_PROMO="Presentation"
3 | HEADER_THISPAGE_PRESENTAION_TABSPACE="Espaces d'onglets"
4 | HEADER_THISPAGE_PRESENTAION_FLOATING="Bouton flottant"
5 | HEADER_THISPAGE_PRESENTAION_DOWNLOAD="Télécharger"
6 | BANNER_TABSPACE="Voyez le web autrement grâce aux espaces d'onglets de Sielo. Naviguez facilement dès maintenant."
7 | ONE_TITLE="Sielo, pas seulement un navigateur web"
8 | ONE_PRESENTATION="Sielo possède toute les fonctionnalités d'un navigateur traditionnel, mais ce n'est pas tout. Avec les espaces d'onglets, fini l'excédent, utilisez le web différemment"
9 | ONE_DOWNLOAD="Télécharger"
10 | ONE_YTVIDEO_TAG="DNDkEY5hSf0"
11 | TABSPACE_TITLE="Faites plus avec les espaces d'onglets"
12 | TABSPACE_PRESENTATION="L'ère des onglets dans tous les sens est terminée"
13 | TABSPACE_FEATURE="C'est la fonctionalité qui démarque le plus Sielo. Les espaces d'onglets vous permettent de découper votre fenêtre Sielo en plusieurs espaces, comme si vous aviez plusieurs fenêtre les unes à côté des autres, mais qui interagissent entre elles. Vous pouvez redimensionner les espaces d'onglets, les cacher, les rendre muets… Cela peut permettre, entre autre, d’avoir plusieures sessions, par exemple une session réseaux sociaux, musique et travail. Ainsi, on peut cacher lespace avec la musique et le récupérer à tout moment."
14 | FLOATING_TITLE="Le Bouton Flottant"
15 | FLOATING_PRESENTATION="Soyez plus efficace et gagnez de la place"
16 | FLOATING_FEATURE="Cette autre fonctionnalité unique à Sielo permet de gagner de l'espace en dématérialisant la barre d'outils du navigateur. Sous forme d'un simple bouton mobile, cela vous permettra d'atteindre les contrôles nécessaires à votre navigation plus facilement tout en s'adaptant à votre espace de travail !"
17 | CARACTERISTICS_START="Utilisez Sielo dès maintenant"
18 | CARACTERISTICS_HELP="Un projet avec l'aide précieuse d'Hotaru, LavaPower et Kaktus"
19 | CARACTERISTICS_FREE="Gratuit"
20 | CARACTERISTICS_FREE_PRESENTATION="Sielo est gratuit, maintenant et pour toujours. C'est un projet open-source commencé en 2016, avec la conviction d'améliorer votre experience du web."
21 | CARACTERISTICS_IMPROVED="Amélioré par les contributeurs"
22 | CARACTERISTICS_IMPROVED_PRESENTATION="Sielo est open-source, cela signifie que vous pouvez nous aider avec votre savoir en développement ou en design pour améliorer Sielo tous les jours."
23 | CARACTERISTICS_CUSTOMIZABLE="Personnalisable"
24 | CARACTERISTICS_CUSTOMIZABLE_PRESENTATION="Avec son API de thème très importante, Sielo permet une très grande personnalisation, y compris pour l'utilisateur qui peut choisir les couleurs."
25 | CARACTERISTICS_FAST="Rapide"
26 | CARACTERISTICS_FAST_PRESENTATION="En utilisant la dernière version du moteur Blink, Sielo vous assure une navigation rapide sur le web."
27 | CARACTERISTICS_HELP_US="Aidez-nous"
28 | CARACTERISTICS_HELP_US_PRESENTATION="Il y a plein de façons de nous aider. Vous pouvez
faire un don, nous aider à améliorer le code source ou simplement parler de Sielo autour de vous."
29 | CARACTERISTICS_UPDATE="Mis à jour régulièrement"
30 | CARACTERISTICS_UPDATE_PRESENTATION="Je suis derrière mon écran jour et nuit pour vous apporter la meilleure expérience possible avec Sielo."
31 | DOWNLOAD_DOWNLOAD="Télécharger"
32 | DOWNLOAD_WINDOWS="Windows (64bits)"
33 | DOWNLOAD_WINDOWSSETUP="Télécharger l'installateur"
34 | DOWNLOAD_WINDOWSPORTABLE="Windows"
35 | DOWNLOAD_WINDOWSPORTABLESETUP="Télécharger la version portable"
36 | DOWNLOAD_LINUX="Linux"
37 | DOWNLOAD_LINUXSETUP="Télécharger l'AppImage"
38 | DOWNLOAD_ARCH="ArchLinux"
39 | DOWNLOAD_ARCHSETUP="Disponible sur l'AUR"
40 | DOWNLOAD_GITHUB="Github"
41 | DOWNLOAD_GITHUBSOURCE="Code source"
42 |
43 | # Home
44 |
--------------------------------------------------------------------------------
/Application/Site/Langs/fr/Theme.ini:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Site/Langs/fr/Theme.ini
--------------------------------------------------------------------------------
/Application/Site/Langs/fr/User.ini:
--------------------------------------------------------------------------------
1 | # My
2 | MY_PAGE_TITLE="Mon compte"
3 | MY_ACCOUNT=Mon compte
4 | MY_WELCOME_INFORMATION=vous voici sur votre page de gestion du compte, vous pouvez modifier toute les informations vous concernant et concernant vos activités
5 | HEADER_SITEOPT_MY_OVERVIEW=Vue générale
6 | HEADER_SITEOPT_MY_CHANGEINFORMATIONS=Changer les informations
7 | MY_CHANGE_IMAGE_TITLE=Change l'image
8 | MY_CHANGE_IMAGE=Séléctionner l'image
9 | MY_CHANGE_NICKNAME_TITLE=Changer le pseudonyme
10 | MY_CHANGE_NICKNAME=Entrez un pseudonyme
11 | MY_CHANGE_PASSWORD_TITLE=Changez le mot de passe
12 | MY_CHANGE_PASSWORD=Mot de passe
13 | MY_CHANGE_PASSWORD_CONFIRM=Confirmation de mot de passe
14 | MY_SEND=Envoyer
15 |
16 | # Join
17 | JOIN_PAGE_TITLE=Rejoignez la communauté
18 | JOIN_COMMUNITY=Rejoignez la communauté de Sielo
19 | JOIN_LOGIN=Se connecter
20 | JOIN_REGISTER=S'enregistrer
21 | JOIN_NICKNAME=Pseudo
22 | JOIN_PASSWORD=Mot de passe
23 | JOIN_SURNAME_AND_NAME=Nom et prénom
24 | JOIN_NAME=Prénom
25 | JOIN_SURNAME=Nom
26 | JOIN_CONFIRM=Confirmation
27 | JOIN_EMAIL=Email
28 | JOIN_ERROR_PASSWORD_DOES_NOT_MATCH_CONFIRM=Nous sommes désolés mais le mot de passe ne correspond pas avec la confirmation
29 | JOIN_ERROR_ACCOUNT_ALREADY_EXISTS=Nous sommes désolés mais le compte existe déjà
30 | JOIN_ERROR_ACCOUNT_PASSWORD_DOESNT_MATCH=Nous sommes désolés mais le mot de passe ne correspond pas avec celui du compte
31 | JOIN_ERROR_ACCOUNT_NICKNAME_DOESNT_EXIST=Nous sommes désolés mais le compte n'existe pas
32 | JOIN_ERROR_ACCOUNT_NICKNAME_OR_PASSWORD_IS_NOT_SET=Nous sommes désolés mais le nom d'utilisateur ou le mot de passe n'est pas définit
33 |
34 | # Account
35 | ACCOUNT_PAGE_TITLE=Compte de
36 |
37 | # Utils
38 | CHOOSE_LANGUAGE=Choisissez une langue
39 | DATE_MONTHS= Janvier, Février, Mars, Avril, Mai, Juin, Juillet, Août, Septembre, Octobre, Novembre, Décembre
40 | DATE_DAYS= Lundi, Mardi, Mercredi, Jeudi, Vendredi, Samedi, Dimanche
41 | DATE_DELIMITOR=
--------------------------------------------------------------------------------
/Application/Site/Langs/fr/default.ini:
--------------------------------------------------------------------------------
1 | PAGENOTFOUND="404, Nous sommes désolés mais cette page n'existe pas"
2 | WELCOME="Bonjour"
3 | HEADER_THISPAGE="Cette page"
4 | HEADER_SITEOPT="Catégories du site"
5 | HEADER_GALERY="Galleries"
6 | HEADER_GALERY_THEMES="Thèmes"
7 | HEADER_GALERY_IMAGES="Images"
8 | HEADER_SITEOPT_LANG="Choisisez un langage"
9 | HEADER_SITEOPT_PRESENTATION="Page de présentation"
10 | HEADER_SITEOPT_HOME="Page d'accueil"
11 | HEADER_SITEOPT_LOGIN="Se connecter"
12 | HEADER_SITEOPT_REGISTER="S'enregistrer"
13 | HEADER_SITEOPT_ACCOUNT="Mon compte"
14 | HEADER_SITEOPT_DISCONNECT="Se déconnecter"
15 | FORM_SUBMIT_BUTTON="Envoyer"
16 | LANG_LIST="English, Français"
17 | LANG_LIST_SORTED_VALUE="en, fr"
--------------------------------------------------------------------------------
/Application/Site/Model/Theme.php:
--------------------------------------------------------------------------------
1 | db = $this->getDb();
21 | }
22 |
23 | public function getTheme($themeName)
24 | {
25 |
26 | }
27 |
28 | public function getThemes()
29 | {
30 |
31 | }
32 |
33 | public function addTheme()
34 | {
35 |
36 | }
37 |
38 | public function deleteTheme()
39 | {
40 |
41 | }
42 | }
--------------------------------------------------------------------------------
/Application/Site/Model/User.php:
--------------------------------------------------------------------------------
1 | db = $this->getDb();
25 |
26 | }
27 |
28 | /**
29 | * createAccount
30 | *
31 | * @param string $name
32 | * @param string $surname
33 | * @param string $nickname
34 | * @param string $password
35 | * @param string $confirm
36 | * @param string $email
37 | *
38 | * @return string
39 | * @throws \Exception
40 | */
41 | public function createAccount(string $name, string $surname, string $nickname, string $password, string $confirm, string $email)
42 | {
43 | if($password === $confirm)
44 | {
45 | if($this->accountExists($nickname, $email) === false)
46 | {
47 | $this->db->insert('`user`')->column(['name', 'surname', 'nickname', 'password', 'email', 'registrationDate'])->values([':name', ':surname', ':nickname', ':password', ':email', ':date']);
48 | $this->db->appendParameters([':name' => $name, ':surname' => $surname, ':nickname' => $nickname, ':password' => password_hash($password, PASSWORD_DEFAULT), ':email' => $email, ':date' => date('Y-m-d H:i:s')]);
49 | $this->db->execute();
50 | return 'Done';
51 | } else {
52 | return 'Already exists';
53 | }
54 | } else {
55 | return 'Password does not match';
56 | }
57 | }
58 |
59 | /**
60 | * deleteAccount
61 | *
62 | * @param string $name
63 | * @param string $confirm
64 | */
65 | public function deleteAccount(string $name, string $confirm)
66 | {
67 | $this->db->select('*')->from('`user`')->execute();
68 | $accounts = $this->db->loadObjectList();
69 | foreach ($accounts as $account)
70 | {
71 | if($account->name === $name && password_verify($confirm, $account->password) === true) {
72 | return;
73 | }
74 | }
75 | }
76 |
77 | /**
78 | * getAccount
79 | *
80 | * @param string $name
81 | *
82 | * @return mixed
83 | */
84 | public function getAccount($name)
85 | {
86 | if($name)
87 | {
88 | $this->db->select('*')->from('`user`')->where('`nickname` = \''.$name.'\'');
89 | $account = $this->db->execute()->loadObjectList();
90 | $this->db->select('title')->from('usergroup_map')->join('inner', 'usergroups', 'usergroups.id = usergroup_map.usergroup')->where('`user` = \''.$name.'\'');
91 | $groups = $this->db->execute()->loadObjectList();
92 | $account[0]->usergroup = '';
93 | foreach ($groups as $group)
94 | {
95 | $account[0]->usergroup .= $group->title.', ';
96 | }
97 | $account[0]->usergroup = explode(', ', $account[0]->usergroup);
98 | return $account;
99 | }
100 | }
101 |
102 | /**
103 | * accountExists
104 | *
105 | * @param string $nickname
106 | * @param string $email
107 | *
108 | * @return bool
109 | * @throws \Exception
110 | */
111 | public function accountExists($nickname, $email)
112 | {
113 | if($nickname && $email)
114 | {
115 | $this->db->select('`nickname`, `email`')->from('`user`')->execute();
116 | $accounts = $this->db->loadObjectList();
117 | foreach ($accounts as $account)
118 | {
119 | if($nickname === $account->nickname && $email === $account->email)
120 | {
121 | return true;
122 | }
123 | }
124 | return false;
125 | } else {
126 | throw new \Exception('[AccountExists]: Name, Nickname or email is not set');
127 | }
128 | }
129 |
130 | /**
131 | * @param string $nickname
132 | * @param string $password
133 | *
134 | * @return string
135 | */
136 | public function login($nickname, $password)
137 | {
138 | if($nickname && $password)
139 | {
140 | $this->db->select('*')->from('`user`')->execute();
141 | $accounts = $this->db->loadObjectList();
142 | foreach ($accounts as $account)
143 | {
144 | if($nickname === $account->nickname)
145 | {
146 | if(password_verify($password, $account->password))
147 | {
148 | Session::connect();
149 | return 'Done';
150 | } else {
151 | return 'Account password doesn\'t match';
152 | }
153 | }
154 | }
155 | return 'Account nickname doesn\'t exists';
156 | } else {
157 | return 'Account nickname or password is not set';
158 | }
159 | }
160 | }
--------------------------------------------------------------------------------
/Application/Site/View/Default/404.php:
--------------------------------------------------------------------------------
1 |
2 | lang->getKey('PAGENOTFOUND'); ?>
3 |
--------------------------------------------------------------------------------
/Application/Site/View/Default/default.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | htmlDocument->header->parseHeaderDatas();
5 | ?>
6 |
Sielo
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
49 |
50 |
51 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/Application/Site/View/Home/home.php:
--------------------------------------------------------------------------------
1 |
5 |
6 | '.$this->params['lang']->getKey('HEADER_THISPAGE').'
7 |
11 |
12 |
13 | '.$this->params['lang']->getKey('HEADER_SITEOPT').'
14 |
20 |
21 | ';
22 | $this->htmlDocument->body->generateSpecificHtmlVar('headerNav', $html);
23 | ?>
24 |
25 |
26 |
27 |
28 |
29 | Sielo home page
30 | params['lang']->getKey('WELCOME').' '.$this->params['account']->nickname; ?>
31 |
32 |

33 |
34 | Next
35 |
36 |
37 |
48 |
49 |
50 |
51 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/Application/Site/View/Home/presentation.php:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | '.$this->params['lang']->getKey('HEADER_THISPAGE').'
6 |
12 |
13 |
14 | '.$this->params['lang']->getKey('HEADER_SITEOPT').'
15 | ';
20 | $this->htmlDocument->body->generateSpecificHtmlVar('headerNav', $html);
21 | ?>
22 |
23 |
24 |
25 |
26 |
30 |

31 |
32 | Next
33 |
34 |
35 |
36 |
46 |
47 |
48 |
49 |
50 |
51 |
55 |
lang->getKey('TABSPACE_FEATURE'); ?>
56 |
57 | Next
58 |
59 |
60 |
61 |
72 |
73 |
74 |
118 |
119 |
120 |
121 |
122 |
123 | lang->getKey('DOWNLOAD_DOWNLOAD'); ?>
124 |
125 |
164 |
165 | Next
166 |
--------------------------------------------------------------------------------
/Application/Site/View/User/account.php:
--------------------------------------------------------------------------------
1 | params['account']->nickname === \Core\Session\Session::getParam('nickname'))
5 | header('Location: /Sielo/account/my');
6 |
7 | ?>
8 |
9 |
10 |
20 |
21 |
22 |
23 |
32 |

33 |
34 | Next
35 |
36 |
37 |
85 |
86 |
87 |
88 |
89 | Contributions de l'utilisateur: params['account']->nickname; ?>
90 |
91 |
92 |
93 | Aucune contribution
94 |
95 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/Application/Site/View/User/join.php:
--------------------------------------------------------------------------------
1 |
5 |
6 | '.$this->params['lang']->getKey('HEADER_THISPAGE').'
7 |
11 |
12 |
13 | '.$this->params['lang']->getKey('HEADER_SITEOPT').'
14 |
18 |
19 | ';
20 | $this->htmlDocument->body->generateSpecificHtmlVar('headerNav', $html);
21 | ?>
22 |
23 |
24 |
29 |

30 |
31 | Next
32 |
33 |
34 |
35 |
36 |
37 | params['lang']->getKey('JOIN_LOGIN') ?>
38 |
39 |
40 | params['typeOf'])) { if($this->params['typeOf'] === 'login') echo '
×'.$this->params['returnError'].'
'; } ?>
41 |
54 |
55 |
Next
56 |
57 |
58 |
59 |
60 |
61 |
62 | params['lang']->getKey('JOIN_REGISTER') ?>
63 |
64 |
65 | params['typeOf'])) { if($this->params['typeOf'] === 'register') echo '
×'.$this->params['returnError'].'
'; } ?>
66 |
89 |
90 |
91 |
--------------------------------------------------------------------------------
/Application/Site/View/User/lang.php:
--------------------------------------------------------------------------------
1 |
3 |
4 | '.$this->params['lang']->getKey('CHOOSE_LANGUAGE').'
5 |
6 |
7 | '.$this->params['lang']->getKey('HEADER_SITEOPT').'
8 |
11 |
12 | ';
13 | $this->htmlDocument->body->generateSpecificHtmlVar('headerNav', $html);
14 | ?>
15 |
16 |
17 |
18 | params['lang']->getKey('CHOOSE_LANGUAGE') ?>
19 |
20 |
33 |
34 |
--------------------------------------------------------------------------------
/Application/Site/View/User/my.php:
--------------------------------------------------------------------------------
1 |
5 |
6 | '.$this->params['lang']->getKey('HEADER_THISPAGE').'
7 |
11 |
12 |
13 | '.$this->params['lang']->getKey('HEADER_SITEOPT').'
14 |
18 |
19 |
20 | '.$this->params['lang']->getKey('HEADER_GALERY').'
21 |
25 |
26 | ';
27 | $this->htmlDocument->body->generateSpecificHtmlVar('headerNav', $html);
28 | ?>
29 |
30 |
31 |
32 | params['lang']->getKey('MY_ACCOUNT'); ?>
33 | params['lang']->getKey('WELCOME').' '.$this->params['account']->nickname.' '.$this->params['lang']->getKey('MY_WELCOME_INFORMATION'); ?>
34 |
35 |

36 |
37 | Next
38 |
39 |
40 |
41 |
42 |
43 | Informations overview
44 |
45 |
46 | Next
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Core/Autoloader/Register.php:
--------------------------------------------------------------------------------
1 | register();
21 | }
22 |
23 | private function register()
24 | {
25 |
26 | spl_autoload_register([__CLASS__, 'load']);
27 |
28 | }
29 |
30 | private function load($className)
31 | {
32 |
33 | if(strpos($className, 'Core') === 0)
34 | {
35 |
36 | $className = str_replace('Core\\', '', $className);
37 | require_once $_SERVER['DOCUMENT_ROOT'].'\\Sielo\\Core\\'.$className.'.php';
38 |
39 | } else if(strpos($className,'App') === 0)
40 | {
41 |
42 | $className = str_replace('Application\\', '', $className);
43 | require_once $_SERVER['DOCUMENT_ROOT'].'\\Sielo\\Application\\'.$className.'.php';
44 |
45 | }
46 |
47 | }
48 | }
--------------------------------------------------------------------------------
/Core/Cache/Cache.php:
--------------------------------------------------------------------------------
1 | cachePath = 'Application/'.$type.'/Cache/';
22 |
23 | }
24 |
25 | public function add($fileName, $content)
26 | {
27 | file_put_contents($this->cachePath.$fileName.'.html', $content);
28 | }
29 |
30 | public function delete($fileName)
31 | {
32 | unlink($this->cachePath.$fileName.'.html');
33 | }
34 |
35 | public function isExpired($fileName)
36 | {
37 | $expireTime = time() - Config::getInstance()->getCacheExpirationTime();
38 | if (file_exists($this->cachePath.$fileName.'.html') && filemtime($this->cachePath.$fileName.'.html') > $expireTime)
39 | {
40 | return false;
41 | } else {
42 | return true;
43 | }
44 | }
45 |
46 | public function get($fileName)
47 | {
48 | echo readfile($this->cachePath.$fileName.'.html');
49 | }
50 |
51 | }
--------------------------------------------------------------------------------
/Core/Config/Config.php:
--------------------------------------------------------------------------------
1 | configFile = new IniFile(__DIR__.'\config.ini');
32 | }
33 |
34 | public function setDbInformations($db, $user, $host, $password)
35 | {
36 | $this->configFile->alterKey('DB_NAME', $db);
37 | $this->configFile->alterKey('DB_USER', $user);
38 | $this->configFile->alterKey('DB_HOST', $host);
39 | $this->configFile->alterKey('DB_USER_PASSWORD', $password);
40 | }
41 |
42 | public function getDbInformations()
43 | {
44 | return ['dbName' => $this->configFile->getKey('DB_NAME'), 'dbHost' => $this->configFile->getKey('DB_HOST'), 'dbUser' => $this->configFile->getKey('DB_USER'), 'dbUserPassword' => $this->configFile->getKey('DB_USER_PASSWORD')];
45 | }
46 |
47 | public function setSiteBasePath($basePath)
48 | {
49 | $this->configFile->alterKey('SITE_BASE_PATH', $basePath);
50 | }
51 |
52 | public function getSiteBasePath()
53 | {
54 | return $this->configFile->getKey('SITE_BASE_PATH');
55 | }
56 |
57 | public function setFrameworkBasePath($basePath)
58 | {
59 | $this->configFile->alterKey('FRAMEWORK_BASE_PATH', $basePath);
60 | }
61 |
62 | public function getFrameworkBasePath()
63 | {
64 | return $this->configFile->getKey('FRAMEWORK_BASE_PATH');
65 | }
66 |
67 | public function setCacheExpirationTime($expirationTime)
68 | {
69 | $this->configFile->alterKey('CACHE_EXPIRATION_TIME', $expirationTime);
70 | }
71 |
72 | public function getCacheExpirationTime()
73 | {
74 | return intval($this->configFile->getKey('CACHE_EXPIRATION_TIME'));
75 | }
76 |
77 | public function setCookieExpirationTime($expirationTime)
78 | {
79 | $this->configFile->alterKey('COOKIE_EXPIRATION_TIME', $expirationTime);
80 | }
81 |
82 | public function getCookieExpirationTime()
83 | {
84 | return intval($this->configFile->getKey('COOKIE_EXPIRATION_TIME'));
85 | }
86 |
87 | public function setPathInformations($site, $framework)
88 | {
89 | $this->configFile->alterKey('SITE_BASE_PATH', $site);
90 | $this->configFile->alterKey( 'APPLICATION_PATH', $site);
91 | $this->configFile->alterKey('FRAMEWORK_BASE_PATH', $framework);
92 | }
93 |
94 | public function getPathInformations()
95 | {
96 | return ['FrameworkPath' => $this->configFile->getKey('FRAMEWORK_PATH'), 'ApplicationPath' => $this->configFile->getKey('APPLICATION_PATH'), 'SitePath' => $this->configFile->getKey('SITE_PATH')];
97 | }
98 | }
--------------------------------------------------------------------------------
/Core/Config/config.ini:
--------------------------------------------------------------------------------
1 | DB_NAME=sielo
2 | DB_USER=root
3 | DB_HOST=localhost
4 | DB_USER_PASSWORD=
5 | CACHE_EXPIRATION_TIME=3600
6 | COOKIE_EXPIRATION_TIME=1200
7 | FRAMEWORK_PATH=Core
8 | APPLICATION_PATH=Application
9 | SITE_PATH=Sielo
--------------------------------------------------------------------------------
/Core/Cookie/Cookie.php:
--------------------------------------------------------------------------------
1 | getCookieExpirationTime();
20 | echo $machin;
21 | var_dump(setcookie($name, $value, time()+$machin, $path));
22 | }
23 | }
24 |
25 | public static function deleteCookie($name)
26 | {
27 | unset($_COOKIE[$name]);
28 | }
29 |
30 | public static function getCookie($name)
31 | {
32 | if(self::cookieExists($name))
33 | {
34 | return $_COOKIE[$name];
35 | }
36 | }
37 |
38 | public static function cookieExists($name)
39 | {
40 | if(key_exists($name, $_COOKIE))
41 | return true;
42 | return false;
43 | }
44 | }
--------------------------------------------------------------------------------
/Core/Database/Connector.php:
--------------------------------------------------------------------------------
1 | params = $config->getDbInformations();
31 | }
32 |
33 | public function getPDO()
34 | {
35 | try {
36 | $pdoStatement = new \PDO('mysql:dbname='.$this->params['dbName'].';host='.$this->params['dbHost'], $this->params['dbUser'], $this->params['dbUserPassword']);
37 | } catch(\PDOException $e)
38 | {
39 | throw new \DatabaseException('PDOError, connection not initalised: '.$e);
40 | }
41 | return $pdoStatement;
42 | }
43 | }
--------------------------------------------------------------------------------
/Core/Database/DatabaseException.php:
--------------------------------------------------------------------------------
1 | connectorInstance = Connector::getInstance();
23 | $this->getDb();
24 | }
25 |
26 | private function getDb()
27 | {
28 | $this->db = $this->connectorInstance->getPDO();
29 | }
30 |
31 | public function select($argument)
32 | {
33 | $this->preparedQuery .= 'SELECT '.$argument;
34 | $this->queryType = 'SELECT';
35 | return $this;
36 | }
37 |
38 | public function from($table)
39 | {
40 | if($this->queryType === 'SELECT')
41 | {
42 | $this->preparedQuery .= ' FROM '.$table;
43 | return $this;
44 | }
45 | }
46 |
47 | public function where($condition)
48 | {
49 | if($this->queryType === 'SELECT')
50 | {
51 | $this->preparedQuery .= ' WHERE '.$condition;
52 | return $this;
53 | }
54 | }
55 |
56 | public function insert($table)
57 | {
58 | $this->preparedQuery .= 'INSERT INTO '.$table;
59 | $this->queryType = 'INSERT';
60 | return $this;
61 | }
62 |
63 | public function column($columns)
64 | {
65 | if($this->queryType === 'INSERT')
66 | {
67 | if(is_array($columns))
68 | $columns = implode(', ', $columns);
69 | $this->preparedQuery .= ' ('.$columns.')';
70 | return $this;
71 | }
72 | return null;
73 | }
74 |
75 | public function values($values)
76 | {
77 | if($this->queryType === 'INSERT')
78 | {
79 | if(is_array($values))
80 | $values = implode(', ', $values);
81 | $this->preparedQuery .= ' VALUES ('.$values.')';
82 | return $this;
83 | }
84 | return null;
85 | }
86 |
87 | public function join($joinType, $table, $on = null)
88 | {
89 | switch ($joinType)
90 | {
91 | case 'inner':
92 | $this->preparedQuery .= ' INNER JOIN '.$table.' ON '.$on;
93 | break;
94 | case 'cross':
95 | $this->preparedQuery .= ' CROSS JOIN '.$table;
96 | break;
97 | case 'full':
98 | $this->preparedQuery .= ' FULL JOIN '.$table.' ON '.$on;
99 | break;
100 | case 'left':
101 | $this->preparedQuery .= ' LEFT JOIN '.$table.' ON '.$on;
102 | break;
103 | }
104 | return $this;
105 | }
106 |
107 | public function appendParameters(array $params)
108 | {
109 | $this->params = $params;
110 | return $this;
111 | }
112 |
113 | public function execute()
114 | {
115 | try {
116 | $query = $this->db->prepare($this->preparedQuery);
117 | $query->execute($this->params);
118 | $this->queryExecuted = $query;
119 | $this->preparedQuery = '';
120 | } catch (\PDOException $e)
121 | {
122 | echo $e;
123 | }
124 | return $this;
125 | }
126 |
127 | public function loadObjectList()
128 | {
129 | return $this->queryExecuted->fetchAll(\PDO::FETCH_OBJ);
130 | }
131 |
132 | public function loadAssoc()
133 | {
134 | return $this->queryExecuted->fetchAll(\PDO::FETCH_ASSOC);
135 | }
136 |
137 | public function loadColumn()
138 | {
139 | return $this->queryExecuted->fetchAll(\PDO::FETCH_COLUMN);
140 | }
141 |
142 | public function getCurrentQuery()
143 | {
144 | return $this->preparedQuery;
145 | }
146 | }
--------------------------------------------------------------------------------
/Core/Emitter/Emitter.php:
--------------------------------------------------------------------------------
1 | hasListener($event))
44 | {
45 | foreach ($this->listeners[$event] as $listener)
46 | {
47 | $listener->handle($args);
48 | if($listener->stopPropagation)
49 | {
50 | break;
51 | }
52 | }
53 | }
54 | }
55 |
56 | /**
57 | * @param string $event
58 | * @param callable $callable
59 | * @param int $priority
60 | *
61 | * @return Listener
62 | */
63 | public function on(string $event, callable $callable, int $priority = 0) : Listener
64 | {
65 | if(!$this->hasListener($event))
66 | {
67 | $this->listeners[$event] = [];
68 | }
69 | $this->callableExistsForEvent($event, $callable);
70 | $listener = new Listener($callable, $priority);
71 | $this->listeners[$event][] = $listener;
72 | $this->sortListeners($event);
73 | return $listener;
74 | }
75 |
76 | /**
77 | * @param string $event
78 | * @param callable $callable
79 | * @param int $priority
80 | *
81 | * @return Listener
82 | */
83 | public function once(string $event, callable $callable, int $priority = 0) : Listener
84 | {
85 |
86 | return $this->on($event, $callable, $priority)->once();
87 |
88 | }
89 |
90 | /**
91 | * @param string $event
92 | *
93 | * @return bool
94 | */
95 | private function hasListener(string $event): bool {
96 | return array_key_exists($event, $this->listeners);
97 | }
98 |
99 | /**
100 | * @param $event
101 | */
102 | private function sortListeners($event)
103 | {
104 | uasort($this->listeners[$event], function($a, $b) {
105 | return $a->priority < $b->priority;
106 | });
107 | }
108 |
109 | private function callableExistsForEvent(string $event, callable $callback): bool
110 | {
111 |
112 | foreach ($this->listeners[$event] as $listener)
113 | {
114 | if($listener->callback === $callback)
115 | {
116 | throw new EventException();
117 | }
118 | }
119 | return false;
120 | }
121 | }
--------------------------------------------------------------------------------
/Core/Emitter/EventException.php:
--------------------------------------------------------------------------------
1 | callback = $callback;
48 | $this->priority = $priority;
49 | }
50 |
51 | /**
52 | * @param array $args
53 | *
54 | * @return mixed
55 | */
56 | public function handle(array $args)
57 | {
58 | if ($this->once && $this->calls > 0)
59 | {
60 | return null;
61 | }
62 | $this->calls++;
63 | return call_user_func($this->callback, $args);
64 | }
65 |
66 | /**
67 | * @param bool $once
68 | *
69 | * @return Listener
70 | */
71 | public function once (): Listener
72 | {
73 | $this->once = true;
74 | return $this;
75 | }
76 |
77 | /**
78 | *
79 | */
80 | public function stopPropagation()
81 | {
82 | $this->stopPropagation = true;
83 | return $this;
84 | }
85 |
86 | }
--------------------------------------------------------------------------------
/Core/File/File.php:
--------------------------------------------------------------------------------
1 | filePath = $path;
18 | }
19 |
20 | public function createFile()
21 | {
22 | file_put_contents($this->filePath, '');
23 | }
24 |
25 | public function resetFile()
26 | {
27 | $this->createFile();
28 | }
29 |
30 | public function deleteFile()
31 | {
32 | if($this->fileExists())
33 | {
34 | return unlink($this->filePath);
35 | }
36 | }
37 |
38 | protected function fileExists()
39 | {
40 | return file_exists($this->filePath);
41 | }
42 | }
--------------------------------------------------------------------------------
/Core/File/FileException.php:
--------------------------------------------------------------------------------
1 | init();
20 | }
21 |
22 | public function getKey($keyName)
23 | {
24 | if($this->fileExists())
25 | {
26 | if($this->keyExists($keyName))
27 | {
28 | return $this->keys[$keyName];
29 | } else {
30 | return false;
31 | }
32 | } else {
33 | $this->createFile();
34 | return false;
35 | }
36 | }
37 |
38 | public function addKey($keyName, $value, $quote = true)
39 | {
40 | if($this->fileExists())
41 | {
42 | if(!$this->keyExists($keyName))
43 | {
44 | $this->keys[$keyName] = $value;
45 | $content = '';
46 | foreach ($this->keys as $key => $value)
47 | {
48 | $content .= $key.'='.$value."\n";
49 | }
50 | file_put_contents($this->filePath, $content);
51 | } else {
52 | throw new FileException('[Fine: ini] => addKey: key '.$keyName.' already exists, if u want to modify it use the alterKey function');
53 | }
54 | } else {
55 | $this->createFile();
56 | $this->addKey($keyName, $value, $quote);
57 | }
58 | }
59 |
60 | public function alterKey($keyName, $value, $quote = true)
61 | {
62 | if($this->fileExists())
63 | {
64 | if($this->keyExists($keyName))
65 | {
66 | $this->keys[$keyName] = $value;
67 | $content = '';
68 | foreach ($this->keys as $key => $value)
69 | {
70 | $content .= $key.'='.$value."\n";
71 | }
72 | file_put_contents($this->filePath, $content);
73 | } else {
74 | return false;
75 | }
76 | } else {
77 | $this->createFile();
78 | $this->alterKey($keyName, $value, $quote);
79 | }
80 | }
81 |
82 | public function deleteKey($keyName)
83 | {
84 | if($this->fileExists())
85 | {
86 | if(isset($this->keys))
87 | {
88 | if($this->keyExists($keyName))
89 | {
90 | unset($this->keys[$keyName]);
91 | $content = '';
92 | foreach ($this->keys as $key => $value)
93 | {
94 | $content .= $key.'='.$value."\n";
95 | }
96 | file_put_contents($this->filePath, $content);
97 | } else {
98 | throw new FileException('[File: ini] => deleteKey: key '.$keyName.' don\'t exist');
99 | }
100 | } else {
101 | $this->init();
102 | return;
103 | }
104 | } else {
105 | $this->createFile();
106 | return;
107 | }
108 | }
109 |
110 | protected function keyExists($keyName)
111 | {
112 | return isset($this->keys[$keyName]);
113 | }
114 |
115 | protected function init()
116 | {
117 | $this->keys = parse_ini_file($this->filePath);
118 | }
119 | }
--------------------------------------------------------------------------------
/Core/File/OtherFile.php:
--------------------------------------------------------------------------------
1 | lines = file($path);
20 | }
21 |
22 | public function getLine(int $line)
23 | {
24 | if($this->lineExists($line))
25 | {
26 | return $this->lines[$line];
27 | }
28 | }
29 |
30 | public function deleteLine(int $line)
31 | {
32 | if($this->lineExists($line))
33 | {
34 | unset($this->lines[$line]);
35 | }
36 | file_put_contents($this->filePath, $this->lines);
37 | }
38 |
39 | public function alterLine(int $line, string $newValue)
40 | {
41 | if($this->lineExists($line))
42 | {
43 | $this->lines[$line] = $newValue;
44 | }
45 | file_put_contents($this->filePath, $this->lines);
46 | }
47 |
48 | private function lineExists(int $line)
49 | {
50 | return isset($this->lines[$line]);
51 | }
52 |
53 | }
--------------------------------------------------------------------------------
/Core/File/XmlFile.php:
--------------------------------------------------------------------------------
1 | specificHtmlVarExists($name))
37 | $this->specificHtmlVar[$name] = $html;
38 | }
39 |
40 | public function getSpecificHtmlVar($name)
41 | {
42 | if($this->specificHtmlVarExists($name))
43 | return $this->specificHtmlVar[$name];
44 | else
45 | return false;
46 | }
47 |
48 | private function specificHtmlVarExists($name)
49 | {
50 | if(isset($this->specificHtmlVar[$name]))
51 | return true;
52 | return false;
53 | }
54 |
55 | }
--------------------------------------------------------------------------------
/Core/Html/Document.php:
--------------------------------------------------------------------------------
1 | header = Header::getInstance();
32 | $this->body= Body::getInstance();
33 | }
34 | }
--------------------------------------------------------------------------------
/Core/Html/Header.php:
--------------------------------------------------------------------------------
1 | $param)
34 | {
35 | $meta .= $key.'="'.$param.'"';
36 | }
37 | $meta .= '>';
38 | $this->meta[] = $meta;
39 | }
40 |
41 | public function addScript($url, $type = null)
42 | {
43 | $this->scripts[] = '';
44 | }
45 |
46 | public function addScriptDeclaration($script)
47 | {
48 | $this->scripts[] = '';
49 | }
50 |
51 | public function addStyleSheet($url, $rel = null, $type = null)
52 | {
53 | $this->stylesheet[] = '
';
54 | }
55 |
56 | public function addStyleSheetDeclaration($rules)
57 | {
58 | $this->stylesheet[] = '';
59 | }
60 |
61 | public function setTitle($title)
62 | {
63 | $this->title = '
'.$title.'';
64 | }
65 |
66 | public function parseHeaderDatas()
67 | {
68 | foreach ($this->meta as $meta)
69 | {
70 | echo $meta;
71 | }
72 | echo $this->title;
73 | foreach ($this->scripts as $script)
74 | {
75 | echo $script;
76 | }
77 | foreach ($this->stylesheet as $stylesheet)
78 | {
79 | echo $stylesheet;
80 | }
81 | }
82 |
83 | }
--------------------------------------------------------------------------------
/Core/Language/Lang.php:
--------------------------------------------------------------------------------
1 | lang = $lang;
23 | $this->basePart = $basePart;
24 | if(!is_null($basePart))
25 | {
26 | $this->files['default'] = ["file" => new IniFile($_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.SITE_PATH.DIRECTORY_SEPARATOR.APPLICATION_PATH.DIRECTORY_SEPARATOR.$basePart.DIRECTORY_SEPARATOR.'Langs'.DIRECTORY_SEPARATOR.$lang.DIRECTORY_SEPARATOR.'default.ini'), "use" => true];
27 | }
28 | }
29 |
30 | public function addFile(string $fileName, string $part = null)
31 | {
32 | if(!is_null($this->basePart))
33 | {
34 | $filePath = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.SITE_PATH.DIRECTORY_SEPARATOR.APPLICATION_PATH.DIRECTORY_SEPARATOR.((isset($part)) ? $part.DIRECTORY_SEPARATOR : (isset($this->basePart) ? $this->basePart.DIRECTORY_SEPARATOR : '' )).'Langs'.DIRECTORY_SEPARATOR.$this->lang.DIRECTORY_SEPARATOR.$fileName.'.ini';
35 | if(file_exists($filePath))
36 | {
37 | $this->files[$fileName] = ["file" => new IniFile($filePath), "use" => true];
38 | } else {
39 | throw new LangException('[Lang] {addFile} => file given: '.$fileName.' doesn\'t exists');
40 | }
41 | } else {
42 | throw new LangException('[Lang] {addFile} => Base site part is not set. Please give a part for search the file');
43 | }
44 | }
45 |
46 | public function useFile(string $fileName, bool $use)
47 | {
48 | if($this->fileExists($fileName))
49 | {
50 | $this->files[$fileName]['use'] = $use;
51 | } else {
52 | throw new LangException('[Lang] {useFile} => File given doesn\'t exists');
53 | }
54 | }
55 |
56 | public function deleteFile($fileName)
57 | {
58 | if($this->fileExists($fileName))
59 | {
60 | unset($this->files[$fileName]);
61 | } else {
62 | throw new LangException('[Lang] {deleteFile} => File given doesn\'t exists');
63 | }
64 | }
65 |
66 | public function getKey($keyName)
67 | {
68 | foreach ($this->files as $key => $file)
69 | {
70 | if($file['use'] === true)
71 | {
72 | $value = $file['file']->getKey($keyName);
73 | if($value !== false)
74 | {
75 | return $value;
76 | }
77 | }
78 | }
79 | }
80 |
81 | private function fileExists(string $fileName)
82 | {
83 | return isset($this->files[$fileName]);
84 | }
85 | }
--------------------------------------------------------------------------------
/Core/Language/LangException.php:
--------------------------------------------------------------------------------
1 | htmlDocument = Document::getInstance();
70 | $this->type = $type;
71 | $this->emitter = Emitter::getInstance();
72 | }
73 |
74 | public function loadModel($modelName)
75 | {
76 | $this->$modelName = $this->getModel($modelName, $this->type);
77 | }
78 |
79 | /**
80 | * @param string $lang
81 | * @param string $langFileName
82 | * @param string $sitePart
83 | */
84 | public function setLang(string $lang, string $sitePart)
85 | {
86 | $this->lang = new Lang((isset($lang)) ? $lang : $this->defaultlang, $sitePart);
87 | }
88 |
89 | /**
90 | * @param string $modelName
91 | * @param string $type
92 | *
93 | * @return mixed
94 | */
95 | private function getModel(string $modelName, string $type)
96 | {
97 | if($modelName && $type)
98 | {
99 | $modelPath = 'Application\\'.$type.'\\Model\\'.$modelName;
100 |
101 | return new $modelPath();
102 | } else {
103 | return null;
104 | }
105 | }
106 |
107 | // /**
108 | // * @param bool $param
109 | // */
110 | // protected function useCache(bool $param = true)
111 | // {
112 | // $this->cacheActive = $param;
113 | // }
114 |
115 |
116 | /**
117 | * @param mixed $param
118 | * @param string|null $name
119 | */
120 | public function setParam($param, string $name = null)
121 | {
122 | if(is_array($param) && is_array($name))
123 | {
124 | foreach ($param as $key => $item)
125 | {
126 | $this->params[$name[$key]] = $item;
127 | }
128 | } else if(isset($name)) {
129 | $this->params[$name] = $param;
130 | } else {
131 | $this->params = $param;
132 | }
133 | }
134 |
135 | /**
136 | * @param string $viewName
137 | */
138 | public function render(string $viewName, $cacheName = '')
139 | {
140 | ob_start();
141 | $this->params;
142 | $this->htmlDocument;
143 | require $_SERVER['DOCUMENT_ROOT'].'/Sielo/Application/'.$this->type.'/View/'.$viewName.'.php';
144 | $includedContent = ob_get_contents();
145 | ob_end_clean();
146 | ob_start();
147 | require_once $_SERVER['DOCUMENT_ROOT'].'/Sielo/Application/'.$this->type.'/View/'.$this->defaultView.'.php';
148 | $content = ob_get_contents();
149 | ob_end_clean();
150 | echo $content;
151 |
152 | /*
153 | *
154 | * Cache system
155 | *
156 | */
157 | // if($this->cache->isExpired($viewName.$cacheName) === false && $this->cacheActive === true)
158 | // {
159 | // $this->cache->get($viewName.$cacheName);
160 | // } else {
161 | // ob_start();
162 | // $this->params;
163 | // $this->htmlDocument;
164 | // require $_SERVER['DOCUMENT_ROOT'].'/Sielo/Application/'.$this->type.'/View/'.$viewName.'.php';
165 | // $includedContent = ob_get_contents();
166 | // ob_end_clean();
167 | // ob_start();
168 | // require_once $_SERVER['DOCUMENT_ROOT'].'/Sielo/Application/'.$this->type.'/View/'.$this->defaultView.'.php';
169 | // $content = ob_get_contents();
170 | // ob_end_clean();
171 | // if($this->cacheActive === true)
172 | // $this->cache->add($viewName.$cacheName, $content);
173 | // echo $content;
174 | // }
175 | /*
176 | *
177 | * //
178 | *
179 | */
180 | }
181 |
182 | }
--------------------------------------------------------------------------------
/Core/MVC/BaseModel.php:
--------------------------------------------------------------------------------
1 | db = $this->getDb();
20 | }
21 |
22 | public function getDb()
23 | {
24 | return new QueryBuilder();
25 | }
26 | }
--------------------------------------------------------------------------------
/Core/Session/Session.php:
--------------------------------------------------------------------------------
1 | path = trim($path, '/');
23 | $this->callable = $callable;
24 |
25 | }
26 |
27 | public function match($url){
28 | $url = trim($url, '/');
29 | $path = preg_replace_callback('#:([\w]+)#', [$this, 'paramMatch'], $this->path);
30 | $regex = "#^$path$#i";
31 | if(!preg_match($regex, $url, $matches)){
32 | return false;
33 | }
34 | array_shift($matches);
35 | $this->matches = $matches;
36 | return true;
37 | }
38 |
39 | private function paramMatch($match){
40 | if(isset($this->params[$match[1]])){
41 | return '(' . $this->params[$match[1]] . ')';
42 | }
43 | return '([^/]+)';
44 | }
45 |
46 | public function call(){
47 | if(is_string($this->callable)){
48 | $params = explode('#', $this->callable);
49 | $controller = "App\\ControllerInterface\\" . $params[0] . "ControllerInterface";
50 | $controller = new $controller();
51 | return call_user_func_array([$controller, $params[1]], $this->matches);
52 | } else {
53 | return call_user_func_array($this->callable, $this->matches);
54 | }
55 | }
56 |
57 | public function with($param, $regex){
58 | $this->params[$param] = str_replace('(', '(?:', $regex);
59 | return $this;
60 | }
61 |
62 | public function getUrl($params){
63 | $path = $this->path;
64 | foreach($params as $k => $v){
65 | $path = str_replace(":$k", $v, $path);
66 | }
67 | return $path;
68 | }
69 |
70 | }
--------------------------------------------------------------------------------
/Core/UrlRouter/Router.php:
--------------------------------------------------------------------------------
1 | url = $url;
13 | }
14 |
15 | public function get($path, $callable, $name = null){
16 | return $this->add($path, $callable, $name, 'GET');
17 | }
18 |
19 | public function post($path, $callable, $name = null){
20 | return $this->add($path, $callable, $name, 'POST');
21 | }
22 |
23 | private function add($path, $callable, $name, $method){
24 | $route = new Route($path, $callable);
25 | $this->routes[$method][] = $route;
26 | if(is_string($callable) && $name === null){
27 | $name = $callable;
28 | }
29 | if($name){
30 | $this->namedRoutes[$name] = $route;
31 | }
32 | return $route;
33 | }
34 |
35 | public function run(){
36 | if(!isset($this->routes[$_SERVER['REQUEST_METHOD']])){
37 | throw new RouterException('REQUEST_METHOD does not exist');
38 | }
39 | foreach($this->routes[$_SERVER['REQUEST_METHOD']] as $route){
40 | if($route->match($this->url)){
41 | return $route->call();
42 | }
43 | }
44 | throw new RouterException('No matching routes');
45 | }
46 |
47 | public function getUrl($name, $params = []){
48 | if(!isset($this->namedRoutes[$name])){
49 | throw new RouterException('No route matches this name');
50 | }
51 | return $this->namedRoutes[$name]->getUrl($params);
52 | }
53 |
54 | }
--------------------------------------------------------------------------------
/Core/UrlRouter/RouterException.php:
--------------------------------------------------------------------------------
1 | getPathInformations()['FrameworkPath']);
5 | define('APPLICATION_PATH', $config->getPathInformations()['ApplicationPath']);
6 | define('SITE_PATH', $config->getPathInformations()['SitePath']);
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | get('/', function () { if(\Core\Session\Session::isConnected()) header('Location: /Sielo/home'); else header('Location: /Sielo/presentation'); });
13 | $router->get('/presentation', function () { $home = new \Application\Site\Controller\Home();$home->invokePresentationPage(); });
14 | $router->get('/home', function () { $home = new \Application\Site\Controller\Home();$home->invokeHomePage(); });
15 | /*
16 | * Galleries
17 | */
18 | $router->get('/gallery/themes', function () { $themeListing = new \Application\Site\Controller\Themes();$themeListing->invokeListing(); });
19 | $router->get('/gallery/themes/:name', function ($name) { $themeListing = new \Application\Site\Controller\ThemeGallery();$themeListing->invokeListing(); });
20 | $router->get('/gallery/images', function () { $name = str_replace('-', ' ', $name); $themeListing = new \Application\Site\Controller\ThemeGallery();$themeListing->invokeThemePage($name); });
21 | $router->get('/gallery/images/:name', function ($name) { $name = str_replace('-', ' ', $name); $themeListing = new \Application\Site\Controller\ThemeGallery();$themeListing->invokeThemePage($name); });
22 | /*
23 | * Account
24 | */
25 | $router->get('/account/listing', function () {});
26 | $router->get('/account/user/:name', function ($name) { $name = str_replace('-', ' ', $name); $userAccount = new \Application\Site\Controller\User();$userAccount->invokeAccountPage($name); });
27 | $router->get('/account/my', function () { $userAccount = new \Application\Site\Controller\User();$userAccount->invokeMyPage(); });
28 | $router->post('/account/my/changes/password', function () { });
29 | $router->post('/account/my/changes/image', function () { });
30 | $router->post('/account/my/changes/nickname', function () { });
31 | $router->get('/account/lang', function () { $userAccount = new \Application\Site\Controller\User();$userAccount->invokeLangPage(); });
32 | $router->post('/account/lang', function () { $userAccount = new \Application\Site\Controller\User();$userAccount->lang($_POST['lang']); });
33 | /*
34 | * Join
35 | */
36 | $router->get('/join', function () { $userAccount = new \Application\Site\Controller\User();$userAccount->invokeJoinPage(); });
37 | $router->post('/join/login', function() { $userController = new Application\Site\Controller\User();$userController->login($_POST); });
38 | $router->post('/join/register', function() { $userController = new Application\Site\Controller\User();$userController->createAccount($_POST); });
39 | $router->get('/join/disconnect', function () { $userController = new Application\Site\Controller\User();$userController->disconnect(); });
40 |
41 | /*
42 | * Run
43 | */
44 | $router->run();
45 |
--------------------------------------------------------------------------------