i.getMaxZoom()&&s>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=n._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),g(this._animRequest);var a=e(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=f(a,this,!0),Pt(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,g(this._animRequest),ft(document,"touchmove",this._onTouchMove),ft(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});be.addInitHook("addHandler","touchZoom",Zn),be.BoxZoom=bn,be.DoubleClickZoom=Tn,be.Drag=zn,be.Keyboard=Mn,be.ScrollWheelZoom=Cn,be.Tap=Sn,be.TouchZoom=Zn,Object.freeze=ti,t.version="1.4.0+HEAD.3337f36",t.Control=Te,t.control=ze,t.Browser=Qi,t.Evented=ci,t.Mixin=Be,t.Util=ui,t.Class=v,t.Handler=Ee,t.extend=i,t.bind=e,t.stamp=n,t.setOptions=l,t.DomEvent=Pe,t.DomUtil=ve,t.PosAnimation=Le,t.Draggable=Re,t.LineUtil=Ne,t.PolyUtil=De,t.Point=x,t.point=w,t.Bounds=P,t.bounds=b,t.Transformation=S,t.transformation=Z,t.Projection=He,t.LatLng=M,t.latLng=C,t.LatLngBounds=T,t.latLngBounds=z,t.CRS=di,t.GeoJSON=sn,t.geoJSON=Xt,t.geoJson=an,t.Layer=qe,t.LayerGroup=Ge,t.layerGroup=function(t,i){return new Ge(t,i)},t.FeatureGroup=Ke,t.featureGroup=function(t){return new Ke(t)},t.ImageOverlay=hn,t.imageOverlay=function(t,i,e){return new hn(t,i,e)},t.VideoOverlay=un,t.videoOverlay=function(t,i,e){return new un(t,i,e)},t.DivOverlay=ln,t.Popup=cn,t.popup=function(t,i){return new cn(t,i)},t.Tooltip=_n,t.tooltip=function(t,i){return new _n(t,i)},t.Icon=Ye,t.icon=function(t){return new Ye(t)},t.DivIcon=dn,t.divIcon=function(t){return new dn(t)},t.Marker=$e,t.marker=function(t,i){return new $e(t,i)},t.TileLayer=mn,t.tileLayer=Jt,t.GridLayer=pn,t.gridLayer=function(t){return new pn(t)},t.SVG=Pn,t.svg=Qt,t.Renderer=gn,t.Canvas=vn,t.canvas=$t,t.Path=Qe,t.CircleMarker=tn,t.circleMarker=function(t,i){return new tn(t,i)},t.Circle=en,t.circle=function(t,i,e){return new en(t,i,e)},t.Polyline=nn,t.polyline=function(t,i){return new nn(t,i)},t.Polygon=on,t.polygon=function(t,i){return new on(t,i)},t.Rectangle=Ln,t.rectangle=function(t,i){return new Ln(t,i)},t.Map=be,t.map=function(t,i){return new be(t,i)};var En=window.L;t.noConflict=function(){return window.L=En,this},window.L=t});
diff --git a/app/static/js/map.js b/app/static/js/map.js
index 18344df..c97776c 100644
--- a/app/static/js/map.js
+++ b/app/static/js/map.js
@@ -1,69 +1,69 @@
var map = L.map('mapid');
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
- attribution: '© OpenStreetMap contributors'
+ attribution: '© OpenStreetMap contributors'
}).addTo(map);
let base_request_uri = "https://photon.komoot.de/api/?limit=1&q=";
function performRequest(url, location, success_callback) {
- var request = new XMLHttpRequest();
- request.open('GET', url, true);
- request.onload = function() {
- if (this.status >= 200 && this.status < 400) {
- // Success!
- var data = JSON.parse(this.response);
- success_callback(location, data);
- } else {
- // We reached our target server, but it returned an error
- }
- };
- request.onerror = function() {
- console.log("Error requestion location coordinates");
- // There was a connection error of some sort
- };
- request.send();
+ var request = new XMLHttpRequest();
+ request.open('GET', url, true);
+ request.onload = function() {
+ if (this.status >= 200 && this.status < 400) {
+ // Success!
+ var data = JSON.parse(this.response);
+ success_callback(location, data);
+ } else {
+ // We reached our target server, but it returned an error
+ }
+ };
+ request.onerror = function() {
+ console.log("Error requestion location coordinates");
+ // There was a connection error of some sort
+ };
+ request.send();
}
let marker_icon = L.icon({
- iconUrl: "/static/images/marker-icon.png",
- shadowUrl: "/static/images/marker-shadow.png",
- iconAnchor: [12, 41]
+ iconUrl: "/static/images/marker-icon.png",
+ shadowUrl: "/static/images/marker-shadow.png",
+ iconAnchor: [12, 41]
});
let callback = function OSMCallBack(location, data) {
- let lat, lon;
- if (data.features.length >= 1) {
- let place = data.features[0].properties;
- lat = data.features[0].geometry.coordinates[1];
- lon = data.features[0].geometry.coordinates[0];
+ let lat, lon;
+ if (data.features.length >= 1) {
+ let place = data.features[0].properties;
+ lat = data.features[0].geometry.coordinates[1];
+ lon = data.features[0].geometry.coordinates[0];
- let marker = L.marker([lat, lon], {
- icon: marker_icon
- }).addTo(map)
- .bindPopup(location.name + ', ' + location.address, {offset: new L.Point(0, -16)}).on('click', function () {
- let win = window.open(location.url, '_blank');
- win.focus();
- });
+ let marker = L.marker([lat, lon], {
+ icon: marker_icon
+ }).addTo(map)
+ .bindPopup(location.name + ', ' + location.address, {offset: new L.Point(0, -16)}).on('click', function () {
+ let win = window.open(location.url, '_blank');
+ win.focus();
+ });
- marker.on('mouseover', function(env) {
- marker.openPopup();
- });
- marker.on('mouseout', function(env) {
- marker.closePopup();
- });
+ marker.on('mouseover', function(env) {
+ marker.openPopup();
+ });
+ marker.on('mouseout', function(env) {
+ marker.closePopup();
+ });
- if (location.center) {
- map.setView([lat, lon], 14);
- }
- } else {
- console.log(`Location ${JSON.stringify(location, null, 2)} returned no features, are you sure this is a valid address?`);
- }
+ if (location.center) {
+ map.setView([lat, lon], 14);
+ }
+ } else {
+ console.log(`Location ${JSON.stringify(location, null, 2)} returned no features, are you sure this is a valid address?`);
+ }
};
function loadmap(locations) {
- for (let loc of locations) {
- let request_uri = base_request_uri + loc.address;
- performRequest(request_uri, loc, callback);
- }
+ for (let loc of locations) {
+ let request_uri = base_request_uri + loc.address;
+ performRequest(request_uri, loc, callback);
+ }
}
diff --git a/app/static/js/theme.js b/app/static/js/theme.js
index c780f1c..9d582a3 100644
--- a/app/static/js/theme.js
+++ b/app/static/js/theme.js
@@ -1,14 +1,13 @@
-
{
const init = () =>{
- document.cookie.split('; ').forEach(itCookie = cookie =>{ //I know that this is a shitty way of fixing things... But I'll try to fix it in the future.
+ document.cookie.split('; ').forEach(itCookie = cookie =>{ // TODO (Arnhoudt) Fix shitty way of doing things
if(cookie.split("=")[0] == "theme" && cookie.split("=")[1] == "darkmode"){
document.querySelector(".toggleDarkmode").innerHTML = "Enter lightmode"
document.querySelector(".toggleDarkmode").id = "lightmode";
}
-
+
if(cookie.split("=")[0] == "theme" && cookie.split("=")[1] == "customTheme"){
- document.querySelector(".background").innerHTML = '';
+ document.querySelector(".background").innerHTML = '';
}
if(cookie.split("=")[0] == "performance" && cookie.split("=")[1] == "highPerformance" && document.querySelector(".changePerformance")){
document.querySelector(".changePerformance").innerHTML = "enable low performance";
@@ -20,16 +19,16 @@
}
const handleClickChangePerformance = e => {
- document.cookie = "performance = "+e.currentTarget.id+";path=/";
+ document.cookie = "performance = "+e.currentTarget.id+";path=/";
location.reload();
}
const handleClickChangeTheme = e =>{
- document.cookie = "theme = "+e.currentTarget.id+";path=/";
+ document.cookie = "theme = "+e.currentTarget.id+";path=/";
location.reload();
}
-
+
init();
-}
\ No newline at end of file
+}
diff --git a/app/static/js/timer.js b/app/static/js/timer.js
index 05aaca1..127230c 100644
--- a/app/static/js/timer.js
+++ b/app/static/js/timer.js
@@ -1,36 +1,36 @@
/**
- * Created by feliciaan on 30/03/15.
- */
+* Created by feliciaan on 30/03/15.
+*/
$.ready(function(){
- $('.time').each(function() {
- var timeEl = $( this );
- var time = timeEl.text().split(' ')[0].split(':');
+ $('.time').each(function() {
+ var timeEl = $( this );
+ var time = timeEl.text().split(' ')[0].split(':');
- if (timeEl.text().indexOf('closed') < 0) {
- window.setInterval(function () {
- time = my_tick(time);
- if (time !== "closed") {
- timeS = ("0" + time[0]).slice(-2) + ":" + ("0" + time[1]).slice(-2) + ":" + ("0" + time[2]).slice(-2) + " left";
- } else {
- timeS = "closed"
- }
- timeEl.html(timeS);
- }, 1000);
- }
- });
+ if (timeEl.text().indexOf('closed') < 0) {
+ window.setInterval(function () {
+ time = my_tick(time);
+ if (time !== "closed") {
+ timeS = ("0" + time[0]).slice(-2) + ":" + ("0" + time[1]).slice(-2) + ":" + ("0" + time[2]).slice(-2) + " left";
+ } else {
+ timeS = "closed"
+ }
+ timeEl.html(timeS);
+ }, 1000);
+ }
+ });
- function my_tick(time) {
- if (time[2] > 0) {
- time[2] = time[2] - 1;
- } else if(time[1] > 0) {
- time[2] = 59;
- time[1] = time[1] - 1;
- } else if(time[0] > 0) {
- time[1] = 59;
- time[0] = time[0] - 1;
- } else {
- return "closed";
- }
- return time;
- }
-}());
\ No newline at end of file
+ function my_tick(time) {
+ if (time[2] > 0) {
+ time[2] = time[2] - 1;
+ } else if(time[1] > 0) {
+ time[2] = 59;
+ time[1] = time[1] - 1;
+ } else if(time[0] > 0) {
+ time[1] = 59;
+ time[0] = time[0] - 1;
+ } else {
+ return "closed";
+ }
+ return time;
+ }
+}());
diff --git a/app/templates/about.html b/app/templates/about.html
index 3ba431d..b811d72 100644
--- a/app/templates/about.html
+++ b/app/templates/about.html
@@ -2,6 +2,6 @@
{% set active_page = "about" -%}
{% block container %}
- About
- Haldis is your friendly neighbourhood servant. He exists so lazy fucks like you and me don't need to keep tabs of who is ordering what from where.
+ About
+ Haldis is your friendly neighbourhood servant. He exists so lazy fucks like you and me don't need to keep tabs of who is ordering what from where.
{% endblock %}
diff --git a/app/templates/errors/401.html b/app/templates/errors/401.html
index ba80436..50ed43a 100644
--- a/app/templates/errors/401.html
+++ b/app/templates/errors/401.html
@@ -1,9 +1,9 @@
{% extends "layout.html" -%}
{% block container %}
-
-{% endblock %}
\ No newline at end of file
+
+{% endblock %}
diff --git a/app/templates/errors/404.html b/app/templates/errors/404.html
index 76437e2..11d79d0 100644
--- a/app/templates/errors/404.html
+++ b/app/templates/errors/404.html
@@ -1,9 +1,9 @@
{% extends "layout.html" -%}
{% block container %}
-
-
Page Not Found
-
What you were looking for is just not there.
-
Go somewhere nice
-
-{% endblock %}
\ No newline at end of file
+
+
Page Not Found
+
What you were looking for is just not there.
+
Go somewhere nice
+
+{% endblock %}
diff --git a/app/templates/home.html b/app/templates/home.html
index 7940944..b196e4f 100644
--- a/app/templates/home.html
+++ b/app/templates/home.html
@@ -4,35 +4,35 @@
{% import "utils.html" as util -%}
{% block container %}
-
-
-
Hi, I'm Haldis
- What would you like to eat?
-
-
-
-
- {% if orders|count > 0 -%}
-
Open orders:
- {% for order in orders %}
- {{ util.render_order(order) }}
- {% endfor %}
- {% else %}
-
No orders available.
- {% if not current_user.is_anonymous() %}
- To create an order, fill in the form
here.
- {% else %}
- Login to create an order, or ask someone else.
- {% endif %}
- {%- endif %}
-
-
- {% if recently_closed|count > 0 -%}
-
Recently closed orders:
- {% for order in recently_closed %}
- {{ util.render_order(order) }}
- {% endfor %}
- {%- endif %}
-
-
+
+
+
Hi, I'm Haldis
+ What would you like to eat?
+
+
+
+
+ {% if orders|count > 0 -%}
+
Open orders:
+ {% for order in orders %}
+ {{ util.render_order(order) }}
+ {% endfor %}
+ {% else %}
+
No orders available.
+ {% if not current_user.is_anonymous() %}
+ To create an order, fill in the form
here.
+ {% else %}
+ Login to create an order, or ask someone else.
+ {% endif %}
+ {%- endif %}
+
+
+ {% if recently_closed|count > 0 -%}
+
Recently closed orders:
+ {% for order in recently_closed %}
+ {{ util.render_order(order) }}
+ {% endfor %}
+ {%- endif %}
+
+
{% endblock %}
diff --git a/app/templates/layout.html b/app/templates/layout.html
index 707b9ab..cddb82a 100644
--- a/app/templates/layout.html
+++ b/app/templates/layout.html
@@ -2,87 +2,87 @@
{% import "bootstrap/utils.html" as utils %}
{% set navbar = [
- ('general_bp.home', 'Home'),
- ('order_bp.orders', 'Orders'),
- ('general_bp.locations', 'Locations'),
- ('general_bp.map_view', 'Map'),
- ('general_bp.about', 'About'),
- ('stats_blueprint.stats', 'Stats'),
+ ('general_bp.home', 'Home'),
+ ('order_bp.orders', 'Orders'),
+ ('general_bp.locations', 'Locations'),
+ ('general_bp.map_view', 'Map'),
+ ('general_bp.about', 'About'),
+ ('stats_blueprint.stats', 'Stats'),
] -%}
{% set active_page = active_page|default('index') -%}
{% block title %}
Haldis - {{ active_page|capitalize }}
- {% if title %}
- - {{ title }}
- {% endif %}
+ {% if title %}
+ - {{ title }}
+ {% endif %}
{% endblock %}
{% block styles %}
- {{ super() }}
-
-
-
+ {{ super() }}
+
+
+
{% endblock %}
{% block scripts %}
- {{ super() }}
-
-
-
+ {{ super() }}
+
+
+
{% endblock %}
{% block navbar %}
-
-
-
+
+
+
{% endblock %}
{% block content -%}
- {{ utils.flashed_messages(container=True) }}
+ {{ utils.flashed_messages(container=True) }}
-
- {% block container -%}
- {%- endblock %}
-
+
+ {% block container -%}
+ {%- endblock %}
+
-
+
{%- endblock %}
diff --git a/app/templates/location.html b/app/templates/location.html
index 9a9560a..2cfa19b 100644
--- a/app/templates/location.html
+++ b/app/templates/location.html
@@ -5,40 +5,40 @@
{% block container %}
-
-
{{ location.name }}
- {% if location.address %}
{{ location.address }}
{% endif %}
- {% if location.telephone %}
{{ location.telephone }}
{% endif %}
- {% if location.website %}
{{ location.website }} {% endif %}
- {% if location.osm %}
{{ location.osm }} {% endif %}
- {% if not current_user.is_anonymous() %}
-
Create order
- {% endif %}
-
-
- {% if location.address %}
-
- {% endif %}
-
+
+
{{ location.name }}
+ {% if location.address %}
{{ location.address }}
{% endif %}
+ {% if location.telephone %}
{{ location.telephone }}
{% endif %}
+ {% if location.website %}
{{ location.website }} {% endif %}
+ {% if location.osm %}
{{ location.osm }} {% endif %}
+ {% if not current_user.is_anonymous() %}
+
Create order
+ {% endif %}
+
+
+ {% if location.address %}
+
+ {% endif %}
+
-
-
Products
-
-
- Name | Description | Price |
-
-
- {% for dish in location.dishes -%}
-
- {{ dish.name or dish.id }} |
- {{ dish.description or "" }} |
- {{ dish.price|euro }} |
- |
- {%- endfor %}
-
-
-
+
+
Products
+
+
+ Name | Description | Price |
+
+
+ {% for dish in location.dishes -%}
+
+ {{ dish.name or dish.id }} |
+ {{ dish.description or "" }} |
+ {{ dish.price|euro }} |
+ |
+ {%- endfor %}
+
+
+
{% endblock %}
@@ -49,23 +49,19 @@
{% endblock %}
{% block scripts %}
-{{super()}}
+{{ super() }}
{% if location.address %}
-
-
-
+
+
+
{% endif %}
{% endblock %}
diff --git a/app/templates/locations.html b/app/templates/locations.html
index 03d8c99..0dc7d82 100644
--- a/app/templates/locations.html
+++ b/app/templates/locations.html
@@ -5,27 +5,27 @@
{% block container %}
{% endblock %}
diff --git a/app/templates/maps.html b/app/templates/maps.html
index 508a2e2..0b27b3f 100644
--- a/app/templates/maps.html
+++ b/app/templates/maps.html
@@ -20,23 +20,20 @@
{% endblock %}
diff --git a/app/templates/order.html b/app/templates/order.html
index cc3bba6..40732b9 100644
--- a/app/templates/order.html
+++ b/app/templates/order.html
@@ -7,190 +7,200 @@
{% block container %}
-
-
Order {{ order.id }}
-
- {% if order.can_close(current_user.id) -%}
-
- {% endif %}{% if courier_or_admin %}
-
Edit
- {%- endif %}
-
- courier: {{ order.courier.username }}
- {% if order.courier == None and not current_user.is_anonymous() %}
-
- {% endif %}
-
- location: {% if order.location %}
-
{{ order.location_name }}
- {% else %}
- {{ order.location_name }}
- {% endif %}
- {% if order.location.telephone != None %}
- telephone:
{{ order.location.telephone }}
- {% endif %}
- start: {{ order.starttime.strftime("%d/%m/%Y %H:%M") }}
- {% if order.stoptime %}
- closing time: {{ order.stoptime.strftime("%H:%M") }} (
{{ order.stoptime|countdown }})
- {% else %}open{% endif %}
- total price: {{ total_price|euro }} {% if courier_or_admin %}- remaining debts: {{ debts|euro }}{% endif %}
-
- {% if form -%}
-
+ {%- endif %}
-
-
-
Ordered dishes: {{ order.items.count() }}
-
- {% for key, value in order.group_by_dish().items() -%}
-
- {{ key }}: {{ value["count"] }}
- {% if value["comments"]|any -%}
-
- {%- endif %}
-
- {%- endfor %}
-
+
+
+
Ordered dishes: {{ order.items.count() }}
+
+ {% for key, value in order.group_by_dish().items() -%}
+
+ {{ key }}: {{ value["count"] }}
+ {% if value["comments"]|any -%}
+
+ {%- endif %}
+
+ {%- endfor %}
+
{% endblock %}
{% block styles %}
- {{ super() }}
-
-
-
+ {{ super() }}
+
+
+
{% endblock %}
{% block scripts %}
- {{ super() }}
-
-
+ {{ super() }}
+
+
{% endblock %}
diff --git a/app/templates/order_edit.html b/app/templates/order_edit.html
index 2f28781..a47cd1d 100644
--- a/app/templates/order_edit.html
+++ b/app/templates/order_edit.html
@@ -5,76 +5,75 @@
{% import "utils.html" as util -%}
{% block container %}
-
- {% if not current_user.is_anonymous() %}
-
-
Edit order:
-
-
-
-
-
-
- {% endif %}
-
-
+
+ {% if not current_user.is_anonymous() %}
+
+
Edit order:
+
+
+
+
+
+
+ {% endif %}
+
{% endblock %}
{% block styles -%}
- {{ super() }}
+ {{ super() }}
-
-
-
+
+
+
{%- endblock %}
{% block scripts -%}
- {{ super() }}
-
-
-
-
+ {{ super() }}
+
+
+
+
{%- endblock %}
diff --git a/app/templates/order_items.html b/app/templates/order_items.html
index fb479ee..a92b632 100644
--- a/app/templates/order_items.html
+++ b/app/templates/order_items.html
@@ -6,47 +6,47 @@ Haldis - Order {{ order.id }}
{% endblock %}
{% block styles %}
- {{ super() }}
-
-
-
+ {{ super() }}
+
+
+
{% endblock %}
{% block scripts %}
- {{ super() }}
-
-
+ {{ super() }}
+
+
{% endblock %}
{% block content -%}
- {{ utils.flashed_messages(container=True) }}
+ {{ utils.flashed_messages(container=True) }}
-
-
Haldis order {{ order.id }}
+
+
Haldis order {{ order.id }}
- {% if not order.is_closed() %}
-
- {{ order.stoptime|countdown }}
- Refresh page when closed!
-
- {% endif %}
+ {% if not order.is_closed() %}
+
+ {{ order.stoptime|countdown }}
+ Refresh page when closed!
+
+ {% endif %}
- {% for key, value in order.group_by_dish().items() -%}
-
-
{{ value["count"] }} × {{ key }}
- {% if value["comments"]|any -%}
-
- {%- endif %}
-
-
- {%- endfor %}
-
Total {{ order.items.count() }} items — {{ total_price|euro }}
-
+ {% for key, value in order.group_by_dish().items() -%}
+
+
{{ value["count"] }} × {{ key }}
+ {% if value["comments"]|any -%}
+
+ {%- endif %}
+
+
+ {%- endfor %}
+
Total {{ order.items.count() }} items — {{ total_price|euro }}
+
{%- endblock %}
diff --git a/app/templates/orders.html b/app/templates/orders.html
index 1c86c9e..e7fb9a1 100644
--- a/app/templates/orders.html
+++ b/app/templates/orders.html
@@ -5,90 +5,89 @@
{% import "utils.html" as util -%}
{% block container %}
-
-
- {% if orders|count > 0 -%}
-
Open orders:
- {% for order in orders %}
- {{ util.render_order(order) }}
- {% endfor %}
- {% else %}
- No orders available.
- {% if not current_user.is_anonymous() %}
- To create an order, fill in the form on the right.
- {% else %}
- Login to create an order, or ask someone else.
- {% endif %}
- {%- endif %}
-
- {% if not current_user.is_anonymous() %}
-
-
Create new order:
-
-
-
-
-
-
- {% endif %}
-
-
+
+
+ {% if orders|count > 0 -%}
+
Open orders:
+ {% for order in orders %}
+ {{ util.render_order(order) }}
+ {% endfor %}
+ {% else %}
+ No orders available.
+ {% if not current_user.is_anonymous() %}
+ To create an order, fill in the form on the right.
+ {% else %}
+ Login to create an order, or ask someone else.
+ {% endif %}
+ {%- endif %}
+
+ {% if not current_user.is_anonymous() %}
+
+
Create new order:
+
+
+
+
+
+
+ {% endif %}
+
{% endblock %}
{% block styles -%}
- {{ super() }}
-
-
-
+ {{ super() }}
+
+
+
{%- endblock %}
{% block scripts -%}
- {{ super() }}
-
-
-
-
+ {{ super() }}
+
+
+
+
{%- endblock %}
diff --git a/app/templates/profile.html b/app/templates/profile.html
index 964905b..c9b1715 100644
--- a/app/templates/profile.html
+++ b/app/templates/profile.html
@@ -2,17 +2,17 @@
{% set active_page = "profile" -%}
{% block container %}
- {{ current_user.username }}
- Themes
- enable custom themes
- enable high performance
-
-
-
-
+ {{ current_user.username }}
+ Themes
+ enable custom themes
+ enable high performance
+
+
+
+
{% endblock %}
diff --git a/app/templates/stats.html b/app/templates/stats.html
index e8111c6..80632ac 100644
--- a/app/templates/stats.html
+++ b/app/templates/stats.html
@@ -1,14 +1,14 @@
{% extends "layout.html" -%}
{% set active_page = "stats" -%}
{% block container %}
- Stats bruh
-
-
- Over
- {{ data.amount.orders }} orders,
- {{ data.amount.users }} users have ordered
- {{ data.amount.orderitems }} items in
- {{ data.amount.locations }} locations.
-
-
-{% endblock %}
\ No newline at end of file
+ Stats bruh
+
+
+ Over
+ {{ data.amount.orders }} orders,
+ {{ data.amount.users }} users have ordered
+ {{ data.amount.orderitems }} items in
+ {{ data.amount.locations }} locations.
+
+
+{% endblock %}
diff --git a/app/templates/utils.html b/app/templates/utils.html
index 7c62e4b..d835c04 100644
--- a/app/templates/utils.html
+++ b/app/templates/utils.html
@@ -1,25 +1,25 @@
{% macro render_order(order) -%}
-
-
{{ order.location_name }}
-
{{ order.items.count() }} orders
-
- {% if order.stoptime %}
- Closes {{ order.stoptime.strftime("%H:%M") }}{{ order.stoptime|countdown }}
- {% else %}open{% endif %}
-
-
+
+
{{ order.location_name }}
+
{{ order.items.count() }} orders
+
+ {% if order.stoptime %}
+ Closes {{ order.stoptime.strftime("%H:%M") }}{{ order.stoptime|countdown }}
+ {% else %}open{% endif %}
+
+
{%- endmacro %}
{% macro render_form_field_errors(field) %}
{%- if field.errors %}
- {%- for error in field.errors %}
- {{error}}
- {%- endfor %}
+ {%- for error in field.errors %}
+ {{error}}
+ {%- endfor %}
{%- elif field.description -%}
- {{field.description|safe}}
+ {{field.description|safe}}
{%- endif %}
{% endmacro %}
diff --git a/app/views/themes.yml b/app/views/themes.yml
index 3cc45fb..824b689 100644
--- a/app/views/themes.yml
+++ b/app/views/themes.yml
@@ -1,22 +1,22 @@
# Seasonal themes for Haldis
- lightmode:
- file: lightmode.css
- type: default
+ file: lightmode.css
+ type: default
- darkmode:
- file: darkmode.css
- type: default
+ file: darkmode.css
+ type: default
- halloween:
- file: halloween.css
- type: static-date
- start: 21/10
- end: 10/11
+ file: halloween.css
+ type: static-date
+ start: 21/10
+ end: 10/11
- sinterklaas:
- file: sinterklaas.css
- type: static-date
- start: 28/11
- end: 5/12
+ file: sinterklaas.css
+ type: static-date
+ start: 28/11
+ end: 5/12
- kerstmis:
- file: kerstmis.css
- type: static-date
- start: 6/12
- end: 06/01
\ No newline at end of file
+ file: kerstmis.css
+ type: static-date
+ start: 6/12
+ end: 06/01
diff --git a/etc/vscode/language-configuration.json b/etc/vscode/language-configuration.json
index f3e7fd6..6dec264 100644
--- a/etc/vscode/language-configuration.json
+++ b/etc/vscode/language-configuration.json
@@ -1,30 +1,30 @@
{
- "comments": {
- // symbol used for single line comment. Remove this entry if your language does not support line comments
- "lineComment": "//",
- // symbols used for start and end a block comment. Remove this entry if your language does not support block comments
- "blockComment": [ "=============================================", "=============================================" ]
- },
- // symbols used as brackets
- "brackets": [
- ["{", "}"],
- ["[", "]"],
- ["(", ")"]
- ],
- // symbols that are auto closed when typing
- "autoClosingPairs": [
- ["{", "}"],
- ["[", "]"],
- ["(", ")"],
- ["\"", "\""],
- ["'", "'"]
- ],
- // symbols that can be used to surround a selection
- "surroundingPairs": [
- ["{", "}"],
- ["[", "]"],
- ["(", ")"],
- ["\"", "\""],
- ["'", "'"]
- ]
-}
\ No newline at end of file
+ "comments": {
+ // symbol used for single line comment. Remove this entry if your language does not support line comments
+ "lineComment": "//",
+ // symbols used for start and end a block comment. Remove this entry if your language does not support block comments
+ "blockComment": [ "=============================================", "=============================================" ]
+ },
+ // symbols used as brackets
+ "brackets": [
+ ["{", "}"],
+ ["[", "]"],
+ ["(", ")"]
+ ],
+ // symbols that are auto closed when typing
+ "autoClosingPairs": [
+ ["{", "}"],
+ ["[", "]"],
+ ["(", ")"],
+ ["\"", "\""],
+ ["'", "'"]
+ ],
+ // symbols that can be used to surround a selection
+ "surroundingPairs": [
+ ["{", "}"],
+ ["[", "]"],
+ ["(", ")"],
+ ["\"", "\""],
+ ["'", "'"]
+ ]
+}
diff --git a/etc/vscode/package.json b/etc/vscode/package.json
index 4708b30..7860b42 100644
--- a/etc/vscode/package.json
+++ b/etc/vscode/package.json
@@ -1,31 +1,31 @@
{
- "name": "hlds",
- "publisher": "Silvius",
- "displayName": "Syntax highlighting for haldis (hlds) files.",
- "description": "hlds",
- "repository": "https://git.zeus.gent/midgard/haldis",
- "version": "0.0.2",
- "engines": {
- "vscode": "^1.30.0"
- },
- "categories": [
- "Programming Languages"
- ],
- "contributes": {
- "languages": [{
- "id": "hlds",
- "aliases": ["HLDS", "hlds"],
- "extensions": [".hlds"],
- "configuration": "./language-configuration.json"
- }],
- "grammars": [{
- "language": "hlds",
- "scopeName": "source.hlds",
- "path": "./syntaxes/hlds.tmLanguage.json"
- }, {
- "path": "./syntaxes/injections.json",
- "scopeName": "comment.injection",
- "injectTo": ["source.hlds"]
- }]
- }
+ "name": "hlds",
+ "publisher": "Silvius",
+ "displayName": "Syntax highlighting for haldis (hlds) files.",
+ "description": "hlds",
+ "repository": "https://git.zeus.gent/midgard/haldis",
+ "version": "0.0.2",
+ "engines": {
+ "vscode": "^1.30.0"
+ },
+ "categories": [
+ "Programming Languages"
+ ],
+ "contributes": {
+ "languages": [{
+ "id": "hlds",
+ "aliases": ["HLDS", "hlds"],
+ "extensions": [".hlds"],
+ "configuration": "./language-configuration.json"
+ }],
+ "grammars": [{
+ "language": "hlds",
+ "scopeName": "source.hlds",
+ "path": "./syntaxes/hlds.tmLanguage.json"
+ }, {
+ "path": "./syntaxes/injections.json",
+ "scopeName": "comment.injection",
+ "injectTo": ["source.hlds"]
+ }]
+ }
}
diff --git a/etc/vscode/syntaxes/injections.json b/etc/vscode/syntaxes/injections.json
index 6557b5d..f3960e6 100644
--- a/etc/vscode/syntaxes/injections.json
+++ b/etc/vscode/syntaxes/injections.json
@@ -1,36 +1,36 @@
{
- "scopeName": "comment.injection",
- "injectionSelector": "L:embedded.meta.tag",
- "patterns": [
- {
- "include": "#comment"
- },
- {
- "include": "#header"
- },
- {
- "include": "#links"
- },
- {
- "include": "#brackets"
- }
- ],
- "repository": {
- "comment": {
- "match": "#.*$",
- "name": "comment"
- },
- "header": {
- "match": "^[a-zA-Z0-9_].*$",
- "name": "keyword.todo"
- },
- "links": {
- "match": "^\\t[a-zA-Z0-9-_]*",
- "name": "keyword.todo"
- },
- "brackets": {
- "match": "=",
- "name": "variable.other"
- }
- }
+ "scopeName": "comment.injection",
+ "injectionSelector": "L:embedded.meta.tag",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#header"
+ },
+ {
+ "include": "#links"
+ },
+ {
+ "include": "#brackets"
+ }
+ ],
+ "repository": {
+ "comment": {
+ "match": "#.*$",
+ "name": "comment"
+ },
+ "header": {
+ "match": "^[a-zA-Z0-9_].*$",
+ "name": "keyword.todo"
+ },
+ "links": {
+ "match": "^\\t[a-zA-Z0-9-_]*",
+ "name": "keyword.todo"
+ },
+ "brackets": {
+ "match": "=",
+ "name": "variable.other"
+ }
+ }
}
diff --git a/first-setup.sh b/first-setup.sh
index 633a4b1..b9f9585 100755
--- a/first-setup.sh
+++ b/first-setup.sh
@@ -9,8 +9,8 @@ B="\n${bold}"
E="${normal}"
if [ ! -d "venv" ]; then
- echo -e "${B} No venv found, creating a new one ${E}"
- python3 -m venv venv
+ echo -e "${B} No venv found, creating a new one ${E}"
+ python3 -m venv venv
fi
source venv/bin/activate
@@ -29,4 +29,4 @@ cd ..
echo -e "${B} Seeding database ${E}"
./populate-db.sh
-echo -e "${B} Activate your venv using 'source venv/bin/activate'.\nThen run the server with 'python app/app.py runserver' ${E}"
\ No newline at end of file
+echo -e "${B} Activate your venv using 'source venv/bin/activate'.\nThen run the server with 'python app/app.py runserver' ${E}"