<commit_before><?php

/**
 * @var Blog\Entity\Article $article
 * @var Blog\Entity\Article $articleRecent
 * @var Blog\Entity\Article $articleAncien
 * @var Blog\Entity\Picture $picture
 * @var Blog\Entity\Tag $tag
 */

$title = $article->getTitle();
$subtitle = $article->getSubtitle();
$this->headTitle($title);

?>

<br>
<?php echo $this->partial('partial/flashmessenger') ?>

<div class="row">
    <div class="box">
        <div class="row">
            <div class="col-lg-2">
            </div>
            <div class="col-lg-8 text-center">
                <h2><?php echo $title ?></h2>
                <h3 class="intro-subtext"><?php echo $subtitle ?></h3>
                <hr class="short-hr"/>
            </div>
            <div class="col-lg-2">
                <?php if (!is_null($this->identity())) : ?>
                    <ul class="list-inline pull-right">
                        <li>
                            <a href="<?php echo $this->url('article', array('action' => 'edit', 'id' => $article->getId())) ?>">
                                <span class="glyphicon glyphicon-pencil text-warning"></span>
                            </a>
                        </li>
                    </ul>
                    <br/>
                    <br/>
                <?php endif ?>
                <ul class="list-unstyled pull-right text-right">
                    <?php foreach ($article->getTags() as $tag) : ?>
                        <li>
                            <h4>
                                <a href="<?php echo $this->url('tags', array('names' => $tag->getTitle())) ?>" style="text-decoration: none">
                                    <span class="label label-info">#<?php echo $tag->getTitle() ?></span>
                                </a>
                            </h4>
                        </li>
                    <?php endforeach ?>
                </ul>
            </div>
        </div>
        <?php if ($article->getText()) : ?>
            <div class="row">
                <div class="col-lg-12">
                    <p class="text-center">
                        <?php echo nl2br($article->getText()) ?>
                    </p>
                </div>
            </div>
            <br/>
        <?php endif ?>
        <?php if (!$article->getYoutube()) : ?>
            <?php if ($article->isMosaique()) : ?>
                <div class="row">
                    <div class="col-lg-4 col-sm-6">
                        <?php
                        foreach ($article->getPictures() as $key => $picture) {
                            if ($key % 3 == 0) {
                                echo $this->partial('blog/article/partial/tile', array('picture' => $picture));
                            }
                        }
                        ?>
                    </div>
                    <div class="col-lg-4 col-sm-6">
                        <?php
                        foreach ($article->getPictures() as $key => $picture) {
                            if ($key % 3 == 1) {
                                echo $this->partial('blog/article/partial/tile', array('picture' => $picture));
                            }
                        }
                        ?>
                    </div>
                    <div class="col-lg-4 col-sm-6">
                        <?php
                        foreach ($article->getPictures() as $key => $picture) {
                            if ($key % 3 == 2) {
                                echo $this->partial('blog/article/partial/tile', array('picture' => $picture));
                            }
                        }
                        ?>
                    </div>
                </div>
            <?php else : ?>
                <?php foreach ($article->getPictures() as $picture) : ?>
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="image">
                                <a class="fancybox" href="<?php echo $picture->getFlickrUrl() ?>" rel="gallery"
                                   title="<?php echo $picture->getLegend() ?>">
                                    <img class="img-responsive img-center"
                                         alt="<?php echo $picture->getLegend() ?>"
                                         src="<?php echo $picture->getFlickrUrl() ?>">
                                </a>
                            </div>
                            <?php if ($picture->getLegend()) : ?>
                                <p class="text-center">
                                    <br/><?php echo nl2br($picture->getLegend()) ?>
                                </p>
                            <?php endif ?>
                        </div>
                    </div>
                    <br/>
                <?php endforeach ?>
            <?php endif ?>
        <?php else : ?>
            <div class="row"><commit_msg>Layout 2 columns for iPad<commit_after><?php

/**
 * @var Blog\Entity\Article $article
 * @var Blog\Entity\Article $articleRecent
 * @var Blog\Entity\Article $articleAncien
 * @var Blog\Entity\Picture $picture
 * @var Blog\Entity\Tag $tag
 */

$title = $article->getTitle();
$subtitle = $article->getSubtitle();
$this->headTitle($title);

?>

<br>
<?php echo $this->partial('partial/flashmessenger') ?>

<div class="row">
    <div class="box">
        <div class="row">
            <div class="col-lg-2">
            </div>
            <div class="col-lg-8 text-center">
                <h2><?php echo $title ?></h2>
                <h3 class="intro-subtext"><?php echo $subtitle ?></h3>
                <hr class="short-hr"/>
            </div>
            <div class="col-lg-2">
                <?php if (!is_null($this->identity())) : ?>
                    <ul class="list-inline pull-right">
                        <li>
                            <a href="<?php echo $this->url('article', array('action' => 'edit', 'id' => $article->getId())) ?>">
                                <span class="glyphicon glyphicon-pencil text-warning"></span>
                            </a>
                        </li>
                    </ul>
                    <br/>
                    <br/>
                <?php endif ?>
                <ul class="list-unstyled pull-right text-right">
                    <?php foreach ($article->getTags() as $tag) : ?>
                        <li>
                            <h4>
                                <a href="<?php echo $this->url('tags', array('names' => $tag->getTitle())) ?>" style="text-decoration: none">
                                    <span class="label label-info">#<?php echo $tag->getTitle() ?></span>
                                </a>
                            </h4>
                        </li>
                    <?php endforeach ?>
                </ul>
            </div>
        </div>
        <?php if ($article->getText()) : ?>
            <div class="row">
                <div class="col-lg-12">
                    <p class="text-center">
                        <?php echo nl2br($article->getText()) ?>
                    </p>
                </div>
            </div>
            <br/>
        <?php endif ?>
        <?php if (!$article->getYoutube()) : ?>
            <?php if ($article->isMosaique()) : ?>
                <div class="row hidden-xs hidden-sm">
                    <div class="col-lg-4">
                        <?php
                        foreach ($article->getPictures() as $key => $picture) {
                            if ($key % 3 == 0) {
                                echo $this->partial('blog/article/partial/tile', array('picture' => $picture));
                            }
                        }
                        ?>
                    </div>
                    <div class="col-lg-4">
                        <?php
                        foreach ($article->getPictures() as $key => $picture) {
                            if ($key % 3 == 1) {
                                echo $this->partial('blog/article/partial/tile', array('picture' => $picture));
                            }
                        }
                        ?>
                    </div>
                    <div class="col-lg-4">
                        <?php
                        foreach ($article->getPictures() as $key => $picture) {
                            if ($key % 3 == 2) {
                                echo $this->partial('blog/article/partial/tile', array('picture' => $picture));
                            }
                        }
                        ?>
                    </div>
                </div>
                <div class="row hidden-md hidden-lg">
                    <div class="col-sm-6">
                        <?php
                        foreach ($article->getPictures() as $key => $picture) {
                            if ($key % 3 == 0) {
                                echo $this->partial('blog/article/partial/tile', array('picture' => $picture));
                            }
                        }
                        ?>
                    </div>
                    <div class="col-sm-6">
                        <?php
                        foreach ($article->getPictures() as $key => $picture) {
                            if ($key % 3 == 1) {
                                echo $this->partial('blog/article/partial/tile', array('picture' => $picture));
                            }
                        }
                        ?>
                    </div>
                </div>
            <?php else : ?>
                <?php foreach ($article->getPictures() as $picture) : ?>
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="image">
                                <a class="fancybox" href="<?php echo $picture->getFlickrUrl() ?>" rel="gallery"
                                   title="<?php echo $picture->getLegend() ?>">
                                    <img class="img-responsive img-center"
                                         alt="<?php echo $picture->getLegend() ?>"
                                         src="<?php echo $picture->getFlickrUrl() ?>">
                                </a>
                            </div>
                            <?php if ($picture->getLegend()) : ?>
                                <p class="text-center">
                                    <br/><?php echo nl2br($picture->getLegend()) ?>
                                </p>
                            <?php endif ?>
                        </div>
                    </div>
                    <br/>
                <?php endforeach ?>
            <?php endif ?>
        <?php else : ?>
            <div class="row">
{'fraction_non_alphanumeric': 0.15098508561959123, 'fraction_numerical': 0.005339716442644081, 'mean_word_length': 0.8879040667361835, 'pattern_counts': {'":': 0, '<': 203, '<?xml version=': 0, '>': 285, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '358039', 'n_tokens_mistral': 2739, 'n_tokens_neox': 2559, 'n_words': 533}