Skip to content
Snippets Groups Projects
Commit bb94a9e7 authored by Rico van Endern's avatar Rico van Endern
Browse files

Merged in dev (pull request #16)

parents 7b81761b afcf30c7
Branches
No related tags found
No related merge requests found
Showing
with 19 additions and 117 deletions
.idea/
......@@ -2,3 +2,6 @@
# Enable expirations.
ExpiresActive Off
</IfModule>
RewriteEngine on
RewriteRule ^(.*).less$ less/style.php?name=$1.less
<?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
const ROOT_DIR="/infoscreen";
?>
@viewport {
width: device-width;
user-zoom: fixed;
}
body {
margin: 0px;
background: #0a0a0a;
font-family: Arial;
overflow: hidden;
}
[data-container=panel] {
background-color: rgba(8, 8, 8, 0.68);
border: solid 1px #252525;
box-shadow: 0px 2px 1px #000000;
padding: 6px;
/* margin: 5px;*/
float: left;
box-sizing: border-box;
height: 100%;
width: 100%;
overflow: hidden;
}
[data-container=panelContainer] {
float: left;
width: 100%;
height: 100%;
/*padding: 4px;*/
padding: 0.2vw;
box-sizing: border-box;
}
[data-container=split] {
box-sizing: border-box;
/* display: flex;
flex-direction: column;*/
height: 100%;
width: 100%;
float: left;
}
[data-container=main] {
height: 100%;
width: 100%;
position: absolute;
box-sizing: border-box;
padding: 0.2vw;
background: radial-gradient(black 15%, transparent 15%) 0 0, radial-gradient(black 15%, transparent 15%) 12px 12px, radial-gradient(rgba(255, 255, 255, 0.1) 15%, transparent 20%) 0 1px, radial-gradient(rgba(255, 255, 255, 0.1) 15%, transparent 20%) 12px 13px;
background-size: 24px 24px;
background-color: #171717;
}
......@@ -6,18 +6,17 @@
}
body {
margin: 0px;
background: #0a0a0a;
font-family: Arial;
overflow:hidden;
margin: 0;
background: #0a0a0a;
font-family: Arial, serif;
overflow:hidden;
}
[data-container=panel] {
background-color: rgba(8, 8, 8, 0.68);
border: solid 1px #252525;
box-shadow: 0px 2px 1px #000000;
box-shadow: 0 2px 1px #000000;
padding: 6px;
/* margin: 5px;*/
float:left;
box-sizing: border-box;
height:100%;
......@@ -49,11 +48,13 @@ body {
position:absolute;
box-sizing: border-box;
padding: 0.2vw;
background: radial-gradient(black 15%, transparent 15%) 0 0, radial-gradient(black 15%, transparent 15%) @dotdist @dotdist, radial-gradient(rgba(255,255,255,.1)
15%,
transparent 20%) 0 1px, radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) @dotdist @dotdist+1;
padding: 0.2vw;
background:
radial-gradient(black 15%, transparent 15%) 0 0,
radial-gradient(black 15%, transparent 15%) @dotdist @dotdist,
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px,
radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) @dotdist @dotdist+1,
#171717;
background-size: @dotdist*2 @dotdist*2;
background-color: #171717;
}
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment