73 lines
2.8 KiB
HTML
73 lines
2.8 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ product.name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<section class="product-detail">
|
|
<div class="container">
|
|
<nav class="breadcrumb">
|
|
<a href="{{ url_for('index') }}">Каталог</a>
|
|
<span>/</span>
|
|
<span>{{ product.name }}</span>
|
|
</nav>
|
|
|
|
<div class="product-detail-grid">
|
|
<div class="product-detail-image">
|
|
<img src="{{ url_for('static', filename='images/' + product.image) }}"
|
|
alt="{{ product.name }}"
|
|
onerror="this.src='https://via.placeholder.com/500x500?text={{ product.brand }}'">
|
|
</div>
|
|
|
|
<div class="product-detail-info">
|
|
<span class="product-brand">{{ product.brand }}</span>
|
|
<h1 class="product-title">{{ product.name }}</h1>
|
|
<div class="product-price-large">
|
|
{{ "{:,.0f}".format(product.price).replace(',', ' ') }} ₽
|
|
</div>
|
|
|
|
<div class="product-description">
|
|
<p>{{ product.description }}</p>
|
|
</div>
|
|
|
|
<div class="specs-table">
|
|
<h3>Характеристики</h3>
|
|
<table>
|
|
<tr>
|
|
<td>Производитель</td>
|
|
<td>{{ product.brand }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Память</td>
|
|
<td>{{ product.storage }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Оперативная память</td>
|
|
<td>{{ product.ram }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Диагональ экрана</td>
|
|
<td>{{ product.screen }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Аккумулятор</td>
|
|
<td>{{ product.battery }}</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Особенности</td>
|
|
<td>{{ product.features }}</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<form action="{{ url_for('add_to_cart', product_id=product.id) }}" method="POST" class="add-to-cart-form">
|
|
<input type="hidden" name="next" value="{{ url_for('product_detail', product_id=product.id) }}">
|
|
<button type="submit" class="btn btn-primary btn-large">
|
|
Добавить в корзину
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
{% endblock %}
|