Merge remote-tracking branch 'origin/gh-pages' into pr/2

This commit is contained in:
feliciaan 2014-12-14 20:11:48 +01:00
commit a438995e95
7 changed files with 106 additions and 47 deletions

View file

@ -42,7 +42,7 @@
"saturday": "8u30 - 22u", "saturday": "8u30 - 22u",
"sunday": "8u30 - 22u" "sunday": "8u30 - 22u"
}, },
"extra": "Enkel weekend en feestdagen. Registratie noodzakelijk: ieder zondag om 19u student.ugent.be", "extra": "Enkel weekend, kerstverlof en feestdagen,Registratie noodzakelijk! Registreer <a href=\"http://student.UGent.be/blok_kantien/\">hier</a>. Vanaf 9u kunnen studenten zonder registratie toegang krijgen.",
"type": "UGent" "type": "UGent"
} }
}, },
@ -50,7 +50,7 @@
"type": "Feature", "type": "Feature",
"geometry": { "geometry": {
"type": "Point", "type": "Point",
"coordinates": [3.725116, 51.044255] "coordinates": [ 3.724770, 51.045507 ]
}, },
"properties": { "properties": {
"name": "Faculteit Letteren en Wijsbegeerte, faculteitsbibliotheek, vleugels Magnel & Loveling", "name": "Faculteit Letteren en Wijsbegeerte, faculteitsbibliotheek, vleugels Magnel & Loveling",
@ -90,7 +90,7 @@
"saturday": "8u30 - 22u", "saturday": "8u30 - 22u",
"sunday": "8u30 - 22u" "sunday": "8u30 - 22u"
}, },
"extra": "Registratie noodzakelijk! Registreer via http://student.UGent.be/blok/ . Vanaf 9u kunnen studenten zonder registratie toegang krijgen.", "extra": "Registratie noodzakelijk! Registreer <a href=\"http://student.UGent.be/blok/\">hier</a>. Vanaf 9u kunnen studenten zonder registratie toegang krijgen.",
"type": "UGent" "type": "UGent"
} }
}, },
@ -114,7 +114,7 @@
"saturday": "8u30 - 22u", "saturday": "8u30 - 22u",
"sunday": "8u30 - 22u" "sunday": "8u30 - 22u"
}, },
"extra": "Registratie noodzakelijk! Registreer via http://student.UGent.be/blok/ . Vanaf 9u kunnen studenten zonder registratie toegang krijgen. Sluitingsdagen: 25/12, 01/01, 3/01, 4/01, 5/01,6/01, 13/01 en 20/01.<br/>24/12 en 31/12: 8u-16u", "extra": "Registratie noodzakelijk! Registreer <a href=\"http://student.UGent.be/blok_aula/\">hier</a>. Vanaf 9u kunnen studenten zonder registratie toegang krijgen. Sluitingsdagen: 25/12, 01/01, 3/01, 4/01, 5/01,6/01, 13/01 en 20/01.<br/>24/12 en 31/12: 8u-16u",
"type": "UGent" "type": "UGent"
} }
}, },
@ -204,7 +204,7 @@
"hours": { "hours": {
"monday": "9u - 17u", "monday": "9u - 17u",
"tuesday": "9u - 18u", "tuesday": "9u - 18u",
"wednesday": "9u - 11u30 en 12u45 - 16u45", "wednesday": "9u - 11u30 <br> 12u45 - 16u45",
"thursday": "9u - 18u", "thursday": "9u - 18u",
"friday": "9u - 17u", "friday": "9u - 17u",
"saturday": false, "saturday": false,
@ -250,11 +250,11 @@
"capacity": 15, "capacity": 15,
"period": { "start": "05/01/2014", "end": "30/01/2015" }, "period": { "start": "05/01/2014", "end": "30/01/2015" },
"hours": { "hours": {
"monday": "10u - 12u30 en 13u - 16u15", "monday": "10u - 12u30<br />13u - 16u15",
"tuesday": "10u - 12u30 en 13u - 16u15", "tuesday": "10u - 12u30<br />13u - 16u15",
"wednesday": "10u - 12u30 en 13u - 16u15", "wednesday": "10u - 12u30<br />13u - 16u15",
"thursday": "10u - 12u", "thursday": "10u - 12u",
"friday": "10u - 12u30 en 13u - 16u15", "friday": "10u - 12u30<br />13u - 16u15",
"saturday": false, "saturday": false,
"sunday": false "sunday": false
}, },
@ -274,11 +274,11 @@
"capacity": 50, "capacity": 50,
"period": { "start": "05/01/2014", "end": "30/01/2015" }, "period": { "start": "05/01/2014", "end": "30/01/2015" },
"hours": { "hours": {
"monday": "9u - 12u30 en 13u - 17u", "monday": "9u - 12u30<br />13u - 17u",
"tuesday": "8u30u - 12u30 en 13u - 17u", "tuesday": "8u30u - 12u30<br />13u - 17u",
"wednesday": "9u - 12u30 en 13u - 17u", "wednesday": "9u - 12u30<br />13u - 17u",
"thursday": "8u - 12u en 12u30 - 17u", "thursday": "8u - 12u<br />12u30 - 17u",
"friday": "8u - 12u en 12u30 - 17u", "friday": "8u - 12u<br />12u30 - 17u",
"saturday": false, "saturday": false,
"sunday": false "sunday": false
}, },

27
map.css
View file

@ -59,6 +59,7 @@ table {
.desktop tr td { .desktop tr td {
padding-right: 5px; padding-right: 5px;
width: 75; width: 75;
vertical-align: top;
} }
.mobile tr td:first-child { .mobile tr td:first-child {
@ -77,6 +78,18 @@ table {
background: rgba(255,255,255,0.0); background: rgba(255,255,255,0.0);
} }
#zeus {
padding-left: 10px;
}
.legend {
height: 52px;
width: 130px;
background-color: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}
.type { .type {
position: absolute; position: absolute;
top: 15px; top: 15px;
@ -107,6 +120,20 @@ table {
} }
} }
@media screen and (max-width: 800px) {
.info {
max-width: 90px;s
}
#schamper {
width: 90px;
}
#zeus {
width: 75px;
}
}
@media screen and (max-height: 400px) { @media screen and (max-height: 400px) {
.leaflet-popup-content-wrapper { .leaflet-popup-content-wrapper {
max-height: 150px; max-height: 150px;

View file

@ -2,11 +2,24 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Blokken in Gent</title> <title>Bloklocaties in Gent</title>
<meta name="apple-itunes-app" content="app-id=602640924"> <meta name="apple-itunes-app" content="app-id=602640924">
<meta name="google-play-app" content="app-id=be.ugent.zeus.hydra"> <meta name="google-play-app" content="app-id=be.ugent.zeus.hydra">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta property="og:site_name" content="Zeus WPI">
<meta property="og:type" content="article">
<meta property="og:title" content="Bloklocaties in Gent">
<meta property="og:description" content="Samenhokken om te blokken? Er zijn maar liefst 4000 zitjes in Gent om dat te doen. Schamper en Zeus maakten een overzicht!">
<meta property="og:url" content="http://zeus.ugent.be/blok/">
<meta property="og:image" content="http://zeus.ugent.be/blok/share.jpg">
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="http://zeus.ugent.be/blok/">
<meta name="twitter:title" content="Bloklocaties in Gent">
<meta name="twitter:description" content="Samenhokken om te blokken? Er zijn maar liefst 4000 zitjes in Gent om dat te doen. Schamper en Zeus maakten een overzicht!">
<meta name="twitter:image" content="http://zeus.ugent.be/blok/share.jpg">
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link rel="stylesheet" href="map.css" /> <link rel="stylesheet" href="map.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
@ -35,53 +48,66 @@
<td>Zondag</td> <td>Zondag</td>
</tr> </tr>
<tr> <tr>
<td>{{#if hours.monday}}{{hours.monday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.monday}}{{{hours.monday}}}{{else}}Gesloten{{/if}}</td>
<td>{{#if hours.tuesday}}{{hours.tuesday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.tuesday}}{{{hours.tuesday}}}{{else}}Gesloten{{/if}}</td>
<td>{{#if hours.wednesday}}{{hours.wednesday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.wednesday}}{{{hours.wednesday}}}{{else}}Gesloten{{/if}}</td>
<td>{{#if hours.thursday}}{{hours.thursday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.thursday}}{{{hours.thursday}}}{{else}}Gesloten{{/if}}</td>
<td>{{#if hours.friday}}{{hours.friday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.friday}}{{{hours.friday}}}{{else}}Gesloten{{/if}}</td>
<td>{{#if hours.saturday}}{{hours.saturday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.saturday}}{{{hours.saturday}}}{{else}}Gesloten{{/if}}</td>
<td>{{#if hours.sunday}}{{hours.sunday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.sunday}}{{{hours.sunday}}}{{else}}Gesloten{{/if}}</td>
</tr> </tr>
</table> </table>
<table class="mobile"> <table class="mobile">
<tr> <tr>
<td>Maandag</td> <td>Maandag</td>
<td>{{#if hours.monday}}{{hours.monday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.monday}}{{{hours.monday}}}{{else}}Gesloten{{/if}}</td>
</tr> </tr>
<tr> <tr>
<td>Dinsdag</td> <td>Dinsdag</td>
<td>{{#if hours.tuesday}}{{hours.tuesday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.tuesday}}{{{hours.tuesday}}}{{else}}Gesloten{{/if}}</td>
</tr> </tr>
<tr> <tr>
<td>Woensdag</td> <td>Woensdag</td>
<td>{{#if hours.wednesday}}{{hours.wednesday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.wednesday}}{{{hours.wednesday}}}{{else}}Gesloten{{/if}}</td>
</tr> </tr>
<tr> <tr>
<td>Donderdag</td> <td>Donderdag</td>
<td>{{#if hours.thursday}}{{hours.thursday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.thursday}}{{{hours.thursday}}}{{else}}Gesloten{{/if}}</td>
</tr><tr> </tr><tr>
<td>Vrijdag</td> <td>Vrijdag</td>
<td>{{#if hours.friday}}{{hours.friday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.friday}}{{{hours.friday}}}{{else}}Gesloten{{/if}}</td>
</tr> </tr>
<tr> <tr>
<td>Zaterdag</td> <td>Zaterdag</td>
<td>{{#if hours.saturday}}{{hours.saturday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.saturday}}{{{hours.saturday}}}{{else}}Gesloten{{/if}}</td>
</tr> </tr>
<tr> <tr>
<td>Zondag</td> <td>Zondag</td>
<td>{{#if hours.sunday}}{{hours.sunday}}{{else}}Gesloten{{/if}}</td> <td>{{#if hours.sunday}}{{{hours.sunday}}}{{else}}Gesloten{{/if}}</td>
</tr> </tr>
</table> </table>
{{#if extra}}{{extra}}{{/if}} {{#if extra}}{{{extra}}}{{/if}}
</div> </div>
</script> </script>
<script id="info-template" type="text/x-handlebars-template"> <script id="info-template" type="text/x-handlebars-template">
<a href="http://zeus.ugent.be/"><img src='logo.png'></a> <a href="http://schamper.be/"><img id="schamper" src='schamper.png'></a>
<a href="http://zeus.ugent.be/"><img id="zeus" src='zeus.png'></a>
</script> </script>
<script id="share-template" type="text/x-handlebars-template"> <script id="share-template" type="text/x-handlebars-template">
<div class="fb-share-button" data-href="http://zeus.ugent.be/blok/" data-layout="button_count"></div> <div class="fb-share-button" data-href="http://zeus.ugent.be/blok/" data-layout="button_count"></div>
</script> </script>
<script id="legend-template" type="text/x-handlebars-template">
<div style="padding-top: 5px;">
<div style="width: 125px; height: 18px; padding-top: 5px; padding-left: 5px;">
<div style="height: 10px; width: 10px; background: rgb(209,39,35); margin-top: -1px; margin-left: 5px;"></div>
<span style="position: absolute; left: 25px; top: 5px;">Week en weekend</span>
</div>
<div style="width: 125px; height: 18px; padding-top: 5px; padding-left: 5px;">
<div style="height: 10px; width: 10px; background: rgb(36, 126, 202); margin-top: 1px; margin-left: 5px;"></div>
<span style="position: absolute; left: 25px; top: 30px;">Enkel week</span>
</div>
</div>
</script>
<!-- Facebook SDK --> <!-- Facebook SDK -->
<div id="fb-root"></div> <div id="fb-root"></div>

36
map.js
View file

@ -39,24 +39,30 @@ $(document).ready(function() {
map.addLayer(geojson); map.addLayer(geojson);
}); });
var info = L.control(); var SimpleControl = L.Control.extend({
initialize: function(templateId, divClass, options) {
this.template = Handlebars.compile($(templateId).html());
this.divClass = divClass;
L.Util.setOptions(this, options);
},
info.onAdd = function (map) { onAdd: function (map) {
var div = L.DomUtil.create('div', 'info'); this._div = L.DomUtil.create('div', this.divClass);
div.innerHTML = Handlebars.compile($('#info-template').html())(); this._div.innerHTML = this.template();
return div; return this._div;
}; }
});
info.addTo(map); var info = new SimpleControl('#info-template', 'info', {
position: 'topright'
}).addTo(map);
var sharePane = L.control().setPosition("bottomleft"); var sharePane = new SimpleControl('#share-template', 'info', {
sharePane.onAdd = function (map) { position: 'bottomleft'
var div = L.DomUtil.create('div', 'info'); }).addTo(map);
div.innerHTML = Handlebars.compile($('#share-template').html())();
return div; var legend = new SimpleControl('#legend-template', 'legend', {
}; position: 'bottomright'
}).addTo(map);
sharePane.addTo(map);
}); });

BIN
schamper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
share.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

View file

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB