added a widget to front page if on mobile

master
Tezza 2015-03-01 02:17:00 +01:00
parent f0c4a2faa7
commit 86a61d1f18
5 changed files with 31 additions and 19 deletions

View File

@ -13,11 +13,12 @@
$spaceAPI = Helpers::spaceAPI( $app );
$Level2[ 'open' ] = $spaceAPI[ 'state' ][ 'open' ];
$Level2[ 'people' ] = $spaceAPI[ 'sensors' ][ 'people_now_present' ][ 0 ][ 'value' ];
$Level2[ 'address' ] = $spaceAPI[ 'location' ][ 'address' ];
$Level2[ 'phone' ] = $spaceAPI[ 'contact' ][ 'phone' ];
$Level2[ 'logo' ] = $spaceAPI[ 'logo' ];
$Level2[ 'open' ] = $spaceAPI[ 'state' ][ 'open' ];
$Level2[ 'lastchange' ] = $spaceAPI[ 'state' ][ 'lastchange' ];
$Level2[ 'people' ] = $spaceAPI[ 'sensors' ][ 'people_now_present' ][ 0 ][ 'value' ];
$Level2[ 'address' ] = $spaceAPI[ 'location' ][ 'address' ];
$Level2[ 'phone' ] = $spaceAPI[ 'contact' ][ 'phone' ];
$Level2[ 'logo' ] = $spaceAPI[ 'logo' ];
return $Level2;

View File

@ -41,7 +41,7 @@
<li {% if page == 'home' %} class="active" {% endif %} ><a href="/">Level2</a></li>
<li {% if page == 'events' %} class="active" {% endif %} ><a href="/events">Events</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<ul class="nav navbar-nav navbar-right hidden-xs">
{% if level2.open %}
<li class="status status-open"><a>We're OPEN &middot; {{ level2.people }} hacker{% if level2.people > 1 %}s{% endif %} present</a></li>
{% else %}

View File

@ -4,7 +4,7 @@
<div class="row">
<div class="col-sm-3">
<div class="col-sm-3 hidden-xs">
<h2>Events</h2>

View File

@ -6,6 +6,16 @@
<div class="col-md-4">
<section class="visible-xs">
{% if level2.open %}
<div class="well status status-open">We're OPEN since {{ level2.lastchange|date("g:i") }}<br />{{ level2.people }} hacker{% if level2.people > 1 %}s{% endif %} present</div>
{% else %}
<div class="well status status-closed">Sorry, we're Closed</div>
{% endif %}
</section>
<section>
<h2 class="well">#openMonday</h2>
@ -33,7 +43,7 @@
Level2<br />
87, route de Thionville<br />
L-2611 Luxembourg<br />
T: <a href="tel:+352-20-33-35-50">+352 20 33 35 50</a>
T: <a href="tel:+352-20-333-550">+352 20 333 550</a>
</p>
</section>

View File

@ -74,19 +74,14 @@ a {
}
}
@media (max-width: 767px) {
.well {
border-radius: 0;
}
}
img {
max-width: 100%;
border-radius: 0.4rem;
}
.event img {
max-height: 150px;
max-height: 10rem;
margin-bottom: 0.6rem;
}
@media (max-width: 992px) {
@ -117,6 +112,7 @@ p {
}
.event h2 {
font-size: 2rem;
margin-bottom: 0.7rem;
}
.event h4 {
color: #777;
@ -181,11 +177,16 @@ section:hover .well {
padding: 0;
}
.row {
margin: auto 0;
}
.next-event {
margin-bottom: 20px;
margin: 0 0 20px 0;
}
.next-event .event {
border-radius: 0 0 0.4rem 0.4rem;
}
.well.status-open, .well.status-open:hover {
color: #fff;
background-color: #67C13C;
}
.well.status-closed, .well.status-closed:hover {
color: #fff;
background-color: #F56533;
}