diff --git a/data.json b/data.json index b9556d3..03a6ea9 100644 --- a/data.json +++ b/data.json @@ -42,7 +42,7 @@ "saturday": "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 hier. Vanaf 9u kunnen studenten zonder registratie toegang krijgen.", "type": "UGent" } }, @@ -50,7 +50,7 @@ "type": "Feature", "geometry": { "type": "Point", - "coordinates": [3.725116, 51.044255] + "coordinates": [ 3.724770, 51.045507 ] }, "properties": { "name": "Faculteit Letteren en Wijsbegeerte, faculteitsbibliotheek, vleugels Magnel & Loveling", @@ -90,7 +90,7 @@ "saturday": "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 hier. Vanaf 9u kunnen studenten zonder registratie toegang krijgen.", "type": "UGent" } }, @@ -114,7 +114,7 @@ "saturday": "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.
24/12 en 31/12: 8u-16u", + "extra": "Registratie noodzakelijk! Registreer hier. 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.
24/12 en 31/12: 8u-16u", "type": "UGent" } }, @@ -204,7 +204,7 @@ "hours": { "monday": "9u - 17u", "tuesday": "9u - 18u", - "wednesday": "9u - 11u30 en 12u45 - 16u45", + "wednesday": "9u - 11u30
12u45 - 16u45", "thursday": "9u - 18u", "friday": "9u - 17u", "saturday": false, @@ -250,11 +250,11 @@ "capacity": 15, "period": { "start": "05/01/2014", "end": "30/01/2015" }, "hours": { - "monday": "10u - 12u30 en 13u - 16u15", - "tuesday": "10u - 12u30 en 13u - 16u15", - "wednesday": "10u - 12u30 en 13u - 16u15", + "monday": "10u - 12u30
13u - 16u15", + "tuesday": "10u - 12u30
13u - 16u15", + "wednesday": "10u - 12u30
13u - 16u15", "thursday": "10u - 12u", - "friday": "10u - 12u30 en 13u - 16u15", + "friday": "10u - 12u30
13u - 16u15", "saturday": false, "sunday": false }, @@ -274,11 +274,11 @@ "capacity": 50, "period": { "start": "05/01/2014", "end": "30/01/2015" }, "hours": { - "monday": "9u - 12u30 en 13u - 17u", - "tuesday": "8u30u - 12u30 en 13u - 17u", - "wednesday": "9u - 12u30 en 13u - 17u", - "thursday": "8u - 12u en 12u30 - 17u", - "friday": "8u - 12u en 12u30 - 17u", + "monday": "9u - 12u30
13u - 17u", + "tuesday": "8u30u - 12u30
13u - 17u", + "wednesday": "9u - 12u30
13u - 17u", + "thursday": "8u - 12u
12u30 - 17u", + "friday": "8u - 12u
12u30 - 17u", "saturday": false, "sunday": false }, diff --git a/map.css b/map.css index 792be72..b881d2e 100644 --- a/map.css +++ b/map.css @@ -59,6 +59,7 @@ table { .desktop tr td { padding-right: 5px; width: 75; + vertical-align: top; } .mobile tr td:first-child { @@ -77,6 +78,18 @@ table { 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 { position: absolute; 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) { .leaflet-popup-content-wrapper { max-height: 150px; diff --git a/map.html b/map.html index 237aa75..ce0c5d9 100644 --- a/map.html +++ b/map.html @@ -2,11 +2,24 @@ - Blokken in Gent + Bloklocaties in Gent + + + + + + + + + + + + + @@ -35,53 +48,66 @@ Zondag - {{#if hours.monday}}{{hours.monday}}{{else}}Gesloten{{/if}} - {{#if hours.tuesday}}{{hours.tuesday}}{{else}}Gesloten{{/if}} - {{#if hours.wednesday}}{{hours.wednesday}}{{else}}Gesloten{{/if}} - {{#if hours.thursday}}{{hours.thursday}}{{else}}Gesloten{{/if}} - {{#if hours.friday}}{{hours.friday}}{{else}}Gesloten{{/if}} - {{#if hours.saturday}}{{hours.saturday}}{{else}}Gesloten{{/if}} - {{#if hours.sunday}}{{hours.sunday}}{{else}}Gesloten{{/if}} + {{#if hours.monday}}{{{hours.monday}}}{{else}}Gesloten{{/if}} + {{#if hours.tuesday}}{{{hours.tuesday}}}{{else}}Gesloten{{/if}} + {{#if hours.wednesday}}{{{hours.wednesday}}}{{else}}Gesloten{{/if}} + {{#if hours.thursday}}{{{hours.thursday}}}{{else}}Gesloten{{/if}} + {{#if hours.friday}}{{{hours.friday}}}{{else}}Gesloten{{/if}} + {{#if hours.saturday}}{{{hours.saturday}}}{{else}}Gesloten{{/if}} + {{#if hours.sunday}}{{{hours.sunday}}}{{else}}Gesloten{{/if}} - + - + - + - + - + - + - +
Maandag{{#if hours.monday}}{{hours.monday}}{{else}}Gesloten{{/if}}{{#if hours.monday}}{{{hours.monday}}}{{else}}Gesloten{{/if}}
Dinsdag{{#if hours.tuesday}}{{hours.tuesday}}{{else}}Gesloten{{/if}}{{#if hours.tuesday}}{{{hours.tuesday}}}{{else}}Gesloten{{/if}}
Woensdag{{#if hours.wednesday}}{{hours.wednesday}}{{else}}Gesloten{{/if}}{{#if hours.wednesday}}{{{hours.wednesday}}}{{else}}Gesloten{{/if}}
Donderdag{{#if hours.thursday}}{{hours.thursday}}{{else}}Gesloten{{/if}}{{#if hours.thursday}}{{{hours.thursday}}}{{else}}Gesloten{{/if}}
Vrijdag{{#if hours.friday}}{{hours.friday}}{{else}}Gesloten{{/if}}{{#if hours.friday}}{{{hours.friday}}}{{else}}Gesloten{{/if}}
Zaterdag{{#if hours.saturday}}{{hours.saturday}}{{else}}Gesloten{{/if}}{{#if hours.saturday}}{{{hours.saturday}}}{{else}}Gesloten{{/if}}
Zondag{{#if hours.sunday}}{{hours.sunday}}{{else}}Gesloten{{/if}}{{#if hours.sunday}}{{{hours.sunday}}}{{else}}Gesloten{{/if}}
- {{#if extra}}{{extra}}{{/if}} + {{#if extra}}{{{extra}}}{{/if}} +
diff --git a/map.js b/map.js index 5a6de9c..a83f3a7 100644 --- a/map.js +++ b/map.js @@ -31,7 +31,7 @@ $(document).ready(function() { }).addTo(map); $.getJSON('data.json') - .done(function(data) { + .done(function(data) { var geojson = L.geoJson(data, { onEachFeature: onEachFeature, pointToLayer: pointToLayer @@ -39,24 +39,30 @@ $(document).ready(function() { 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) { - var div = L.DomUtil.create('div', 'info'); - div.innerHTML = Handlebars.compile($('#info-template').html())(); + onAdd: function (map) { + this._div = L.DomUtil.create('div', this.divClass); + 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"); - sharePane.onAdd = function (map) { - var div = L.DomUtil.create('div', 'info'); - div.innerHTML = Handlebars.compile($('#share-template').html())(); + var sharePane = new SimpleControl('#share-template', 'info', { + position: 'bottomleft' + }).addTo(map); - return div; - }; - - sharePane.addTo(map); + var legend = new SimpleControl('#legend-template', 'legend', { + position: 'bottomright' + }).addTo(map); }); diff --git a/schamper.png b/schamper.png new file mode 100644 index 0000000..063b713 Binary files /dev/null and b/schamper.png differ diff --git a/share.jpg b/share.jpg new file mode 100644 index 0000000..c93cf88 Binary files /dev/null and b/share.jpg differ diff --git a/logo.png b/zeus.png similarity index 100% rename from logo.png rename to zeus.png