mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Improve mobile shopping cart experience
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
{% load money %}
|
{% load money %}
|
||||||
{% blocktrans asvar s_taxes %}taxes{% endblocktrans %}
|
{% blocktrans asvar s_taxes %}taxes{% endblocktrans %}
|
||||||
{% for line in cart.positions %}
|
{% for line in cart.positions %}
|
||||||
<div class="row cart-row {% if download %}has-downloads{% endif %}">
|
<div class="row cart-row {% if download %}has-downloads{% endif %}{% if editable %}editable{% endif %}">
|
||||||
<div class="product">
|
<div class="product">
|
||||||
{% if line.addon_to %}
|
{% if line.addon_to %}
|
||||||
<span class="addon-signifier">+</span>
|
<span class="addon-signifier">+</span>
|
||||||
@@ -217,22 +217,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% if download %}
|
|
||||||
<div class="download-mobile">
|
|
||||||
{% if line.generate_ticket %}
|
|
||||||
{% for b in download_buttons %}
|
|
||||||
<form action="{% if position_page and line.addon_to %}{% eventurl event "presale:event.order.position.download" secret=line.addon_to.web_secret order=order.code output=b.identifier pid=line.pk position=line.addon_to.positionid %}{% elif position_page %}{% eventurl event "presale:event.order.position.download" secret=line.web_secret order=order.code output=b.identifier pid=line.pk position=line.positionid %}{% else %}{% eventurl event "presale:event.order.download" secret=order.secret order=order.code output=b.identifier position=line.pk %}{% endif %}"
|
|
||||||
method="post" data-asynctask data-asynctask-download class="download-btn-form">
|
|
||||||
{% csrf_token %}
|
|
||||||
<button type="submit"
|
|
||||||
class="btn btn-sm {% if b.identifier == "pdf" %}btn-primary{% else %}btn-default{% endif %}">
|
|
||||||
<span class="fa {{ b.icon }}"></span> {{ b.text }}
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -37,11 +37,6 @@
|
|||||||
padding-right: floor(($grid-gutter-width / 2));
|
padding-right: floor(($grid-gutter-width / 2));
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.download-mobile {
|
|
||||||
display: none;
|
|
||||||
width: 100%;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.download-desktop {
|
.download-desktop {
|
||||||
display: block;
|
display: block;
|
||||||
width: percentage((4 / $grid-columns));
|
width: percentage((4 / $grid-columns));
|
||||||
@@ -80,18 +75,60 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media(max-width: $screen-sm-max) {
|
@media(max-width: $screen-sm-max) {
|
||||||
.cart-row {
|
.cart .panel-body {
|
||||||
.download-mobile {
|
padding: 5px;
|
||||||
|
.checkout-button-row {
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
#cart-deadline {
|
||||||
display: block;
|
display: block;
|
||||||
|
padding: 0 10px 5px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.cart-row {
|
||||||
.download-desktop {
|
.download-desktop {
|
||||||
display: none;
|
clear: both;
|
||||||
|
display: block;
|
||||||
|
width: 50%;
|
||||||
|
text-align: left;
|
||||||
|
a.btn, button.btn {
|
||||||
|
word-break: break-all;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
&.has-downloads .product, .product, .count, .singleprice, .totalprice {
|
|
||||||
|
.totalprice {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
.singleprice {
|
.product, &.has-downloads .product {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
&.total .product {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.count {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
width: 25%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.singleprice {
|
||||||
|
width: 25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.editable {
|
||||||
|
.count {
|
||||||
|
width: 50%;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
.singleprice {
|
||||||
|
clear: both;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.totalprice {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
a.btn, button.btn {
|
||||||
|
max-width: 100%;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
|
|
||||||
.panel-title .radio {
|
.panel-title .radio {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user