├── .gitignore ├── .htaccess ├── .idea ├── Sielo.iml ├── dataSources.local.xml ├── dataSources.xml ├── deployment.xml ├── misc.xml ├── modules.xml ├── php.xml ├── vcs.xml ├── webServers.xml └── workspace.xml ├── Application ├── Assets │ ├── Template │ │ ├── css │ │ │ ├── font-awesome.min.css │ │ │ ├── ie8.css │ │ │ ├── ie9.css │ │ │ ├── images │ │ │ │ ├── _overlay.png │ │ │ │ ├── arrow.svg │ │ │ │ └── ie │ │ │ │ │ └── banner-overlay.png │ │ │ └── main.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── js │ │ │ ├── ie │ │ │ │ ├── PIE.htc │ │ │ │ ├── html5shiv.js │ │ │ │ └── respond.min.js │ │ │ ├── jquery.dropotron.min.js │ │ │ ├── jquery.min.js │ │ │ ├── jquery.scrollex.min.js │ │ │ ├── jquery.scrolly.min.js │ │ │ ├── main.js │ │ │ ├── skel.min.js │ │ │ └── util.js │ │ └── sass │ │ │ ├── ie8.scss │ │ │ ├── ie9.scss │ │ │ ├── libs │ │ │ ├── _functions.scss │ │ │ ├── _mixins.scss │ │ │ ├── _skel.scss │ │ │ └── _vars.scss │ │ │ └── main.scss │ ├── Utils │ │ ├── inputs.css │ │ └── messages.css │ └── images │ │ ├── __tabs-space.gif │ │ ├── fbutton.png │ │ ├── floating-button.gif │ │ ├── icon.png │ │ ├── official-sielo.png │ │ ├── tabs-space.gif │ │ ├── tabsspaces.png │ │ ├── themes.png │ │ └── wiki │ │ ├── compile │ │ └── win_cmake.jpg │ │ └── themes │ │ ├── addressbar-details.jpg │ │ ├── floating-button-details.jpg │ │ ├── interface-names.xcf │ │ ├── tabs-details.jpg │ │ ├── tabs-details2.jpg │ │ └── temps.jpg └── Site │ ├── Controller │ ├── Home.php │ ├── THeme.php │ └── User.php │ ├── Datas │ └── User │ │ └── Kaktus.jpg │ ├── Langs │ ├── en │ │ ├── Home.ini │ │ ├── Theme.ini │ │ ├── User.ini │ │ └── default.ini │ └── fr │ │ ├── Home.ini │ │ ├── Theme.ini │ │ ├── User.ini │ │ └── default.ini │ ├── Model │ ├── Theme.php │ └── User.php │ └── View │ ├── Default │ ├── 404.php │ └── default.php │ ├── Home │ ├── home.php │ └── presentation.php │ └── User │ ├── account.php │ ├── join.php │ ├── lang.php │ └── my.php ├── Core ├── Autoloader │ └── Register.php ├── Cache │ └── Cache.php ├── Config │ ├── Config.php │ └── config.ini ├── Cookie │ └── Cookie.php ├── Database │ ├── Connector.php │ ├── DatabaseException.php │ └── QueryBuilder.php ├── Emitter │ ├── Emitter.php │ ├── EventException.php │ └── Listener.php ├── File │ ├── File.php │ ├── FileException.php │ ├── IniFile.php │ ├── OtherFile.php │ └── XmlFile.php ├── Html │ ├── Body.php │ ├── Document.php │ └── Header.php ├── Language │ ├── Lang.php │ └── LangException.php ├── MVC │ ├── BaseController.php │ └── BaseModel.php ├── Session │ └── Session.php ├── UrlRouter │ ├── Route.php │ ├── Router.php │ └── RouterException.php ├── autoloader.php └── defines.php └── index.php /.gitignore: -------------------------------------------------------------------------------- 1 | # Idea file 2 | .idea 3 | # Cache files 4 | Application/Site/Cache/*git -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | RewriteCond %{REQUEST_FILENAME} !-d 4 | RewriteCond %{REQUEST_FILENAME} !-f 5 | RewriteRule ^(.*)$ index.php?url=/$1 [QSA,L] 6 | 7 | 8 | php_flag session.cookie_httponly on 9 | -------------------------------------------------------------------------------- /.idea/Sielo.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/dataSources.local.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | master_key 7 | true 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/dataSources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | mysql 6 | true 7 | com.mysql.jdbc.Driver 8 | jdbc:mysql://localhost:3306 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/deployment.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/php.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/webServers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | -------------------------------------------------------------------------------- /Application/Assets/Template/css/ie8.css: -------------------------------------------------------------------------------- 1 | /* 2 | Landed by HTML5 UP 3 | html5up.net | @ajlkn 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Basic */ 8 | 9 | body { 10 | color: #ffffff; 11 | } 12 | 13 | body, html, #page-wrapper { 14 | height: 100%; 15 | } 16 | 17 | blockquote { 18 | border-left: solid 4px #606067; 19 | } 20 | 21 | code { 22 | background: #32333b; 23 | } 24 | 25 | hr { 26 | border-bottom: solid 1px #606067; 27 | } 28 | 29 | /* Icon */ 30 | 31 | .icon.major { 32 | -ms-behavior: url("assets/js/ie/PIE.htc"); 33 | } 34 | 35 | /* Image */ 36 | 37 | .image { 38 | position: relative; 39 | -ms-behavior: url("assets/js/ie/PIE.htc"); 40 | } 41 | 42 | .image:before { 43 | display: none; 44 | } 45 | 46 | .image img { 47 | position: relative; 48 | -ms-behavior: url("assets/js/ie/PIE.htc"); 49 | } 50 | 51 | /* Form */ 52 | 53 | input[type="text"], 54 | input[type="password"], 55 | input[type="email"], 56 | select, 57 | textarea { 58 | position: relative; 59 | -ms-behavior: url("assets/js/ie/PIE.htc"); 60 | } 61 | 62 | input[type="text"]:focus, 63 | input[type="password"]:focus, 64 | input[type="email"]:focus, 65 | select:focus, 66 | textarea:focus { 67 | -ms-behavior: url("assets/js/ie/PIE.htc"); 68 | } 69 | 70 | input[type="text"], 71 | input[type="password"], 72 | input[type="email"] { 73 | line-height: 3em; 74 | } 75 | 76 | input[type="checkbox"], 77 | input[type="radio"] { 78 | font-size: 3em; 79 | } 80 | 81 | input[type="checkbox"] + label:before, 82 | input[type="radio"] + label:before { 83 | display: none; 84 | } 85 | 86 | /* Table */ 87 | 88 | table tbody tr { 89 | border: solid 1px #606067; 90 | } 91 | 92 | table thead { 93 | border-bottom: solid 1px #606067; 94 | } 95 | 96 | table tfoot { 97 | border-top: solid 1px #606067; 98 | } 99 | 100 | table.alt tbody tr td { 101 | border: solid 1px #606067; 102 | } 103 | 104 | /* Button */ 105 | 106 | input[type="submit"], 107 | input[type="reset"], 108 | input[type="button"], 109 | .button { 110 | border: solid 1px #ffffff !important; 111 | } 112 | 113 | input[type="submit"].special, 114 | input[type="reset"].special, 115 | input[type="button"].special, 116 | .button.special { 117 | border: 0 !important; 118 | } 119 | 120 | /* Goto Next */ 121 | 122 | .goto-next { 123 | display: none; 124 | } 125 | 126 | /* Spotlight */ 127 | 128 | .spotlight { 129 | height: 100%; 130 | } 131 | 132 | .spotlight .content { 133 | background: #272833; 134 | } 135 | 136 | /* Wrapper */ 137 | 138 | .wrapper.style2 input[type="text"]:focus, 139 | .wrapper.style2 input[type="password"]:focus, 140 | .wrapper.style2 input[type="email"]:focus, 141 | .wrapper.style2 select:focus, 142 | .wrapper.style2 textarea:focus { 143 | border-color: #ffffff; 144 | } 145 | 146 | .wrapper.style2 input[type="submit"].special:hover, .wrapper.style2 input[type="submit"].special:active, 147 | .wrapper.style2 input[type="reset"].special:hover, 148 | .wrapper.style2 input[type="reset"].special:active, 149 | .wrapper.style2 input[type="button"].special:hover, 150 | .wrapper.style2 input[type="button"].special:active, 151 | .wrapper.style2 .button.special:hover, 152 | .wrapper.style2 .button.special:active { 153 | color: #e44c65 !important; 154 | } 155 | 156 | /* Dropotron */ 157 | 158 | .dropotron { 159 | background: #272833; 160 | box-shadow: none !important; 161 | -ms-behavior: url("assets/js/ie/PIE.htc"); 162 | } 163 | 164 | .dropotron > li a, .dropotron > li span { 165 | color: #ffffff !important; 166 | } 167 | 168 | .dropotron.level-0 { 169 | margin-top: 0; 170 | } 171 | 172 | .dropotron.level-0:before { 173 | display: none; 174 | } 175 | 176 | /* Header */ 177 | 178 | #header { 179 | background: #272833; 180 | } 181 | 182 | /* Banner */ 183 | 184 | #banner { 185 | height: 100%; 186 | } 187 | 188 | #banner:before { 189 | height: 100%; 190 | } 191 | 192 | #banner:after { 193 | background-image: url("images/ie/banner-overlay.png"); 194 | } -------------------------------------------------------------------------------- /Application/Assets/Template/css/ie9.css: -------------------------------------------------------------------------------- 1 | /* 2 | Landed by HTML5 UP 3 | html5up.net | @ajlkn 4 | Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) 5 | */ 6 | 7 | /* Loader */ 8 | 9 | body.landing:before, body.landing:after { 10 | display: none !important; 11 | } 12 | 13 | /* Icon */ 14 | 15 | .icon.alt { 16 | color: inherit !important; 17 | } 18 | 19 | .icon.major.alt:before { 20 | color: #ffffff !important; 21 | } 22 | 23 | /* Banner */ 24 | 25 | #banner:after { 26 | background-color: rgba(23, 24, 32, 0.95); 27 | } 28 | 29 | /* Footer */ 30 | 31 | #footer .icons .icon.alt:before { 32 | color: #ffffff !important; 33 | } -------------------------------------------------------------------------------- /Application/Assets/Template/css/images/_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/Template/css/images/_overlay.png -------------------------------------------------------------------------------- /Application/Assets/Template/css/images/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Application/Assets/Template/css/images/ie/banner-overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/Template/css/images/ie/banner-overlay.png -------------------------------------------------------------------------------- /Application/Assets/Template/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/Template/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /Application/Assets/Template/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/Template/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /Application/Assets/Template/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/Template/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /Application/Assets/Template/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/Template/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /Application/Assets/Template/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SieloBrowser/SieloWebsite/cf2bbba374e8b408874366ef764cb9244813890f/Application/Assets/Template/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /Application/Assets/Template/js/ie/html5shiv.js: -------------------------------------------------------------------------------- 1 | /* 2 | HTML5 Shiv v3.6.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | (function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); 5 | a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/\w+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x"; 6 | c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| 7 | "undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup main mark meter nav output progress section summary time video",version:"3.6.2",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f);if(g)return a.createDocumentFragment(); 8 | for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d #mq-test-1 { width: 42px; }',c.insertBefore(e,d),b=42===f.offsetWidth,c.removeChild(e),{matches:b,media:a}}}(a.document)}(this),function(a){"use strict";function b(){v(!0)}var c={};a.respond=c,c.update=function(){};var d=[],e=function(){var b=!1;try{b=new a.XMLHttpRequest}catch(c){b=new a.ActiveXObject("Microsoft.XMLHTTP")}return function(){return b}}(),f=function(a,b){var c=e();c&&(c.open("GET",a,!0),c.onreadystatechange=function(){4!==c.readyState||200!==c.status&&304!==c.status||b(c.responseText)},4!==c.readyState&&c.send(null))},g=function(a){return a.replace(c.regex.minmaxwh,"").match(c.regex.other)};if(c.ajax=f,c.queue=d,c.unsupportedmq=g,c.regex={media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},c.mediaQueriesSupported=a.matchMedia&&null!==a.matchMedia("only all")&&a.matchMedia("only all").matches,!c.mediaQueriesSupported){var h,i,j,k=a.document,l=k.documentElement,m=[],n=[],o=[],p={},q=30,r=k.getElementsByTagName("head")[0]||l,s=k.getElementsByTagName("base")[0],t=r.getElementsByTagName("link"),u=function(){var a,b=k.createElement("div"),c=k.body,d=l.style.fontSize,e=c&&c.style.fontSize,f=!1;return b.style.cssText="position:absolute;font-size:1em;width:1em",c||(c=f=k.createElement("body"),c.style.background="none"),l.style.fontSize="100%",c.style.fontSize="100%",c.appendChild(b),f&&l.insertBefore(c,l.firstChild),a=b.offsetWidth,f?l.removeChild(c):c.removeChild(b),l.style.fontSize=d,e&&(c.style.fontSize=e),a=j=parseFloat(a)},v=function(b){var c="clientWidth",d=l[c],e="CSS1Compat"===k.compatMode&&d||k.body[c]||d,f={},g=t[t.length-1],p=(new Date).getTime();if(b&&h&&q>p-h)return a.clearTimeout(i),i=a.setTimeout(v,q),void 0;h=p;for(var s in m)if(m.hasOwnProperty(s)){var w=m[s],x=w.minw,y=w.maxw,z=null===x,A=null===y,B="em";x&&(x=parseFloat(x)*(x.indexOf(B)>-1?j||u():1)),y&&(y=parseFloat(y)*(y.indexOf(B)>-1?j||u():1)),w.hasquery&&(z&&A||!(z||e>=x)||!(A||y>=e))||(f[w.media]||(f[w.media]=[]),f[w.media].push(n[w.rules]))}for(var C in o)o.hasOwnProperty(C)&&o[C]&&o[C].parentNode===r&&r.removeChild(o[C]);o.length=0;for(var D in f)if(f.hasOwnProperty(D)){var E=k.createElement("style"),F=f[D].join("\n");E.type="text/css",E.media=D,r.insertBefore(E,g.nextSibling),E.styleSheet?E.styleSheet.cssText=F:E.appendChild(k.createTextNode(F)),o.push(E)}},w=function(a,b,d){var e=a.replace(c.regex.comments,"").replace(c.regex.keyframes,"").match(c.regex.media),f=e&&e.length||0;b=b.substring(0,b.lastIndexOf("/"));var h=function(a){return a.replace(c.regex.urls,"$1"+b+"$2$3")},i=!f&&d;b.length&&(b+="/"),i&&(f=1);for(var j=0;f>j;j++){var k,l,o,p;i?(k=d,n.push(h(a))):(k=e[j].match(c.regex.findStyles)&&RegExp.$1,n.push(RegExp.$2&&h(RegExp.$2))),o=k.split(","),p=o.length;for(var q=0;p>q;q++)l=o[q],g(l)||m.push({media:l.split("(")[0].match(c.regex.only)&&RegExp.$2||"all",rules:n.length-1,hasquery:l.indexOf("(")>-1,minw:l.match(c.regex.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:l.match(c.regex.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}v()},x=function(){if(d.length){var b=d.shift();f(b.href,function(c){w(c,b.href,b.media),p[b.href]=!0,a.setTimeout(function(){x()},0)})}},y=function(){for(var b=0;b1)for(var o=0;o0&&t.add(n).on("mouseleave",function(e){window.clearTimeout(c),c=window.setTimeout(function(){t.trigger("doCollapse")},o.hideDelay)}),t.disableSelection_dropotron().hide().addClass(o.menuClass).css("position","absolute").on("mouseenter",function(e){window.clearTimeout(c)}).on("doExpand",function(){if(t.is(":visible"))return!1;window.clearTimeout(c),s.each(function(){var t=e(this);e.contains(t.get(0),n.get(0))||t.trigger("doCollapse")});var i,a,d,f,u=n.offset(),p=n.position(),h=(n.parent().position(),n.outerWidth()),g=t.outerWidth(),v=t.css("z-index")==o.baseZIndex;if(v){switch(i=o.detach?u:p,f=i.top+n.outerHeight()+o.globalOffsetY,a=o.alignment,t.removeClass("left").removeClass("right").removeClass("center"),o.alignment){case"right":d=i.left-g+h,0>d&&(d=i.left,a="left");break;case"center":d=i.left-Math.floor((g-h)/2),0>d?(d=i.left,a="left"):d+g>l.width()&&(d=i.left-g+h,a="right");break;case"left":default:d=i.left,d+g>l.width()&&(d=i.left-g+h,a="right")}t.addClass(a)}else switch("relative"==n.css("position")||"absolute"==n.css("position")?(f=o.offsetY,d=-1*p.left):(f=p.top+o.offsetY,d=0),o.alignment){case"right":d+=-1*n.parent().outerWidth()+o.offsetX;break;case"center":case"left":default:d+=n.parent().outerWidth()+o.offsetX}navigator.userAgent.match(/MSIE ([0-9]+)\./)&&RegExp.$1<8&&(d+=o.IEOffsetX,f+=o.IEOffsetY),t.css("left",d+"px").css("top",f+"px").css("opacity","0.01").show();var C=!1;switch(d="relative"==n.css("position")||"absolute"==n.css("position")?-1*p.left:0,t.offset().left<0?(d+=n.parent().outerWidth()-o.offsetX,C=!0):t.offset().left+g>l.width()&&(d+=-1*n.parent().outerWidth()-o.offsetX,C=!0),C&&t.css("left",d+"px"),t.hide().css("opacity","1"),o.mode){case"zoom":r=!0,n.addClass(o.openerActiveClass),t.animate({width:"toggle",height:"toggle"},o.speed,o.easing,function(){r=!1});break;case"slide":r=!0,n.addClass(o.openerActiveClass),t.animate({height:"toggle"},o.speed,o.easing,function(){r=!1});break;case"fade":if(r=!0,v&&!o.noOpenerFade){var C;C="slow"==o.speed?80:"fast"==o.speed?40:Math.floor(o.speed/2),n.fadeTo(C,.01,function(){n.addClass(o.openerActiveClass),n.fadeTo(o.speed,1),t.fadeIn(o.speed,function(){r=!1})})}else n.addClass(o.openerActiveClass),n.fadeTo(o.speed,1),t.fadeIn(o.speed,function(){r=!1});break;case"instant":default:n.addClass(o.openerActiveClass),t.show()}return!1}).on("doCollapse",function(){return t.is(":visible")?(t.hide(),n.removeClass(o.openerActiveClass),t.find("."+o.openerActiveClass).removeClass(o.openerActiveClass),t.find("ul").hide(),!1):!1}).on("doToggle",function(e){return t.is(":visible")?t.trigger("doCollapse"):t.trigger("doExpand"),!1}),n.disableSelection_dropotron().addClass("opener").css("cursor","pointer").on("click touchend",function(e){r||(e.preventDefault(),e.stopPropagation(),t.trigger("doToggle"))}),"hover"==o.expandMode&&n.hover(function(e){r||(d=window.setTimeout(function(){t.trigger("doExpand")},o.hoverDelay))},function(e){window.clearTimeout(d)})}),s.find("a").css("display","block").on("click touchend",function(t){r||e(this).attr("href").length<1&&t.preventDefault()}),n.find("li").css("white-space","nowrap").each(function(){var t=e(this),o=t.children("a"),s=t.children("ul"),i=o.attr("href");o.on("click touchend",function(e){0==i.length||"#"==i?e.preventDefault():e.stopPropagation()}),o.length>0&&0==s.length&&t.on("click touchend",function(e){r||(n.trigger("doCollapseAll"),e.stopPropagation())})}),n.children("li").each(function(){var t,n=e(this),s=n.children("ul");if(s.length>0){o.detach&&(o.cloneOnDetach&&(t=s.clone(),t.attr("class","").hide().appendTo(s.parent())),s.detach().appendTo(i));for(var a=o.baseZIndex,l=1,r=s;r.length>0;l++)r.css("z-index",a++),o.submenuClassPrefix&&r.addClass(o.submenuClassPrefix+(a-1-o.baseZIndex)),r=r.find("> li > ul")}}),l.on("scroll",function(){n.trigger("doCollapseAll")}).on("keypress",function(e){r||27!=e.keyCode||(e.preventDefault(),n.trigger("doCollapseAll"))}),a.on("click touchend",function(){r||n.trigger("doCollapseAll")})}}(jQuery); 3 | -------------------------------------------------------------------------------- /Application/Assets/Template/js/jquery.scrollex.min.js: -------------------------------------------------------------------------------- 1 | /* jquery.scrollex v0.2.1 | (c) @ajlkn | github.com/ajlkn/jquery.scrollex | MIT licensed */ 2 | !function(t){function e(t,e,n){return"string"==typeof t&&("%"==t.slice(-1)?t=parseInt(t.substring(0,t.length-1))/100*e:"vh"==t.slice(-2)?t=parseInt(t.substring(0,t.length-2))/100*n:"px"==t.slice(-2)&&(t=parseInt(t.substring(0,t.length-2)))),t}var n=t(window),i=1,o={};n.on("scroll",function(){var e=n.scrollTop();t.map(o,function(t){window.clearTimeout(t.timeoutId),t.timeoutId=window.setTimeout(function(){t.handler(e)},t.options.delay)})}).on("load",function(){n.trigger("scroll")}),jQuery.fn.scrollex=function(l){var s=t(this);if(0==this.length)return s;if(this.length>1){for(var r=0;r=i&&o>=t};break;case"bottom":h=function(t,e,n,i,o){return n>=i&&o>=n};break;case"middle":h=function(t,e,n,i,o){return e>=i&&o>=e};break;case"top-only":h=function(t,e,n,i,o){return i>=t&&n>=i};break;case"bottom-only":h=function(t,e,n,i,o){return n>=o&&o>=t};break;default:case"default":h=function(t,e,n,i,o){return n>=i&&o>=t}}return c=function(t){var i,o,l,s,r,a,u=this.state,h=!1,c=this.$element.offset();i=n.height(),o=t+i/2,l=t+i,s=this.$element.outerHeight(),r=c.top+e(this.options.top,s,i),a=c.top+s-e(this.options.bottom,s,i),h=this.test(t,o,l,r,a),h!=u&&(this.state=h,h?this.options.enter&&this.options.enter.apply(this.element):this.options.leave&&this.options.leave.apply(this.element)),this.options.scroll&&this.options.scroll.apply(this.element,[(o-r)/(a-r)])},p={id:a,options:u,test:h,handler:c,state:null,element:this,$element:s,timeoutId:null},o[a]=p,s.data("_scrollexId",p.id),p.options.initialize&&p.options.initialize.apply(this),s},jQuery.fn.unscrollex=function(){var e=t(this);if(0==this.length)return e;if(this.length>1){for(var n=0;n1){for(o=0;o ul').dropotron({ 58 | alignment: 'right', 59 | hideDelay: 350 60 | }); 61 | 62 | // Off-Canvas Navigation. 63 | 64 | // Title Bar. 65 | $( 66 | '
' + 67 | '' + 68 | '' + $('#logo').html() + '' + 69 | '
' 70 | ) 71 | .appendTo($body); 72 | 73 | // Navigation Panel. 74 | $( 75 | '' 80 | ) 81 | .appendTo($body) 82 | .panel({ 83 | delay: 500, 84 | hideOnClick: true, 85 | hideOnSwipe: true, 86 | resetScroll: true, 87 | resetForms: true, 88 | side: 'left', 89 | target: $body, 90 | visibleClass: 'navPanel-visible' 91 | }); 92 | 93 | // Fix: Remove navPanel transitions on WP<10 (poor/buggy performance). 94 | if (skel.vars.os == 'wp' && skel.vars.osVersion < 10) 95 | $('#titleBar, #navPanel, #page-wrapper') 96 | .css('transition', 'none'); 97 | 98 | // Parallax. 99 | // Disabled on IE (choppy scrolling) and mobile platforms (poor performance). 100 | if (skel.vars.browser == 'ie' 101 | || skel.vars.mobile) { 102 | 103 | $.fn._parallax = function() { 104 | 105 | return $(this); 106 | 107 | }; 108 | 109 | } 110 | else { 111 | 112 | $.fn._parallax = function() { 113 | 114 | $(this).each(function() { 115 | 116 | var $this = $(this), 117 | on, off; 118 | 119 | on = function() { 120 | 121 | $this 122 | .css('background-position', 'center 0px'); 123 | 124 | $window 125 | .on('scroll._parallax', function() { 126 | 127 | var pos = parseInt($window.scrollTop()) - parseInt($this.position().top); 128 | 129 | $this.css('background-position', 'center ' + (pos * -0.15) + 'px'); 130 | 131 | }); 132 | 133 | }; 134 | 135 | off = function() { 136 | 137 | $this 138 | .css('background-position', ''); 139 | 140 | $window 141 | .off('scroll._parallax'); 142 | 143 | }; 144 | 145 | skel.on('change', function() { 146 | 147 | if (skel.breakpoint('medium').active) 148 | (off)(); 149 | else 150 | (on)(); 151 | 152 | }); 153 | 154 | }); 155 | 156 | return $(this); 157 | 158 | }; 159 | 160 | $window 161 | .on('load resize', function() { 162 | $window.trigger('scroll'); 163 | }); 164 | 165 | } 166 | 167 | // Spotlights. 168 | var $spotlights = $('.spotlight'); 169 | 170 | $spotlights 171 | ._parallax() 172 | .each(function() { 173 | 174 | var $this = $(this), 175 | on, off; 176 | 177 | on = function() { 178 | 179 | // Use main 's src as this spotlight's background. 180 | $this.css('background-image', 'url("' + $this.find('.image.main > img').attr('src') + '")'); 181 | 182 | // Enable transitions (if supported). 183 | if (skel.canUse('transition')) { 184 | 185 | var top, bottom, mode; 186 | 187 | // Side-specific scrollex tweaks. 188 | if ($this.hasClass('top')) { 189 | 190 | mode = 'top'; 191 | top = '-20%'; 192 | bottom = 0; 193 | 194 | } 195 | else if ($this.hasClass('bottom')) { 196 | 197 | mode = 'bottom-only'; 198 | top = 0; 199 | bottom = '20%'; 200 | 201 | } 202 | else { 203 | 204 | mode = 'middle'; 205 | top = 0; 206 | bottom = 0; 207 | 208 | } 209 | 210 | // Add scrollex. 211 | $this.scrollex({ 212 | mode: mode, 213 | top: top, 214 | bottom: bottom, 215 | initialize: function(t) { $this.addClass('inactive'); }, 216 | terminate: function(t) { $this.removeClass('inactive'); }, 217 | enter: function(t) { $this.removeClass('inactive'); }, 218 | 219 | // Uncomment the line below to "rewind" when this spotlight scrolls out of view. 220 | 221 | //leave: function(t) { $this.addClass('inactive'); }, 222 | 223 | }); 224 | 225 | } 226 | 227 | }; 228 | 229 | off = function() { 230 | 231 | // Clear spotlight's background. 232 | $this.css('background-image', ''); 233 | 234 | // Disable transitions (if supported). 235 | if (skel.canUse('transition')) { 236 | 237 | // Remove scrollex. 238 | $this.unscrollex(); 239 | 240 | } 241 | 242 | }; 243 | 244 | skel.on('change', function() { 245 | 246 | if (skel.breakpoint('medium').active) 247 | (off)(); 248 | else 249 | (on)(); 250 | 251 | }); 252 | 253 | }); 254 | 255 | // Wrappers. 256 | var $wrappers = $('.wrapper'); 257 | 258 | $wrappers 259 | .each(function() { 260 | 261 | var $this = $(this), 262 | on, off; 263 | 264 | on = function() { 265 | 266 | if (skel.canUse('transition')) { 267 | 268 | $this.scrollex({ 269 | top: 250, 270 | bottom: 0, 271 | initialize: function(t) { $this.addClass('inactive'); }, 272 | terminate: function(t) { $this.removeClass('inactive'); }, 273 | enter: function(t) { $this.removeClass('inactive'); }, 274 | 275 | // Uncomment the line below to "rewind" when this wrapper scrolls out of view. 276 | 277 | //leave: function(t) { $this.addClass('inactive'); }, 278 | 279 | }); 280 | 281 | } 282 | 283 | }; 284 | 285 | off = function() { 286 | 287 | if (skel.canUse('transition')) 288 | $this.unscrollex(); 289 | 290 | }; 291 | 292 | skel.on('change', function() { 293 | 294 | if (skel.breakpoint('medium').active) 295 | (off)(); 296 | else 297 | (on)(); 298 | 299 | }); 300 | 301 | }); 302 | 303 | // Banner. 304 | var $banner = $('#banner'); 305 | 306 | $banner 307 | ._parallax(); 308 | 309 | }); 310 | 311 | })(jQuery); 312 | -------------------------------------------------------------------------------- /Application/Assets/Template/js/skel.min.js: -------------------------------------------------------------------------------- 1 | /* skel.js v3.0.1 | (c) skel.io | MIT licensed */ 2 | var skel=function(){"use strict";var t={breakpointIds:null,events:{},isInit:!1,obj:{attachments:{},breakpoints:{},head:null,states:{}},sd:"/",state:null,stateHandlers:{},stateId:"",vars:{},DOMReady:null,indexOf:null,isArray:null,iterate:null,matchesMedia:null,extend:function(e,n){t.iterate(n,function(i){t.isArray(n[i])?(t.isArray(e[i])||(e[i]=[]),t.extend(e[i],n[i])):"object"==typeof n[i]?("object"!=typeof e[i]&&(e[i]={}),t.extend(e[i],n[i])):e[i]=n[i]})},newStyle:function(t){var e=document.createElement("style");return e.type="text/css",e.innerHTML=t,e},_canUse:null,canUse:function(e){t._canUse||(t._canUse=document.createElement("div"));var n=t._canUse.style,i=e.charAt(0).toUpperCase()+e.slice(1);return e in n||"Moz"+i in n||"Webkit"+i in n||"O"+i in n||"ms"+i in n},on:function(e,n){var i=e.split(/[\s]+/);return t.iterate(i,function(e){var a=i[e];if(t.isInit){if("init"==a)return void n();if("change"==a)n();else{var r=a.charAt(0);if("+"==r||"!"==r){var o=a.substring(1);if(o in t.obj.breakpoints)if("+"==r&&t.obj.breakpoints[o].active)n();else if("!"==r&&!t.obj.breakpoints[o].active)return void n()}}}t.events[a]||(t.events[a]=[]),t.events[a].push(n)}),t},trigger:function(e){return t.events[e]&&0!=t.events[e].length?(t.iterate(t.events[e],function(n){t.events[e][n]()}),t):void 0},breakpoint:function(e){return t.obj.breakpoints[e]},breakpoints:function(e){function n(t,e){this.name=this.id=t,this.media=e,this.active=!1,this.wasActive=!1}return n.prototype.matches=function(){return t.matchesMedia(this.media)},n.prototype.sync=function(){this.wasActive=this.active,this.active=this.matches()},t.iterate(e,function(i){t.obj.breakpoints[i]=new n(i,e[i])}),window.setTimeout(function(){t.poll()},0),t},addStateHandler:function(e,n){t.stateHandlers[e]=n},callStateHandler:function(e){var n=t.stateHandlers[e]();t.iterate(n,function(e){t.state.attachments.push(n[e])})},changeState:function(e){t.iterate(t.obj.breakpoints,function(e){t.obj.breakpoints[e].sync()}),t.vars.lastStateId=t.stateId,t.stateId=e,t.breakpointIds=t.stateId===t.sd?[]:t.stateId.substring(1).split(t.sd),t.obj.states[t.stateId]?t.state=t.obj.states[t.stateId]:(t.obj.states[t.stateId]={attachments:[]},t.state=t.obj.states[t.stateId],t.iterate(t.stateHandlers,t.callStateHandler)),t.detachAll(t.state.attachments),t.attachAll(t.state.attachments),t.vars.stateId=t.stateId,t.vars.state=t.state,t.trigger("change"),t.iterate(t.obj.breakpoints,function(e){t.obj.breakpoints[e].active?t.obj.breakpoints[e].wasActive||t.trigger("+"+e):t.obj.breakpoints[e].wasActive&&t.trigger("-"+e)})},generateStateConfig:function(e,n){var i={};return t.extend(i,e),t.iterate(t.breakpointIds,function(e){t.extend(i,n[t.breakpointIds[e]])}),i},getStateId:function(){var e="";return t.iterate(t.obj.breakpoints,function(n){var i=t.obj.breakpoints[n];i.matches()&&(e+=t.sd+i.id)}),e},poll:function(){var e="";e=t.getStateId(),""===e&&(e=t.sd),e!==t.stateId&&t.changeState(e)},_attach:null,attach:function(e){var n=t.obj.head,i=e.element;return i.parentNode&&i.parentNode.tagName?!1:(t._attach||(t._attach=n.firstChild),n.insertBefore(i,t._attach.nextSibling),e.permanent&&(t._attach=i),!0)},attachAll:function(e){var n=[];t.iterate(e,function(t){n[e[t].priority]||(n[e[t].priority]=[]),n[e[t].priority].push(e[t])}),n.reverse(),t.iterate(n,function(e){t.iterate(n[e],function(i){t.attach(n[e][i])})})},detach:function(t){var e=t.element;return t.permanent||!e.parentNode||e.parentNode&&!e.parentNode.tagName?!1:(e.parentNode.removeChild(e),!0)},detachAll:function(e){var n={};t.iterate(e,function(t){n[e[t].id]=!0}),t.iterate(t.obj.attachments,function(e){e in n||t.detach(t.obj.attachments[e])})},attachment:function(e){return e in t.obj.attachments?t.obj.attachments[e]:null},newAttachment:function(e,n,i,a){return t.obj.attachments[e]={id:e,element:n,priority:i,permanent:a}},init:function(){t.initMethods(),t.initVars(),t.initEvents(),t.obj.head=document.getElementsByTagName("head")[0],t.isInit=!0,t.trigger("init")},initEvents:function(){t.on("resize",function(){t.poll()}),t.on("orientationChange",function(){t.poll()}),t.DOMReady(function(){t.trigger("ready")}),window.onload&&t.on("load",window.onload),window.onload=function(){t.trigger("load")},window.onresize&&t.on("resize",window.onresize),window.onresize=function(){t.trigger("resize")},window.onorientationchange&&t.on("orientationChange",window.onorientationchange),window.onorientationchange=function(){t.trigger("orientationChange")}},initMethods:function(){document.addEventListener?!function(e,n){t.DOMReady=n()}("domready",function(){function t(t){for(r=1;t=n.shift();)t()}var e,n=[],i=document,a="DOMContentLoaded",r=/^loaded|^c/.test(i.readyState);return i.addEventListener(a,e=function(){i.removeEventListener(a,e),t()}),function(t){r?t():n.push(t)}}):!function(e,n){t.DOMReady=n()}("domready",function(t){function e(t){for(h=1;t=i.shift();)t()}var n,i=[],a=!1,r=document,o=r.documentElement,s=o.doScroll,c="DOMContentLoaded",d="addEventListener",u="onreadystatechange",l="readyState",f=s?/^loaded|^c/:/^loaded|c/,h=f.test(r[l]);return r[d]&&r[d](c,n=function(){r.removeEventListener(c,n,a),e()},a),s&&r.attachEvent(u,n=function(){/^c/.test(r[l])&&(r.detachEvent(u,n),e())}),t=s?function(e){self!=top?h?e():i.push(e):function(){try{o.doScroll("left")}catch(n){return setTimeout(function(){t(e)},50)}e()}()}:function(t){h?t():i.push(t)}}),Array.prototype.indexOf?t.indexOf=function(t,e){return t.indexOf(e)}:t.indexOf=function(t,e){if("string"==typeof t)return t.indexOf(e);var n,i,a=e?e:0;if(!this)throw new TypeError;if(i=this.length,0===i||a>=i)return-1;for(0>a&&(a=i-Math.abs(a)),n=a;i>n;n++)if(this[n]===t)return n;return-1},Array.isArray?t.isArray=function(t){return Array.isArray(t)}:t.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},Object.keys?t.iterate=function(t,e){if(!t)return[];var n,i=Object.keys(t);for(n=0;i[n]&&e(i[n],t[i[n]])!==!1;n++);}:t.iterate=function(t,e){if(!t)return[];var n;for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(n,t[n])===!1)break},window.matchMedia?t.matchesMedia=function(t){return""==t?!0:window.matchMedia(t).matches}:window.styleMedia||window.media?t.matchesMedia=function(t){if(""==t)return!0;var e=window.styleMedia||window.media;return e.matchMedium(t||"all")}:window.getComputedStyle?t.matchesMedia=function(t){if(""==t)return!0;var e=document.createElement("style"),n=document.getElementsByTagName("script")[0],i=null;e.type="text/css",e.id="matchmediajs-test",n.parentNode.insertBefore(e,n),i="getComputedStyle"in window&&window.getComputedStyle(e,null)||e.currentStyle;var a="@media "+t+"{ #matchmediajs-test { width: 1px; } }";return e.styleSheet?e.styleSheet.cssText=a:e.textContent=a,"1px"===i.width}:t.matchesMedia=function(t){if(""==t)return!0;var e,n,i,a,r={"min-width":null,"max-width":null},o=!1;for(i=t.split(/\s+and\s+/),e=0;er["max-width"]||null!==r["min-height"]&&cr["max-height"]?!1:!0},navigator.userAgent.match(/MSIE ([0-9]+)/)&&RegExp.$1<9&&(t.newStyle=function(t){var e=document.createElement("span");return e.innerHTML=' ",e})},initVars:function(){var e,n,i,a=navigator.userAgent;e="other",n=0,i=[["firefox",/Firefox\/([0-9\.]+)/],["bb",/BlackBerry.+Version\/([0-9\.]+)/],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/],["opera",/OPR\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)/],["edge",/Edge\/([0-9\.]+)/],["safari",/Version\/([0-9\.]+).+Safari/],["chrome",/Chrome\/([0-9\.]+)/],["ie",/MSIE ([0-9]+)/],["ie",/Trident\/.+rv:([0-9]+)/]],t.iterate(i,function(t,i){return a.match(i[1])?(e=i[0],n=parseFloat(RegExp.$1),!1):void 0}),t.vars.browser=e,t.vars.browserVersion=n,e="other",n=0,i=[["ios",/([0-9_]+) like Mac OS X/,function(t){return t.replace("_",".").replace("_","")}],["ios",/CPU like Mac OS X/,function(t){return 0}],["wp",/Windows Phone ([0-9\.]+)/,null],["android",/Android ([0-9\.]+)/,null],["mac",/Macintosh.+Mac OS X ([0-9_]+)/,function(t){return t.replace("_",".").replace("_","")}],["windows",/Windows NT ([0-9\.]+)/,null],["bb",/BlackBerry.+Version\/([0-9\.]+)/,null],["bb",/BB[0-9]+.+Version\/([0-9\.]+)/,null]],t.iterate(i,function(t,i){return a.match(i[1])?(e=i[0],n=parseFloat(i[2]?i[2](RegExp.$1):RegExp.$1),!1):void 0}),t.vars.os=e,t.vars.osVersion=n,t.vars.IEVersion="ie"==t.vars.browser?t.vars.browserVersion:99,t.vars.touch="wp"==t.vars.os?navigator.msMaxTouchPoints>0:!!("ontouchstart"in window),t.vars.mobile="wp"==t.vars.os||"android"==t.vars.os||"ios"==t.vars.os||"bb"==t.vars.os}};return t.init(),t}();!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():t.skel=e()}(this,function(){return skel}); 3 | -------------------------------------------------------------------------------- /Application/Assets/Template/js/util.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 3 | /** 4 | * Generate an indented list of links from a nav. Meant for use with panel(). 5 | * @return {jQuery} jQuery object. 6 | */ 7 | $.fn.navList = function() { 8 | 9 | var $this = $(this); 10 | $a = $this.find('a'), 11 | b = []; 12 | 13 | $a.each(function() { 14 | 15 | var $this = $(this), 16 | indent = Math.max(0, $this.parents('li').length - 1), 17 | href = $this.attr('href'), 18 | target = $this.attr('target'); 19 | 20 | b.push( 21 | '' + 26 | '' + 27 | $this.text() + 28 | '' 29 | ); 30 | 31 | }); 32 | 33 | return b.join(''); 34 | 35 | }; 36 | 37 | /** 38 | * Panel-ify an element. 39 | * @param {object} userConfig User config. 40 | * @return {jQuery} jQuery object. 41 | */ 42 | $.fn.panel = function(userConfig) { 43 | 44 | // No elements? 45 | if (this.length == 0) 46 | return $this; 47 | 48 | // Multiple elements? 49 | if (this.length > 1) { 50 | 51 | for (var i=0; i < this.length; i++) 52 | $(this[i]).panel(userConfig); 53 | 54 | return $this; 55 | 56 | } 57 | 58 | // Vars. 59 | var $this = $(this), 60 | $body = $('body'), 61 | $window = $(window), 62 | id = $this.attr('id'), 63 | config; 64 | 65 | // Config. 66 | config = $.extend({ 67 | 68 | // Delay. 69 | delay: 0, 70 | 71 | // Hide panel on link click. 72 | hideOnClick: false, 73 | 74 | // Hide panel on escape keypress. 75 | hideOnEscape: false, 76 | 77 | // Hide panel on swipe. 78 | hideOnSwipe: false, 79 | 80 | // Reset scroll position on hide. 81 | resetScroll: false, 82 | 83 | // Reset forms on hide. 84 | resetForms: false, 85 | 86 | // Side of viewport the panel will appear. 87 | side: null, 88 | 89 | // Target element for "class". 90 | target: $this, 91 | 92 | // Class to toggle. 93 | visibleClass: 'visible' 94 | 95 | }, userConfig); 96 | 97 | // Expand "target" if it's not a jQuery object already. 98 | if (typeof config.target != 'jQuery') 99 | config.target = $(config.target); 100 | 101 | // Panel. 102 | 103 | // Methods. 104 | $this._hide = function(event) { 105 | 106 | // Already hidden? Bail. 107 | if (!config.target.hasClass(config.visibleClass)) 108 | return; 109 | 110 | // If an event was provided, cancel it. 111 | if (event) { 112 | 113 | event.preventDefault(); 114 | event.stopPropagation(); 115 | 116 | } 117 | 118 | // Hide. 119 | config.target.removeClass(config.visibleClass); 120 | 121 | // Post-hide stuff. 122 | window.setTimeout(function() { 123 | 124 | // Reset scroll position. 125 | if (config.resetScroll) 126 | $this.scrollTop(0); 127 | 128 | // Reset forms. 129 | if (config.resetForms) 130 | $this.find('form').each(function() { 131 | this.reset(); 132 | }); 133 | 134 | }, config.delay); 135 | 136 | }; 137 | 138 | // Vendor fixes. 139 | $this 140 | .css('-ms-overflow-style', '-ms-autohiding-scrollbar') 141 | .css('-webkit-overflow-scrolling', 'touch'); 142 | 143 | // Hide on click. 144 | if (config.hideOnClick) { 145 | 146 | $this.find('a') 147 | .css('-webkit-tap-highlight-color', 'rgba(0,0,0,0)'); 148 | 149 | $this 150 | .on('click', 'a', function(event) { 151 | 152 | var $a = $(this), 153 | href = $a.attr('href'), 154 | target = $a.attr('target'); 155 | 156 | if (!href || href == '#' || href == '' || href == '#' + id) 157 | return; 158 | 159 | // Cancel original event. 160 | event.preventDefault(); 161 | event.stopPropagation(); 162 | 163 | // Hide panel. 164 | $this._hide(); 165 | 166 | // Redirect to href. 167 | window.setTimeout(function() { 168 | 169 | if (target == '_blank') 170 | window.open(href); 171 | else 172 | window.location.href = href; 173 | 174 | }, config.delay + 10); 175 | 176 | }); 177 | 178 | } 179 | 180 | // Event: Touch stuff. 181 | $this.on('touchstart', function(event) { 182 | 183 | $this.touchPosX = event.originalEvent.touches[0].pageX; 184 | $this.touchPosY = event.originalEvent.touches[0].pageY; 185 | 186 | }) 187 | 188 | $this.on('touchmove', function(event) { 189 | 190 | if ($this.touchPosX === null 191 | || $this.touchPosY === null) 192 | return; 193 | 194 | var diffX = $this.touchPosX - event.originalEvent.touches[0].pageX, 195 | diffY = $this.touchPosY - event.originalEvent.touches[0].pageY, 196 | th = $this.outerHeight(), 197 | ts = ($this.get(0).scrollHeight - $this.scrollTop()); 198 | 199 | // Hide on swipe? 200 | if (config.hideOnSwipe) { 201 | 202 | var result = false, 203 | boundary = 20, 204 | delta = 50; 205 | 206 | switch (config.side) { 207 | 208 | case 'left': 209 | result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX > delta); 210 | break; 211 | 212 | case 'right': 213 | result = (diffY < boundary && diffY > (-1 * boundary)) && (diffX < (-1 * delta)); 214 | break; 215 | 216 | case 'top': 217 | result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY > delta); 218 | break; 219 | 220 | case 'bottom': 221 | result = (diffX < boundary && diffX > (-1 * boundary)) && (diffY < (-1 * delta)); 222 | break; 223 | 224 | default: 225 | break; 226 | 227 | } 228 | 229 | if (result) { 230 | 231 | $this.touchPosX = null; 232 | $this.touchPosY = null; 233 | $this._hide(); 234 | 235 | return false; 236 | 237 | } 238 | 239 | } 240 | 241 | // Prevent vertical scrolling past the top or bottom. 242 | if (($this.scrollTop() < 0 && diffY < 0) 243 | || (ts > (th - 2) && ts < (th + 2) && diffY > 0)) { 244 | 245 | event.preventDefault(); 246 | event.stopPropagation(); 247 | 248 | } 249 | 250 | }); 251 | 252 | // Event: Prevent certain events inside the panel from bubbling. 253 | $this.on('click touchend touchstart touchmove', function(event) { 254 | event.stopPropagation(); 255 | }); 256 | 257 | // Event: Hide panel if a child anchor tag pointing to its ID is clicked. 258 | $this.on('click', 'a[href="#' + id + '"]', function(event) { 259 | 260 | event.preventDefault(); 261 | event.stopPropagation(); 262 | 263 | config.target.removeClass(config.visibleClass); 264 | 265 | }); 266 | 267 | // Body. 268 | 269 | // Event: Hide panel on body click/tap. 270 | $body.on('click touchend', function(event) { 271 | $this._hide(event); 272 | }); 273 | 274 | // Event: Toggle. 275 | $body.on('click', 'a[href="#' + id + '"]', function(event) { 276 | 277 | event.preventDefault(); 278 | event.stopPropagation(); 279 | 280 | config.target.toggleClass(config.visibleClass); 281 | 282 | }); 283 | 284 | // Window. 285 | 286 | // Event: Hide on ESC. 287 | if (config.hideOnEscape) 288 | $window.on('keydown', function(event) { 289 | 290 | if (event.keyCode == 27) 291 | $this._hide(event); 292 | 293 | }); 294 | 295 | return $this; 296 | 297 | }; 298 | 299 | /** 300 | * Apply "placeholder" attribute polyfill to one or more forms. 301 | * @return {jQuery} jQuery object. 302 | */ 303 | $.fn.placeholder = function() { 304 | 305 | // Browser natively supports placeholders? Bail. 306 | if (typeof (document.createElement('input')).placeholder != 'undefined') 307 | return $(this); 308 | 309 | // No elements? 310 | if (this.length == 0) 311 | return $this; 312 | 313 | // Multiple elements? 314 | if (this.length > 1) { 315 | 316 | for (var i=0; i < this.length; i++) 317 | $(this[i]).placeholder(); 318 | 319 | return $this; 320 | 321 | } 322 | 323 | // Vars. 324 | var $this = $(this); 325 | 326 | // Text, TextArea. 327 | $this.find('input[type=text],textarea') 328 | .each(function() { 329 | 330 | var i = $(this); 331 | 332 | if (i.val() == '' 333 | || i.val() == i.attr('placeholder')) 334 | i 335 | .addClass('polyfill-placeholder') 336 | .val(i.attr('placeholder')); 337 | 338 | }) 339 | .on('blur', function() { 340 | 341 | var i = $(this); 342 | 343 | if (i.attr('name').match(/-polyfill-field$/)) 344 | return; 345 | 346 | if (i.val() == '') 347 | i 348 | .addClass('polyfill-placeholder') 349 | .val(i.attr('placeholder')); 350 | 351 | }) 352 | .on('focus', function() { 353 | 354 | var i = $(this); 355 | 356 | if (i.attr('name').match(/-polyfill-field$/)) 357 | return; 358 | 359 | if (i.val() == i.attr('placeholder')) 360 | i 361 | .removeClass('polyfill-placeholder') 362 | .val(''); 363 | 364 | }); 365 | 366 | // Password. 367 | $this.find('input[type=password]') 368 | .each(function() { 369 | 370 | var i = $(this); 371 | var x = $( 372 | $('
') 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 | 36 | 37 |
    38 |
    39 |
    40 |

    News

    41 |
    42 |
    43 | 44 |
    45 |
    46 | Next 47 |
    48 | 49 |
    50 |
    51 |
    52 |

    Themes

    53 |
    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 | 34 | 35 | 36 |
    37 |
    38 |
    39 |

    lang->getKey('ONE_TITLE'); ?>

    40 |

    lang->getKey('ONE_PRESENTATION'); ?>

    41 |
    42 | 43 |
    44 | Next 45 |
    46 | 47 | 48 |
    49 | 50 |
    51 |
    52 |

    lang->getKey('TABSPACE_TITLE'); ?>

    53 |

    "lang->getKey('TABSPACE_PRESENTATION'); ?>

    54 |
    55 |

    lang->getKey('TABSPACE_FEATURE'); ?>

    56 |
    57 | Next 58 |
    59 | 60 | 61 |
    62 | 63 |
    64 |
    65 |

    lang->getKey('FLOATING_TITLE'); ?>

    66 |

    lang->getKey('FLOATING_PRESENTATION'); ?>

    67 |
    68 |

    lang->getKey('FLOATING_FEATURE'); ?>

    69 |
    70 | Next 71 |
    72 | 73 | 74 |
    75 |
    76 |
    77 |

    lang->getKey('CARACTERISTICS_START'); ?>

    78 |

    lang->getKey('CARACTERISTICS_HELP'); ?>

    79 |
    80 |
    81 |
    82 |
    83 | 84 |

    lang->getKey('CARACTERISTICS_FREE'); ?>

    85 |

    lang->getKey('CARACTERISTICS_FREE_PRESENTATION'); ?>

    86 |
    87 |
    88 | 89 |

    lang->getKey('CARACTERISTICS_IMPROVED'); ?>

    90 |

    lang->getKey('CARACTERISTICS_IMPROVED_PRESENTATION'); ?>

    91 |
    92 |
    93 | 94 |

    lang->getKey('CARACTERISTICS_CUSTOMIZABLE'); ?>

    95 |

    lang->getKey('CARACTERISTICS_CUSTOMIZABLE_PRESENTATION'); ?>

    96 |
    97 |
    98 | 99 |

    lang->getKey('CARACTERISTICS_FAST'); ?>

    100 |

    lang->getKey('CARACTERISTICS_FAST_PRESENTATION'); ?>

    101 |
    102 |
    103 | 104 |

    lang->getKey('CARACTERISTICS_HELP_US'); ?>

    105 |

    lang->getKey('CARACTERISTICS_HELP_US_PRESENTATION'); ?>

    106 |
    107 |
    108 | 109 |

    lang->getKey('CARACTERISTICS_UPDATE'); ?>

    110 |

    lang->getKey('CARACTERISTICS_UPDATE_PRESENTATION'); ?>

    111 |
    112 |
    113 |
    114 |
    115 |
    116 |
    117 |
    118 | 119 | 120 |
    121 |
    122 |
    123 |

    lang->getKey('DOWNLOAD_DOWNLOAD'); ?>

    124 |
    125 |
    126 |
    127 |
    128 | 129 |

    lang->getKey('DOWNLOAD_WINDOWS'); ?>

    130 | 133 |
    134 |
    135 | 136 |

    lang->getKey('DOWNLOAD_WINDOWSPORTABLE'); ?>

    137 | 140 |
    141 |
    142 | 143 |

    lang->getKey('DOWNLOAD_LINUX'); ?>

    144 | 147 |
    148 |
    149 | 150 |

    lang->getKey('DOWNLOAD_ARCH'); ?>

    151 | 154 |
    155 |
    156 | 157 |

    lang->getKey('DOWNLOAD_GITHUB'); ?>

    158 | 161 |
    162 |
    163 |
    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 | 36 | 37 |
    38 |
    39 |
    40 |

    Informations de l'utilisateur: params['account']->nickname; ?>

    41 |
    42 |
    43 |
    44 |
    45 | 46 |

    Pseudonyme

    47 |

    params['account']->nickname; ?>

    48 |
    49 |
    50 | 51 |

    Nombre de contributions

    52 |

    Theme au pif

    53 |
    54 |
    55 | 56 |

    Prénom

    57 |

    params['account']->name; ?>

    58 |
    59 |
    60 | 61 |

    Date d'inscription

    62 |

    lang->getKey('DATE_MONTHS')); 66 | $langDays = explode(', ', $this->lang->getKey('DATE_DAYS')); 67 | $day = str_replace($baseDays, $langDays, date('l', strtotime($this->params['account']->registrationDate))); 68 | $month = str_replace($baseMonth, $langMonth, date('F', strtotime($this->params['account']->registrationDate))); 69 | echo $day.' '.date('j', strtotime($this->params['account']->registrationDate)).' '.$this->lang->getKey('DATE_DELIMITOR').' '.$month.' '.date('Y', strtotime($this->params['account']->registrationDate)); 70 | // echo date('l j \of F Y h:i:s A', strtotime($this->params['account']->registrationDate)); 71 | ?>

    72 |
    73 |
    74 |
    75 |
    76 | 77 |

    Dernière connection

    78 |

    26 juin 2018

    79 |
    80 |
    81 |
    82 | Next 83 |
    84 |
    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 | 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 |
    42 | 46 | 50 | 53 |
    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 |
    67 | 71 | 76 | 81 | 85 | 88 |
    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 | -------------------------------------------------------------------------------- /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 | 39 | 40 |
    41 |
    42 |
    43 |

    Informations overview

    44 |
    45 |
    46 | Next 47 |
    48 | 49 |
    50 |
    51 |
    52 |

    Change informations

    53 |
    54 |
    55 |
    56 |

    params['lang']->getKey('MY_CHANGE_IMAGE_TITLE'); ?>

    57 |
    58 | 59 |
    60 | 61 |
    62 |
    63 |
    64 |

    params['lang']->getKey('MY_CHANGE_NICKNAME_TITLE'); ?>

    65 |
    66 | 67 |
    68 | 69 |
    70 |
    71 |
    72 |

    params['lang']->getKey('MY_CHANGE_PASSWORD_TITLE'); ?>

    73 |
    74 | 75 | 76 |
    77 | 78 |
    79 |
    80 |
    81 |
    82 | Next 83 |
    -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------