diff --git a/ajax/ConfigurationComponent.php b/ajax/ConfigurationComponent.php old mode 100644 new mode 100755 index 8fce7bd5d5656dac535f3d397768630dc5b99389..0df7bb1ab02f7a5e87cfc203aeea8fde49cb94b0 --- a/ajax/ConfigurationComponent.php +++ b/ajax/ConfigurationComponent.php @@ -1,58 +1,58 @@ -<?php - - namespace App\Controller\Component; - - use Cake\Controller\Component; - use Cake\Filesystem\File; - - class ConfigurationComponent extends Component { - - private $session = NULL; - private $folder = null; - - public function initialize(array $config) { - $this->session = $this->request->session(); - } - - public function getConfiguration($session_key, $config_name = '', $config_type = 'panel') { - if (!is_string($session_key) - || !is_string($config_name) - || !is_string($config_type) - || empty($session_key)) { - return FALSE; - } - // load data from session or reload data to session? - /* if ($this->session->check($session_key)) { - // return configuration - return $this->session->read($session_key); - } else {*/ - // reload configuration - return $this->getReloadedConfiguration($session_key, $config_name, $config_type); - // } - } - - public function getReloadedConfiguration($session_key, $config_name = '', $config_type = 'panel') { - if (!is_string($session_key) - || !is_string($config_name) - || !is_string($config_type) - || (strpos($config_type, "..")) - || empty($config_name) - || empty($session_key)) { - return FALSE; - } - // get filename for configuration - $file = new File(ROOT.'/config/'.$config_type.'/'.$config_name.'.json'); - // can we get our configuration? - if ($file->exists() && $file->readable() - && !(($file_content = $file->read()) === false)) { - // decode, save and return configuration - $result = json_decode($file_content,true); - $this->session->write($session_key, $result); - return $result; - } else { - // ERROR! - return FALSE; - } - } - - } +<?php + + namespace App\Controller\Component; + + use Cake\Controller\Component; + use Cake\Filesystem\File; + + class ConfigurationComponent extends Component { + + private $session = NULL; + private $folder = null; + + public function initialize(array $config) { + $this->session = $this->request->session(); + } + + public function getConfiguration($session_key, $config_name = '', $config_type = 'panel') { + if (!is_string($session_key) + || !is_string($config_name) + || !is_string($config_type) + || empty($session_key)) { + return FALSE; + } + // load data from session or reload data to session? + /* if ($this->session->check($session_key)) { + // return configuration + return $this->session->read($session_key); + } else {*/ + // reload configuration + return $this->getReloadedConfiguration($session_key, $config_name, $config_type); + // } + } + + public function getReloadedConfiguration($session_key, $config_name = '', $config_type = 'panel') { + if (!is_string($session_key) + || !is_string($config_name) + || !is_string($config_type) + || (strpos($config_type, "..")) + || empty($config_name) + || empty($session_key)) { + return FALSE; + } + // get filename for configuration + $file = new File(ROOT.'/config/'.$config_type.'/'.$config_name.'.json'); + // can we get our configuration? + if ($file->exists() && $file->readable() + && !(($file_content = $file->read()) === false)) { + // decode, save and return configuration + $result = json_decode($file_content,true); + $this->session->write($session_key, $result); + return $result; + } else { + // ERROR! + return FALSE; + } + } + + } diff --git a/css/font/NewCicle.ttf b/css/font/NewCicle.ttf index e651dc554798781ffecc64d9e7956b72c9fb58ea..51811cab9ee985a6271c0a77d6f1a9f0c71d9865 100755 Binary files a/css/font/NewCicle.ttf and b/css/font/NewCicle.ttf differ diff --git a/css/font/time-fat.ttf b/css/font/time-fat.ttf old mode 100644 new mode 100755 diff --git a/css/font/time-medium.ttf b/css/font/time-medium.ttf old mode 100644 new mode 100755 diff --git a/js/webfontloader.js b/js/webfontloader.js old mode 100644 new mode 100755 index 1a5cb2300651bffaae03803916a8077598f1c50b..b80242d6d610d04d837eb52aa414b5c528b94387 --- a/js/webfontloader.js +++ b/js/webfontloader.js @@ -1,17 +1,17 @@ -/* Web Font Loader v1.6.3 - (c) Adobe Systems, Google. License: Apache 2.0 */ -(function(){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function m(a,b,c){m=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?aa:ba;return m.apply(null,arguments)}var n=Date.now||function(){return+new Date};function r(a,b){this.C=a;this.q=b||a;this.D=this.q.document}r.prototype.createElement=function(a,b,c){a=this.D.createElement(a);if(b)for(var d in b)b.hasOwnProperty(d)&&("style"==d?a.style.cssText=b[d]:a.setAttribute(d,b[d]));c&&a.appendChild(this.D.createTextNode(c));return a};function s(a,b,c){a=a.D.getElementsByTagName(b)[0];a||(a=document.documentElement);a&&a.lastChild&&a.insertBefore(c,a.lastChild)} -function t(a,b,c){b=b||[];c=c||[];for(var d=a.className.split(/\s+/),f=0;f<b.length;f+=1){for(var e=!1,g=0;g<d.length;g+=1)if(b[f]===d[g]){e=!0;break}e||d.push(b[f])}b=[];for(f=0;f<d.length;f+=1){e=!1;for(g=0;g<c.length;g+=1)if(d[f]===c[g]){e=!0;break}e||b.push(d[f])}a.className=b.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function u(a,b){for(var c=a.className.split(/\s+/),d=0,f=c.length;d<f;d++)if(c[d]==b)return!0;return!1} -function v(a){if("string"===typeof a.ca)return a.ca;var b=a.q.location.protocol;"about:"==b&&(b=a.C.location.protocol);return"https:"==b?"https:":"http:"}function w(a,b){var c=a.createElement("link",{rel:"stylesheet",href:b,media:"all"}),d=!1;c.onload=function(){d||(d=!0)};c.onerror=function(){d||(d=!0)};s(a,"head",c)} -function x(a,b,c,d){var f=a.D.getElementsByTagName("head")[0];if(f){var e=a.createElement("script",{src:b}),g=!1;e.onload=e.onreadystatechange=function(){g||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(g=!0,c&&c(null),e.onload=e.onreadystatechange=null,"HEAD"==e.parentNode.tagName&&f.removeChild(e))};f.appendChild(e);setTimeout(function(){g||(g=!0,c&&c(Error("Script load timeout")))},d||5E3);return e}return null};function y(a){this.ba=a||"-"}y.prototype.d=function(a){for(var b=[],c=0;c<arguments.length;c++)b.push(arguments[c].replace(/[\W_]+/g,"").toLowerCase());return b.join(this.ba)};function z(a,b){this.U=a;this.M=4;this.G="n";var c=(b||"n4").match(/^([nio])([1-9])$/i);c&&(this.G=c[1],this.M=parseInt(c[2],10))}z.prototype.getName=function(){return this.U};function A(a){return a.G+a.M}function ca(a){var b=4,c="n",d=null;a&&((d=a.match(/(normal|oblique|italic)/i))&&d[1]&&(c=d[1].substr(0,1).toLowerCase()),(d=a.match(/([1-9]00|normal|bold)/i))&&d[1]&&(/bold/i.test(d[1])?b=7:/[1-9]00/.test(d[1])&&(b=parseInt(d[1].substr(0,1),10))));return c+b};function da(a,b){this.a=a;this.j=a.q.document.documentElement;this.I=b;this.f="wf";this.e=new y("-");this.Y=!1!==b.events;this.v=!1!==b.classes}function ea(a){a.v&&t(a.j,[a.e.d(a.f,"loading")]);B(a,"loading")}function C(a){if(a.v){var b=u(a.j,a.e.d(a.f,"active")),c=[],d=[a.e.d(a.f,"loading")];b||c.push(a.e.d(a.f,"inactive"));t(a.j,c,d)}B(a,"inactive")}function B(a,b,c){if(a.Y&&a.I[b])if(c)a.I[b](c.getName(),A(c));else a.I[b]()};function fa(){this.u={}}function ga(a,b,c){var d=[],f;for(f in b)if(b.hasOwnProperty(f)){var e=a.u[f];e&&d.push(e(b[f],c))}return d};function D(a,b){this.a=a;this.A=b;this.g=this.a.createElement("span",{"aria-hidden":"true"},this.A)}function F(a){s(a.a,"body",a.g)} -function G(a){var b;b=[];for(var c=a.U.split(/,\s*/),d=0;d<c.length;d++){var f=c[d].replace(/['"]/g,"");-1==f.indexOf(" ")?b.push(f):b.push("'"+f+"'")}b=b.join(",");c="normal";"o"===a.G?c="oblique":"i"===a.G&&(c="italic");return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+b+";"+("font-style:"+c+";font-weight:"+(a.M+"00")+";")} -D.prototype.remove=function(){var a=this.g;a.parentNode&&a.parentNode.removeChild(a)};function H(a,b,c,d,f,e,g){this.N=a;this.aa=b;this.a=c;this.h=d;this.A=g||"BESbswy";this.p={};this.L=f||3E3;this.S=e||null;this.w=this.o=this.m=null;this.m=new D(this.a,this.A);this.o=new D(this.a,this.A);this.w=new D(this.a,this.A);a=new z("serif",A(this.h));a=G(a);this.m.g.style.cssText=a;a=new z("sans-serif",A(this.h));a=G(a);this.o.g.style.cssText=a;a=new z("monospace",A(this.h));a=G(a);this.w.g.style.cssText=a;F(this.m);F(this.o);F(this.w);this.p.serif=this.m.g.offsetWidth;this.p["sans-serif"]= -this.o.g.offsetWidth;this.p.monospace=this.w.g.offsetWidth}var I={ga:"serif",fa:"sans-serif",ea:"monospace"},J=null;function K(){if(null===J){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);J=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return J} -H.prototype.start=function(){this.da=n();var a=new z(this.h.getName()+",serif",A(this.h)),a=G(a);this.m.g.style.cssText=a;a=new z(this.h.getName()+",sans-serif",A(this.h));a=G(a);this.o.g.style.cssText=a;L(this)};function M(a,b,c){for(var d in I)if(I.hasOwnProperty(d)&&b===a.p[I[d]]&&c===a.p[I[d]])return!0;return!1} -function L(a){var b=a.m.g.offsetWidth,c=a.o.g.offsetWidth,d;(d=b===a.p.serif&&c===a.p["sans-serif"])||(d=K()&&M(a,b,c));d?n()-a.da>=a.L?K()&&M(a,b,c)&&(null===a.S||a.S.hasOwnProperty(a.h.getName()))?N(a,a.N):N(a,a.aa):ha(a):N(a,a.N)}function ha(a){setTimeout(m(function(){L(this)},a),50)}function N(a,b){a.m.remove();a.o.remove();a.w.remove();b(a.h)};function O(a,b,c){this.a=a;this.s=b;this.J=0;this.W=this.R=!1;this.L=c}O.prototype.Z=function(a){var b=this.s;b.v&&t(b.j,[b.e.d(b.f,a.getName(),A(a).toString(),"active")],[b.e.d(b.f,a.getName(),A(a).toString(),"loading"),b.e.d(b.f,a.getName(),A(a).toString(),"inactive")]);B(b,"fontactive",a);this.W=!0;P(this)}; -O.prototype.$=function(a){var b=this.s;if(b.v){var c=u(b.j,b.e.d(b.f,a.getName(),A(a).toString(),"active")),d=[],f=[b.e.d(b.f,a.getName(),A(a).toString(),"loading")];c||d.push(b.e.d(b.f,a.getName(),A(a).toString(),"inactive"));t(b.j,d,f)}B(b,"fontinactive",a);P(this)};function P(a){0==--a.J&&a.R&&(a.W?(a=a.s,a.v&&t(a.j,[a.e.d(a.f,"active")],[a.e.d(a.f,"loading"),a.e.d(a.f,"inactive")]),B(a,"active")):C(a.s))};function Q(a){this.C=a;this.t=new fa;this.T=0;this.O=this.P=!0}Q.prototype.load=function(a){this.a=new r(this.C,a.context||this.C);this.P=!1!==a.events;this.O=!1!==a.classes;ia(this,new da(this.a,a),a)}; -function ja(a,b,c,d,f){var e=0==--a.T;(a.O||a.P)&&setTimeout(function(){var a=f||null,l=d||null||{};if(0===c.length&&e)C(b.s);else{b.J+=c.length;e&&(b.R=e);for(var k=0;k<c.length;k++){var h=c[k],p=l[h.getName()],q=b.s,E=h;q.v&&t(q.j,[q.e.d(q.f,E.getName(),A(E).toString(),"loading")]);B(q,"fontloading",E);q=null;q=new H(m(b.Z,b),m(b.$,b),b.a,h,b.L,a,p);q.start()}}},0)} -function ia(a,b,c){var d=[],f=c.timeout;ea(b);var d=ga(a.t,c,a.a),e=new O(a.a,b,f);a.T=d.length;b=0;for(c=d.length;b<c;b++)d[b].load(function(b,c,d){ja(a,e,b,c,d)})};function R(a,b,c){this.H=a?a:b+ka;this.k=[];this.K=[];this.X=c||""}var ka="//fonts.googleapis.com/css";R.prototype.d=function(){if(0==this.k.length)throw Error("No fonts to load!");if(-1!=this.H.indexOf("kit="))return this.H;for(var a=this.k.length,b=[],c=0;c<a;c++)b.push(this.k[c].replace(/ /g,"+"));a=this.H+"?family="+b.join("%7C");0<this.K.length&&(a+="&subset="+this.K.join(","));0<this.X.length&&(a+="&text="+encodeURIComponent(this.X));return a};function S(a){this.k=a;this.V=[];this.F={}} -var T={latin:"BESbswy",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},la={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},ma={i:"i",italic:"i",n:"n",normal:"n"},na=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/; -S.prototype.parse=function(){for(var a=this.k.length,b=0;b<a;b++){var c=this.k[b].split(":"),d=c[0].replace(/\+/g," "),f=["n4"];if(2<=c.length){var e;var g=c[1];e=[];if(g)for(var g=g.split(","),l=g.length,k=0;k<l;k++){var h;h=g[k];if(h.match(/^[\w-]+$/))if(h=na.exec(h.toLowerCase()),null==h)h="";else{var p;p=h[1];if(null==p||""==p)p="4";else{var q=la[p];p=q?q:isNaN(p)?"4":p.substr(0,1)}h=h[2];h=[null==h||""==h?"n":ma[h],p].join("")}else h="";h&&e.push(h)}0<e.length&&(f=e);3==c.length&&(c=c[2],e=[], -c=c?c.split(","):e,0<c.length&&(c=T[c[0]])&&(this.F[d]=c))}this.F[d]||(c=T[d])&&(this.F[d]=c);for(c=0;c<f.length;c+=1)this.V.push(new z(d,f[c]))}};function U(a,b){this.a=a;this.c=b}var oa={Arimo:!0,Cousine:!0,Tinos:!0};U.prototype.load=function(a){for(var b=this.a,c=new R(this.c.api,v(b),this.c.text),d=this.c.families,f=d.length,e=0;e<f;e++){var g=d[e].split(":");3==g.length&&c.K.push(g.pop());var l="";2==g.length&&""!=g[1]&&(l=":");c.k.push(g.join(l))}d=new S(d);d.parse();w(b,c.d());a(d.V,d.F,oa)};function V(a,b){this.a=a;this.c=b;this.Q=[]}V.prototype.B=function(a){var b=this.a;return v(this.a)+(this.c.api||"//f.fontdeck.com/s/css/js/")+(b.q.location.hostname||b.C.location.hostname)+"/"+a+".js"}; -V.prototype.load=function(a){var b=this.c.id,c=this.a.q,d=this;b?(c.__webfontfontdeckmodule__||(c.__webfontfontdeckmodule__={}),c.__webfontfontdeckmodule__[b]=function(b,c){for(var g=0,l=c.fonts.length;g<l;++g){var k=c.fonts[g];d.Q.push(new z(k.name,ca("font-weight:"+k.weight+";font-style:"+k.style)))}a(d.Q)},x(this.a,this.B(b),function(b){b&&a([])})):a([])};function W(a,b){this.a=a;this.c=b}W.prototype.B=function(a){return(this.c.api||"https://use.typekit.net")+"/"+a+".js"};W.prototype.load=function(a){var b=this.c.id,c=this.a.q;b?x(this.a,this.B(b),function(b){if(b)a([]);else if(c.Typekit&&c.Typekit.config&&c.Typekit.config.fn){b=c.Typekit.config.fn;for(var f=[],e=0;e<b.length;e+=2)for(var g=b[e],l=b[e+1],k=0;k<l.length;k++)f.push(new z(g,l[k]));try{c.Typekit.load({events:!1,classes:!1})}catch(h){}a(f)}},2E3):a([])};function X(a,b){this.a=a;this.c=b}X.prototype.B=function(a,b){var c=v(this.a),d=(this.c.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,"");return c+"//"+d+"/"+a+".js"+(b?"?v="+b:"")};X.prototype.load=function(a){var b=this.c.projectId,c=this.c.version;if(b){var d=this.a.q;x(this.a,this.B(b,c),function(c){if(c)a([]);else if(d["__mti_fntLst"+b]){c=d["__mti_fntLst"+b]();var e=[];if(c)for(var g=0;g<c.length;g++)e.push(new z(c[g].fontfamily));a(e)}else a([])}).id="__MonotypeAPIScript__"+b}else a([])};function Y(a,b){this.a=a;this.c=b}Y.prototype.load=function(a){var b,c,d=this.c.urls||[],f=this.c.families||[],e=this.c.testStrings||{};b=0;for(c=d.length;b<c;b++)w(this.a,d[b]);d=[];b=0;for(c=f.length;b<c;b++){var g=f[b].split(":");if(g[1])for(var l=g[1].split(","),k=0;k<l.length;k+=1)d.push(new z(g[0],l[k]));else d.push(new z(g[0]))}a(d,e)};var Z=new Q(window);Z.t.u.custom=function(a,b){return new Y(b,a)};Z.t.u.fontdeck=function(a,b){return new V(b,a)};Z.t.u.monotype=function(a,b){return new X(b,a)};Z.t.u.typekit=function(a,b){return new W(b,a)};Z.t.u.google=function(a,b){return new U(b,a)};var $={load:m(Z.load,Z)};"function"===typeof define&&define.amd?define(function(){return $}):"undefined"!==typeof module&&module.exports?module.exports=$:(window.WebFont=$,window.WebFontConfig&&Z.load(window.WebFontConfig));}()); +/* Web Font Loader v1.6.3 - (c) Adobe Systems, Google. License: Apache 2.0 */ +(function(){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function m(a,b,c){m=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?aa:ba;return m.apply(null,arguments)}var n=Date.now||function(){return+new Date};function r(a,b){this.C=a;this.q=b||a;this.D=this.q.document}r.prototype.createElement=function(a,b,c){a=this.D.createElement(a);if(b)for(var d in b)b.hasOwnProperty(d)&&("style"==d?a.style.cssText=b[d]:a.setAttribute(d,b[d]));c&&a.appendChild(this.D.createTextNode(c));return a};function s(a,b,c){a=a.D.getElementsByTagName(b)[0];a||(a=document.documentElement);a&&a.lastChild&&a.insertBefore(c,a.lastChild)} +function t(a,b,c){b=b||[];c=c||[];for(var d=a.className.split(/\s+/),f=0;f<b.length;f+=1){for(var e=!1,g=0;g<d.length;g+=1)if(b[f]===d[g]){e=!0;break}e||d.push(b[f])}b=[];for(f=0;f<d.length;f+=1){e=!1;for(g=0;g<c.length;g+=1)if(d[f]===c[g]){e=!0;break}e||b.push(d[f])}a.className=b.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function u(a,b){for(var c=a.className.split(/\s+/),d=0,f=c.length;d<f;d++)if(c[d]==b)return!0;return!1} +function v(a){if("string"===typeof a.ca)return a.ca;var b=a.q.location.protocol;"about:"==b&&(b=a.C.location.protocol);return"https:"==b?"https:":"http:"}function w(a,b){var c=a.createElement("link",{rel:"stylesheet",href:b,media:"all"}),d=!1;c.onload=function(){d||(d=!0)};c.onerror=function(){d||(d=!0)};s(a,"head",c)} +function x(a,b,c,d){var f=a.D.getElementsByTagName("head")[0];if(f){var e=a.createElement("script",{src:b}),g=!1;e.onload=e.onreadystatechange=function(){g||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(g=!0,c&&c(null),e.onload=e.onreadystatechange=null,"HEAD"==e.parentNode.tagName&&f.removeChild(e))};f.appendChild(e);setTimeout(function(){g||(g=!0,c&&c(Error("Script load timeout")))},d||5E3);return e}return null};function y(a){this.ba=a||"-"}y.prototype.d=function(a){for(var b=[],c=0;c<arguments.length;c++)b.push(arguments[c].replace(/[\W_]+/g,"").toLowerCase());return b.join(this.ba)};function z(a,b){this.U=a;this.M=4;this.G="n";var c=(b||"n4").match(/^([nio])([1-9])$/i);c&&(this.G=c[1],this.M=parseInt(c[2],10))}z.prototype.getName=function(){return this.U};function A(a){return a.G+a.M}function ca(a){var b=4,c="n",d=null;a&&((d=a.match(/(normal|oblique|italic)/i))&&d[1]&&(c=d[1].substr(0,1).toLowerCase()),(d=a.match(/([1-9]00|normal|bold)/i))&&d[1]&&(/bold/i.test(d[1])?b=7:/[1-9]00/.test(d[1])&&(b=parseInt(d[1].substr(0,1),10))));return c+b};function da(a,b){this.a=a;this.j=a.q.document.documentElement;this.I=b;this.f="wf";this.e=new y("-");this.Y=!1!==b.events;this.v=!1!==b.classes}function ea(a){a.v&&t(a.j,[a.e.d(a.f,"loading")]);B(a,"loading")}function C(a){if(a.v){var b=u(a.j,a.e.d(a.f,"active")),c=[],d=[a.e.d(a.f,"loading")];b||c.push(a.e.d(a.f,"inactive"));t(a.j,c,d)}B(a,"inactive")}function B(a,b,c){if(a.Y&&a.I[b])if(c)a.I[b](c.getName(),A(c));else a.I[b]()};function fa(){this.u={}}function ga(a,b,c){var d=[],f;for(f in b)if(b.hasOwnProperty(f)){var e=a.u[f];e&&d.push(e(b[f],c))}return d};function D(a,b){this.a=a;this.A=b;this.g=this.a.createElement("span",{"aria-hidden":"true"},this.A)}function F(a){s(a.a,"body",a.g)} +function G(a){var b;b=[];for(var c=a.U.split(/,\s*/),d=0;d<c.length;d++){var f=c[d].replace(/['"]/g,"");-1==f.indexOf(" ")?b.push(f):b.push("'"+f+"'")}b=b.join(",");c="normal";"o"===a.G?c="oblique":"i"===a.G&&(c="italic");return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+b+";"+("font-style:"+c+";font-weight:"+(a.M+"00")+";")} +D.prototype.remove=function(){var a=this.g;a.parentNode&&a.parentNode.removeChild(a)};function H(a,b,c,d,f,e,g){this.N=a;this.aa=b;this.a=c;this.h=d;this.A=g||"BESbswy";this.p={};this.L=f||3E3;this.S=e||null;this.w=this.o=this.m=null;this.m=new D(this.a,this.A);this.o=new D(this.a,this.A);this.w=new D(this.a,this.A);a=new z("serif",A(this.h));a=G(a);this.m.g.style.cssText=a;a=new z("sans-serif",A(this.h));a=G(a);this.o.g.style.cssText=a;a=new z("monospace",A(this.h));a=G(a);this.w.g.style.cssText=a;F(this.m);F(this.o);F(this.w);this.p.serif=this.m.g.offsetWidth;this.p["sans-serif"]= +this.o.g.offsetWidth;this.p.monospace=this.w.g.offsetWidth}var I={ga:"serif",fa:"sans-serif",ea:"monospace"},J=null;function K(){if(null===J){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);J=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return J} +H.prototype.start=function(){this.da=n();var a=new z(this.h.getName()+",serif",A(this.h)),a=G(a);this.m.g.style.cssText=a;a=new z(this.h.getName()+",sans-serif",A(this.h));a=G(a);this.o.g.style.cssText=a;L(this)};function M(a,b,c){for(var d in I)if(I.hasOwnProperty(d)&&b===a.p[I[d]]&&c===a.p[I[d]])return!0;return!1} +function L(a){var b=a.m.g.offsetWidth,c=a.o.g.offsetWidth,d;(d=b===a.p.serif&&c===a.p["sans-serif"])||(d=K()&&M(a,b,c));d?n()-a.da>=a.L?K()&&M(a,b,c)&&(null===a.S||a.S.hasOwnProperty(a.h.getName()))?N(a,a.N):N(a,a.aa):ha(a):N(a,a.N)}function ha(a){setTimeout(m(function(){L(this)},a),50)}function N(a,b){a.m.remove();a.o.remove();a.w.remove();b(a.h)};function O(a,b,c){this.a=a;this.s=b;this.J=0;this.W=this.R=!1;this.L=c}O.prototype.Z=function(a){var b=this.s;b.v&&t(b.j,[b.e.d(b.f,a.getName(),A(a).toString(),"active")],[b.e.d(b.f,a.getName(),A(a).toString(),"loading"),b.e.d(b.f,a.getName(),A(a).toString(),"inactive")]);B(b,"fontactive",a);this.W=!0;P(this)}; +O.prototype.$=function(a){var b=this.s;if(b.v){var c=u(b.j,b.e.d(b.f,a.getName(),A(a).toString(),"active")),d=[],f=[b.e.d(b.f,a.getName(),A(a).toString(),"loading")];c||d.push(b.e.d(b.f,a.getName(),A(a).toString(),"inactive"));t(b.j,d,f)}B(b,"fontinactive",a);P(this)};function P(a){0==--a.J&&a.R&&(a.W?(a=a.s,a.v&&t(a.j,[a.e.d(a.f,"active")],[a.e.d(a.f,"loading"),a.e.d(a.f,"inactive")]),B(a,"active")):C(a.s))};function Q(a){this.C=a;this.t=new fa;this.T=0;this.O=this.P=!0}Q.prototype.load=function(a){this.a=new r(this.C,a.context||this.C);this.P=!1!==a.events;this.O=!1!==a.classes;ia(this,new da(this.a,a),a)}; +function ja(a,b,c,d,f){var e=0==--a.T;(a.O||a.P)&&setTimeout(function(){var a=f||null,l=d||null||{};if(0===c.length&&e)C(b.s);else{b.J+=c.length;e&&(b.R=e);for(var k=0;k<c.length;k++){var h=c[k],p=l[h.getName()],q=b.s,E=h;q.v&&t(q.j,[q.e.d(q.f,E.getName(),A(E).toString(),"loading")]);B(q,"fontloading",E);q=null;q=new H(m(b.Z,b),m(b.$,b),b.a,h,b.L,a,p);q.start()}}},0)} +function ia(a,b,c){var d=[],f=c.timeout;ea(b);var d=ga(a.t,c,a.a),e=new O(a.a,b,f);a.T=d.length;b=0;for(c=d.length;b<c;b++)d[b].load(function(b,c,d){ja(a,e,b,c,d)})};function R(a,b,c){this.H=a?a:b+ka;this.k=[];this.K=[];this.X=c||""}var ka="//fonts.googleapis.com/css";R.prototype.d=function(){if(0==this.k.length)throw Error("No fonts to load!");if(-1!=this.H.indexOf("kit="))return this.H;for(var a=this.k.length,b=[],c=0;c<a;c++)b.push(this.k[c].replace(/ /g,"+"));a=this.H+"?family="+b.join("%7C");0<this.K.length&&(a+="&subset="+this.K.join(","));0<this.X.length&&(a+="&text="+encodeURIComponent(this.X));return a};function S(a){this.k=a;this.V=[];this.F={}} +var T={latin:"BESbswy",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},la={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},ma={i:"i",italic:"i",n:"n",normal:"n"},na=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/; +S.prototype.parse=function(){for(var a=this.k.length,b=0;b<a;b++){var c=this.k[b].split(":"),d=c[0].replace(/\+/g," "),f=["n4"];if(2<=c.length){var e;var g=c[1];e=[];if(g)for(var g=g.split(","),l=g.length,k=0;k<l;k++){var h;h=g[k];if(h.match(/^[\w-]+$/))if(h=na.exec(h.toLowerCase()),null==h)h="";else{var p;p=h[1];if(null==p||""==p)p="4";else{var q=la[p];p=q?q:isNaN(p)?"4":p.substr(0,1)}h=h[2];h=[null==h||""==h?"n":ma[h],p].join("")}else h="";h&&e.push(h)}0<e.length&&(f=e);3==c.length&&(c=c[2],e=[], +c=c?c.split(","):e,0<c.length&&(c=T[c[0]])&&(this.F[d]=c))}this.F[d]||(c=T[d])&&(this.F[d]=c);for(c=0;c<f.length;c+=1)this.V.push(new z(d,f[c]))}};function U(a,b){this.a=a;this.c=b}var oa={Arimo:!0,Cousine:!0,Tinos:!0};U.prototype.load=function(a){for(var b=this.a,c=new R(this.c.api,v(b),this.c.text),d=this.c.families,f=d.length,e=0;e<f;e++){var g=d[e].split(":");3==g.length&&c.K.push(g.pop());var l="";2==g.length&&""!=g[1]&&(l=":");c.k.push(g.join(l))}d=new S(d);d.parse();w(b,c.d());a(d.V,d.F,oa)};function V(a,b){this.a=a;this.c=b;this.Q=[]}V.prototype.B=function(a){var b=this.a;return v(this.a)+(this.c.api||"//f.fontdeck.com/s/css/js/")+(b.q.location.hostname||b.C.location.hostname)+"/"+a+".js"}; +V.prototype.load=function(a){var b=this.c.id,c=this.a.q,d=this;b?(c.__webfontfontdeckmodule__||(c.__webfontfontdeckmodule__={}),c.__webfontfontdeckmodule__[b]=function(b,c){for(var g=0,l=c.fonts.length;g<l;++g){var k=c.fonts[g];d.Q.push(new z(k.name,ca("font-weight:"+k.weight+";font-style:"+k.style)))}a(d.Q)},x(this.a,this.B(b),function(b){b&&a([])})):a([])};function W(a,b){this.a=a;this.c=b}W.prototype.B=function(a){return(this.c.api||"https://use.typekit.net")+"/"+a+".js"};W.prototype.load=function(a){var b=this.c.id,c=this.a.q;b?x(this.a,this.B(b),function(b){if(b)a([]);else if(c.Typekit&&c.Typekit.config&&c.Typekit.config.fn){b=c.Typekit.config.fn;for(var f=[],e=0;e<b.length;e+=2)for(var g=b[e],l=b[e+1],k=0;k<l.length;k++)f.push(new z(g,l[k]));try{c.Typekit.load({events:!1,classes:!1})}catch(h){}a(f)}},2E3):a([])};function X(a,b){this.a=a;this.c=b}X.prototype.B=function(a,b){var c=v(this.a),d=(this.c.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,"");return c+"//"+d+"/"+a+".js"+(b?"?v="+b:"")};X.prototype.load=function(a){var b=this.c.projectId,c=this.c.version;if(b){var d=this.a.q;x(this.a,this.B(b,c),function(c){if(c)a([]);else if(d["__mti_fntLst"+b]){c=d["__mti_fntLst"+b]();var e=[];if(c)for(var g=0;g<c.length;g++)e.push(new z(c[g].fontfamily));a(e)}else a([])}).id="__MonotypeAPIScript__"+b}else a([])};function Y(a,b){this.a=a;this.c=b}Y.prototype.load=function(a){var b,c,d=this.c.urls||[],f=this.c.families||[],e=this.c.testStrings||{};b=0;for(c=d.length;b<c;b++)w(this.a,d[b]);d=[];b=0;for(c=f.length;b<c;b++){var g=f[b].split(":");if(g[1])for(var l=g[1].split(","),k=0;k<l.length;k+=1)d.push(new z(g[0],l[k]));else d.push(new z(g[0]))}a(d,e)};var Z=new Q(window);Z.t.u.custom=function(a,b){return new Y(b,a)};Z.t.u.fontdeck=function(a,b){return new V(b,a)};Z.t.u.monotype=function(a,b){return new X(b,a)};Z.t.u.typekit=function(a,b){return new W(b,a)};Z.t.u.google=function(a,b){return new U(b,a)};var $={load:m(Z.load,Z)};"function"===typeof define&&define.amd?define(function(){return $}):"undefined"!==typeof module&&module.exports?module.exports=$:(window.WebFont=$,window.WebFontConfig&&Z.load(window.WebFontConfig));}()); diff --git a/panels/clock/background.png b/panels/clock/background.png old mode 100644 new mode 100755 diff --git a/panels/clock/background.svg b/panels/clock/background.svg old mode 100644 new mode 100755 diff --git a/panels/clock/script.js b/panels/clock/script.js old mode 100644 new mode 100755 diff --git a/panels/clock/style.less b/panels/clock/style.less old mode 100644 new mode 100755 diff --git a/panels/clock/template.html b/panels/clock/template.html old mode 100644 new mode 100755 diff --git a/style.php b/style.php index a758b95732f3f8194c11868c5d72eed642dd9bb7..12e171754d4acfc4377e48643594bf7df6ce2169 100755 --- a/style.php +++ b/style.php @@ -5,10 +5,16 @@ require "lessc.php"; $less = new lessc(); $style = $_GET["style"]; echo $style; -$less_file = "panels/" . $style . "/style.less"; +$less_file = "panels/$style/style.less"; +$css_file = "tmp/$style.css"; +if (!file_exists($less_file)) { +http_response_code(404); +echo $less_file." not found"; +return; +} -if ( !file_exists(filemtime($less_file)) ) +if ( !file_exists($css_file)) { $code = $less->compile( diff --git a/tmp/.gitignore b/tmp/.gitignore new file mode 100755 index 0000000000000000000000000000000000000000..72e8ffc0db8aad71a934dd11e5968bd5109e54b4 --- /dev/null +++ b/tmp/.gitignore @@ -0,0 +1 @@ +* diff --git a/tmp/GameOfLife.css b/tmp/GameOfLife.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/tmp/clock.css b/tmp/clock.css deleted file mode 100755 index 7c0fa9f759bdd1f0dc5eb13afb03828870b56cd1..0000000000000000000000000000000000000000 --- a/tmp/clock.css +++ /dev/null @@ -1,150 +0,0 @@ -[data-template=clock] [data-clock=right], -[data-template=clock] [data-clock=analog] { - float: left; - height: 100%; -} -[data-template=clock] [data-clock=analog] { - display: block; -} -[data-template=clock] [data-clock=analog] img { - width: 200px; - height: 200px; - position: absolute; -} -[data-template=clock] [data-biber] { - opacity: 0.3; -} -[data-template=clock] [data-clock=digital] { - display: -webkit-box; - -webkit-box-pack: justify; - -webkit-box-align: center; - display: -moz-box; - -moz-box-pack: justify; - -moz-box-align: center; - display: -ms-flexbox; - -ms-flex-pack: justify; - -ms-flex-align: center; - display: box; - box-pack: justify; - box-align: center; - height: 100%; -} -[data-template=clock] [data-clock] { - font-family: lcd; -} -@keyframes clock24 { - [data-template=clock] [data-clock=digital] from { - top: 0%; - } - [data-template=clock] [data-clock=digital] to { - top: -2400%; - } -} -@keyframes clock60 { - [data-template=clock] [data-clock=digital] from { - top: 0%; - } - [data-template=clock] [data-clock=digital] to { - top: -6000%; - } -} -@keyframes clockPulse { - [data-template=clock] [data-clock=digital] 0% { - color: #AA0000; - } - [data-template=clock] [data-clock=digital] 50% { - color: #550000; - } - [data-template=clock] [data-clock=digital] 100% { - color: #AA0000; - } -} -[data-template=clock] [data-clock=digital] [data-clock] { - position: relative; - width: 400px; - height: 200px; - overflow: hidden; - padding: 0px; - text-align: center; - background-color: #000000; - color: #550000; - box-sizing: border-box; -} -[data-template=clock] [data-clock=digital] [data-clock] [data-clock-seperator] { - position: relative; - display: inline-table; - top: -20px; - height: 120px; - font-size: 150px; - line-height: 150px; - margin-top: -20px; - width: 5px; - text-align: center; - margin-left: -20px; - margin-right: -20px; -} -[data-template=clock] [data-clock=digital] [data-clock] [data-clock-number] { - margin-top: -10px; -} -[data-template=clock] [data-clock=digital] [data-clock] [data-clock-number=hour], -[data-template=clock] [data-clock=digital] [data-clock] [data-clock-number=minute] { - position: relative; - display: inline-table; - font-size: 150px; - line-height: 150px; - text-align: center; - overflow: hidden; -} -[data-template=clock] [data-clock=digital] [data-clock] [data-clock-number=second] { - position: relative; - display: inline-table; - margin-left: 5px; - font-size: 75px; - line-height: 150px; - text-align: center; - overflow: hidden; -} -[data-template=clock] [data-clock=digital] [data-clock] [data-clock-number] [data-clock-indicator] { - position: absolute; - color: #AA0000; - text-align: center; - top: 0px; -} -[data-template=clock] [data-clock=digital] [data-clock=css] [data-clock-number=hour] [data-clock-indicator] { - animation: clock24 86400s steps(24) infinite; -} -[data-template=clock] [data-clock=digital] [data-clock=css] [data-clock-number=minute] [data-clock-indicator] { - animation: clock60 3600s steps(60) infinite; -} -[data-template=clock] [data-clock=digital] [data-clock=css] [data-clock-number=second] [data-clock-indicator] { - animation: clock60 60s steps(60) infinite; -} -[data-template=clock] [data-clock=digital] [data-clock=css] [data-clock-seperator] { - animation: clockPulse 1s steps(1) infinite; -} -[data-template=clock] [data-clock=digital] [data-clock-date] { - position: relative; - display: inline-table; - height: 75px; - font-size: 75px; - line-height: 75px; - text-align: center; - margin-top: -60px; - margin-left: -20px; - margin-right: -20px; -} -[data-template=clock] [data-clock=digital] [data-clock-date] [data-clock-date-background] { - position: absolute; - display: inline-table; - text-align: center; - top: 0px; - left: 0px; -} -[data-template=clock] [data-clock=digital] [data-clock-date] [data-clock-date-indicator] { - position: absolute; - display: inline-table; - text-align: center; - top: 0px; - left: 0px; - color: #AA0000; -} diff --git a/tmp/clock2.css b/tmp/clock2.css deleted file mode 100644 index 4b73aaec9b8e68949ef97910429673a32645f73e..0000000000000000000000000000000000000000 --- a/tmp/clock2.css +++ /dev/null @@ -1,3 +0,0 @@ -[data-template=clock2] [data-analog-clock] { - float: left; -} diff --git a/tmp/departure.css b/tmp/departure.css deleted file mode 100755 index 6bbd46b3c944f9bb3f19e3da2b16a8bb138365e6..0000000000000000000000000000000000000000 --- a/tmp/departure.css +++ /dev/null @@ -1,171 +0,0 @@ -[data-template=departure] [data-departure-view] { - position: relative; - width: 100%; - height: 100%; - background-color: #000000; - border-style: solid; - border-width: 1px; - border-color: #000000; - padding: 0px; - box-sizing: border-box; - overflow: hidden; - font-family: display; -} -[data-template=departure] [data-departure-view] [data-departure] { - position: relative; - width: 100%; - background-color: #0000A0; - color: #FFFFFF; - border-style: solid; - border-width: 1px; - border-color: #000000; - padding: 0px; - box-sizing: border-box; -} -[data-template=departure] [data-departure-view] [data-departure] [data-transport] { - position: relative; - display: inline-table; - width: 100%; - white-space: nowrap; -} -[data-template=departure] [data-departure-view] [data-departure] [data-transport] [data-line] { - position: relative; - display: inline-table; - background-color: #FFFFFF; - color: #0000A0; - width: 10%; - height: 100%; - text-align: right; - padding: 0px 5px; -} -[data-template=departure] [data-departure-view] [data-departure] [data-transport] [data-name] { - position: relative; - display: inline-table; - background-color: #0000A0; - color: #FFFFFF; - height: 100%; - padding: 0px 5px; -} -[data-template=departure] [data-departure-view] [data-departure] [data-stops] { - position: relative; - display: block; - width: 100%; -} -[data-template=departure] [data-departure-view] [data-departure] [data-stops] [data-stop] { - position: relative; - display: list-item; - list-style: none; - width: 100%; - margin: 1px 0px 0px 0px; -} -[data-template=departure] [data-departure-view] [data-departure] [data-stops] [data-stop] [data-time] { - position: relative; - max-width: 7.9%; - height: 100%; - float: left; - overflow: hidden; - padding: 0px 5px 0px 0px; -} -[data-template=departure] [data-departure-view] [data-departure] [data-stops] [data-stop] [data-name] { - position: relative; - max-width: 54.17%; - height: 100%; - float: left; - overflow: hidden; -} -[data-template=departure] [data-departure-view] [data-departure] [data-stops] [data-stop] [data-info] { - position: absolute; - width: 37.93%; - height: 100%; - right: 0px; - overflow: hidden; -} -[data-template=departure] [data-departure-view] [data-departure] [data-stops] [data-stop] [data-info] marquee { - background-color: #FFFFFF; - color: #0000A0; -} -[data-template=departure] [data-departure-view] [data-departure] [data-stops] [data-stop] [data-info] [data-css-marquee] { - position: relative; - overflow: hidden; - width: 100%; - height: 100%; - display: inline-block; -} -[data-template=departure] [data-departure-view] [data-departure] [data-stops] [data-stop] [data-info] [data-css-marquee] [data-css-marquee-text] { - position: absolute; - display: table-cell; - padding: 0px; - white-space: nowrap; - background-color: #FFFFFF; - color: #0000A0; - cursor: default; -} -[data-template=departure] [data-departure-view] [data-information] { - position: relative; - width: 100%; - background-color: #0000A0; - color: #FFFFFF; - border-style: solid; - border-width: 1px; - border-color: #000000; - padding: 0px; - box-sizing: border-box; - white-space: nowrap; -} -[data-template=departure] [data-departure-view] [data-information] [data-head] { - width: 100%; - background-color: #FFFFFF; - color: #0000A0; - text-align: center; -} -[data-template=departure] [data-departure-view] [data-information] [data-message] { - position: relative; - width: 100%; -} -[data-template=departure] [data-departure-view] [data-error] { - position: relative; - width: 100%; - background-color: #0000A0; - color: #FFFFFF; - border-style: solid; - border-width: 1px; - border-color: #000000; - padding: 0px; - box-sizing: border-box; - white-space: nowrap; - display: hidden; -} -[data-template=departure] [data-departure-view] [data-error] [data-head] { - width: 100%; - background-color: #FFFFFF; - color: #0000A0; - text-align: center; -} -[data-template=departure] [data-departure-view] [data-error] [data-message] { - width: 100%; -} -[data-template=departure] [data-departure-view] [data-vrrf-error] { - position: relative; - width: 100%; - background-color: #0000A0; - color: #FFFFFF; - border-style: solid; - border-width: 1px; - border-color: #000000; - padding: 0px; - box-sizing: border-box; - white-space: nowrap; - display: hidden; -} -[data-template=departure] [data-departure-view] [data-vrrf-error] [data-head] { - width: 100%; - background-color: #FFFFFF; - color: #0000A0; - text-align: center; -} -[data-template=departure] [data-departure-view] [data-vrrf-error] [data-stop] { - width: 100%; -} -[data-template=departure] [data-departure-view] [data-vrrf-error] [data-message] { - width: 100%; -} diff --git a/tmp/departures.css b/tmp/departures.css deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/tmp/scrollbar.css b/tmp/scrollbar.css deleted file mode 100755 index 341afd56810406b8f1f16277f93119dfbb7e2d61..0000000000000000000000000000000000000000 --- a/tmp/scrollbar.css +++ /dev/null @@ -1,33 +0,0 @@ -[data-template=scrollbar] [data-scrollbar-view] { - position: relative; - width: 100%; - height: 100%; - background-color: #000000; - border-style: solid; - border-color: #000000; - padding: 0px; - box-sizing: border-box; - overflow: hidden; - font-family: vrr; -} -[data-template=scrollbar] [data-scrollbar-view] marquee { - background-color: #000000; - color: #FFC000; -} -[data-template=scrollbar] [data-scrollbar-view] [data-css-marquee] { - position: relative; - overflow: hidden; - width: 100%; - height: 100%; - display: inline-block; - background-color: #000000; -} -[data-template=scrollbar] [data-scrollbar-view] [data-css-marquee] [data-css-marquee-text] { - position: absolute; - display: table-cell; - padding: 0px; - white-space: nowrap; - background-color: #000000; - color: #FFC000; - cursor: default; -} diff --git a/tmp/siog.css b/tmp/siog.css deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000