/** * Возвращает массив ['style' => 'name: value; name: value;', ...] * * @param array $options * @param array $styleOptions * * @return array */ public static function css($styleOptions = [], &$options = null) { if (is_null($options)) { $options = []; } Html::addCssStyle($options, $styleOptions); return $options; }
function drawItem($d) { $html = []; $html[] = Html::img(\Yii::$app->assetManager->getBundle('app\\assets\\Maya\\Asset')->baseUrl . "/images/stamp/{$d['stamp']}.jpg", ['height' => 40, 'alt' => \cs\models\Calendar\Maya::$stampRows[$d['stamp'] - 1][0], 'title' => \cs\models\Calendar\Maya::$stampRows[$d['stamp'] - 1][0], 'class' => 'js-stamp']); $html[] = Html::tag('span', $d['day'] . '.' . $d['month'], ['class' => 'js-stamp', 'title' => GsssHtml::dateString($d['date'])]); $html[] = Html::tag('br'); $html[] = 'kin: ' . $d['kin']; $html[] = $d['nearPortal'] == 0 ? 'п' : ''; return join('', $html); }
public function run() { $this->registerAssets(); $items = ['<a href="' . $this->home['url'] . '" class="btn btn-default">' . $this->home['name'] . '</a>', '<div class="btn btn-default">...</div>']; foreach ($this->items as $item) { if (is_array($item)) { $url = $item['url']; $name = $item['label']; } else { $url = 'javascript:void();'; $name = $item; } $items[] = Html::a(Html::tag('div', $name), Url::to($url), ['class' => 'btn btn-default']); } $items = join('', $items); return Html::tag('div', $items, ['class' => 'btn-group btn-breadcrumb']); }
text-align: center; width: 64px; height: 64px; } #wave4 td { padding: 5px; text-align: center; } </style> <div class="container"> <div class="col-lg-12"> <h1 class="page-header"><?php echo Html::encode($this->title); ?> </h1> </div> <div class="col-lg-10"> <div class="col-lg-12"> <div id="orakul-div" class="col-lg-4"> <table id="orakul-table" class="oracul"> <tr> <td></td> <td id="vedun" class="item"> <img src="<?php echo $mayaAssetUrl;
" class="img-circle" width="50" > </span> <div class="chat-body clearfix"> <div class="header"> <strong class="primary-font char-user-name"><?php echo $user->getNameFull(); ?> </strong> <small class="pull-right text-muted chat-datetime" data-time="<?php echo $message->getDateTime(); ?> " title="<?php echo Yii::$app->formatter->asDatetime($message->getDateTime()); ?> "> <i class="glyphicon glyphicon-time"></i> <?php echo \cs\services\DatePeriod::back($message->getDateTime()); ?> </small> </div> <p> <?php echo \cs\helpers\Html::encode($message->getText()); ?> </p> </div> </li>
</div> <!-- Индекс счастья --> <hr class="featurette-divider" style="margin-top: 100px;"> <div class="container"> <div class="col-md-7"> <h2 class="featurette-heading" style="margin-top: 50px;">Индекс счастья <span class="text-muted">планеты Земля</span></h2> <p class="lead">Индекс Общенационального Счастья рассматривается как ключевой элемент строительства экономики Новой Земли, который синхронизирован с изначальными законми мироздания.</p> <p>Министерство Счастья провело несколько международных конференций, на которые были приглашены многие западные экономисты (включая нобелевских лауреатов по экономике), с целью выработки методик расчета ИОС (Индекс Общенационального Счастья) на основе сочетания экономической ситуации в стране и удовлетворенности жизнью населения. Улыбка населения является одним из показателей в разработанных формулах.</p> </div> <div class="col-md-5"> <p style="<?php echo \cs\helpers\Html::cssStyleFromArray(['position' => 'absolute', 'top' => '350px', 'left' => '20px', 'color' => '#ffffff', 'margin' => '0px', 'padding' => '0px', 'font-family' => 'courier new']); ?> "><span style="font-size: 400%; font-weight: 100;" id="iosDec">12</span>.<br> <span id='iosOst' style="font-size: 100%; padding-left: 20px;vertical-align: top;"></span> </p> <img class="featurette-image img-responsive center-block" src="/images/index/x_83bd0a57.jpg" alt="Generic placeholder image" > </div> </div>
<div class="col-lg-12"> <h1 class="page-header"><?php echo $this->title; ?> </h1> </div> <div class="col-lg-10"> <div class="col-lg-1"> 1. </div> <div class="col-lg-3"> <script src='/js/widget/maya-today.js'></script> </div> <div class="col-lg-8"> <textarea rows="5" style="width: 100%;" id="textCode1" ><?php echo Html::encode("<script src='//" . $_SERVER['SERVER_NAME'] . "/js/widget/maya-today.js'></script>"); ?> </textarea> <button class="btn btn-default btn-sm buttonCopy1" id="copy1">Копировать в буфер</button> </div> </div> <?php echo $this->render('_menu'); ?> </div>
public static function articleItem($row, $category) { if (!is_array($row)) { $id = $row; $item = \app\models\Article::find($id); if (is_null($item)) { return ''; } $row = $item->getFields(); } // Заголовок $html[] = Html::tag('div', Html::tag('h4', $row['header']), ['class' => 'header']); // ссылка $item2 = ['id' => $row['id_string'], 'year' => substr($row['date_insert'], 0, 4), 'month' => substr($row['date_insert'], 5, 2), 'day' => substr($row['date_insert'], 8, 2), 'category' => $category]; $link = "/category/{$item2['category']}/article/{$item2['year']}/{$item2['month']}/{$item2['day']}/{$item2['id']}"; // картинка с ссылкой $html[] = Html::tag('p', Html::a(Html::img($row['image'], ['width' => '100%', 'class' => 'thumbnail']), $link)); // Описание $content = $row['description']; if ($content . '' == '') { $content = self::getMiniText($row['content']); } else { $content = self::getMiniText($content); } $html[] = Html::tag('p', $content); return Html::tag('div', join('', $html), ['class' => 'col-lg-4 articleItem']); }
<?php use yii\helpers\Url; $this->title = 'Музыка'; ?> <div class="container"> <div class="col-lg-12"> <h1 class="page-header"><?php echo \cs\helpers\Html::encode($this->title); ?> </h1> <p class="lead">Музыка высших сфер раскрывает сердца и расширяет сознание</p> <p> <a href="/category/music/407"> <img src="/images/page/music/sutra.jpg" width="100%" class="thumbnail"> </a> </p> <a href="/category/music/407" class="btn btn-success btn-lg" style="width: 100%; margin-bottom: 80px;"> Слушать и наслаждаться </a> <hr> </div> <?php echo \app\services\GsssHtml::unionCategoryItems(13); ?> <?php if (count($articleList) > 0) {