Files

33 lines
1.4 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block title %}{{ product.title }} — {{ app_name }}{% endblock %}
{% block content %}
<section class="page-section product-page">
<a class="back-link" href="/#catalog">К каталогу</a>
<div class="product-layout">
<div class="product-stage tone-{{ product.image_gradient }}">
<span class="product-mark xl">{{ product.title[:1] }}</span>
</div>
<div class="product-info">
<p class="product-tag">{{ product.delivery_note }}</p>
<h1>{{ product.title }}</h1>
<p class="lead">{{ product.short_description }}</p>
<p class="body-copy">{{ product.description }}</p>
<p class="stock-line">В наличии: <strong>{{ stock }}</strong> шт.</p>
<div class="buy-row">
<span class="price big">{{ product.price | rub }}</span>
<form method="post" action="/cart/add/{{ product.id }}" class="inline-form">
<label class="qty-label">
Кол-во
<input type="number" name="quantity" min="1" max="{{ stock if stock > 0 else 1 }}" value="1" {% if stock < 1 %}disabled{% endif %} />
</label>
<button class="btn btn-primary" type="submit" {% if stock < 1 %}disabled{% endif %}>
{% if stock < 1 %}Нет в наличии{% else %}В корзину{% endif %}
</button>
</form>
</div>
</div>
</div>
</section>
{% endblock %}