Consistent indentation please

This commit is contained in:
Midgard 2020-05-20 17:00:25 +02:00
parent fb377030ef
commit 43fdcf0c87
Signed by: midgard
GPG Key ID: 511C112F1331BBB4
4 changed files with 122 additions and 115 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
# https://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
[*.html]
indent_size = 2

View File

@ -1,28 +1,28 @@
html, body {
margin: 0px;
padding: 0px;
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
width: 100%;
height: 100%;
}
#map {
width: 100%;
height: 100%;
width: 100%;
height: 100%;
}
.leaflet-popup-content-wrapper,
.leaflet-control-zoom {
border-radius: 0px;
border-radius: 0px;
}
.leaflet-popup-content-wrapper {
width: 600px;
max-height: 400px;
overflow-y:auto
width: 600px;
max-height: 400px;
overflow-y: auto;
}
.leaflet-popup-content {
width:auto !important;
width: auto !important;
}
a img {
@ -48,8 +48,8 @@ table {
}
.mobile tr td:first-child {
padding: 0;
padding-right: 10px;
padding: 0;
padding-right: 10px;
}
.mobile tr:nth-child(2n) {
@ -69,21 +69,21 @@ table {
}
.legend {
height: 52px;
width: 130px;
background-color: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
height: 52px;
width: 130px;
background-color: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}
.holiday-legend {
height: 72px;
width: 145px;
background-color: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
height: 72px;
width: 145px;
background-color: #fff;
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}
.legend .holiday {
display: none;
display: none;
}
.type {

View File

@ -1,11 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<html lang="nl">
<head>
<meta charset="utf-8">
<title>Bloklocaties in Vlaanderen</title>
<meta name="apple-itunes-app" content="app-id=602640924">
<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">
@ -30,65 +30,60 @@
</head>
<body>
<div id="map"></div>
<script id="popup-template" type="text/x-handlebars-template">
<div id="resto-popup">
<h3>{{name}} ({{capacity}} pl.)</h3>
<img src="img/{{type}}.png" class="type">
<div class="text">Locatie: {{address}}<br />
{{#if period.start}}
Van {{period.start}} tot {{period.end}}
Van {{period.start}} tot {{period.end}}
{{else}}
Open gedurende het hele jaar.
Open gedurende het hele jaar.
{{/if}}
</div>
<h4>Openingsuren</h4>
<table class="desktop">
<tr>
<td>Maandag</td>
<td>Dinsdag</td>
<td>Woensdag</td>
<td>Donderdag</td>
<td>Vrijdag</td>
<td>Zaterdag</td>
<td>Zondag</td>
</tr>
<tr>
<td>{{#if hours.monday}}{{{hours.monday}}}{{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.thursday}}{{{hours.thursday}}}{{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.sunday}}{{{hours.sunday}}}{{else}}Gesloten{{/if}}</td>
</tr>
<tr>
<td>Maandag</td>
<td>Dinsdag</td>
<td>Woensdag</td>
<td>Donderdag</td>
<td>Vrijdag</td>
<td>Zaterdag</td>
<td>Zondag</td>
</tr><tr>
<td>{{#if hours.monday}}{{{hours.monday}}}{{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.thursday}}{{{hours.thursday}}}{{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.sunday}}{{{hours.sunday}}}{{else}}Gesloten{{/if}}</td>
</tr>
</table>
<table class="mobile">
<tr>
<td>Maandag</td>
<td>{{#if hours.monday}}{{{hours.monday}}}{{else}}Gesloten{{/if}}</td>
</tr>
<tr>
<td>Dinsdag</td>
<td>{{#if hours.tuesday}}{{{hours.tuesday}}}{{else}}Gesloten{{/if}}</td>
</tr>
<tr>
<td>Woensdag</td>
<td>{{#if hours.wednesday}}{{{hours.wednesday}}}{{else}}Gesloten{{/if}}</td>
</tr>
<tr>
<td>Donderdag</td>
<td>{{#if hours.thursday}}{{{hours.thursday}}}{{else}}Gesloten{{/if}}</td>
</tr><tr>
<td>Vrijdag</td>
<td>{{#if hours.friday}}{{{hours.friday}}}{{else}}Gesloten{{/if}}</td>
</tr>
<tr>
<td>Zaterdag</td>
<td>{{#if hours.saturday}}{{{hours.saturday}}}{{else}}Gesloten{{/if}}</td>
</tr>
<tr>
<td>Zondag</td>
<td>{{#if hours.sunday}}{{{hours.sunday}}}{{else}}Gesloten{{/if}}</td>
<td>Dinsdag</td>
<td>{{#if hours.tuesday}}{{{hours.tuesday}}}{{else}}Gesloten{{/if}}</td>
</tr><tr>
<td>Woensdag</td>
<td>{{#if hours.wednesday}}{{{hours.wednesday}}}{{else}}Gesloten{{/if}}</td>
</tr><tr>
<td>Donderdag</td>
<td>{{#if hours.thursday}}{{{hours.thursday}}}{{else}}Gesloten{{/if}}</td>
</tr><tr>
<td>Vrijdag</td>
<td>{{#if hours.friday}}{{{hours.friday}}}{{else}}Gesloten{{/if}}</td>
</tr><tr>
<td>Zaterdag</td>
<td>{{#if hours.saturday}}{{{hours.saturday}}}{{else}}Gesloten{{/if}}</td>
</tr><tr>
<td>Zondag</td>
<td>{{#if hours.sunday}}{{{hours.sunday}}}{{else}}Gesloten{{/if}}</td>
</tr>
</table>
{{#if extra}}{{{extra}}}{{/if}}
@ -103,18 +98,18 @@
</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 style="width: 140px; height: 18px; padding-top: 5px; padding-left: 5px;" class="holiday">
<div style="height: 10px; width: 10px; background: rgb(121, 230, 121); margin-top: 0px; margin-left: 5px;"></div>
<span style="position: absolute; left: 25px; top: 53px;">Tijdens kerstvakantie</span>
</div>
<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 style="width: 140px; height: 18px; padding-top: 5px; padding-left: 5px;" class="holiday">
<div style="height: 10px; width: 10px; background: rgb(121, 230, 121); margin-top: 0px; margin-left: 5px;"></div>
<span style="position: absolute; left: 25px; top: 53px;">Tijdens kerstvakantie</span>
</div>
</div>
</script>
@ -129,14 +124,13 @@
}(document, 'script', 'facebook-jssdk'));</script>
<!-- Google Analytics SDK -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-25444917-8', 'auto');
ga('send', 'pageview');
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-25444917-8', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>

View File

@ -72,90 +72,90 @@ $(document).ready(function() {
// code copied from http://jsfiddle.net/sowelie/3JbNY/
var HoverMarker = L.Marker.extend({
bindPopup: function(htmlContent, options) {
if (options && options.showOnMouseOver) {
// call the super method
L.Marker.prototype.bindPopup.apply(this, [htmlContent, options]);
// unbind the click event
this.off("click", this.openPopup, this);
// bind to mouse over
this.on("mouseover", function(e) {
// get the element that the mouse hovered onto
var target = e.originalEvent.fromElement || e.originalEvent.relatedTarget;
var parent = this._getParent(target, "leaflet-popup");
// check to see if the element is a popup, and if it is this marker's popup
if (parent == this._popup._container)
return true;
// show the popup
this.openPopup();
}, this);
// and mouse out
this.on("mouseout", function(e) {
// get the element that the mouse hovered onto
var target = e.originalEvent.toElement || e.originalEvent.relatedTarget;
// check to see if the element is a popup
if (this._getParent(target, "leaflet-popup")) {
L.DomEvent.on(this._popup._container, "mouseout", this._popupMouseOut, this);
return true;
}
// hide the popup
this.closePopup();
}, this);
}
},
_popupMouseOut: function(e) {
// detach the event
L.DomEvent.off(this._popup, "mouseout", this._popupMouseOut, this);
// get the element that the mouse hovered onto
var target = e.toElement || e.relatedTarget;
// check to see if the element is a popup
if (this._getParent(target, "leaflet-popup"))
return true;
// check to see if the marker was hovered back onto
if (target == this._icon)
return true;
// hide the popup
this.closePopup();
},
_getParent: function(element, className) {
var parent = element.parentNode;
while (parent != null) {
if (parent.className && L.DomUtil.hasClass(parent, className))
return parent;
parent = parent.parentNode;
}
return false;
}
});