Added widgets for the export and limited the output to 25 events by default

master
Tezza 2015-03-01 20:15:33 +01:00
parent 327dcc005a
commit 2abf6880ab
3 changed files with 27 additions and 14 deletions

View File

@ -13,18 +13,16 @@
$ctr->get('/', function() use ( $app ) {
$eventsToReturn = Level2::getEventsByMonth(
Level2::getEvents( $app ),
date( 'Y' ),
date( 'm' )
);
return $app['twig']->render(
'event-list.twig',
array(
'page' => 'events',
'level2' => Level2::getStatus( $app ),
'events' => $eventsToReturn
'events' => array_slice(
Level2::getEvents( $app ),
0,
25
)
)
);

View File

@ -6,7 +6,27 @@
<div class="col-sm-3 hidden-xs">
<h2>Events</h2>
<section>
<h2 class="well">Host an event</h2>
<p class="well info">
We host a few recurring events at Level2. But you're welcome to use our Hackerspace to host yours too.<br />
<a href="mailto:events@level2.lu">Get in touch</a>
</p>
</section>
<section>
<h2 class="well">Export</h2>
<div class="well info">
<h2>
<a href="/events/ical"><span class="label label-info">iCal</span></a>
<a href="/events/json"><span class="label label-info">JSON</span></a>
</h2>
</div>
</section>
</div>

View File

@ -102,12 +102,7 @@ img {
* END - NAVBAR
*/
h2, h3, h4 {
text-shadow: 1px 0px 6px rgba( 255, 255, 255, 0.7 );
margin: 0;
}
p {
h2, h3, h4, p {
margin: 0;
}
.event h2 {