<?
use yii\helpers\Html;

	$imgFileShort = "/images/report_photo/";
//	echo  '<div class="attachment-block clearfix" style="max-width: 92px;"><img src="'.$imgFileShort.$model->folder.'/0.160.jpg'.'" width="80px" class="attachment-img"></div>';
//	echo Html::a(Html::encode(strip_tags($model->title)), $model->getUrl());
	$img = $imgFileShort.$model->folder.'/0.160.jpg';
    $imgFileShort = "/images/report_photo/{$model->folder}/";
	$amic_image = $imgFileShort."0.size2.jpg";
	if( file_exists(Yii::getAlias('@webroot').$amic_image) ){
			$img = $amic_image;
	}


if( isset($index) ){
	$index = $index+1;
}else{
	static $index = 0;
}
$key = $index;
?>
<div class="">
    <div class="archive-news-item" data-key="<?=$key?>">
        <div class="illustration">
                <div class="picture-cont-16x9">
                    <a href="<?=$model->getUrl()?>">
                        <picture class="w-100">
                            <img src="<?=$img?>" alt="<?=htmlentities(strip_tags($model->title),ENT_QUOTES)?>"  class="w-100" <?=($index > 2)?'loading="lazy"':''?>>
                        </picture>
                    </a>
                </div>
        </div>

        <div class="meta">
            <h2 class="title"><a href="<?=$model->getUrl()?>"><?=strip_tags($model->title)?></a></h2>
            <div class="published_at">
                <?=$model->date?>
            </div>
        </div>
    </div>
</div>
