fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9d76369
)
checkout styles
author
Radek Czajka
<rczajka@rczajka.pl>
Tue, 23 May 2023 10:32:14 +0000
(12:32 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Tue, 23 May 2023 10:32:14 +0000
(12:32 +0200)
src/club/models.py
patch
|
blob
|
history
src/club/templates/club/2022/donation_step1_form.html
patch
|
blob
|
history
src/club/templates/club/2022/donation_step2.html
patch
|
blob
|
history
src/club/templates/club/2022/donation_step3.html
patch
|
blob
|
history
src/wolnelektury/static/2022/styles/layout/_checkout.scss
patch
|
blob
|
history
diff --git
a/src/club/models.py
b/src/club/models.py
index
98b4ee0
..
6766694
100644
(file)
--- a/
src/club/models.py
+++ b/
src/club/models.py
@@
-69,6
+69,10
@@
class Club(models.Model):
c[f'{tag}_wide_spot'] = wide_spot
return c
c[f'{tag}_wide_spot'] = wide_spot
return c
+ def get_description_for_amount(self, amount, monthly):
+ amounts = self.monthlyamount_set if monthly else self.singleamount_set
+ amount = amounts.all().filter(amount__lte=amount).last()
+ return amount.description if amount is not None else ''
class SingleAmount(models.Model):
class SingleAmount(models.Model):
@@
-146,6
+150,10
@@
class Schedule(models.Model):
super(Schedule, self).save(*args, **kwargs)
self.update_contact()
super(Schedule, self).save(*args, **kwargs)
self.update_contact()
+ def get_description(self):
+ club = Club.objects.first()
+ return club.get_description_for_amount(self.amount, self.monthly)
+
def initiate_payment(self, request):
return self.get_payment_method().initiate(request, self)
def initiate_payment(self, request):
return self.get_payment_method().initiate(request, self)
diff --git
a/src/club/templates/club/2022/donation_step1_form.html
b/src/club/templates/club/2022/donation_step1_form.html
index
cfdd5d3
..
6b985ed
100644
(file)
--- a/
src/club/templates/club/2022/donation_step1_form.html
+++ b/
src/club/templates/club/2022/donation_step1_form.html
@@
-80,11
+80,11
@@
Bezpieczne płatności zapewniają:
<div class="l-checkout__info">
<div class="l-checkout__info__item">
<div>nazwa odbiorcy</div>
<div class="l-checkout__info">
<div class="l-checkout__info__item">
<div>nazwa odbiorcy</div>
- <h3>Fundacja
Nowoczesna Polska
</h3>
+ <h3>Fundacja
Wolne Lektury
</h3>
<button title="Kopiuj tekst" class="js-copy">
<img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
</button>
<button title="Kopiuj tekst" class="js-copy">
<img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
</button>
- <input type="text" value="Fundacja
Nowoczesna Polska
">
+ <input type="text" value="Fundacja
Wolne Lektury
">
</div>
<div class="l-checkout__info__item">
<div>adres odbiorcy</div>
</div>
<div class="l-checkout__info__item">
<div>adres odbiorcy</div>
diff --git
a/src/club/templates/club/2022/donation_step2.html
b/src/club/templates/club/2022/donation_step2.html
index
cd7a9f4
..
f115ece
100644
(file)
--- a/
src/club/templates/club/2022/donation_step2.html
+++ b/
src/club/templates/club/2022/donation_step2.html
@@
-18,6
+18,7
@@
{% endif %}
</h3>
<img src="{% static '2022/images/checkout-img-3.jpg' %}" alt="">
{% endif %}
</h3>
<img src="{% static '2022/images/checkout-img-3.jpg' %}" alt="">
+ <p>{{ schedule.get_description }}</p>
</div>
</div>
<div class="l-checkout__col">
</div>
</div>
<div class="l-checkout__col">
@@
-105,5
+106,9
@@
</form>
</div>
</div>
</form>
</div>
</div>
- <img src="{% static '2022/images/checkout-footer.png' %}" alt="Bezpieczne płatności zapewniają" class="l-checkout__footer__img">
+ <div class="l-checkout__secure">
+ <img src="{% static '2022/images/payments-padlock.png' %}" class="l-checkout__secure__padlock">
+ Bezpieczne płatności zapewniają:
+ <img src="{% static '2022/images/payments-2.png' %}" class="l-checkout__secure__img">
+ </div>
{% endblock %}
{% endblock %}
diff --git
a/src/club/templates/club/2022/donation_step3.html
b/src/club/templates/club/2022/donation_step3.html
index
4da3456
..
a368c65
100644
(file)
--- a/
src/club/templates/club/2022/donation_step3.html
+++ b/
src/club/templates/club/2022/donation_step3.html
@@
-34,11
+34,11
@@
<div class="l-checkout__info">
<div class="l-checkout__info__item">
<div>nazwa odbiorcy</div>
<div class="l-checkout__info">
<div class="l-checkout__info__item">
<div>nazwa odbiorcy</div>
- <h3>Fundacja
Nowoczesna Polska
</h3>
+ <h3>Fundacja
Wolne Lektury
</h3>
<button title="Kopiuj tekst" class="js-copy">
<img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
</button>
<button title="Kopiuj tekst" class="js-copy">
<img src="{% static '2022/images/copy.svg' %}" alt="Kopiuj">
</button>
- <input type="text" value="Fundacja
Nowoczesna Polska
">
+ <input type="text" value="Fundacja
Wolne Lektury
">
</div>
<div class="l-checkout__info__item">
<div>adres odbiorcy</div>
</div>
<div class="l-checkout__info__item">
<div>adres odbiorcy</div>
diff --git
a/src/wolnelektury/static/2022/styles/layout/_checkout.scss
b/src/wolnelektury/static/2022/styles/layout/_checkout.scss
index
779324a
..
89b97f1
100644
(file)
--- a/
src/wolnelektury/static/2022/styles/layout/_checkout.scss
+++ b/
src/wolnelektury/static/2022/styles/layout/_checkout.scss
@@
-188,11
+188,15
@@
.l-switch label {
color: #fff;
font-weight: 600;
.l-switch label {
color: #fff;
font-weight: 600;
- font-size:
21
.5px;
+ font-size:
18
.5px;
line-height: 26px;
transition: color .2s ease;
width: 122px;
cursor: pointer;
line-height: 26px;
transition: color .2s ease;
width: 122px;
cursor: pointer;
+
+ @include rwd($break-flow) {
+ font-size: 21.5px;
+ }
}
.l-switch label:nth-of-type(1) {
}
.l-switch label:nth-of-type(1) {
@@
-349,6
+353,12
@@
background: rgba(#92BD39, 0.75);
}
}
background: rgba(#92BD39, 0.75);
}
}
+ img {
+ display: none;
+ @include rwd($break-flow) {
+ display: block;
+ }
+ }
&.is-active {
box-shadow: 0px 0px 20px rgba(55, 170, 156, 0.35);
&.is-active {
box-shadow: 0px 0px 20px rgba(55, 170, 156, 0.35);
@@
-527,6
+537,7
@@
span { color: #FF4C54; }
}
input, select, textarea {
span { color: #FF4C54; }
}
input, select, textarea {
+ width: 100%;
height: 56px;
background: #FFFFFF;
border: 1px solid #D5ECED;
height: 56px;
background: #FFFFFF;
border: 1px solid #D5ECED;
@@
-541,19
+552,25
@@
}
button {
}
button {
- height:
56
px;
+ height:
40
px;
background: #083F4D;
background: #083F4D;
+ border: none;
border-radius: 3px;
font-weight: 600;
border-radius: 3px;
font-weight: 600;
- font-size:
20
px;
+ font-size:
16
px;
line-height: 25px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
line-height: 25px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
- margin-left: 32px;
color: #FFFFFF;
color: #FFFFFF;
- width: 340px;
+
+ @include rwd($break-flow) {
+ height: 56px;
+ font-size: 20px;
+ width: 340px;
+ margin-left: 32px;
+ }
}
}
}
}
@@
-586,7
+603,7
@@
}
}
&:nth-child(2) {
}
}
&:nth-child(2) {
- width: calc(100% -
340
px);
+ width: calc(100% -
402
px);
}
&.full {
width: 100%;
}
&.full {
width: 100%;
@@
-635,9
+652,15
@@
}
.l-checkout__form__row {
}
.l-checkout__form__row {
- display: flex;
+ display: flex;
+ flex-direction: column;
+ gap: 20px;
margin-bottom: 24px;
margin-bottom: 24px;
+ @include rwd($break-flow) {
+ flex-direction: row;
+ }
+
&:nth-child(4) {
.l-checkout__input {
&:nth-child(1) { width: 172px; }
&:nth-child(4) {
.l-checkout__input {
&:nth-child(1) { width: 172px; }
@@
-647,14
+670,8
@@
&.full {
flex-direction: column;
&.full {
flex-direction: column;
-
- .l-checkout__input {
- &:nth-child(1) {
- padding-right: 0;
- }
- &:nth-child(2) {
- padding-left: 0;
- }
+ @include rwd($break-flow) {
+ flex-direction: column;
}
}
}
}
@@
-673,12
+690,6
@@
.l-checkout__input {
width: 100%;
.l-checkout__input {
width: 100%;
- &:nth-child(1) {
- padding-right: 10px;
- }
- &:nth-child(2) {
- padding-left: 10px;
- }
}
& > a {
}
& > a {
@@
-694,13
+705,23
@@
}
&.confirm {
}
&.confirm {
- display: flex;
+ display: flex;
+ flex-direction: row;
align-items: center;
align-items: center;
- justify-content: s
pace-between
;
+ justify-content: s
tretch
;
width: 100%;
width: 100%;
+ gap: 50px;
+ @include rwd($break-flow) {
+ justify-content: space-between;
+ }
+
.l-checkout__input {
.l-checkout__input {
- width: auto;
+ flex-grow: 1;
+ @include rwd($break-flow) {
+ width: auto;
+ flex-grow: 0;
+ }
}
}
.errorlist {
}
}
.errorlist {