Introduce templates/pg/pg_base.html holding the common layout, Vazirmatn typography, colour tokens and reusable components (buttons, rows, dividers, gateway cards, alerts). All four payer-facing screens now extend it for a consistent, mobile-first UI matching the approved UI/UX design: - payment_request: card layout with amount row + gateway picker cards - payment_confirm: restyled "in review" state - payment_success: extends base, adds tracking-code row - payment_failure: extends base, keeps refund notice Mobile: full-bleed white screen, centred content, primary action pinned to the bottom with safe-area padding. >=480px: floated centred card on a grey canvas. No view/logic changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
214 lines
6.3 KiB
HTML
214 lines
6.3 KiB
HTML
{% load static %}
|
|
<!DOCTYPE html>
|
|
<html lang="fa" dir="rtl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% block title %}وینسو | درگاه پرداخت{% endblock %}</title>
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap" rel="stylesheet">
|
|
|
|
<style>
|
|
:root {
|
|
--pg-bg: #f0f0f2;
|
|
--pg-card: #ffffff;
|
|
--pg-text: #2b2b33;
|
|
--pg-muted: #8a8a94;
|
|
--pg-border: #ececef;
|
|
--pg-primary: #2f3e5c;
|
|
--pg-primary-hover: #26334d;
|
|
--pg-accent: #6931c9;
|
|
--pg-success: #3aa76d;
|
|
--pg-danger: #e0483d;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body { height: 100%; }
|
|
|
|
body {
|
|
margin: 0;
|
|
background-color: var(--pg-card);
|
|
font-family: 'Vazirmatn', Tahoma, sans-serif;
|
|
color: var(--pg-text);
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: stretch;
|
|
}
|
|
|
|
.pg-card {
|
|
width: 100%;
|
|
min-height: 100vh;
|
|
min-height: 100dvh;
|
|
background: var(--pg-card);
|
|
padding: 28px 22px calc(24px + env(safe-area-inset-bottom));
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Tablet / desktop: float the card on the grey canvas */
|
|
@media (min-width: 480px) {
|
|
body {
|
|
background-color: var(--pg-bg);
|
|
align-items: center;
|
|
padding: 24px 16px;
|
|
}
|
|
.pg-card {
|
|
max-width: 400px;
|
|
min-height: 580px;
|
|
border-radius: 16px;
|
|
box-shadow: 0 8px 32px rgba(20, 20, 40, 0.08);
|
|
}
|
|
}
|
|
|
|
.pg-body {
|
|
flex-grow: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
text-align: center;
|
|
padding: 16px 0;
|
|
}
|
|
|
|
.pg-status-icon {
|
|
width: 72px;
|
|
height: 72px;
|
|
margin-bottom: 18px;
|
|
}
|
|
.pg-status-icon img { width: 100%; height: 100%; object-fit: contain; }
|
|
|
|
.pg-title {
|
|
font-size: 1.15rem;
|
|
font-weight: 700;
|
|
margin: 0 0 6px;
|
|
}
|
|
.pg-title.is-success { color: var(--pg-success); }
|
|
.pg-title.is-danger { color: var(--pg-danger); }
|
|
|
|
.pg-subtitle {
|
|
color: var(--pg-muted);
|
|
font-size: 0.9rem;
|
|
margin: 0 0 20px;
|
|
}
|
|
|
|
.pg-divider {
|
|
width: 100%;
|
|
height: 1px;
|
|
background: var(--pg-border);
|
|
border: none;
|
|
margin: 8px 0 20px;
|
|
}
|
|
|
|
.pg-row {
|
|
width: 100%;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
font-size: 0.95rem;
|
|
padding: 6px 0;
|
|
}
|
|
.pg-row .label { color: var(--pg-muted); }
|
|
.pg-row .value { font-weight: 700; }
|
|
.pg-row .value.is-success { color: var(--pg-success); }
|
|
|
|
.pg-note {
|
|
color: var(--pg-muted);
|
|
font-size: 0.85rem;
|
|
line-height: 1.9;
|
|
margin: 4px 0;
|
|
}
|
|
.pg-note .code { color: var(--pg-text); font-weight: 600; }
|
|
|
|
.pg-actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
width: 100%;
|
|
margin-top: auto;
|
|
}
|
|
|
|
.pg-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
width: 100%;
|
|
padding: 14px 16px;
|
|
border-radius: 10px;
|
|
font-family: inherit;
|
|
font-size: 1rem;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
border: 1.5px solid transparent;
|
|
transition: filter 0.15s ease, background 0.15s ease;
|
|
text-decoration: none;
|
|
}
|
|
.pg-btn:hover { filter: brightness(0.96); }
|
|
|
|
.pg-btn--primary { background: var(--pg-primary); color: #fff; }
|
|
.pg-btn--outline { background: #fff; border-color: var(--pg-accent); color: var(--pg-accent); }
|
|
|
|
.pg-gateways {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 12px;
|
|
justify-content: center;
|
|
width: 100%;
|
|
}
|
|
.pg-gateway-btn {
|
|
flex: 1 1 120px;
|
|
max-width: 150px;
|
|
background: #fff;
|
|
border: 1.5px solid var(--pg-border);
|
|
border-radius: 12px;
|
|
padding: 14px;
|
|
cursor: pointer;
|
|
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
.pg-gateway-btn:hover {
|
|
border-color: var(--pg-accent);
|
|
box-shadow: 0 4px 16px rgba(105, 49, 201, 0.12);
|
|
}
|
|
.pg-gateway-btn img { width: 64px; height: 64px; object-fit: contain; }
|
|
|
|
.pg-messages { width: 100%; margin-bottom: 12px; }
|
|
.pg-alert {
|
|
width: 100%;
|
|
border-radius: 10px;
|
|
padding: 10px 14px;
|
|
font-size: 0.85rem;
|
|
margin-bottom: 8px;
|
|
}
|
|
.pg-alert--error { background: #fdecea; color: var(--pg-danger); }
|
|
.pg-alert--info { background: #eef2fb; color: var(--pg-primary); }
|
|
.pg-alert--success { background: #e8f6ee; color: var(--pg-success); }
|
|
|
|
.pg-hidden-form { display: none; }
|
|
</style>
|
|
{% block extra_head %}{% endblock %}
|
|
</head>
|
|
<body>
|
|
<div class="pg-card">
|
|
{% if messages %}
|
|
<div class="pg-messages">
|
|
{% for message in messages %}
|
|
<div class="pg-alert pg-alert--{{ message.tags|default:'info' }}">{{ message }}</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% block pg_content %}{% endblock %}
|
|
|
|
<div class="pg-actions">
|
|
{% block pg_actions %}{% endblock %}
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|