<?
use app\modules\ldjson\jsonLD;
use yii\helpers\Url;

//$this->title = $model->name;
$this->params['breadcrumbs'] = [

];
$this->params['breadcrumbs'][] =
    [
       "text"=>$model->name,
       "url"=>$model->getUrl()
	];


Yii::$app->og->title = $model->name;
Yii::$app->og->description = $model->name.': '.$model->jobTitle;

Yii::$app->og->canonical = $model->getUrl(true);
Yii::$app->og->og_url = $model->getUrl(true);
Yii::$app->og->og_image = $model->getImg('_sizehd','jpg');
Yii::$app->og->og_type = "person";
Yii::$app->og->og_title = htmlspecialchars($model->name);
Yii::$app->og->og_description = htmlspecialchars(Yii::$app->og->description);
//Yii::$app->og->dtpub = date( "r", strtotime( '10.04.2023 12:40:00' ) );


jsonLD::addAmicORG();
//jsonLD::news( $model->title, preg_replace('/\s+/', ' ', str_replace( ["\n","\r"],' ',Yii::$app->og->description)), $model->image->url, $model->dt_pub, $model->getUrl(), $model->uid, $model->text);
jsonLD::person( $model->name, $model->description, $model->jobTitle,  Url::base('https').$model->getImg('_size2','jpg', true), $model->getUrl(true), '');
$i = 1;
foreach($this->params['breadcrumbs'] as $el){
	jsonLD::addBreadcrumb($i, $el['url'], $el['text']);
	$i++;
}
?>
<style>
.person td{border-left:2px solid #eee}
.container4 {
  column-count: 3;
  column-rule:2px solid #eee;
  column-gap: 20px;
}

.photo_author{
}
</style>
<div class="row justify-content-md-center person">
    <div class="col-md-10">
    <?=$this->render("/layouts/breadcrumbs")?>
        <div id="post" class="post">
			<section class="text">
			<div style="background-image: url(<?=$model->getImg('_sizehd','jpg')?>);width:100%;height:100%;background-size: cover;padding: 10px;color: white;text-shadow: 1px 1px #6c6c6c;aspect-ratio: 16/9;background-position-x: center;">
			<div style="background:#111;opacity: 0.4;;padding: 20px;width: min-content;">
            <h1><?=$model->name?></h1>
           <?/* <img src="<?=$model->getImg('_size2','jpg')?>" class="img-thumbnail rounded float-left mr-3 mb-2 person" alt="<?=$model->name?>">*/?>
            <h4><b><?=$model->jobTitle?></b></h4><br>
            <?=$model->description?>
            </div>
            </div>
            </section><br>
            <h2><img src="<?=$model->getImg('_sizesq2','jpg')?>" style="border-radius: 50%;box-shadow: 0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23) !important;margin-right: 10px;" width="64px" height="64px">Последнии материалы автора</h2>
			<?=$this->render("/layouts/lenta/lenta_test", ['author'=>$model->id])?>
			<h2>about</h2>
            <?=$model->text?>
        </div>
    </div>
</div>
