Subscriptions: grid, font sizes, and more information
This commit is contained in:
parent
8c6272aabe
commit
a405ab44c7
@ -722,6 +722,15 @@ article + article {
|
|||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product__figure img {
|
||||||
|
max-height: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.product__item button {
|
||||||
|
grid-column: span 2;
|
||||||
|
align-self: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
.product__item h3,
|
.product__item h3,
|
||||||
.product__info h1 {
|
.product__info h1 {
|
||||||
/*text-decoration: underline;*/
|
/*text-decoration: underline;*/
|
||||||
@ -753,6 +762,10 @@ article + article {
|
|||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product__item button {
|
||||||
|
grid-column: span 1;
|
||||||
|
}
|
||||||
|
|
||||||
.product__figure {
|
.product__figure {
|
||||||
grid-row: 1;
|
grid-row: 1;
|
||||||
justify-self: center;
|
justify-self: center;
|
||||||
@ -770,12 +783,10 @@ article + article {
|
|||||||
|
|
||||||
|
|
||||||
.subscription-coffee {
|
.subscription-coffee {
|
||||||
display: flex;
|
display: grid;
|
||||||
gap: 2rem;
|
gap: 2rem;
|
||||||
overflow-x: scroll;
|
grid-template-columns: repeat(4, 1fr);
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-right: var(--default-border);
|
|
||||||
border-left: var(--default-border);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.subscription-coffee div {
|
.subscription-coffee div {
|
||||||
@ -783,13 +794,16 @@ article + article {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.subscription-coffee img {
|
.subscription-coffee img {
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subscription-coffee .product__desc {
|
||||||
|
flex-grow: 2;
|
||||||
|
}
|
||||||
|
|
||||||
.subscription-coffee input[type=number] {
|
.subscription-coffee input[type=number] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@ -817,10 +831,19 @@ article + article {
|
|||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 900px) {
|
||||||
|
.subscription-coffee {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
.subscription-products {
|
.subscription-products {
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
.subscription-coffee {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -24,8 +24,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>{{ product.name }}</h3>
|
<h3>{{ product.name }}</h3>
|
||||||
<h5>{{ product.subtitle }}</h5>
|
<h5>{{ product.subtitle }}</h5>
|
||||||
<p>{{product.description|truncatewords:20}}</p>
|
<p>{{product.description}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<button>Shop now</button>
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -25,8 +25,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<h3>{{ product.name }}</h3>
|
<h3>{{ product.name }}</h3>
|
||||||
<h5>{{ product.subtitle }}</h5>
|
<h5>{{ product.subtitle }}</h5>
|
||||||
<p>{{product.description|truncatewords:20}}</p>
|
<p>{{product.description}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<button>Shop now</button>
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -30,16 +30,17 @@
|
|||||||
</section>
|
</section>
|
||||||
<section class="cart__list">
|
<section class="cart__list">
|
||||||
<h3>Items</h3>
|
<h3>Items</h3>
|
||||||
<h4>Size: {{ sub_cart.size }}</h4>
|
<a href="{% url 'storefront:subscription-form' %}" class="btn">Edit items</a>
|
||||||
<h4>Grind: {{ sub_cart.grind }}</h4>
|
|
||||||
{% for item in sub_cart.items %}
|
{% for item in sub_cart.items %}
|
||||||
<div class="cart__item">
|
<div class="cart__item">
|
||||||
{% with product=item.product %}
|
{% with product=item.product %}
|
||||||
<figure>
|
<figure class="item__figure">
|
||||||
<img src="{{product.get_first_img.image.url}}" alt="{{product.get_first_img.image}}">
|
<img class="item__image" src="{{product.get_first_img.image.url}}" alt="{{product.get_first_img.image}}">
|
||||||
</figure>
|
</figure>
|
||||||
<div>
|
<div class="item__info">
|
||||||
<h2>{{ item.quantity }} × {{product.name}}</h2>
|
<h4>{{ item.quantity }} × {{product.name}}</h4>
|
||||||
|
<h5>Size: {{ sub_cart.size }}</h5>
|
||||||
|
<h5>Grind: {{ sub_cart.grind }}</h5>
|
||||||
</div>
|
</div>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -21,8 +21,18 @@
|
|||||||
<figure class="product__figure">
|
<figure class="product__figure">
|
||||||
<img class="product__image" src="{{ product.get_first_img.image.url }}">
|
<img class="product__image" src="{{ product.get_first_img.image.url }}">
|
||||||
</figure>
|
</figure>
|
||||||
<strong>{{ product }}</strong>
|
<div class="product__desc">
|
||||||
<input type="number" min="0" max="20" pattern="[0-9]*" data-id="{{ product.pk }}" name="product_{{ product.name }}" placeholder="Quantity">
|
<h3>{{ product.name }}</h3>
|
||||||
|
<p>{{product.description}}</p>
|
||||||
|
</div>
|
||||||
|
<input
|
||||||
|
type="number"
|
||||||
|
min="0" max="20"
|
||||||
|
pattern="[0-9]*"
|
||||||
|
data-id="{{ product.pk }}"
|
||||||
|
name="product_{{ product.name }}"
|
||||||
|
placeholder="Quantity"
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user