<?php
/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use frontend\assets\CTAsset;
use yii\helpers\Url;

?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
	<meta charset="<?= Yii::$app->charset ?>" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<?= Html::csrfMetaTags() ?>
	<title><?= Html::encode($this->title) ?></title>
	<!-- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,700,800" rel="stylesheet"> -->
	<style>a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,td,th{text-align:left;font-weight:400;vertical-align:middle}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}button,input,optgroup,select,textarea{background:0 0;border:0;padding:0;margin:0;font:inherit;color:inherit;box-shadow:none}button{height:auto;cursor:pointer}button:focus{outline:0}button::-moz-focus-inner{outline:0;border:0;padding:0}
	</style>
	<?php $this->registerCssFile('@web/assets/report/css/styles.css'); ?>
	<?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>
<?= $content ?>
<?php
$this->registerJsFile('@web/assets/report/js/jquery.js', ['position'=>yii\web\View::POS_END]);
$this->registerJsFile('@web/assets/report/js/d3.min.js', ['position'=>yii\web\View::POS_END]);
$this->registerJsFile('@web/assets/report/js/code.js', ['position'=>yii\web\View::POS_END]);
$this->registerJsFile('@web/assets/report/js/score-charts.js', ['position'=>yii\web\View::POS_END]);
?>
<?php $this->endBody() ?>
<script>
  var humansDiagrammArr = [74, 150, 1, 25, 125];
  //max=100=100%
  //min=0=0%
  var humansDiagramm = $('.js-humans_diagram');
  for (let i = 0; i < humansDiagrammArr.length; i++) {
    var maxP = 100,//max=247px=100%
        minP = 22.86;//min=56px=22.86%
    var percent = humansDiagrammArr[i] * 100 / humansDiagrammArr.max();
    percent = percent <= minP ? minP : percent;
    percent = percent > maxP ? maxP : percent;
    humansDiagramm[i].style.height = percent + "%";
  }
</script>
</body>
</html>
<?php $this->endPage() ?>
