Faces3 presentation mode and /sysinfo endpoint

This commit is contained in:
Ruben 2016-09-20 10:27:36 +01:00
parent ff82dce6f8
commit 351a95b658
2 changed files with 146 additions and 118 deletions

View file

@ -44,50 +44,53 @@ EOSNIPPET;
<title>Emotion Hero</title> <title>Emotion Hero</title>
</head> </head>
<style type="text/css"> <style type="text/css">
html{ html{
height:100%; height:100%;
overflow:hidden; overflow:hidden;
}
body{
background:blue;
font-family:"Unifont";
font-weight:bold;
font-size:1vw;
margin:0.5em;
}
h3{
margin:0.5%;
text-align:center;
} }
h3 span{ body{
background:black; background:blue;
color:white; font-family:"Unifont";
padding:0.2%; font-weight:bold;
font-size:1vw;
margin:0.5em;
}
body.presentation{
background:black;
}
h3{
margin:0.5%;
text-align:center;
}
h3 span{
background:black;
color:white;
padding:0.2%;
} }
.block{ .block{
width:100%; width:100%;
font-size:80%; font-size:80%;
} }
.mouth .emo-block{ .mouth .emo-block{
width:50%; width:50%;
float:left; float:left;
height:3.6em; height:5em;
} }
.mouth .emotitle{ .mouth .emotitle{
display:block; display:block;
width:14%; width:14%;
margin-right:0.14%; margin-right:0.14%;
margin-left:0.14%; margin-left:0.14%;
float:left; float:left;
font-size:80%; font-size:80%;
padding-top:2.5% padding-top:2.5%
} }
.mouth .block { .mouth .block {
width:14%; width:14%;
margin-right:0.14%; margin-right:0.14%;
margin-left:0.14%; margin-left:0.14%;
float:left; float:left;
} }
/*.emotitle span:before{content:"";} /*.emotitle span:before{content:"";}
@ -96,147 +99,164 @@ float:left;
.emotitle:before{content:"«";} .emotitle:before{content:"«";}
.emotitle:after{content:"»";} .emotitle:after{content:"»";}
img{ img{
width:100%; width:100%;
filter:saturate(0%); filter:saturate(0%);
mix-blend-mode: multiply; mix-blend-mode: multiply;
/*mix-blend-mode: exclusion;*/ /*mix-blend-mode: exclusion;*/
} }
.perc{ .perc{
display:block; display:block;
width:100%; width:100%;
text-align:center; text-align:center;
} }
.emo-block{ .emo-block{
float:left; float:left;
text-align:center; text-align:center;
} }
.brows .emo-block { .brows .emo-block {
width:23%; width:23%;
margin-left:1%; margin-left:1%;
margin-right:1%; margin-right:1%;
} }
.nose .emo-block { .nose .emo-block {
width:12%; width:12%;
margin-left:1.14%; margin-left:1.14%;
margin-right:1.14%; margin-right:1.14%;
} }
.nose .emotitle{ .nose .emotitle{
font-size:80%; font-size:80%;
} }
.emo-block-emos{ .emo-block-emos{
position:relative; position:relative;
} }
.emo{ .emo{
text-align:center; text-align:center;
float:left; float:left;
background:#fff; background:#fff;
}
.brows{
width:40%;
margin-right:1%;
}
.nose{
width:40%;
margin-right:1%;
}
.mouth{
width:81%;
margin-top:1%;
} }
img.curImg{ .brows{
width:40%;
margin-right:1%;
}
.nose{
width:40%;
margin-right:1%;
}
.mouth{
width:81%;
margin-top:1%;
}
img.curImg{
position:absolute; position:absolute;
left:0; left:0;
mix-blend-mode:difference; mix-blend-mode:difference;
} }
svg{ .currentHit svg{
border-top: 1em solid blue; border-top: 1em solid blue;
margin: 0px -0.5em; margin: 0px -0.5em;
width: 100%; width: 100%;
padding: 0.5em; padding: 0.5em;
width:100%; width:100%;
} }
.presentation .currentHit svg {
border-top: solid 0.1em white;
}
.nose .block{position:relative;margin-bottom:2%;} .nose .block{position:relative;margin-bottom:2%;}
.nose .block span{position:absolute;top:0;right:0;color:white;text-align:right;padding:0.5%;} .nose .block span{position:absolute;top:0;right:0;color:white;text-align:right;padding:0.5%;}
.brows .emo-block.brow_explainer { .brows .emo-block.brow_explainer {
margin-top:3%;font-size:85%; margin-top:3%;font-size:85%;
border-left: 0.3em solid blue; border-left: 0.3em solid blue;
width: 22%; width: 22%;
padding-left: 0.4em; padding-left: 0.4em;
margin-left: -0.1em; margin-left: -0.1em;
} }
.brow_explainer img{filter:unset;margin-bottom:5%;} .brow_explainer img{filter:unset;margin-bottom:5%;}
.brow_explainer ol{ .brow_explainer ol{
margin:0;padding:0; margin:0;padding:0;
counter-reset:li 4; counter-reset:li 4;
} }
.brow_explainer li{ .brow_explainer li{
text-align:left; text-align:left;
margin-bottom:5%; margin-bottom:5%;
list-style:none; list-style:none;
} }
.brow_explainer li:before{ .brow_explainer li:before{
content:counter(li) ". "; /* Use the counter as content */ content:counter(li) ". "; /* Use the counter as content */
counter-increment:li; /* Increment the counter by 1 */ counter-increment:li; /* Increment the counter by 1 */
color:red; color:red;
} }
.currentHit{ .currentHit{
width:17%; width:17%;
position:absolute; position:absolute;
right:0.5em; right:0.5em;
top:0.5em; top:0.5em;
background:yellow; background:yellow;
padding:0.5%; padding:0.5%;
}
.presentation .currentHit h3 span{
color:white;
background: none;
} }
.currentHit h3 span{ .currentHit h3 span{
color:yellow; color:yellow;
}
.presentation .currentHit h3 span{
color:white;
} }
.currentHit h3 .last{color:red;} .currentHit h3 .last{color:red;}
.currentHit h3 .vs{background:none;color:black;padding-left:0.5em;padding-right:0.5em;} .currentHit h3 .vs{background:none;color:black;padding-left:0.5em;padding-right:0.5em;}
.currentHit h3 .perfect{} .currentHit h3 .perfect{}
ul{ ul{
font-size:80%; font-size:80%;
list-style:none; list-style:none;
margin:0; margin:0;
padding:0; padding:0;
}
.presentation ul{
font-size:100%;
} }
.currentHit li{ .currentHit li{
clear:both; clear:both;
} }
.currentHit li .value{ .currentHit li .value{
float:right; float:right;
} }
.currentHit li .diff{ .currentHit li .diff{
float:right; float:right;
clear:both; clear:both;
font-size:72%; font-size:72%;
color:gray; color:gray;
} }
.currentHit li .diff.negative{ .currentHit li .diff.negative{
color:red; color:red;
} }
.currentHit li .diff.positive{ .currentHit li .diff.positive{
color:green; color:green;
} }
.currentHit p { .currentHit p {
margin: 0 -0.5em 1% -0.5em; margin: 0 -0.5em 1% -0.5em;
border-bottom: solid 1em blue; border-bottom: solid 1em blue;
padding: 0.5em; padding: 0.5em;
text-align: center; text-align: center;
}
.presentation .currentHit p {
border-bottom: solid 0.1em white;
} }
</style> </style>
<body> <body <?php if(isSet($_GET['presentation'])){echo "class='presentation'";}?>>
<?php <?php
echo "<div class='brows emo'><h3><span>eye brows</span></h3>"; echo "<div class='brows emo'><h3><span>eye brows</span></h3>";

View file

@ -16,6 +16,11 @@ $app = new Silex\Application([
error_reporting(E_ALL); error_reporting(E_ALL);
ini_set('display_errors', 1); ini_set('display_errors', 1);
if(ini_get('max_file_uploads') < 50) {
throw new Exception("php directive 'max_file_uploads' should be >= 50");
}
/* /*
* JWT setup * JWT setup
*/ */
@ -75,7 +80,10 @@ $app->register(new Silex\Provider\SecurityServiceProvider());
$app->register(new Silex\Provider\SecurityJWTServiceProvider()); $app->register(new Silex\Provider\SecurityJWTServiceProvider());
$app->get('/sysinfo', function(Request $request) use ($app){
phpinfo();
return new Response(200);
});
/** /**
* Get token for user * Get token for user