Merge branch 'design'

This commit is contained in:
Midgard 2020-10-12 22:41:27 +02:00
commit 17b3bc1c7a
Signed by: midgard
GPG key ID: 511C112F1331BBB4
23 changed files with 708 additions and 603 deletions

View file

@ -171,6 +171,7 @@ def add_template_filters(app: Flask) -> None:
app.template_filter("euro")(euro_string) app.template_filter("euro")(euro_string)
app.template_filter("price_range")(price_range_string) app.template_filter("price_range")(price_range_string)
app.template_filter("any")(any) app.template_filter("any")(any)
app.template_filter("all")(all)
app = Flask(__name__) app = Flask(__name__)

View file

@ -59,10 +59,7 @@ class OrderItemForm(Form):
submit_button = SubmitField("Submit") submit_button = SubmitField("Submit")
def populate(self, location: Location) -> None: def populate(self, location: Location) -> None:
self.dish_id.choices = [ self.dish_id.choices = [(dish.id, dish.name) for dish in location.dishes]
(dish.id, (dish.name + ": " + price_range_string(dish.price_range())))
for dish in location.dishes
]
if not self.is_submitted() and self.comment.data is None: if not self.is_submitted() and self.comment.data is None:
self.comment.data = request.args.get("comment") self.comment.data = request.args.get("comment")

View file

@ -48,7 +48,7 @@ class HldsSemanticActions:
dish.choices[i] = (choiceId, choiceObject) dish.choices[i] = (choiceId, choiceObject)
# Move the base price to the first single_choice if the dish has a fixed price # Move the base price to the first single_choice if the dish doesn't have a fixed price
first_single_choice = first( first_single_choice = first(
c[1] for c in dish.choices if c[0] == "single_choice" c[1] for c in dish.choices if c[0] == "single_choice"
) )

View file

@ -44,35 +44,48 @@ class Order(db.Model):
), "location_id must be configured before updating from HLDS" ), "location_id must be configured before updating from HLDS"
self.location_name = self.location.name self.location_name = self.location.name
def group_by_user(self) -> typing.Dict[str, typing.Any]: def for_user(self, anon=None, user=None) -> typing.List:
return list(
filter(
(lambda i: i.user == user)
if user is not None
else (lambda i: i.user_name == anon),
self.items
)
)
def group_by_user(self) -> typing.List[typing.Tuple[str, typing.List]]:
"Group items of an Order by user" "Group items of an Order by user"
group: typing.Dict[str, typing.Any] = dict() group: typing.Dict[str, typing.List] = dict()
for item in self.items: for item in self.items:
user = group.get(item.get_name(), dict()) if item.for_name not in group:
user["total"] = user.get("total", 0) + item.price group[item.for_name] = []
user["to_pay"] = user.get("to_pay", 0) + item.price if not item.paid else 0
user["paid"] = user.get("paid", True) and item.paid
user["dishes"] = user.get("dishes", []) + [item.dish_name]
group[str(item.get_name())] = user
return group group[item.for_name].append(item)
def group_by_dish( for _user_name, order_items in group.items():
self, sort_comments=False order_items.sort(key=lambda order_item: order_item.comment or "")
) -> typing.Dict[str, typing.Dict[str, typing.Any]]:
return list(sorted(group.items(), key=lambda t: (t[0] or "", t[1] or "")))
def group_by_dish(self) -> typing.List[typing.Tuple[str, typing.List]]:
"Group items of an Order by dish" "Group items of an Order by dish"
group: typing.Dict[str, typing.Dict[str, typing.Any]] = dict() group: typing.Dict[str, typing.List] = dict()
for item in self.items: for item in self.items:
dish = group.get(item.dish_name, dict()) if item.dish_name not in group:
dish["count"] = dish.get("count", 0) + 1 group[item.dish_name] = []
dish["comments"] = dish.get("comments", []) + [item.comment]
group[item.dish_name] = dish
if sort_comments: group[item.dish_name].append(item)
for _dish_name, dish_props in group.items():
dish_props["comments"].sort()
return group for _dish_name, order_items in group.items():
order_items.sort(key=lambda order_item: (
(order_item.comment or " No comment") +
(order_item.for_name or "")
))
return list(sorted(group.items()))
def is_closed(self) -> bool: def is_closed(self) -> bool:
return self.stoptime and datetime.now() > self.stoptime return self.stoptime and datetime.now() > self.stoptime

View file

@ -37,7 +37,8 @@ class OrderItem(db.Model):
raise ValueError("No Location found with id: " + location_id) raise ValueError("No Location found with id: " + location_id)
raise AttributeError() raise AttributeError()
def get_name(self) -> str: @property
def for_name(self) -> str:
"Get the name of the user which 'owns' the item" "Get the name of the user which 'owns' the item"
if self.user_id is not None and self.user_id > 0: if self.user_id is not None and self.user_id > 0:
return self.user.username return self.user.username
@ -46,7 +47,7 @@ class OrderItem(db.Model):
def __repr__(self) -> str: def __repr__(self) -> str:
return "Order %d: %s wants %s" % ( return "Order %d: %s wants %s" % (
self.order_id or 0, self.order_id or 0,
self.get_name(), self.for_name,
self.dish_name or "None", self.dish_name or "None",
) )

View file

@ -1,110 +0,0 @@
:root {
/*Darkmode colors*/
--dGray0:#D0D0D8;
--dGray1:#8E8E93;
--dGray2:#636366;
--dGray3:#48484A;
--dGray4:#3A3A3C;
--dGray5:#2C2C2E;
--dGray6:#1C1C1E;
--dBlue:#0A84FF;
}
.table-hover tbody tr:hover{
background-color: var(--dGray3);
}
body{
background-color: var(--dGray5);
color: var(--dGray1);
}
a {
color: var(--dBlue);
}
.btn-primary {
color: var(--dGray6);
background-color: var(--dBlue);
}
.navbar {
background-color: var(--dGray6);
}
.navbar-default .navbar-nav .active a{
background-color: var(--dGray4);
color: var(--dGray1);
}
.navbar-default .navbar-nav .active a:hover{
background-color: var(--dGray3);
color: var(--dGray0);
}
.navbar-default .navbar-nav li a,.navbar-default .navbar-brand{
color: var(--dGray1);
}
.navbar-default .navbar-nav li a:hover,.navbar-default .navbar-brand:hover{
color: var(--dGray0);
}
hr{
border-top: 1px solid var(--dGray2);
}
h1, h2, h3, h4, h5, h6{
color: var(--dGray1);
}
.jumbotron, .darker {
background-color: var(--dGray4);
}
.table tbody tr td {
border-top: 1px solid var(--dGray3);
}
.table thead tr th {
border-bottom: 2px solid var(--dGray2);
}
.navbar-toggle .icon-bar {
background-color: var(--dGray0);
opacity: 0.5;
}
.select2-container--default .select2-selection--single{
background-color: var(--dGray3);
color: var(--dGray0);
}
.select2-container--default .select2-selection--single .select2-selection__rendered{
color: var(--dGray0);
}
.select2-results__option{
background-color: var(--dGray5);
color: var(--dGray0);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: var(--dGray4);
color: var(--dGray0);
}
.bootstrap-datetimepicker-widget table thead tr:first-child th:hover,
.bootstrap-datetimepicker-widget table td.day:hover,
.bootstrap-datetimepicker-widget table td.hour:hover,
.bootstrap-datetimepicker-widget table td.minute:hover,
.bootstrap-datetimepicker-widget table td span:hover,
.bootstrap-datetimepicker-widget table td.second:hover {
background: var(--dGray4);
}
.select2-container--default .select2-results__option[aria-selected=true]{
background-color: var(--dBlue);
color: var(--dGray0);
}
.select2-search{
background-color: var(--dGray2);
}
.select2-search input{
background-color: var(--dGray0);
}
.dropdown-menu{
background-color: var(--dGray5);
}
.form-control{
color: var(--dGray0);
}
.form-control::placeholder{
color: var(--dGray2);
}
.enter_darkmode>a {
text-align: center;
}

View file

@ -1,16 +1,19 @@
/* Custom CSS */
:root { :root {
/* Darkmode colors */ /* Darkmode colors */
--dGray0:#D0D0D8; --gray0: #d0d0d8;
--dGray1:#8E8E93; --gray1: #8e8e93;
--dGray2:#636366; --gray2: #636366;
--dGray3:#48484A; --gray3: #48484a;
--dGray4:#3A3A3C; --gray4: #3a3a3c;
--dGray5:#2C2C2E; --gray5: #2c2c2e;
--dGray6:#1C1C1E; --gray6: #1c1c1e;
--dBlue:#0A84FF; --accent: #0a84ff;
--FontFamily:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;
--FontSize:13px; --bg: #2c2c2e;
--navbarBg: #1c1c1e;
--fontFamily: "Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;
--fontSize: 13px;
} }
html { html {
@ -19,11 +22,11 @@ html {
body { body {
padding-top: 70px; padding-top: 70px;
background-color: var(--dGray5); background-color: var(--bg);
color: var(--dGray1); color: var(--gray1);
height: 100%; height: 100%;
font-family: var(--FontFamily); font-family: var(--fontFamily);
font-size: var(--FontSize); font-size: var(--fontSize);
} }
.background { .background {
@ -47,12 +50,6 @@ body {
padding-top: 10px; padding-top: 10px;
} }
.darker {
background-color: #fafafa;
margin-top: 10px;
padding-bottom: 5px;
}
@media (min-width: 992px) { @media (min-width: 992px) {
.align-bottom { .align-bottom {
margin-top: 2.5em; margin-top: 2.5em;
@ -78,7 +75,7 @@ body {
font-size: 200%; font-size: 200%;
margin: 0 ; margin: 0 ;
padding: 0.4em 0 0.2em; padding: 0.4em 0 0.2em;
border-bottom: 1px dashed var(--dGray1); border-bottom: 1px dashed var(--gray1);
text-align: center; text-align: center;
} }
.showcase h2 { .showcase h2 {
@ -115,16 +112,12 @@ body {
} }
.showcase .total { .showcase .total {
border-top: 1px dashed var(--dGray1); border-top: 1px dashed var(--gray1);
text-align: center; text-align: center;
padding: 0.5em 0; padding: 0.5em 0;
margin-top: 1.3em; margin-top: 1.3em;
} }
.order_row {
background: var(--dGray4);
}
.time_data{ .time_data{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -144,14 +137,6 @@ body {
} }
} }
/* Add clickable box */
div.box:hover {
cursor: hand;
cursor: pointer;
opacity: .9;
box-shadow: 2px 4px 4px -1px #888888;
}
a.divLink { a.divLink {
position: absolute; position: absolute;
width: 100%; width: 100%;
@ -185,68 +170,82 @@ a.divLink {
} }
.table-hover tbody tr:hover{ .table-hover tbody tr:hover{
background-color: var(--dGray3); background-color: var(--gray4);
} }
a { a {
color: var(--dBlue); color: var(--accent);
} }
.btn-primary { .btn-primary {
color: var(--dGray6); color: var(--gray6);
background-color: var(--dBlue); background-color: var(--accent);
} }
.navbar { .navbar {
background-color: var(--dGray6); background-color: var(--navbarBg);
} }
.navbar-default .navbar-nav .active a { .navbar-default .navbar-nav .active a {
background-color: var(--dGray4); background-color: var(--gray5);
color: var(--dGray1); color: var(--gray1);
} }
.navbar-default .navbar-nav .active a:hover{ .navbar-default .navbar-nav .active a:hover,
background-color: var(--dGray3); .navbar-default .navbar-nav .active a:focus,
color: var(--dGray0); .navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
background-color: var(--gray4);
color: var(--gray0);
} }
.navbar-default .navbar-nav li a,.navbar-default .navbar-brand{ .navbar-default .navbar-nav li a,
color: var(--dGray1); .navbar-default .navbar-brand {
color: var(--gray1);
} }
.navbar-default .navbar-nav li a:hover,.navbar-default .navbar-brand:hover{ .navbar-default .navbar-nav li a:hover,
color: var(--dGray0); .navbar-default .navbar-nav li a:focus,
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
color: var(--gray0);
} }
hr{ hr{
border-top: 1px solid var(--dGray2); border-top: 1px solid var(--gray2);
} }
h1, h2, h3, h4, h5, h6{ h1, h2, h3, h4, h5, h6{
color: var(--dGray1); color: var(--gray1);
} }
.jumbotron, .darker { .jumbotron, .darker, .order_row {
background-color: var(--dGray4); background: var(--gray5);
} }
.darker {
margin-top: 10px;
padding-top: 5px;
padding-bottom: 5px;
}
.table tbody tr td { .table tbody tr td {
border-top: 1px solid var(--dGray3); border-top: 1px solid var(--gray3);
} }
.table thead tr th { .table thead tr th {
border-bottom: 2px solid var(--dGray2); border-bottom: 2px solid var(--gray2);
} }
.navbar-toggle .icon-bar { .navbar-toggle .icon-bar {
background-color: var(--dGray0); background-color: var(--gray0);
opacity: 0.5; opacity: 0.5;
} }
.select2-container--default .select2-selection--single{ .select2-container--default .select2-selection--single{
background-color: var(--dGray3); background-color: var(--gray3);
color: var(--dGray0); color: var(--gray0);
} }
.select2-container--default .select2-selection--single .select2-selection__rendered{ .select2-container--default .select2-selection--single .select2-selection__rendered{
color: var(--dGray0); color: var(--gray0);
} }
.select2-results__option{ .select2-results__option{
background-color: var(--dGray5); background-color: var(--gray5);
color: var(--dGray0); color: var(--gray0);
} }
.select2-container--default .select2-results__option--highlighted[aria-selected] { .select2-container--default .select2-results__option--highlighted[aria-selected] {
background-color: var(--dGray4); background-color: var(--gray4);
color: var(--dGray0); color: var(--gray0);
} }
.bootstrap-datetimepicker-widget table thead tr:first-child th:hover, .bootstrap-datetimepicker-widget table thead tr:first-child th:hover,
.bootstrap-datetimepicker-widget table td.day:hover, .bootstrap-datetimepicker-widget table td.day:hover,
@ -254,15 +253,15 @@ h1, h2, h3, h4, h5, h6{
.bootstrap-datetimepicker-widget table td.minute:hover, .bootstrap-datetimepicker-widget table td.minute:hover,
.bootstrap-datetimepicker-widget table td span:hover, .bootstrap-datetimepicker-widget table td span:hover,
.bootstrap-datetimepicker-widget table td.second:hover { .bootstrap-datetimepicker-widget table td.second:hover {
background: var(--dGray4); background: var(--gray4);
} }
.select2-container--default .select2-results__option[aria-selected=true]{ .select2-container--default .select2-results__option[aria-selected=true]{
background-color: var(--dBlue); background-color: var(--accent);
color: var(--dGray0); color: var(--gray0);
} }
.select2-search{ .select2-search{
background-color: var(--dGray2); background-color: var(--gray2);
} }
.select2-selection--multiple .select2-search{ .select2-selection--multiple .select2-search{
background-color: transparent; background-color: transparent;
@ -276,25 +275,30 @@ h1, h2, h3, h4, h5, h6{
box-sizing: content-box; box-sizing: content-box;
} }
.select2-search input{ .select2-search input{
background-color: var(--dGray0); background-color: var(--gray0);
} }
.dropdown-menu{ .dropdown-menu{
background-color: var(--dGray5); background-color: var(--gray5);
} }
.form-control{ .form-control{
color: var(--dGray0); color: var(--gray0);
} }
.form-control::placeholder{ .form-control::placeholder{
color: var(--dGray2); color: var(--gray2);
}
.enter_darkmode>a {
text-align: center;
} }
#dish_choices { .dish-choices summary {
margin: 0.5em 1em 1.5em; font-style: italic;
transition: opacity 0.2s;
} }
#dish_choices.loading {
opacity: 0.2; details summary {
cursor: pointer;
}
details summary:before {
font-style: normal;
content: "⯈";
padding-right: 0.4em;
}
details[open] summary:before {
content: "⯆";
} }

View file

@ -10,40 +10,37 @@ Enige discretie is aangeraden.
*/ */
:root { :root {
--dGray0:#F28705; --gray0: #F28705;
--dGray1:white; --gray1: white;
--dGray2:#590212; --gray2: #590212;
--dGray3:#590212; --gray3: #590212;
--dGray4:#274001; --gray4: #274001;
--dGray5:#274001; --gray5: #274001;
--dGray6:#F2778D; --gray6: #F2778D;
--dBlue:#F2778D; } --accent: #F2778D;
--bg: #2F0000;
--navbarBg: #F2778D;
--fontFamily: Radikal, Optima, Segoe, Segoe UI, Candara, Calibri, Arial, sans-serif; }
body { body {
height: 100%; height: 100%; }
font-family: Radikal,Optima,Segoe,Segoe UI,Candara,Calibri,Arial,sans-serif;
background-color: #2F0000; }
@font-face { @font-face {
font-family: Radikal; font-family: Radikal;
src: url("static/fonts/radikal_regular.ttf"); src: url("static/fonts/radikal_regular.ttf");
font-weight: normal; } font-weight: normal; }
@font-face { @font-face {
font-family: Radikal; font-family: Radikal;
src: url("static/fonts/radikal_light.ttf"); src: url("static/fonts/radikal_light.ttf");
font-weight: 200; } font-weight: 200; }
@font-face { @font-face {
font-family: Radikal; font-family: Radikal;
src: url("static/fonts/radikal_medium.ttf"); src: url("static/fonts/radikal_medium.ttf");
font-weight: medium; } font-weight: medium; }
@font-face { @font-face {
font-family: Radikal; font-family: Radikal;
src: url("static/fonts/radikal_bold.ttf"); src: url("static/fonts/radikal_bold.ttf");
font-weight: bold; } font-weight: bold; }
.btn { .btn {
border-radius: 5rem; border-radius: 5rem;
color: white; color: white;
@ -82,15 +79,12 @@ body {
@media (min-width: 768px) { @media (min-width: 768px) {
.container { .container {
width: 100%; } } width: 100%; } }
@media (min-width: 992px) { @media (min-width: 992px) {
.main .container, .main .orders { .main .container, .main .orders {
width: 970px; } } width: 970px; } }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.main .container, .main .orders { .main .container, .main .orders {
width: 1170px; } } width: 1170px; } }
.main { .main {
padding-top: 2.5rem; } padding-top: 2.5rem; }
@ -437,7 +431,7 @@ footer > hr {
width: 1rem; width: 1rem;
height: 1rem; height: 1rem;
filter: blur(1.5px); filter: blur(1.5px);
box-shadow: 95.5vw 70.4vh 0 -0.48rem#fff,87.9vw 28.3vh 0 -0.3rem#fff,48.4vw 63.8vh 0 -0.16rem#fff,55.2vw 23.5vh 0 -0.28rem#fff,43.2vw 62.6vh 0 -0.32rem#fff,5vw 16.6vh 0 -0.42rem#fff,34.4vw 88.5vh 0 -0.08rem#fff,63.3vw 27.4vh 0 -0.26rem#fff,58.1vw 21.3vh 0 -0.21rem#fff,58.2vw 56.7vh 0 -0.29rem#fff,81.1vw 47.1vh 0 -0.27rem#fff,89.6vw 19.1vh 0 -0.23rem#fff,76vw 67.1vh 0 -0.16rem#fff,50.8vw 26.8vh 0 -0.43rem#fff,59.1vw 73.6vh 0 -0.11rem#fff,48.2vw 55.3vh 0 -0.09rem#fff,28.1vw 65.2vh 0 -0.13rem#fff,48.3vw 77.8vh 0 -0.31rem#fff,21vw 86.9vh 0 -0.03rem#fff,8.5vw 46.7vh 0 -0.37rem#fff,65.2vw 10.1vh 0 -0.04rem#fff,16.3vw 76.3vh 0 -0.33rem#fff,36.8vw 80.3vh 0 -0.05rem#fff,64.1vw 25.3vh 0 -0.15rem#fff,69vw 4.4vh 0 -0.37rem#fff,20.6vw 59.8vh 0 -0.05rem#fff,92.5vw 58.8vh 0 -0.3rem#fff,89.3vw 76.2vh 0 -0.24rem#fff,16.4vw 77.7vh 0 -0.32rem#fff,93.4vw 49.7vh 0 -0.25rem#fff,75.7vw 50.5vh 0 -0.36rem#fff,53.8vw 45.1vh 0 -0.2rem#fff,25.2vw 42.9vh 0 -0.41rem#fff,21.7vw 63.5vh 0 -0.36rem#fff,76.8vw 29vh 0 -0.11rem#fff,27.4vw 56.2vh 0 -0.25rem#fff,10.7vw 87.3vh 0 -0.37rem#fff,71.9vw 5.2vh 0 -0.09rem#fff,64.9vw 31.5vh 0 -0.13rem#fff,24vw 21.4vh 0 -0.33rem#fff,54.9vw 18vh 0 -0.48rem#fff,4.4vw 37.8vh 0 -0.23rem#fff,58.3vw 93.1vh 0 -0.41rem#fff,56.1vw 58.2vh 0 -0.42rem#fff,17.1vw 17.4vh 0 -0.3rem#fff,69.6vw 50.9vh 0 -0.04rem#fff,81.1vw 8.8vh 0 -0.12rem#fff,69.9vw 6.2vh 0 -0.31rem#fff,86vw 17.9vh 0 -0.16rem#fff,27.7vw 14.1vh 0 -0.37rem#fff,46.9vw 10.9vh 0 -0.07rem#fff,58.3vw 93.4vh 0 -0.14rem#fff,98.9vw 1.1vh 0 -0.17rem#fff,82.5vw 36.2vh 0 -0.41rem#fff,28vw 0.5vh 0 -0.06rem#fff,0.4vw 21.8vh 0 -0.5rem#fff,70.4vw 47.8vh 0 -0.31rem#fff,16vw 42.2vh 0 -0.11rem#fff,42.1vw 14.1vh 0 -0.23rem#fff,49.3vw 67.7vh 0 -0.43rem#fff,46.2vw 69vh 0 -0.13rem#fff,23.2vw 88vh 0 -0.45rem#fff,93.2vw 88.3vh 0 -0.5rem#fff,17.3vw 22vh 0 -0.14rem#fff,57.6vw 6.5vh 0 -0.44rem#fff,26.5vw 88.2vh 0 -0.14rem#fff,85.4vw 14.8vh 0 -0.32rem#fff,33.1vw 44.2vh 0 -0.15rem#fff,1.3vw 6.4vh 0 -0.12rem#fff,1.8vw 58.5vh 0 -0.21rem#fff,85.5vw 74.1vh 0 -0.43rem#fff,82.9vw 4.4vh 0 -0.35rem#fff,94.6vw 55.2vh 0 -0.1rem#fff,7.1vw 5.1vh 0 -0.29rem#fff,47.1vw 95.8vh 0 -0.13rem#fff,69.3vw 35.3vh 0 -0.1rem#fff,8.3vw 83vh 0 -0.02rem#fff,90.8vw 47vh 0 -0.21rem#fff,85.2vw 35.3vh 0 -0.06rem#fff,80.1vw 13.6vh 0 -0.07rem#fff,52vw 37vh 0 -0.11rem#fff,75.7vw 26.3vh 0 -0.16rem#fff,51.3vw 7.7vh 0 -0.46rem#fff,35.2vw 18.6vh 0 -0.09rem#fff,69.4vw 21.3vh 0 -0.05rem#fff,16.1vw 66.8vh 0 -0.14rem#fff,80.3vw 4vh 0 -0.25rem#fff,31.1vw 78.7vh 0 -0.08rem#fff,26.9vw 45.3vh 0 -0.01rem#fff,38.3vw 11.4vh 0 -0.47rem#fff,46.7vw 10.2vh 0 -0.44rem#fff,15.5vw 2.9vh 0 -0.35rem#fff,97.8vw 19.8vh 0 -0.24rem#fff,60.8vw 94.7vh 0 -0.12rem#fff,46.1vw 66vh 0 -0.45rem#fff,59.6vw 65vh 0 -0.33rem#fff,30.5vw 44.4vh 0 -0.18rem#fff,78.2vw 55.6vh 0 -0.07rem#fff,69.5vw 61.9vh 0 -0.11rem#fff,53.4vw 38.3vh 0 -0.11rem#fff; box-shadow: 38.1vw 38.9vh 0 -0.23rem#fff,63.6vw 92.5vh 0 -0.37rem#fff,26.2vw 19vh 0 -0.13rem#fff,43.8vw 53.8vh 0 -0.32rem#fff,18.9vw 78.9vh 0 -0.48rem#fff,78vw 88.3vh 0 -0.45rem#fff,76.2vw 40.9vh 0 -0.35rem#fff,31vw 100vh 0 -0.35rem#fff,30.9vw 40.6vh 0 -0.38rem#fff,78.3vw 68.7vh 0 -0.38rem#fff,90.8vw 12.9vh 0 -0.25rem#fff,80.4vw 98.6vh 0 -0.33rem#fff,8.8vw 75.2vh 0 -0.36rem#fff,45.3vw 50.7vh 0 -0.36rem#fff,79.6vw 2.2vh 0 -0.39rem#fff,4vw 57.4vh 0 -0.24rem#fff,68.4vw 42.8vh 0 -0.38rem#fff,62.4vw 0.5vh 0 -0.04rem#fff,99.8vw 32.8vh 0 -0.41rem#fff,71.4vw 5.4vh 0 -0.15rem#fff,62.8vw 79.2vh 0 -0.18rem#fff,82.1vw 85.2vh 0 -0.18rem#fff,45.1vw 19.1vh 0 -0.4rem#fff,35.2vw 39.2vh 0 -0.03rem#fff,95.6vw 85.1vh 0 -0.06rem#fff,77.3vw 53.1vh 0 -0.36rem#fff,3.2vw 18.3vh 0 -0.43rem#fff,55vw 88.9vh 0 -0.27rem#fff,73.7vw 1.7vh 0 -0.28rem#fff,16.7vw 45vh 0 -0.37rem#fff,78.8vw 65.8vh 0 -0.19rem#fff,10.9vw 64.9vh 0 -0.4rem#fff,42.6vw 84.1vh 0 -0.44rem#fff,4.6vw 77.8vh 0 -0.39rem#fff,40.6vw 37.6vh 0 -0.19rem#fff,82.6vw 51.2vh 0 -0.4rem#fff,15.9vw 87.9vh 0 -0.06rem#fff,7.3vw 98.7vh 0 -0.23rem#fff,91.6vw 20vh 0 -0.48rem#fff,73.6vw 26.2vh 0 -0.32rem#fff,36.3vw 24.8vh 0 -0.39rem#fff,95.3vw 55.1vh 0 -0.12rem#fff,33.1vw 34.4vh 0 -0.09rem#fff,2.7vw 86.9vh 0 -0.25rem#fff,99.8vw 99.6vh 0 -0.06rem#fff,59.3vw 88.2vh 0 -0.48rem#fff,46.5vw 84.2vh 0 -0.4rem#fff,0.9vw 40.4vh 0 -0.04rem#fff,35.8vw 16.7vh 0 -0.41rem#fff,42.7vw 19.1vh 0 -0.25rem#fff,62.9vw 89.8vh 0 -0.43rem#fff,61.6vw 100vh 0 -0.27rem#fff,61.5vw 76.9vh 0 -0.25rem#fff,33.6vw 33.1vh 0 -0.03rem#fff,59.5vw 15.7vh 0 -0.03rem#fff,13.1vw 17.1vh 0 -0.41rem#fff,39.4vw 27.9vh 0 -0.13rem#fff,70.6vw 15.5vh 0 -0.41rem#fff,29vw 27.7vh 0 -0.46rem#fff,88.2vw 64.1vh 0 -0.33rem#fff,93.3vw 42.2vh 0 -0.38rem#fff,52.4vw 55vh 0 -0.01rem#fff,48.2vw 21.7vh 0 -0.4rem#fff,16.2vw 48.9vh 0 -0.36rem#fff,36.3vw 24.2vh 0 -0.24rem#fff,28.9vw 39.6vh 0 -0.32rem#fff,50.2vw 5.1vh 0 -0.11rem#fff,67.5vw 54.6vh 0 -0.12rem#fff,44.1vw 24.5vh 0 -0.23rem#fff,91.4vw 27.6vh 0 -0.1rem#fff,93.2vw 42.3vh 0 -0.46rem#fff,59.6vw 42.4vh 0 -0.29rem#fff,88vw 39.1vh 0 -0.03rem#fff,74vw 5.6vh 0 -0.31rem#fff,49.7vw 0.1vh 0 -0.36rem#fff,93.1vw 47.2vh 0 -0.21rem#fff,54.8vw 59.2vh 0 -0.38rem#fff,27.1vw 71.9vh 0 -0.3rem#fff,20.8vw 10.8vh 0 -0.46rem#fff,20.2vw 10vh 0 -0.45rem#fff,48.9vw 79.3vh 0 -0.36rem#fff,73.3vw 21.8vh 0 -0.2rem#fff,68.4vw 21.6vh 0 -0.06rem#fff,90.1vw 87.1vh 0 -0.24rem#fff,41.6vw 99.4vh 0 -0.03rem#fff,51.4vw 58.8vh 0 -0.43rem#fff,45.7vw 3.5vh 0 -0.14rem#fff,64.7vw 99.3vh 0 -0.31rem#fff,4vw 48.3vh 0 -0.42rem#fff,86.8vw 87.5vh 0 -0.19rem#fff,81.2vw 56.6vh 0 -0.48rem#fff,95.2vw 83.9vh 0 -0.05rem#fff,30.6vw 15.7vh 0 -0.1rem#fff,32.8vw 24.3vh 0 -0.39rem#fff,83.3vw 7.8vh 0 -0.34rem#fff,41.3vw 13.3vh 0 -0.23rem#fff,63.4vw 16.5vh 0 -0.08rem#fff,57.6vw 98.5vh 0 -0.22rem#fff,78.4vw 63.8vh 0 -0.08rem#fff,49vw 29.5vh 0 -0.01rem#fff;
animation-duration: 18s; } animation-duration: 18s; }
.layer1.a { .layer1.a {
@ -447,7 +441,7 @@ footer > hr {
width: 0.8rem; width: 0.8rem;
height: 0.8rem; height: 0.8rem;
filter: blur(3px); filter: blur(3px);
box-shadow: 89.1vw 69.4vh 0 -0.15rem#fff,19.2vw 77.1vh 0 -0.35rem#fff,52.3vw 3.8vh 0 -0.04rem#fff,69.5vw 14.1vh 0 -0.25rem#fff,75.5vw 74.6vh 0 -0.44rem#fff,13.6vw 48vh 0 -0.36rem#fff,62.5vw 17.4vh 0 -0.2rem#fff,53.5vw 44.1vh 0 -0.41rem#fff,58.2vw 63vh 0 -0.28rem#fff,64.3vw 54.3vh 0 -0.42rem#fff,38.3vw 92.4vh 0 -0.36rem#fff,89.4vw 6.5vh 0 -0.06rem#fff,92.9vw 11.4vh 0 -0.06rem#fff,8.4vw 33.7vh 0 -0.25rem#fff,84.1vw 44.5vh 0 -0.02rem#fff,58.2vw 87.2vh 0 -0.43rem#fff,64.8vw 34.8vh 0 -0.33rem#fff,46.1vw 31.1vh 0 -0.4rem#fff,11.3vw 61.1vh 0 -0.33rem#fff,50.9vw 4.5vh 0 -0.3rem#fff,43.6vw 97.2vh 0 -0.43rem#fff,24.7vw 62.9vh 0 -0.12rem#fff,5.2vw 40.3vh 0 -0.45rem#fff,48.2vw 21.6vh 0 -0.45rem#fff,28.4vw 48.3vh 0 -0.18rem#fff,35vw 16.7vh 0 -0.09rem#fff,29.5vw 65.1vh 0 -0.11rem#fff,65.7vw 59.2vh 0 -0.15rem#fff,28vw 80.1vh 0 -0.4rem#fff,20.4vw 33.1vh 0 -0.1rem#fff,11.1vw 70.2vh 0 -0.4rem#fff,37.4vw 92.5vh 0 -0.49rem#fff,38.5vw 90.5vh 0 -0.12rem#fff,97.3vw 34.4vh 0 -0.07rem#fff,14.7vw 10.4vh 0 -0.23rem#fff,98.2vw 54.5vh 0 -0.3rem#fff,23.4vw 44vh 0 -0.17rem#fff,4.8vw 21.2vh 0 -0.26rem#fff,27vw 63.3vh 0 -0.27rem#fff,93.4vw 67.2vh 0 -0.16rem#fff,86.2vw 82vh 0 -0.02rem#fff,61.4vw 50vh 0 -0.41rem#fff,43.9vw 68.4vh 0 -0.49rem#fff,46.6vw 6.3vh 0 -0.18rem#fff,69.8vw 94.2vh 0 -0.03rem#fff,17.1vw 31.7vh 0 -0.39rem#fff,88vw 76.3vh 0 -0.13rem#fff,90.8vw 27.8vh 0 -0.5rem#fff,16.5vw 86vh 0 -0.24rem#fff,48.4vw 50vh 0 -0.12rem#fff,0.2vw 9.7vh 0 -0.29rem#fff,70.6vw 13.2vh 0 -0.34rem#fff,75.4vw 46.7vh 0 -0.02rem#fff,41.9vw 63.2vh 0 -0.09rem#fff,81.2vw 32.4vh 0 -0.44rem#fff,62.1vw 38.9vh 0 -0.29rem#fff,83.8vw 8.6vh 0 -0.46rem#fff,60.4vw 96.9vh 0 -0.37rem#fff,80.7vw 83.8vh 0 -0.14rem#fff,91.1vw 35.7vh 0 -0.45rem#fff,19.8vw 9.6vh 0 -0.11rem#fff,56.3vw 28.3vh 0 -0.11rem#fff,49.7vw 27.6vh 0 -0.21rem#fff,92.2vw 61.1vh 0 -0.37rem#fff,10.7vw 18.8vh 0 -0.04rem#fff,44.4vw 77.2vh 0 -0.41rem#fff,42.3vw 53.9vh 0 -0.32rem#fff,16vw 19.5vh 0 -0.02rem#fff,40.8vw 60.8vh 0 -0.23rem#fff,6.5vw 77.1vh 0 -0.41rem#fff,78.2vw 98.6vh 0 -0.5rem#fff,70.3vw 88vh 0 -0.34rem#fff,21.4vw 45.7vh 0 -0.2rem#fff,79.3vw 27.8vh 0 -0.16rem#fff,20.5vw 91.9vh 0 -0.1rem#fff,44vw 20.7vh 0 -0.05rem#fff,20.2vw 58.5vh 0 -0.18rem#fff,0.4vw 57.7vh 0 -0.44rem#fff,29.8vw 96.4vh 0 -0.41rem#fff,66vw 94.4vh 0 -0.01rem#fff,25.4vw 74.6vh 0 -0.37rem#fff,89.7vw 38.4vh 0 -0.04rem#fff,32vw 64vh 0 -0.4rem#fff,79.9vw 73.7vh 0 -0.45rem#fff,92.8vw 72.3vh 0 -0.46rem#fff,50.5vw 54.5vh 0 -0.47rem#fff,77.8vw 38.2vh 0 -0.29rem#fff,73.9vw 61.4vh 0 -0.17rem#fff,88.1vw 91.1vh 0 -0.37rem#fff,20.4vw 32.5vh 0 -0.39rem#fff,68.5vw 97.8vh 0 -0.42rem#fff,62.7vw 53.2vh 0 -0.11rem#fff,65.4vw 70.8vh 0 -0.14rem#fff,31.3vw 5.3vh 0 -0.12rem#fff,39.2vw 78vh 0 -0.48rem#fff,50vw 44.2vh 0 -0.01rem#fff,16.9vw 20.6vh 0 -0.05rem#fff,61.3vw 5.1vh 0 -0.48rem#fff,18.6vw 65.8vh 0 -0.35rem#fff,88.4vw 67.2vh 0 -0.5rem#fff; box-shadow: 79.8vw 46.8vh 0 -0.07rem#fff,11.3vw 43.8vh 0 -0.4rem#fff,69.3vw 2.8vh 0 -0.27rem#fff,48.8vw 5.8vh 0 -0.13rem#fff,61.1vw 28vh 0 -0.02rem#fff,74.7vw 11.5vh 0 -0.24rem#fff,57.8vw 84.7vh 0 -0.34rem#fff,79.9vw 69.7vh 0 -0.33rem#fff,12vw 68.1vh 0 -0.49rem#fff,47.9vw 86.4vh 0 -0.23rem#fff,82.5vw 46.9vh 0 -0.24rem#fff,21.6vw 20.8vh 0 -0.14rem#fff,9.7vw 80.1vh 0 -0.29rem#fff,6.1vw 47.4vh 0 -0.17rem#fff,59.1vw 97.7vh 0 -0.19rem#fff,11.7vw 40.7vh 0 -0.46rem#fff,92.2vw 58.5vh 0 -0.2rem#fff,71.6vw 91.9vh 0 -0.01rem#fff,9.5vw 12.5vh 0 -0.33rem#fff,73.1vw 91.5vh 0 -0.13rem#fff,53.5vw 55.7vh 0 -0.01rem#fff,7.5vw 95.5vh 0 -0.48rem#fff,11.2vw 13.7vh 0 -0.08rem#fff,3.4vw 81.1vh 0 -0.5rem#fff,40.9vw 43vh 0 -0.4rem#fff,78.3vw 33.4vh 0 -0.35rem#fff,92.7vw 70.1vh 0 -0.36rem#fff,90.1vw 17.5vh 0 -0.18rem#fff,6.6vw 15.7vh 0 -0.41rem#fff,13.8vw 74.1vh 0 -0.38rem#fff,40vw 11.6vh 0 -0.35rem#fff,90.4vw 70.9vh 0 -0.48rem#fff,82.7vw 73.9vh 0 -0.23rem#fff,91.4vw 44.3vh 0 -0.21rem#fff,85.9vw 95.5vh 0 -0.01rem#fff,96.5vw 63.6vh 0 -0.39rem#fff,23.6vw 10.6vh 0 -0.04rem#fff,0.4vw 0.7vh 0 -0.24rem#fff,51.1vw 61.4vh 0 -0.12rem#fff,2.4vw 52.3vh 0 -0.06rem#fff,99.9vw 25.8vh 0 -0.22rem#fff,20.4vw 18.4vh 0 -0.05rem#fff,28vw 64.9vh 0 -0.1rem#fff,95.2vw 34.5vh 0 -0.05rem#fff,43.9vw 96.6vh 0 -0.23rem#fff,10.3vw 27.4vh 0 -0.11rem#fff,2.6vw 91.2vh 0 -0.41rem#fff,85.3vw 12.9vh 0 -0.2rem#fff,50.4vw 32.7vh 0 -0.38rem#fff,12.1vw 76.7vh 0 -0.4rem#fff,24.1vw 83.3vh 0 -0.32rem#fff,80.2vw 30.9vh 0 -0.24rem#fff,30.8vw 34.7vh 0 -0.48rem#fff,94.6vw 65vh 0 -0.08rem#fff,1.3vw 55.1vh 0 -0.36rem#fff,74.8vw 69.7vh 0 -0.04rem#fff,79.4vw 78.9vh 0 -0.19rem#fff,16.7vw 35.6vh 0 -0.19rem#fff,36vw 13.4vh 0 -0.36rem#fff,77.5vw 44.7vh 0 -0.42rem#fff,88.9vw 90.4vh 0 -0.33rem#fff,83vw 74.8vh 0 -0.3rem#fff,67.2vw 98.4vh 0 -0.14rem#fff,10vw 10.9vh 0 -0.27rem#fff,97.3vw 64.2vh 0 -0.03rem#fff,57.8vw 30.6vh 0 -0.37rem#fff,55.2vw 33.3vh 0 -0.39rem#fff,83.8vw 43.2vh 0 -0.28rem#fff,99.4vw 93.6vh 0 -0.45rem#fff,63.2vw 31.2vh 0 -0.16rem#fff,32.5vw 96.4vh 0 -0.49rem#fff,8.9vw 70.8vh 0 -0.27rem#fff,27vw 2.3vh 0 -0.46rem#fff,26.6vw 52.4vh 0 -0.31rem#fff,39.9vw 24.2vh 0 -0.04rem#fff,32.8vw 86.7vh 0 -0.42rem#fff,85.3vw 11.8vh 0 -0.14rem#fff,69vw 85.4vh 0 -0.19rem#fff,84.5vw 54.2vh 0 -0.09rem#fff,22vw 38.9vh 0 -0.34rem#fff,42.8vw 5.4vh 0 -0.35rem#fff,61.2vw 68.5vh 0 -0.26rem#fff,20.8vw 50.7vh 0 -0.01rem#fff,41.6vw 69.5vh 0 -0.15rem#fff,37.8vw 46.8vh 0 -0.05rem#fff,23vw 9.5vh 0 -0.01rem#fff,1.3vw 84.1vh 0 -0.07rem#fff,59.5vw 95.9vh 0 -0.36rem#fff,1.6vw 49.5vh 0 -0.23rem#fff,40.4vw 67.3vh 0 -0.33rem#fff,84vw 12.2vh 0 -0.27rem#fff,53.5vw 55.2vh 0 -0.39rem#fff,98.1vw 39.7vh 0 -0.33rem#fff,68.5vw 53.8vh 0 -0.33rem#fff,6.8vw 4.4vh 0 -0.45rem#fff,35.9vw 51.8vh 0 -0.11rem#fff,42.1vw 77.1vh 0 -0.21rem#fff,9.8vw 37.4vh 0 -0.01rem#fff,99.2vw 13.4vh 0 -0.26rem#fff,88.2vw 21vh 0 -0.33rem#fff;
animation-duration: 24s; } animation-duration: 24s; }
.layer2.a { .layer2.a {
@ -457,7 +451,7 @@ footer > hr {
width: 0.6rem; width: 0.6rem;
height: 0.6rem; height: 0.6rem;
filter: blur(6px); filter: blur(6px);
box-shadow: 12.2vw 53.5vh 0 -0.46rem#fff,38.8vw 53vh 0 -0.18rem#fff,48vw 42vh 0 -0.4rem#fff,89.7vw 31vh 0 -0.36rem#fff,67vw 60.1vh 0 -0.3rem#fff,69vw 14.5vh 0 -0.49rem#fff,6.7vw 91.1vh 0 -0.18rem#fff,13.2vw 34.7vh 0 -0.48rem#fff,70.4vw 67.8vh 0 -0.36rem#fff,85.1vw 82.5vh 0 -0.05rem#fff,16.8vw 7.6vh 0 -0.19rem#fff,6.2vw 34.2vh 0 -0.16rem#fff,8.9vw 68.8vh 0 -0.32rem#fff,58.5vw 28.3vh 0 -0.3rem#fff,41.7vw 74.1vh 0 -0.34rem#fff,10.3vw 79.8vh 0 -0.26rem#fff,8.3vw 24.6vh 0 -0.05rem#fff,33.1vw 85.4vh 0 -0.41rem#fff,20.3vw 16.9vh 0 -0.02rem#fff,21.1vw 50.7vh 0 -0.36rem#fff,14.9vw 17vh 0 -0.05rem#fff,45.8vw 17vh 0 -0.21rem#fff,25.6vw 0.8vh 0 -0.31rem#fff,35.4vw 53.4vh 0 -0.22rem#fff,19.2vw 79.1vh 0 -0.35rem#fff,74.5vw 60.8vh 0 -0.25rem#fff,88.9vw 89.9vh 0 -0.48rem#fff,48.7vw 7.2vh 0 -0.13rem#fff,88.1vw 84.1vh 0 -0.12rem#fff,63.2vw 82.3vh 0 -0.06rem#fff,99.9vw 46.2vh 0 -0.47rem#fff,92vw 59.8vh 0 -0.12rem#fff,1.6vw 8.8vh 0 -0.23rem#fff,79.8vw 2vh 0 -0.5rem#fff,58.2vw 22.4vh 0 -0.34rem#fff,47.6vw 7.3vh 0 -0.06rem#fff,28.1vw 71vh 0 -0.18rem#fff,14.2vw 77.1vh 0 -0.43rem#fff,95.5vw 68.6vh 0 -0.43rem#fff,6.7vw 8.1vh 0 -0.1rem#fff,60.2vw 36.7vh 0 -0.31rem#fff,25.8vw 27vh 0 -0.42rem#fff,1vw 60vh 0 -0.42rem#fff,64.2vw 19.1vh 0 -0.23rem#fff,80.9vw 88.8vh 0 -0.03rem#fff,3.6vw 60.1vh 0 -0.08rem#fff,30.1vw 10.9vh 0 -0.44rem#fff,38.5vw 26.3vh 0 -0.45rem#fff,44.3vw 38.8vh 0 -0.1rem#fff,16.2vw 45.5vh 0 -0.14rem#fff,90.6vw 6.6vh 0 -0.23rem#fff,15.8vw 52.6vh 0 -0.45rem#fff,30.2vw 2.7vh 0 -0.4rem#fff,3.8vw 40.1vh 0 -0.48rem#fff,10.7vw 82.2vh 0 -0.4rem#fff,90.5vw 73.3vh 0 -0.16rem#fff,72.9vw 48.3vh 0 -0.14rem#fff,17.7vw 25.7vh 0 -0.07rem#fff,84.6vw 82.3vh 0 -0.3rem#fff,69.9vw 71.5vh 0 -0.05rem#fff,34.6vw 45.9vh 0 -0.1rem#fff,81.3vw 12.5vh 0 -0.1rem#fff,58.3vw 11.4vh 0 -0.48rem#fff,17.7vw 7vh 0 -0.18rem#fff,67.5vw 27.8vh 0 -0.4rem#fff,92.1vw 63.6vh 0 -0.42rem#fff,92vw 97.7vh 0 -0.3rem#fff,7.3vw 28.6vh 0 -0.22rem#fff,93.4vw 39.8vh 0 -0.04rem#fff,27.4vw 56.7vh 0 -0.08rem#fff,2.5vw 39.9vh 0 -0.47rem#fff,61.1vw 38.3vh 0 -0.29rem#fff,42.4vw 41.2vh 0 -0.14rem#fff,85.8vw 26vh 0 -0.44rem#fff,95.9vw 70vh 0 -0.19rem#fff,77.4vw 52.9vh 0 -0.15rem#fff,54.9vw 1.2vh 0 -0.4rem#fff,47.1vw 44.2vh 0 -0.2rem#fff,60vw 66.7vh 0 -0.41rem#fff,88.2vw 72vh 0 -0.05rem#fff,77.2vw 74.3vh 0 -0.31rem#fff,77.7vw 63.2vh 0 -0.1rem#fff,15.9vw 61.7vh 0 -0.19rem#fff,13.9vw 23.5vh 0 -0.4rem#fff,81.2vw 18.9vh 0 -0.17rem#fff,20.1vw 44.6vh 0 -0.47rem#fff,59vw 4vh 0 -0.44rem#fff,6vw 40vh 0 -0.34rem#fff,12.2vw 77vh 0 -0.26rem#fff,9.5vw 20.3vh 0 -0.01rem#fff,52.6vw 58.7vh 0 -0.17rem#fff,89.5vw 32.6vh 0 -0.03rem#fff,0.2vw 83.9vh 0 -0.3rem#fff,42.3vw 73.3vh 0 -0.03rem#fff,0.5vw 15.7vh 0 -0.17rem#fff,58.1vw 98.2vh 0 -0.01rem#fff,95.7vw 4.3vh 0 -0.01rem#fff,82.7vw 57.7vh 0 -0.18rem#fff,99.6vw 2.6vh 0 -0.12rem#fff,44.5vw 68.3vh 0 -0.02rem#fff; box-shadow: 64.8vw 75.7vh 0 -0.14rem#fff,58.4vw 85.5vh 0 -0.16rem#fff,98.2vw 40.9vh 0 -0.03rem#fff,50.5vw 40.3vh 0 -0.42rem#fff,28.8vw 85.1vh 0 -0.3rem#fff,86.8vw 47.7vh 0 -0.47rem#fff,87vw 17.9vh 0 -0.06rem#fff,31.7vw 16.2vh 0 -0.16rem#fff,90.8vw 9.8vh 0 -0.49rem#fff,98.4vw 66.5vh 0 -0.43rem#fff,33.1vw 92vh 0 -0.46rem#fff,44.7vw 23vh 0 -0.21rem#fff,82.8vw 10.7vh 0 -0.1rem#fff,14.2vw 75.9vh 0 -0.33rem#fff,7.7vw 13vh 0 -0.29rem#fff,39.8vw 98.5vh 0 -0.27rem#fff,24.1vw 80.8vh 0 -0.13rem#fff,30.6vw 21.2vh 0 -0.36rem#fff,69.1vw 92.1vh 0 -0.17rem#fff,20.6vw 58.8vh 0 -0.28rem#fff,1vw 86.4vh 0 -0.27rem#fff,32.7vw 56.3vh 0 -0.43rem#fff,83.3vw 12.9vh 0 -0.07rem#fff,19.4vw 82.1vh 0 -0.46rem#fff,59.9vw 27.9vh 0 -0.22rem#fff,45.9vw 40vh 0 -0.11rem#fff,51.5vw 21.6vh 0 -0.03rem#fff,70.8vw 15.1vh 0 -0.1rem#fff,50.7vw 44.1vh 0 -0.18rem#fff,31.3vw 0.6vh 0 -0.19rem#fff,65.4vw 13.1vh 0 -0.19rem#fff,10.6vw 64.5vh 0 -0.15rem#fff,95.5vw 75.9vh 0 -0.12rem#fff,66.4vw 94vh 0 -0.19rem#fff,33.2vw 46.2vh 0 -0.12rem#fff,33.9vw 1.5vh 0 -0.13rem#fff,43.1vw 89vh 0 -0.1rem#fff,30.4vw 39.9vh 0 -0.45rem#fff,9.3vw 93.2vh 0 -0.35rem#fff,62.6vw 99.4vh 0 -0.09rem#fff,6.5vw 68.9vh 0 -0.14rem#fff,53.8vw 8.3vh 0 -0.46rem#fff,5.4vw 96.1vh 0 -0.18rem#fff,2.8vw 60.2vh 0 -0.05rem#fff,79.9vw 46.9vh 0 -0.48rem#fff,20.9vw 40.4vh 0 -0.24rem#fff,82.2vw 44.5vh 0 -0.37rem#fff,2.9vw 94.1vh 0 -0.31rem#fff,87.7vw 28.5vh 0 -0.44rem#fff,7.7vw 46.6vh 0 -0.25rem#fff,78.5vw 59.4vh 0 -0.48rem#fff,4.5vw 72.6vh 0 -0.21rem#fff,83.8vw 73.9vh 0 -0.25rem#fff,99.8vw 8.1vh 0 -0.42rem#fff,86.6vw 31.8vh 0 -0.21rem#fff,38.8vw 77.2vh 0 -0.13rem#fff,4.6vw 16.4vh 0 -0.17rem#fff,61.3vw 85.8vh 0 -0.06rem#fff,20.3vw 97vh 0 -0.21rem#fff,26.7vw 94.3vh 0 -0.06rem#fff,10.3vw 32.7vh 0 -0.37rem#fff,66.1vw 7.3vh 0 -0.24rem#fff,23.7vw 17.2vh 0 -0.48rem#fff,79.9vw 55.4vh 0 -0.03rem#fff,76.9vw 92.2vh 0 -0.43rem#fff,14.7vw 7.2vh 0 -0.35rem#fff,27.5vw 67.1vh 0 -0.23rem#fff,50vw 7.8vh 0 -0.4rem#fff,25.3vw 79.1vh 0 -0.34rem#fff,3vw 26.3vh 0 -0.26rem#fff,81.4vw 75vh 0 -0.38rem#fff,76.9vw 11.4vh 0 -0.18rem#fff,63.1vw 29.7vh 0 -0.16rem#fff,91.5vw 28.9vh 0 -0.47rem#fff,4.4vw 33.7vh 0 -0.35rem#fff,63.5vw 73.1vh 0 -0.1rem#fff,6.6vw 83.1vh 0 -0.45rem#fff,16.4vw 89.5vh 0 -0.01rem#fff,20.2vw 70.9vh 0 -0.18rem#fff,87.6vw 62vh 0 -0.2rem#fff,94vw 56.4vh 0 -0.03rem#fff,56.8vw 71vh 0 -0.26rem#fff,34.2vw 78.5vh 0 -0.4rem#fff,81.6vw 3.9vh 0 -0.21rem#fff,84.6vw 0.4vh 0 -0.5rem#fff,25vw 38.4vh 0 -0.23rem#fff,49.5vw 22.8vh 0 -0.08rem#fff,90.4vw 71.3vh 0 -0.21rem#fff,24.6vw 52.3vh 0 -0.16rem#fff,35.7vw 50.5vh 0 -0.3rem#fff,68.4vw 67.7vh 0 -0.34rem#fff,67.1vw 33.6vh 0 -0.47rem#fff,90.8vw 98.7vh 0 -0.24rem#fff,15.6vw 86.9vh 0 -0.34rem#fff,48.6vw 65vh 0 -0.37rem#fff,38.8vw 2.6vh 0 -0.36rem#fff,55.5vw 16.2vh 0 -0.07rem#fff,58.4vw 29.6vh 0 -0.29rem#fff,35.8vw 1.1vh 0 -0.42rem#fff,61.1vw 69.5vh 0 -0.38rem#fff;
animation-duration: 30s; } animation-duration: 30s; }
.layer3.a { .layer3.a {
@ -466,7 +460,6 @@ footer > hr {
@keyframes fall { @keyframes fall {
100% { 100% {
transform: translateY(200vh); } } transform: translateY(200vh); } }
@keyframes gradientBG { @keyframes gradientBG {
0% { 0% {
transform: translate(-10%, -10%); } transform: translate(-10%, -10%); }
@ -474,7 +467,6 @@ footer > hr {
transform: translate(-60%, -60%); } transform: translate(-60%, -60%); }
100% { 100% {
transform: translate(-10%, -10%); } } transform: translate(-10%, -10%); } }
@keyframes sled { @keyframes sled {
0% { 0% {
transform: translate(-50rem, 40vh) rotate(0deg); } transform: translate(-50rem, 40vh) rotate(0deg); }
@ -486,7 +478,6 @@ footer > hr {
transform: translate(150vw, 40vh) rotate(40deg); } transform: translate(150vw, 40vh) rotate(40deg); }
100% { 100% {
transform: translate(150vw, 40vh) rotate(40deg); } } transform: translate(150vw, 40vh) rotate(40deg); } }
@keyframes train { @keyframes train {
0% { 0% {
transform: translateX(-80rem); } transform: translateX(-80rem); }
@ -496,7 +487,6 @@ footer > hr {
transform: translateX(100vw); } transform: translateX(100vw); }
100% { 100% {
transform: translateX(100vw); } } transform: translateX(100vw); } }
@keyframes follow_train { @keyframes follow_train {
0% { 0% {
transform: translateX(-80rem) scaleX(20) scaleY(8); } transform: translateX(-80rem) scaleX(20) scaleY(8); }
@ -506,15 +496,12 @@ footer > hr {
transform: translateX(100vw) scaleX(20) scaleY(8); } transform: translateX(100vw) scaleX(20) scaleY(8); }
100% { 100% {
transform: translateX(100vw) scaleX(20) scaleY(8); } } transform: translateX(100vw) scaleX(20) scaleY(8); } }
@keyframes turn { @keyframes turn {
100% { 100% {
transform: rotate(360deg); } } transform: rotate(360deg); } }
@keyframes whobble { @keyframes whobble {
100% { 100% {
transform: translateY(0.5vh); } } transform: translateY(0.5vh); } }
@keyframes snowman { @keyframes snowman {
0% { 0% {
transform: rotate(0); } transform: rotate(0); }
@ -528,7 +515,6 @@ footer > hr {
transform: rotate(0); } transform: rotate(0); }
100% { 100% {
transform: rotate(0); } } transform: rotate(0); } }
@keyframes snowman_head { @keyframes snowman_head {
0% { 0% {
transform: rotate(-3deg); } transform: rotate(-3deg); }
@ -536,7 +522,6 @@ footer > hr {
transform: rotate(3deg); } transform: rotate(3deg); }
100% { 100% {
transform: rotate(-3deg); } } transform: rotate(-3deg); } }
@keyframes merry_christmas { @keyframes merry_christmas {
0% { 0% {
opacity: 0.8; } opacity: 0.8; }

File diff suppressed because one or more lines are too long

View file

@ -10,19 +10,22 @@ Enige discretie is aangeraden.
*/ */
:root { :root {
--dGray0:#F28705; --gray0: #F28705;
--dGray1:white; --gray1: white;
--dGray2:#590212; --gray2: #590212;
--dGray3:#590212; --gray3: #590212;
--dGray4:#274001; --gray4: #274001;
--dGray5:#274001; --gray5: #274001;
--dGray6:#F2778D; --gray6: #F2778D;
--dBlue:#F2778D; --accent: #F2778D;
--bg: #2F0000;
--navbarBg: #F2778D;
--fontFamily: Radikal, Optima, Segoe, Segoe UI, Candara, Calibri, Arial, sans-serif;
} }
body{ body{
height: 100%; height: 100%;
font-family: Radikal,Optima,Segoe,Segoe UI,Candara,Calibri,Arial,sans-serif;
background-color: #2F0000;
} }
@font-face { @font-face {
font-family: Radikal; font-family: Radikal;

View file

@ -10,35 +10,33 @@ Enige discretie is aangeraden.
*/ */
:root { :root {
--dGray0:#F28705; --gray0: #F28705;
--dGray1:white; --gray1: white;
--dGray2:#590212; --gray2: #590212;
--dGray3:#590212; --gray3: #590212;
--dGray4:#274001; --gray4: #274001;
--dGray5:#274001; --gray5: #274001;
--dGray6:#F2778D; --gray6: #F2778D;
--dBlue:#F2778D; } --accent: #F2778D;
--bg: #2F0000;
--navbarBg: #F2778D;
--fontFamily: Radikal, Optima, Segoe, Segoe UI, Candara, Calibri, Arial, sans-serif; }
body { body {
height: 100%; height: 100%; }
font-family: Radikal,Optima,Segoe,Segoe UI,Candara,Calibri,Arial,sans-serif;
background-color: #2F0000; }
@font-face { @font-face {
font-family: Radikal; font-family: Radikal;
src: url("static/fonts/radikal_regular.ttf"); src: url("static/fonts/radikal_regular.ttf");
font-weight: normal; } font-weight: normal; }
@font-face { @font-face {
font-family: Radikal; font-family: Radikal;
src: url("static/fonts/radikal_light.ttf"); src: url("static/fonts/radikal_light.ttf");
font-weight: 200; } font-weight: 200; }
@font-face { @font-face {
font-family: Radikal; font-family: Radikal;
src: url("static/fonts/radikal_bold.ttf"); src: url("static/fonts/radikal_bold.ttf");
font-weight: bold; } font-weight: bold; }
.btn { .btn {
border-radius: 5rem; border-radius: 5rem;
color: white; color: white;
@ -77,15 +75,12 @@ body {
@media (min-width: 768px) { @media (min-width: 768px) {
.container { .container {
width: 100%; } } width: 100%; } }
@media (min-width: 992px) { @media (min-width: 992px) {
.main .container, .main .orders { .main .container, .main .orders {
width: 970px; } } width: 970px; } }
@media (min-width: 1200px) { @media (min-width: 1200px) {
.main .container, .main .orders { .main .container, .main .orders {
width: 1170px; } } width: 1170px; } }
.main { .main {
padding-top: 2.5rem; } padding-top: 2.5rem; }
@ -407,7 +402,6 @@ footer > hr {
transform: translate(150vw, 40vh) rotate(40deg); } transform: translate(150vw, 40vh) rotate(40deg); }
100% { 100% {
transform: translate(150vw, 40vh) rotate(40deg); } } transform: translate(150vw, 40vh) rotate(40deg); } }
@keyframes train { @keyframes train {
0% { 0% {
transform: translateX(-80rem); } transform: translateX(-80rem); }
@ -417,15 +411,12 @@ footer > hr {
transform: translateX(100vw); } transform: translateX(100vw); }
100% { 100% {
transform: translateX(100vw); } } transform: translateX(100vw); } }
@keyframes turn { @keyframes turn {
100% { 100% {
transform: rotate(360deg); } } transform: rotate(360deg); } }
@keyframes whobble { @keyframes whobble {
100% { 100% {
transform: translateY(0.5vh); } } transform: translateY(0.5vh); } }
@keyframes snowman { @keyframes snowman {
0% { 0% {
transform: rotate(0); } transform: rotate(0); }
@ -439,7 +430,6 @@ footer > hr {
transform: rotate(0); } transform: rotate(0); }
100% { 100% {
transform: rotate(0); } } transform: rotate(0); } }
@keyframes snowman_head { @keyframes snowman_head {
0% { 0% {
transform: rotate(-3deg); } transform: rotate(-3deg); }

File diff suppressed because one or more lines are too long

View file

@ -10,19 +10,22 @@ Enige discretie is aangeraden.
*/ */
:root { :root {
--dGray0:#F28705; --gray0: #F28705;
--dGray1:white; --gray1: white;
--dGray2:#590212; --gray2: #590212;
--dGray3:#590212; --gray3: #590212;
--dGray4:#274001; --gray4: #274001;
--dGray5:#274001; --gray5: #274001;
--dGray6:#F2778D; --gray6: #F2778D;
--dBlue:#F2778D; --accent: #F2778D;
--bg: #2F0000;
--navbarBg: #F2778D;
--fontFamily: Radikal, Optima, Segoe, Segoe UI, Candara, Calibri, Arial, sans-serif;
} }
body{ body{
height: 100%; height: 100%;
font-family: Radikal,Optima,Segoe,Segoe UI,Candara,Calibri,Arial,sans-serif;
background-color: #2F0000;
} }
@font-face { @font-face {
font-family: Radikal; font-family: Radikal;

View file

@ -1,12 +1,15 @@
:root { :root {
--dGray0:#FFEB65; --gray0: #ffeb65;
--dGray1:#F28705; --gray1: #f28705;
--dGray2:#F25C05; --gray2: #f25c05;
--dGray3:#F27405; --gray3: #f27405;
--dGray4:#8C3D0F; --gray4: #8c3d0f;
--dGray5:#260101; --gray5: #260101;
--dGray6:#260101; --gray6: #260101;
--dBlue:#D91604; --accent: #d91604;
--bg: #260101;
--navbarBg: #260101;
} }
.table-hover tbody tr:hover{ .table-hover tbody tr:hover{

View file

@ -1,10 +1,13 @@
:root { :root {
--dGray0:#D0D0D8; --gray0: #d0d0d8;
--dGray1:#8E8E93; --gray1: #8e8e93;
--dGray2:#636366; --gray2: #636366;
--dGray3:#48484A; --gray3: #48484a;
--dGray4:#3A3A3C; --gray4: #3a3a3c;
--dGray5:#2C2C2E; --gray5: #2c2c2e;
--dGray6:#1C1C1E; --gray6: #1c1c1e;
--dBlue:#0A84FF; --accent: #0a84ff;
--bg: #222224;
--navbarBg: #1c1c1e;
} }

View file

@ -1,10 +1,13 @@
:root { :root {
--dGray0:#444444; --gray0: #212121;
--dGray1:#666666; --gray1: #444444;
--dGray2:#212121; --gray2: #666666;
--dGray3:#ffffff; --gray3: #cccccc;
--dGray4:#f9f9f9; --gray4: #f1f1f1;
--dGray5:#ffffff; --gray5: #f8f8f8;
--dGray6:#ffffff; --gray6: #ffffff;
--dBlue:#0A84FF; --accent: #0a84ff;
--bg: #ffffff;
--navbarBg: #f8f8f8;
} }

View file

@ -1,12 +1,12 @@
:root { :root {
--dGray0:#F2EB80; --gray0: #f2eb80;
--dGray1:#F2EF05; --gray1: #f2ef05;
--dGray2:#F2EF05; --gray2: #f2ef05;
--dGray3:#177EBF; --gray3: #177ebf;
--dGray4:#0C6AA6; --gray4: #0c6aa6;
--dGray5:#F20505; --gray5: #f20505;
--dGray6:#F50B00; --gray6: #f50b00;
--dBlue:#35F546; --accent: #35f546;
} }
.background{ .background{

View file

@ -35,12 +35,30 @@
<td> <td>
{{ dish.description or "" }} {{ dish.description or "" }}
{% if dish.choices %} {% if dish.choices %}
<div class="dish-choices"> <details class="dish-choices">
Choices: <summary>
{% set comma = joiner(",") %} {% set comma = joiner(",") %}
{% for choice in dish.choices %}{{ comma() }} {% for choice in dish.choices %}{{ comma() }}
{{ choice[1].name }}{% endfor %} {{ choice[1].name }}{% endfor %}
</div> </summary>
<ul>
{% for type, choice in dish.choices %}
<li><strong>{{ choice.name }}</strong>{{
choice.description if choice.description
}}{{
" (choose one)" if type == "single_choice"
}}
<ul>
{% for option in choice.options %}
<li>{{ option.name }}{% if option.description %}:
{{ option.description}}{% endif %}{% if option.price %}:
{{ option.price | euro }}{% endif %}</li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</details>
{% endif %} {% endif %}
</td> </td>
<td style="white-space: nowrap;">{{ dish.price_range()|price_range(true) }}<td> <td style="white-space: nowrap;">{{ dish.price_range()|price_range(true) }}<td>

View file

@ -1,61 +1,90 @@
{% extends "layout.html" %} {% extends "layout.html" %}
{% set active_page = "orders" -%} {% set active_page = "orders" -%}
{% set order_items = order.group_by_user() -%} {% if current_user.is_anonymous() %}
{% set my_items = order.for_user(anon=session.get("anon_name", "")) %}
{% else %}
{% set my_items = order.for_user(user=current_user) %}
{% endif %}
{% set courier_or_admin = not current_user.is_anonymous() and (current_user.is_admin() or current_user.id == order.courier_id) -%} {% set courier_or_admin = not current_user.is_anonymous() and (current_user.is_admin() or current_user.id == order.courier_id) -%}
{% import "utils.html" as util %} {% import "utils.html" as util %}
{% block metas %}
{{ super() }}
<meta name="robots" content="noindex, nofollow">
{% endblock %}
{% block container %} {% block container %}
<div class="row"> <header>
<div class="col-md-push-1 col-md-10 darker order_overview" id="info"><!-- Shitty html --> <h2 id="order-title">Order {{ order.id }}</h2>
<h3 id="order-title">Order {{ order.id }}
<div class="pull-right"> <div class="location">
{% if order.can_close(current_user.id) -%} {% if order.location %}
<form action="{{ url_for('order_bp.close_order', order_id=order.id) }}" method="post" style="display:inline">
<input type="submit" class="btn btn-danger" value="Close"></input>
</form>
{% endif %}{% if courier_or_admin %}
<a class="btn btn-warning" href="{{ url_for('order_bp.order_edit', order_id=order.id) }}">Edit</a>
{%- endif %}
</div></h3>
courier: {{ order.courier.username }}
{% if order.courier == None and not current_user.is_anonymous() %}
<form action="{{ url_for('order_bp.volunteer', order_id=order.id) }}" method="post" style="display:inline">
<input type="submit" class="btn btn-primary btn-sm" value="Volunteer"></input>
</form>
{% endif %}
<br/>
location: {% if order.location %}
<a href="{{ url_for('general_bp.location', location_id=order.location_id) }}">{{ order.location_name }}</a> <a href="{{ url_for('general_bp.location', location_id=order.location_id) }}">{{ order.location_name }}</a>
{% else %} {% else %}
{{ order.location_name }} {{ order.location_name }}
{% endif %}<br/>
{% if order.location.telephone != None %}
telephone: <a href="tel://{{ order.location.telephone }}">{{ order.location.telephone }}</a><br/>
{% endif %} {% endif %}
start: {{ order.starttime.strftime("%d/%m/%Y %H:%M") }}<br>
{% if order.stoptime %}
closing time: {{ order.stoptime.strftime("%H:%M") }} ({{ order.stoptime|countdown }})
{% else %}open{% endif %}<br/>
total price: {{ total_price|euro }} {% if courier_or_admin %}- remaining debts: {{ debts|euro }}{% endif %}
</div> </div>
{% if form -%} </header>
<div class="col-md-push-1 col-md-10 darker order_order" id="form">
<h4>Order</h4> <section>
<form method="post" action="{{ url_for('order_bp.order_item_create', order_id=order.id) }}"> <div class="column">
<span class="pull-right"> <div class="box" id="my_items">
<a class="btn btn-primary" onclick="chooseRandom()">Choose for me</a> <h3>My items</h3>
</span> {% if my_items %}
{{ form.csrf_token }} <ul>
<div class="form-group select2-container select2 {{ 'has-errors' if form.dish_id.errors}}"> {% for item in my_items %}
{{ form.dish_id.label(class='control-label') }}<br> <li class="spacecake">
{{ form.dish_id(class='form-control select') }} {% if item.can_delete(order.id, current_user.id, session.get('anon_name', '')) -%}
{{ util.render_form_field_errors(form.dish_id) }} <form action="{{ url_for('order_bp.delete_item', order_id=order.id, item_id=item.id) }}" method="post" style="display:inline">
<button class="btn btn-link btn-sm" type="submit" style="padding: 0 0.5em;"><span class="glyphicon glyphicon-remove"></span></button>
</form>
{%- endif %}
<span>{{ item.dish_name }}{% if item.comment %}; {{ item.comment }}{% endif %}</span><span class="spacer"> </span><span class="price_aligned">{{ item.price | euro }}</span>
</li>
{% endfor %}
</ul>
{% else %}
<div>(None)</div>
{% endif %}
</div> </div>
<input type="hidden" name="form_for_dish" value="{{ dish.id }}" />
<div id="dish_choices"> {% if form %}
{% if dish and dish.choices %}
<!--
<div class="box" id="from_favourites">
<h3>Add from favourites</h3>
<ul>
<li>Todo</li>
</ul>
</div>
-->
<div class="box" id="add_item">
<h3>Add item to order</h3>
{% for dish in order.location.dishes %}
<form method="post" action="{{ url_for('order_bp.order_item_create', order_id=order.id) }}">
{{ form.csrf_token }}
<input type="hidden" name="dish_id" value="{{ dish.id }}" />
{% if form.dish_id.errors %}
<div class="form-group has-errors">
{{ util.render_form_field_errors(form.dish_id) }}
</div>
{% endif %}
<details {% if dish.id == selected_dish.id %}open="open"{% endif %}>
<summary class="spacecake">
<span class="dish_name">{{ dish.name }}</span>
<!--
{% if dish.tags %}<span class="tags"> {{ dish.tags | join(", ") }}</span>{% endif %}
-->
<span class="spacer"></span>
<span class="price">{{ dish.price_range() | price_range }}</span>
</summary>
{% if dish.description %}<div class="description">{{ dish.description }}</div>{% endif %}
{% for (choice_type, choice) in dish.choices %} {% for (choice_type, choice) in dish.choices %}
<div class="form-group select2-container select2"> <div class="form-group select2-container select2">
<label class="control-label" for="choice_{{ choice.id }}">{{ choice.name }}</label><br/> <label class="control-label" for="choice_{{ choice.id }}">{{ choice.name }}</label><br/>
@ -72,11 +101,9 @@
</select> </select>
</div> </div>
{% endfor %} {% endfor %}
{% endif %}
</div>
<div class="form-group {{ 'has-errors' if form.dish_id.errors }}"> <div class="form-group {{ 'has-errors' if form.dish_id.errors }}">
{{ form.comment.label(class='control-label') }}<br> {{ form.comment.label }}<br>
{{ form.comment(class='form-control', placeholder='Fill in comment, when applicable') }} {{ form.comment(class='form-control', placeholder='Fill in comment, when applicable') }}
{{ util.render_form_field_errors(form.comment) }} {{ util.render_form_field_errors(form.comment) }}
</div> </div>
@ -90,97 +117,200 @@
{% endif %} {% endif %}
<div class="form-group" style="padding-top: 8px;"> <div class="form-group" style="padding-top: 8px;">
{{ form.submit_button(class='btn btn-primary') }} {{ form.submit_button(class='btn btn-primary') }}
{% if not dish %}
<div id="submit-reveals-options-msg">If the chosen dish has options, they will be shown when you press submit, before adding the item to the order.</div>
{% endif %}
</div> </div>
</details>
</form> </form>
{% endfor %}
</div> </div>
{% endif %}
{% if form %}
</div>
<div class="column">
{% endif %}
<div class="box" id="order_info">
<h3>Order information</h3>
<dl>
<dt>Location</dt>
<dd>
{% if order.location %}
<a href="{{ url_for('general_bp.location', location_id=order.location_id) }}">{{ order.location_name }}</a>
{% else %}
{{ order.location_name }}
{% endif %}
</dd>
<dt>Courier</dt>
<dd>
{% if order.courier == None %}
{% if not current_user.is_anonymous() %}
<form action="{{ url_for('order_bp.volunteer', order_id=order.id) }}" method="post" style="display:inline">
<input type="submit" class="btn btn-primary btn-sm" value="Volunteer"></input>
</form>
{% else %}No-one{% endif %}
{% else %}
{{ order.courier.username }}
{% endif %}
</dd>
<dt>Order opens</dt>
<dd>{{ order.starttime.strftime("%Y-%m-%d, %H:%M") }}</dd>
<dt>Order closes</dt>
<dd>
{% if order.stoptime %}
{% set stoptimefmt = (
"%H:%M" if order.stoptime.date() == order.starttime.date()
else "%Y-%m-%d, %H:%M"
) %}
{{ order.stoptime.strftime(stoptimefmt) }} ({{ order.stoptime|countdown }})
{% else %}
Never
{% endif %}
</dd>
</dl>
<div>
{% if order.can_close(current_user.id) -%}
<form action="{{ url_for('order_bp.close_order', order_id=order.id) }}" method="post" style="display:inline">
<input type="submit" class="btn btn-danger" value="Close"></input>
</form>
{% endif %}
{% if courier_or_admin %}
<a class="btn" href="{{ url_for('order_bp.order_edit', order_id=order.id) }}">Edit</a>
{%- endif %} {%- endif %}
</div> </div>
<div class="row" id="items">
<div class="col-md-push-1 col-md-5 darker order_items" id="items-list">
<h3>Items</h3>
<table class="table table-hover table-condensed">
<thead>
<tr><th>Name</th><th>Item</th><th>Price</th>{% if courier_or_admin %}<th>Paid?</th>{% endif %}<th>Delete</th></tr>
</thead>
<tbody>
{% for item in order.items -%}
<tr>
<td>{{ item.get_name() }}</td>
<td><span title="{{ item.comment if item.comment }}">{{ item.dish_name }}{{ "*" if item.comment }}</span></td>
<td>{{ item.price|euro }}</td>
{% if courier_or_admin %}
<td>
{% if not item.paid %}
<form action="{{ url_for('order_bp.item_paid', order_id=order.id, item_id=item.id) }}" method="post" style="display:inline">
<input type="submit" class="btn btn-xs btn-primary" value="Pay"></input>
</form>
{% else %} <span class="glyphicon glyphicon-chevron-down"></span>
{% endif %}
</td>
{% endif %}
<td>
{% if item.can_delete(order.id, current_user.id, session.get('anon_name', '')) -%}
<form action="{{ url_for('order_bp.delete_item', order_id=order.id, item_id=item.id) }}" method="post" style="display:inline">
<button class="btn btn-link" type="submit"><span class="glyphicon glyphicon-remove"></span></button>
</form>
{%- endif %}<br/></td>
</tr>
{%- endfor %}
</tbody>
</table>
</div> </div>
<div class="col-md-push-2 col-md-4 darker box order_ordered" id="items-ordered">
<h3>Ordered dishes: {{ order.items.count() }}</h3> <div class="box" id="how_to_order">
<a class="divLink" href="{{ url_for('order_bp.items_showcase', order_id=order.id) }}"></a> <h3>Ordering at {{ order.location_name }}</h3>
{% for key, value in order.group_by_dish().items() -%} <dl>
<div class="product"> {% if order.location.telephone %}
{{ key }}: {{ value["count"] }} <dt>Telephone</dt>
{% if value["comments"]|any -%} <dd><a href="tel://{{ order.location.telephone }}">{{ order.location.telephone }}</a></dd>
{% endif %}
{% if order.location.website %}
<dt>Website</dt>
<dd><a href="{{ order.location.website }}">{{ order.location.website }}</a></dd>
{% endif %}
{% if order.location.address or order.location.osm %}
<dt>Location</dt>
<dd>
{% if order.location.osm %}
<a href="{{ order.location.osm }}">{{ order.location.address or "View on OSM" }}</a>
{% else %}
{{ order.location.address }}
{% endif %}
</dd>
{% endif %}
</dl>
</div>
{% if not form %}
</div>
<div class="column">
{% endif %}
<div class="box" id="per_dish">
<h3>Ordered dishes</h3>
{% for dish_name, dish_order_items in order.group_by_dish() -%}
{% set has_comments = dish_order_items | map(attribute="comment") | any -%}
<div class="dish {{ 'spacecake' if not has_comments }}">
<h4>
<span class="quantity">{{ dish_order_items | length }}</span> ×
{{ dish_name }}
</h4>
{% if has_comments -%}
<ul class="comments"> <ul class="comments">
{% for comment in value["comments"] -%} {% for item in dish_order_items -%}
<li>{% if comment %}{{ comment }} <li class="spacecake">{% if item["comment"] %}<span>{{ item["comment"] }}</span>
{% else %}<i>No comment</i> {% else %}<i>No comment</i>
{% endif %}</li> {% endif %}<span class="spacer"> </span><span class="item_for">for {{ item.for_name }}</span></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %}
<span class="spacer"> </span><span class="item_for">for {{ dish_order_items | map(attribute="for_name") | join(", ") }}</span>
{%- endif %} {%- endif %}
</p>
</div> </div>
{%- endfor %} {%- endfor %}
<div class="footer">
Total {{ order.items.count() }} items — {{ total_price|euro }}
&nbsp;
<a class="btn btn-sm" href="{{ url_for('order_bp.items_showcase', order_id=order.id) }}">Shop view</a>
</div> </div>
</div> </div>
<div class="row"> </div>
<div class="col-md-push-1 col-md-5 darker order_depts" id="debts"> </section>
<h3>Debts</h3>
<table class="table table-hover table-condensed"> <section class="single_column">
<div class="box" id="per_person">
<h3>Items per person</h3>
<table class="table table-condensed">
<thead> <thead>
<tr><th>Name</th><th>Total</th><th>To pay</th>{% if courier_or_admin %}<th>Paid?</th>{% endif %}</tr> <tr><th>Total</th><th>Name</th><th>Items</th></tr>
</thead> </thead>
<tbody> <tbody>
{% for key, value in order_items.items() -%} {% for user_name, order_items in order.group_by_user() -%}
<tr> <tr>
<td>{{ key }}</td>
<td>{{ value["total"]|euro }}</td>
<td>{{ value["to_pay"]|euro }}</td>
{% if courier_or_admin %}
<td> <td>
{% if not value["to_pay"] == 0 %} {% set paid = order_items | map(attribute="paid") | all %}
<form action="{{ url_for('order_bp.items_user_paid', order_id=order.id, user_name=key) }}" method="post" style="display:inline"> <input type="checkbox" name="{{ user_name }}"
<input type="submit" class="btn btn-xs btn-primary" value="Pay"></input> {{ "disabled" if paid }} style="{{ 'opacity: 0.5' if paid }}">
<span class="price">{{ order_items | map(attribute="price") | sum | euro }}</span>
{% if paid %}paid{% endif %}
</td>
<td>{{ user_name }}</td>
<td class="items">
<ul>
{% for item in order_items %}
<li class="{{ 'paid' if item.paid }}">
<div class="actions">
{% if item.can_delete(order.id, current_user.id, session.get('anon_name', '')) -%}
<form action="{{ url_for('order_bp.delete_item', order_id=order.id, item_id=item.id) }}" method="post" style="display:inline">
<button class="btn btn-link btn-sm" type="submit" style="padding: 0 0.5em;"><span class="glyphicon glyphicon-remove"></span></button>
</form> </form>
{% else %} {% else %}
<span class="glyphicon glyphicon-chevron-down"></span> <span class="glyphicon glyphicon-remove" style="color: var(--gray3); padding: 0 0.5em"></span>
{% endif %} {%- endif %}
</div>
<div class="price_aligned">{{ item.price|euro }}</div>
<div class="item_description">{{ item.dish_name }}{{ "; " + item.comment if item.comment }}</div>
</li>
{% endfor %}
<li>
<button class="btn btn-link btn-sm" onclick="alert('TODO')" style="color: green; padding: 0 0.5em;"><span class="glyphicon glyphicon-plus"></span></button>
</li>
</ul>
</td> </td>
{% endif %}
</tr> </tr>
{%- endfor %} {%- endfor %}
</tbody> </tbody>
</table> </table>
<div class="footer">
On selected:
<button class="btn btn-sm">Mark paid (TODO)</button>
Request payment for selected:
<button class="btn btn-sm"><span class="glyphicon glyphicon-piggy-bank"></span> Tab (TODO)</button>
<button class="btn btn-sm"><span class="glyphicon glyphicon-qrcode"></span> QR code (TODO)</button>
</div> </div>
</div> </div>
</section>
{% endblock %} {% endblock %}
{% block styles %} {% block styles %}
@ -188,87 +318,163 @@
<link rel="stylesheet" href="{{ url_for('static', filename='css/select2.min.css') }}" /> <link rel="stylesheet" href="{{ url_for('static', filename='css/select2.min.css') }}" />
<link rel="stylesheet" href="{{ url_for('static', filename='css/select2-bootstrap.min.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/select2-bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='css/print.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/print.css') }}">
<style>
body, h1, h2, h3, h4 {
color: var(--gray0);
}
table {
overflow-wrap: break-word;
}
@media (min-width: 1200px) {
section {
display: grid;
grid-template-columns: 1fr 1fr;
grid-gap: 0 30px;
align-items: start;
}
}
section.single_column {
grid-template-columns: unset;
}
.description {
color: #888;
margin-left: 1em;
}
header {
margin-bottom: 25px;
}
h2 {
margin-bottom: 0;
}
h3 {
margin-top: 0;
font-size: 150%;
font-weight: 500;
}
.location {
font-size: 150%;
font-weight: 500;
margin-left: 3px;
margin-top: -5px;
}
.box {
width: 100%;
border: 2px solid var(--gray0);
padding: 10px;
margin-bottom: 30px;
}
#order_info dl {
column-width: 150px;
}
#from_favourites ul, #my_items ul, #per_person ul {
list-style-type: none;
padding: 0;
}
dl {
margin-bottom: 10px;
}
.box :last-child {
margin-bottom: 0;
}
.box h4 {
font-size: 110%;
font-weight: bold;
margin-bottom: 0.6em;
}
.spacecake {
display: flex;
align-items: flex-end;
}
.spacecake .tags {
padding-left: 0.5em;
color: var(--gray2);
}
.spacecake .spacer {
content: ' ';
flex-grow: 1;
min-width: 10px;
border-bottom: 1px solid var(--gray3);
margin: 0.3em 0.5em;
}
li {
line-height: 1.5;
margin: 0.5em 0;
}
#my_items li form {
align-self: flex-start;
}
#per_dish .comments li {
}
#per_dish .dish.no_comments {
display: flex;
align-items: flex-end;
}
#per_dish .dish.no_comments h4 {
margin-bottom: 0;
line-height: inherit;
}
#per_dish .item_for {
color: var(--gray2);
text-align: right;
}
#per_person li {
white-space: nowrap;
margin-top: 0.15em;
vertical-align: top;
}
#per_person li > * {
display: inline-block;
vertical-align: top;
}
#per_person .item_description {
white-space: normal;
}
.price, .price_aligned {
white-space: nowrap;
}
.price_aligned {
display: inline-block;
width: 4em;
}
.items .paid {
opacity: 0.4;
}
.footer {
margin-top: 1em;
}
summary {
line-height: 1.2;
margin: 0.6em 0;
}
summary .dish_name {
white-space: nowrap;
}
summary .dish_name, summary:before {
align-self: flex-start;
}
</style>
{% endblock %} {% endblock %}
{% block scripts %} {% block scripts %}
{{ super() }} {{ super() }}
<script src="{{ url_for('static', filename='js/select2.min.js') }}"></script> <script src="{{ url_for('static', filename='js/select2.min.js') }}"></script>
<script type="text/javascript"> <script type="text/javascript">
{% if form %} {% if form %}
function sortArg(sortable) { $(".select").select2({"sorter": x => x.sort()});
return sortable.sort();
}
var select = $(".select").select2({"sorter": sortArg});
var options = select[0].options;
function chooseRandom() {
var index = Math.floor((Math.random() * options.length))
var choice = options[index]
select.val(choice.value).trigger("change")
}
{% endif %}
{% if form and order.location %}
function updateChoices() {
$("#submit-reveals-options-msg").hide(0);
$dish_choices = $("#dish_choices");
$dish_choices.addClass("loading");
var dish_id = $("#dish_id").val();
var url = "{{ url_for('general_bp.location_dish', location_id=order.location.id, dish_id='DISHID') }}".replace("DISHID", encodeURI(dish_id));
$dish_choices.find("select").attr("disabled", "disabled");
$.get(url)
.done(function(data) {
$dish_choices.html("");
for (var i in data) {
var choice = data[i];
var id = "choice_" + choice["id"];
var label = $("<label class='control-label'/>")
.attr("for", id)
.text(choice["name"] +
(choice["price"] ? ": € " + choice["price"] / 100 : "") +
(choice["description"] ? " (" + choice["description"] + ")" : "")
);
var choiceSelect = $("<select class='form-control select' />")
.attr("id", id)
.attr("name", id);
if (choice.type === "multi_choice") {
choiceSelect.attr("multiple", "multiple");
} else {
choiceSelect.attr("required", "required");
}
for (var j in choice["options"]) {
var option = choice["options"][j];
choiceSelect.append(
$("<option />").text(
option["name"] +
(option["price"] ? ": € " + option["price"] / 100 : "") +
(option["description"] ? " (" + option["description"] + ")" : "")
).attr("value", option["id"])
);
}
$dish_choices
.append(
$("<div class='form-group select2-container select2'>")
.append(label, "<br/>", choiceSelect),
" "
);
choiceSelect.select2({"sorter": sortArg});
}
$dish_choices.removeClass("loading");
}).fail(function() {
$("#dish_choices").html("Could not load choices");
$dish_choices.removeClass("loading");
$("#submit-reveals-options-msg").show(0);
});
}
$("#dish_id").on("change", updateChoices);
updateChoices();
{% endif %} {% endif %}
</script> </script>
{% endblock %} {% endblock %}

View file

@ -33,13 +33,13 @@ Haldis - Order {{ order.id }}
</div> </div>
{% endif %} {% endif %}
{% for key, value in order.group_by_dish(True).items() -%} {% for dish_name, dish_order_items in order.group_by_dish() -%}
<div class="dish"> <div class="dish">
<h2><span class="quantity">{{ value["count"] }}</span> × {{ key }}</h2> <h2><span class="quantity">{{ dish_order_items | length }}</span> × {{ dish_name }}</h2>
{% if value["comments"]|any -%} {% if dish_order_items | map(attribute="comment") | any -%}
<ul class="comments"> <ul class="comments">
{% for comment in value["comments"] -%} {% for item in dish_order_items -%}
<li>{% if comment %}{{ comment }} <li>{% if item["comment"] %}{{ item["comment"] }}
{% else %}<i>No comment</i> {% else %}<i>No comment</i>
{% endif %}</li> {% endif %}</li>
{% endfor %} {% endfor %}

View file

@ -1,5 +1,5 @@
{% macro render_order(order) -%} {% macro render_order(order) -%}
<div class="row darke order_row"> <div class="row order_row">
<div class="col-md-8 col-lg-9 order_data"> <div class="col-md-8 col-lg-9 order_data">
<h5>{{ order.location_name }}</h5> <h5>{{ order.location_name }}</h5>
<b class="amount_of_orders">{{ order.items.count() }} orders</b></p> <b class="amount_of_orders">{{ order.items.count() }} orders</b></p>

View file

@ -7,7 +7,11 @@ def euro_string(value: int) -> str:
""" """
Convert cents to string formatted euro Convert cents to string formatted euro
""" """
return "{}.{:02}".format(*divmod(value, 100)) euro, cents = divmod(value, 100)
if cents:
return "{}.{:02}".format(euro, cents)
else:
return "{}".format(euro)
def price_range_string(price_range, include_upper=False): def price_range_string(price_range, include_upper=False):

View file

@ -83,7 +83,7 @@ def order_from_id(order_id: int, form: OrderForm = None, dish_id=None) -> str:
form=form, form=form,
total_price=total_price, total_price=total_price,
debts=debts, debts=debts,
dish=dish, selected_dish=dish,
) )
@ -138,7 +138,7 @@ def order_item_create(order_id: int) -> typing.Any:
abort(404) abort(404)
form = AnonOrderItemForm() if current_user.is_anonymous() else OrderItemForm() form = AnonOrderItemForm() if current_user.is_anonymous() else OrderItemForm()
dish_id = form.dish_id.data if form.is_submitted() else request.args.get("dish") dish_id = request.form["dish_id"] if form.is_submitted() else request.args.get("dish")
if dish_id and not location.dish_by_id(dish_id): if dish_id and not location.dish_by_id(dish_id):
abort(404) abort(404)
if not form.is_submitted(): if not form.is_submitted():
@ -146,7 +146,7 @@ def order_item_create(order_id: int) -> typing.Any:
form.populate(current_order.location) form.populate(current_order.location)
if form.is_submitted(): if form.is_submitted():
form_for_dish = request.form["form_for_dish"] form_for_dish = request.form["dish_id"]
dish_was_changed = form_for_dish != "" and form_for_dish != dish_id dish_was_changed = form_for_dish != "" and form_for_dish != dish_id
# The form's validation tests that dish_id is valid and gives a friendly error if it's not # The form's validation tests that dish_id is valid and gives a friendly error if it's not
@ -234,21 +234,6 @@ def order_item_create(order_id: int) -> typing.Any:
return redirect(url_for("order_bp.order_from_id", order_id=order_id)) return redirect(url_for("order_bp.order_from_id", order_id=order_id))
@order_bp.route("/<order_id>/<item_id>/paid", methods=["POST"])
@login_required
# pylint: disable=R1710
def item_paid(order_id: int, item_id: int) -> typing.Optional[Response]:
"Indicate payment status for an item in an order"
item = OrderItem.query.filter(OrderItem.id == item_id).first()
user_id = current_user.id
if item.order.courier_id == user_id or current_user.admin:
item.paid = True
db.session.commit()
flash("Paid %s by %s" % (item.dish_name, item.get_name()), "success")
return redirect(url_for("order_bp.order_from_id", order_id=order_id))
abort(404)
@order_bp.route("/<order_id>/<user_name>/user_paid", methods=["POST"]) @order_bp.route("/<order_id>/<user_name>/user_paid", methods=["POST"])
@login_required @login_required
# pylint: disable=R1710 # pylint: disable=R1710
@ -269,7 +254,7 @@ def items_user_paid(order_id: int, user_name: str) -> typing.Optional[Response]:
for item in items: for item in items:
item.paid = True item.paid = True
db.session.commit() db.session.commit()
flash("Paid %d items for %s" % (len(items), item.get_name()), "success") flash("Paid %d items for %s" % (len(items), item.for_name), "success")
return redirect(url_for("order_bp.order_from_id", order_id=order_id)) return redirect(url_for("order_bp.order_from_id", order_id=order_id))
abort(404) abort(404)