Beispiel #1
0
        <?php 
echo News::last()->short;
?>
    </blockquote>
</div>

<br/>
<hr/>


<div class="text-center">
    <h2>Last article from category #1</h2>
    <br/>
    <div class="row text-left">
        <?php 
$article = Article::last(1, ['category_id' => 1]);
?>
        <div class="col-md-2">
            <?php 
echo Html::img($article->thumb(160, 120));
?>
        </div>
        <div class="col-md-10 text-left">
            <?php 
echo Html::a($article->title, ['articles/view', 'slug' => $article->slug]);
?>
            <br/>
            <?php 
echo $article->short;
?>
        </div>
Beispiel #2
0
<h1><?php 
echo Article::get('home-about')->model->title;
?>
</h1>

<p>
    <?php 
echo News::get('main-page')->text;
?>
</p>

<div class="row marketing">

    <?php 
foreach (Article::last(2, ['category_id' => 3]) as $item) {
    ?>

        <div class="col-lg-6">

            <h4><?php 
    echo $item->model->title;
    ?>
</h4>
            <p><?php 
    echo $item->model->text;
    ?>
</p>

        </div>
Beispiel #3
0
        <?php 
$this->head();
?>
    </head>


    <body>
    <?php 
$this->beginBody();
?>
    <div class="container">

        <div class="header clearfix">
            <nav>
                <?php 
echo Menu::widget(['items' => [['label' => 'Главная', 'url' => ['main/index']], ['label' => 'О нас', 'url' => ['main/about']], ['label' => 'Медиа', 'url' => ['main/media']], ['label' => Article::last(1, ['category_id' => 4])->model->title, 'url' => ['main/easls', 's' => Article::last(1, ['category_id' => 4])->model->slug]], ['label' => 'Другие тренинги', 'url' => ['main/other_trainings']], ['label' => 'Контакты', 'url' => ['main/contacts']]], 'options' => ['class' => 'nav nav-pills pull-right']]);
?>
            </nav>
            <h3 class="text-muted">
                <div class="main-logo white-overlay"></div>
            </h3>
        </div>
        <?php 
echo $content;
?>


        <footer class="footer">
            <div style="float:left;">&copy; EaSLS <?php 
echo date('Y', time());
?>
Beispiel #4
0
        </div>
        <div class="col col-2">
            <div id="qr-code">
                <img src="/uploads/data/qr.jpg">
            </div>
        </div>
        <div class="col col-4">
            <div class="block-head">
                <h3>Свежие статьи</h3>
                <span class="eng-title">Corporate Information</span>
            </div>
            <div class="news">
                <ul>
                    <?php 
foreach (Article::last(5) as $news) {
    ?>
                        <li>
                            <span class="icon">●</span>
                            <a class="title" href="<?php 
    echo Yii::$app->urlManager->createUrl(['site/article', 'slug' => $news->slug]);
    ?>
"><?php 
    echo $news->title;
    ?>
</a>
                            <span class="date">[<?php 
    echo $news->date;
    ?>
]</span>
                        </li>
Beispiel #5
0
        <?php 
echo News::last() ? News::last()->short : "";
?>
    </blockquote>
</div>

<br/>
<hr/>


<div class="text-center">
    <h2>Последние статьи</h2>
    <br/>
    <div class="row text-left">
        <?php 
$article = Article::last();
?>
        <div class="col-md-2">
            <?php 
echo $article ? Html::img($article->thumb(160, 120)) : "";
?>
        </div>
        <div class="col-md-10 text-left">
            <?php 
echo $article ? Html::a($article->title, ['articles/view', 'slug' => $article->slug]) : "";
?>
            <br/>
            <?php 
echo $article ? $article->short : "";
?>
        </div>