Skip to content

Commit

Permalink
modification du carousel et des images de la tv
Browse files Browse the repository at this point in the history
  • Loading branch information
willkoua committed Jun 9, 2016
1 parent 6e3ad20 commit 5bd6fce
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 24 deletions.
1 change: 1 addition & 0 deletions src/Controller/PagesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public function display()
public function home()
{
//$this->viewBuilder()->layout(false);
set_time_limit(1000);
$this->loadModel("Users");
$numberUsers = $this->Users->find('all')->count();
$numberStudents = $this->Users->find('all')->where(['isStudent' => true])->count();
Expand Down
61 changes: 37 additions & 24 deletions src/Template/Pages/home.ctp
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,46 @@
<div id="carousel-container">
<div id="carousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$i = 0;
foreach ($fichiers as $fichier):
?>
<li data-target="#carousel" data-slide-to="<?= $i ?>" class="active"></li>
<?php
$i++;
endforeach;
?>
<li data-target="#carousel" data-slide-to="1" class="active"></li>
<li data-target="#carousel" data-slide-to="2"></li>
<li data-target="#carousel" data-slide-to="3"></li>
<li data-target="#carousel" data-slide-to="4"></li>
<li data-target="#carousel" data-slide-to="5"></li>
</ol>
<div class="carousel-inner" role="listbox">


<?php
$i = 0;
foreach ($fichiers as $fichier):
?>
<div class="item <?= ($i==0)?'active': ''; ?>">
<div class="fillBackground">
<img src="<?= $this->request->webroot . 'img/carousel/'.$fichier; ?>" class="stretch" alt=""/>
</div>
</div>
<?php
$i++;
endforeach;
?>
<div class="item active">
<div class="fillBackground">
<img src="<?= $this->request->webroot . 'img/carousel/2.jpg'; ?>" class="stretch" alt=""/>
</div>
</div>
<div class="item">
<div class="fillBackground">
<img src="<?= $this->request->webroot . 'img/carousel/banner.png'; ?>" class="stretch" alt=""/>
</div>
</div>
<div class="item">
<div class="fillBackground">
<img src="<?= $this->request->webroot . 'img/carousel/financement-montreal.png'; ?>" class="stretch" alt=""/>
</div>
</div>
<div class="item">
<div class="fillBackground">
<img src="<?= $this->request->webroot . 'img/carousel/tv4.png'; ?>" class="stretch" alt=""/>
</div>
<div class="bloc-link-event pull-right">
<a href="https://www.youtube.com/channel/UCI65aeAJA9jf6AmUNQ6UayQ" class="btn btn-primary"><?= __('more'); ?></a>
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only"><?= __('previous'); ?></span>
</a>
<a class="right carousel-control" href="#carousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only"><?= __('next'); ?></span>
</a>
</div>
</div>
</div>
Expand Down
Binary file removed webroot/img/carousel/tv3.png
Binary file not shown.
Binary file modified webroot/img/tv/tv3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions webroot/less/home.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
height: 100%;
}
}
.bloc-link-event{
background: rgba(0, 0, 0, 0.5);
position: relative;
bottom: 100%;
text-align: center;
padding: 30px;
height: 100px;
width:170px;
}
.fillBackground {
width: 100%;
height: 100%;
Expand Down Expand Up @@ -37,3 +46,4 @@
padding: 0;
}
}

0 comments on commit 5bd6fce

Please sign in to comment.