From a98d18bc92d7d28d54c0cc1c1a636c9d79e6a648 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 11 May 2023 15:47:16 +0200 Subject: [PATCH] layout stuff --- requirements/requirements.txt | 4 +- src/catalogue/models/tag.py | 5 +- .../templates/catalogue/2022/author_box.html | 24 +- .../catalogue/2022/author_detail.html | 2 +- .../catalogue/2022/fragment_box.html | 6 +- src/catalogue/views.py | 15 +- ...43_monthlyamount_wide_singleamount_wide.py | 34 +++ src/club/models.py | 29 +++ .../club/2022/donation_step1_form.html | 17 +- src/search/views.py | 16 +- src/wolnelektury/settings/apps.py | 1 - src/wolnelektury/settings/contrib.py | 1 + .../static/2022/images/payments-2.png | Bin 0 -> 4299 bytes .../static/2022/images/payments-padlock.png | Bin 0 -> 705 bytes src/wolnelektury/static/2022/more.scss | 17 +- .../static/2022/styles/layout/_article.scss | 21 +- .../static/2022/styles/layout/_checkout.scss | 205 +++++++++++++----- .../2022/styles/layout/_navigation.scss | 18 +- .../static/2022/styles/local.scss | 21 +- src/wolnelektury/templates/2022/base.html | 19 +- .../templates/2022/main_page.html | 4 +- .../templates/forms/includes/built_form.html | 5 + 22 files changed, 312 insertions(+), 152 deletions(-) create mode 100644 src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py create mode 100644 src/wolnelektury/static/2022/images/payments-2.png create mode 100644 src/wolnelektury/static/2022/images/payments-padlock.png diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 0e16c969e..3fb38a59c 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -19,7 +19,7 @@ django-admin-ordering==0.16 django-countries==7.3.2 # A version compatible with Django 2.2+, with long help text and editable max_length. --e git+https://github.com/rczajka/django-forms-builder@6bdb2345cfc02ebf7e0fb049e43e4e0a38b52940#egg=django-forms-builder +-e git+https://github.com/rczajka/django-forms-builder@30beb889cbf297be35963c15501c764a0689b539#egg=django-forms-builder oauthlib>=3.0.1,<3.1 @@ -40,7 +40,7 @@ mutagen==1.45.1 sorl-thumbnail==12.8.0 # home-brewed & dependencies -librarian==2.4.10 +librarian==2.4.12 # celery tasks celery[redis]==5.2.7 diff --git a/src/catalogue/models/tag.py b/src/catalogue/models/tag.py index 2ade345a5..1051741bd 100644 --- a/src/catalogue/models/tag.py +++ b/src/catalogue/models/tag.py @@ -159,7 +159,10 @@ class Tag(models.Model): def get_absolute_catalogue_url(self): # TODO: remove magic. - return reverse(f'{self.category}_catalogue') + if self.category == 'set': + return reverse('social_my_shelf') + else: + return reverse(f'{self.category}_catalogue') def has_description(self): return len(self.description) > 0 diff --git a/src/catalogue/templates/catalogue/2022/author_box.html b/src/catalogue/templates/catalogue/2022/author_box.html index 499a2a030..35a3ea05b 100644 --- a/src/catalogue/templates/catalogue/2022/author_box.html +++ b/src/catalogue/templates/catalogue/2022/author_box.html @@ -1,20 +1,32 @@
-

O autorze

+

+ {% if tag.category == 'author' %}O autorze + {% elif tag.category == 'kind' %}O rodzaju + {% elif tag.category == 'genre' %}O gatunku + {% elif tag.category == 'epoch' %}O epoce + {% elif tag.category == 'set' %}Półka + {% endif %} +

- {% if author.photo %} + {% if tag.photo %}
- {{ author.name }} + {{ tag.name }}
- {{ author.photo_attribution|safe }} + {{ tag.photo_attribution|safe }}
{% endif %}
-

{{ author.name }}

+ {% if tag.category == 'set' %} + {% load chunks %} + {% chunk 'polka-how-to' %} + {% else %} +

{{ tag.name }}

- {{ author.description|safe }} + {{ tag.description|safe }}
+ {% endif %}
diff --git a/src/catalogue/templates/catalogue/2022/author_detail.html b/src/catalogue/templates/catalogue/2022/author_detail.html index 716a4b5d5..dc673b26a 100644 --- a/src/catalogue/templates/catalogue/2022/author_detail.html +++ b/src/catalogue/templates/catalogue/2022/author_detail.html @@ -84,7 +84,7 @@ {% if tags %}
- {% with author=tags.0 %} + {% with tag=tags.0 %} {% include 'catalogue/2022/author_box.html' %} {% endwith %} {% choose_cites 3 author=tags.0 as cites %} diff --git a/src/catalogue/templates/catalogue/2022/fragment_box.html b/src/catalogue/templates/catalogue/2022/fragment_box.html index f98d0b5ac..2522ce66e 100644 --- a/src/catalogue/templates/catalogue/2022/fragment_box.html +++ b/src/catalogue/templates/catalogue/2022/fragment_box.html @@ -1,6 +1,10 @@ - {{ fragment.short_text|safe }} + {% if fragment.short_text %} + {{ fragment.short_text|safe }} + {% else %} + {{ fragment.text|safe }} + {% endif %}

{{ fragment.book.pretty_title }}

diff --git a/src/catalogue/views.py b/src/catalogue/views.py index de614ea75..16b66f0fb 100644 --- a/src/catalogue/views.py +++ b/src/catalogue/views.py @@ -109,6 +109,13 @@ def object_list(request, objects, fragments=None, related_tags=None, tags=None, Tag.objects.usage_for_queryset( objects, counts=True ).exclude(category='set').exclude(pk__in=tag_ids)) + related_tag_lists.append( + Tag.objects.usage_for_queryset( + objects, counts=True + ).filter( + user=request.user + ).exclude(name='').exclude(pk__in=tag_ids) + ) if not (extra and extra.get('theme_is_set')): if fragments is None: if list_type == 'gallery': @@ -126,8 +133,7 @@ def object_list(request, objects, fragments=None, related_tags=None, tags=None, categories = split_tags(*related_tag_lists) suggest = [] - for c in ['author', 'epoch', 'kind', 'genre']: - #if len(categories.get(c, [])) > 1: + for c in ['set', 'author', 'epoch', 'kind', 'genre']: suggest.extend(sorted(categories[c], key=lambda t: -t.count)[:3]) objects = list(objects) @@ -155,14 +161,11 @@ def object_list(request, objects, fragments=None, related_tags=None, tags=None, if extra: result.update(extra) - is_set = any((x.category == 'set' for x in tags)) is_theme = len(tags) == 1 and tags[0].category == 'theme' has_theme = any((x.category == 'theme' for x in tags)) new_layout = request.EXPERIMENTS['layout'] - if is_set and new_layout.value: - template = 'social/2022/set_detail.html' - elif is_theme and new_layout.value: + if is_theme and new_layout.value: template = 'catalogue/2022/theme_detail.html' elif new_layout.value and not has_theme: template = 'catalogue/2022/author_detail.html' diff --git a/src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py b/src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py new file mode 100644 index 000000000..0c696b280 --- /dev/null +++ b/src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py @@ -0,0 +1,34 @@ +# Generated by Django 4.0.8 on 2023-05-08 12:46 + +from django.db import migrations, models + + +def last_amount_wide(apps, schema_editor): + SingleAmount = apps.get_model('club', 'SingleAmount') + a = SingleAmount.objects.last() + a.wide = True + a.save() + + +class Migration(migrations.Migration): + + dependencies = [ + ('club', '0042_auto_20220826_1458'), + ] + + operations = [ + migrations.AddField( + model_name='monthlyamount', + name='wide', + field=models.BooleanField(default=False), + ), + migrations.AddField( + model_name='singleamount', + name='wide', + field=models.BooleanField(default=False), + ), + migrations.RunPython( + last_amount_wide, + migrations.RunPython.noop + ) + ] diff --git a/src/club/models.py b/src/club/models.py index 5912b8b6f..8338b554b 100644 --- a/src/club/models.py +++ b/src/club/models.py @@ -37,11 +37,39 @@ class Club(models.Model): def __str__(self): return 'Klub' + def get_amounts(self): + c = {} + single = list(self.singleamount_set.all()) + monthly = list(self.monthlyamount_set.all()) + for tag, amounts in ('single', single), ('monthly', monthly): + wide_spot = narrow_spot = 0 + for i, p in enumerate(amounts): + if p.description or p.wide: + if not p.description: + p.narrow_wide = True + if narrow_spot == 1: + amounts[i-1].narrow_wide = True + narrow_spot = 0 + if p.wide: + if wide_spot == 2: + p.wide_not_wide = True + wide_spot += 1 + else: + wide_spot += 2 + else: + wide_spot += 1 + wide_spot %= 3 + c[tag] = amounts + c[f'{tag}_wide_spot'] = wide_spot + return c + + class SingleAmount(models.Model): club = models.ForeignKey(Club, models.CASCADE) amount = models.IntegerField() description = models.TextField(blank=True) + wide = models.BooleanField(default=False) class Meta: ordering = ['amount'] @@ -50,6 +78,7 @@ class MonthlyAmount(models.Model): club = models.ForeignKey(Club, models.CASCADE) amount = models.IntegerField() description = models.TextField(blank=True) + wide = models.BooleanField(default=False) class Meta: ordering = ['amount'] diff --git a/src/club/templates/club/2022/donation_step1_form.html b/src/club/templates/club/2022/donation_step1_form.html index bd4582645..2f9886959 100644 --- a/src/club/templates/club/2022/donation_step1_form.html +++ b/src/club/templates/club/2022/donation_step1_form.html @@ -17,9 +17,10 @@
+ {% with amounts=club.get_amounts %}
- {% for amount in club.singleamount_set.all %} -
+ {% for amount in amounts.single %} +

{{ amount.amount }} zł

@@ -41,8 +42,8 @@
- {% for amount in club.monthlyamount_set.all %} -
+ {% for amount in amounts.monthly %} +

{{ amount.amount }} zł /mies.

{{ amount.description|safe }}

@@ -63,9 +64,15 @@
+ {% endwith %} -Bezpieczne płatności zapewniają +
+ +Bezpieczne płatności zapewniają: + +
+
diff --git a/src/search/views.py b/src/search/views.py index e5eb3a274..5acbffa85 100644 --- a/src/search/views.py +++ b/src/search/views.py @@ -90,14 +90,14 @@ def hint(request, mozhint=False, param='term'): translator = b.translator() if translator: author_str += ' (tłum. ' + translator + ')' - data.append( - { - 'label': b.title, - 'author': author_str, - 'id': b.id, - 'url': b.get_absolute_url() - } - ) + data.append( + { + 'label': b.title, + 'author': author_str, + 'id': b.id, + 'url': b.get_absolute_url() + } + ) if mozhint: data = [ diff --git a/src/wolnelektury/settings/apps.py b/src/wolnelektury/settings/apps.py index 7410808cd..fe42e04c1 100644 --- a/src/wolnelektury/settings/apps.py +++ b/src/wolnelektury/settings/apps.py @@ -55,7 +55,6 @@ INSTALLED_APPS_CONTRIB = [ 'django.contrib.admin', 'django.contrib.admindocs', 'django.contrib.staticfiles', - 'admin_auto_filters', 'admin_ordering', 'rest_framework', 'fnp_django_pagination', diff --git a/src/wolnelektury/settings/contrib.py b/src/wolnelektury/settings/contrib.py index bf0cbcf76..f2247facd 100644 --- a/src/wolnelektury/settings/contrib.py +++ b/src/wolnelektury/settings/contrib.py @@ -52,3 +52,4 @@ FORMS_BUILDER_EXTRA_FIELDS = [ ] FORMS_BUILDER_HELPTEXT_MAX_LENGTH = 2048 FORMS_BUILDER_REQUIRED_CSS_CLASS = 'required' +FORMS_BUILDER_INACTIVE_VISIBLE = True diff --git a/src/wolnelektury/static/2022/images/payments-2.png b/src/wolnelektury/static/2022/images/payments-2.png new file mode 100644 index 0000000000000000000000000000000000000000..346076122b82bb818684b5b455e53747078a995f GIT binary patch literal 4299 zcmV;+5H#EX>4Tx04R}tkv&MmKp2MKww8*vIM_kNAwzZ1f~bh2R-p(LLaorMgUO|T(4-+r zad8w}3l9D)RvlcNb#-tR1i>E=R~IKm7b)?(q|hS9gS&fp?|WbFz61P?3RBIlaX{59 zBb`hL+1#oSdPNYuh|oGJF;kxt#S}cp*FAiEzl-xM@47!nM9G^B@Cn4TOgAjz4dUrd zOXs{#9Aza*AwDM_Gw6cEk6f2se&bwp*v~VgMkYN^93>Wt9V~Y+D;X;B6md*ZHOlvA zT~;`6aaJoe*19KuVK}d?EOVXa5RzEL5=01)Q9~IOScucEkzyiE=Lrx0pyLPFL=9Bb# zTZIOJC z1V)OKz3%bu?#{mbThr>_4>9#}jr=H^y{D4^000SaNLh0L z01FcU01FcV0GgZ_00007bV*G`2j>L~4F@+TP$_T#000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}000i6NklgH!@iz4;X%LSSJ8Qcs zOk;tj>pzXs00sJDZWi(SCyB^iuYsUwB|o+(LK4`AzL|a~0@MqPRL7FNL1F5x`;d~d z?DYnH(C8)db~n)&$i{zJcwBo!ksRLBhZ&MHBqb6tAyuEPA7}i2j8V8AZ+X7>0Mo!*2+xE~g zBLO0x7m+z!d1DsGCa;2^*6AUxq?*qr3>8r^25`(Al1jC;bHbQ_q@%tL z&EnluZXE!s_6pF!mu-Z%Re;Apc=1zIUj9P2U0+o~xLW$L)_0G(>p(gQB4d@?CKzT_ za@P7FYi)pZ9qr<^O^J|j+=WWgg2PDwkP?gisDB`J*8*_1WDILcM5IAT`j(hpx;Q*L z@cp~RmX(+Gfad+C6q1ID5+?#wuWrW;4U7UHwGOK|-mzoHj07ak0qifU0_ZzP9XJ!{ z0iepDgMpVmYy1`u%McICkXxhO9@P-3rU9h-%ll~G8h7I$#KVGgO;7K)idp-Q2Bep6 zgySSBO&~SkRR|_2biSW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htRDu;@2U{J8BXCn{1@C^{qv_uDwC{Np?tzzc9ylMa z2S`7Uru4J2@4TV>7Z}4#_}5cMD*v=Gyw9~KEqfmezyN@lcm2bb`};hvY618;fEDlh t>)!Pd@7WJM0Pps|ZvwctG1O0Q{|_NuxaF3eTPXkl002ovPDHLkV1lx=A#MNw literal 0 HcmV?d00001 diff --git a/src/wolnelektury/static/2022/images/payments-padlock.png b/src/wolnelektury/static/2022/images/payments-padlock.png new file mode 100644 index 0000000000000000000000000000000000000000..094335dd19f1e5f195c04accf435bd762d02a5ff GIT binary patch literal 705 zcmV;y0zUnTP)EX>4Tx04R}tkv&MmKp2MKww8*vIM_kNAwzZ1f~bh2R-p(LLaorMgUO|T(4-+r zad8w}3l9D)RvlcNb#-tR1i>E=R~IKm7b)?(q|hS9gS&fp?|WbFz61P?3RBIlaX{59 zBb`hL+1#oSdPNYuh|oGJF;kxt#S}cp*FAiEzl-xM@47!nM9G^B@Cn4TOgAjz4dUrd zOXs{#9Aza*AwDM_Gw6cEk6f2se&bwp*v~VgMkYN^93>Wt9V~Y+D;X;B6md*ZHOlvA zT~;`6aaJoe*19KuVK}d?EOVXa5RzEL5=01)Q9~IOScucEkzyiE=Lrx0pyLPFL=9Bb# zTZIOJC z1V)OKz3%bu?#{mbThr>_4>9#}jr=H^y{D4^000SaNLh0L z01FcU01FcV0GgZ_00007bV*G`2j>L~4G0qJ%;ER|000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}0001(Nkl(ZEbfpaePqJFo*O!4B@I zK&?ROfD)i1E8t8XGYrv--RNfLyA>&B)=Dy<21;O(^f9vm;E<3@dIJ@3O1~9wZJI{& zJWn#SE+GJqh*!EhNe_UCxEv+j03_YbY()T1cRvFz$qJwaSe9jAm(6-ztYzQ#-#y%P nWkF`-?vVqt7yk~98E*Um1C%aCW%^xE00000NkvXXu0mjfc)TF6 literal 0 HcmV?d00001 diff --git a/src/wolnelektury/static/2022/more.scss b/src/wolnelektury/static/2022/more.scss index 7bdd83315..7505aab5b 100644 --- a/src/wolnelektury/static/2022/more.scss +++ b/src/wolnelektury/static/2022/more.scss @@ -5,15 +5,6 @@ body.is-open { overflow-y: hidden; } -.l-change-pop { - margin-top: 18px; -} -.is-open .l-change-pop { - height: auto; - margin-top: 18px; - padding: 10px 50px; -} - .l-navigation__logo { height: 44px; } @@ -51,7 +42,7 @@ body.is-open { .l-books__item { @include rwd($break-wide) { - width: 214.5px; + width: 214.4px; margin-left: 17px; margin-right: 0; &:first-of-type { @@ -284,12 +275,6 @@ form { overflow: hidden; } - -.l-change-pop { - margin-bottom: 18px; -} - - .poll-bar { height: 10px; width: 100%; diff --git a/src/wolnelektury/static/2022/styles/layout/_article.scss b/src/wolnelektury/static/2022/styles/layout/_article.scss index 9930b5917..8655babc0 100644 --- a/src/wolnelektury/static/2022/styles/layout/_article.scss +++ b/src/wolnelektury/static/2022/styles/layout/_article.scss @@ -64,19 +64,18 @@ } .l-article__cols { - display: flex; - - .left-column { - padding-right: 27px; - } - - .right-column { - padding-left: 27px; - } + @include rwd($break-flow) { + display: flex; + gap: 22px; + } .left-column, .right-column { - width: 50%; + padding: 0 16px; + + @include rwd($break-flow) { + width: 50%; + } p { margin-top: 0; @@ -162,6 +161,8 @@ margin-bottom: 38px; padding-bottom: 20px; border-bottom: 1px solid #D9D9D9; + margin-left: 16px; + margin-right: 16px; * { margin-top: 0; font-weight: $regular; diff --git a/src/wolnelektury/static/2022/styles/layout/_checkout.scss b/src/wolnelektury/static/2022/styles/layout/_checkout.scss index 26203f5d7..b4423dda4 100644 --- a/src/wolnelektury/static/2022/styles/layout/_checkout.scss +++ b/src/wolnelektury/static/2022/styles/layout/_checkout.scss @@ -1,6 +1,9 @@ //Support bar .l-checkout__support { - margin-bottom: 22px; + margin-bottom: 22px; + + margin-left: 16px; + margin-right: 16px; } .l-checkout__support__bar { @@ -49,11 +52,19 @@ border-radius: 10px; padding-bottom: 30px; overflow: hidden; + margin: 0 16px; } .l-checkout__box__header { display: flex; background: #083F4D; + + img { + display: none; + @include rwd($break-flow) { + display: block; + } + } } .l-checkout__box__header__content h1 { @@ -92,9 +103,13 @@ //Steps .l-checkout__steps { display: flex; - padding: 0 125px; - justify-content: space-between; margin-top: -24px; + justify-content: space-around; + + @include rwd($break-flow) { + padding: 0 125px; + justify-content: space-between; + } div { width: 145px; @@ -126,6 +141,10 @@ text-align: center; letter-spacing: -0.01em; color: #083F4D; + display: none; + @include rwd($break-flow) { + display: block; + } } &.is-completed { @@ -232,39 +251,40 @@ //Payments .l-checkout__payments { display: none; - padding: 0 30px; + padding: 0 16px; margin-top: 34px; margin-bottom: 0; flex-wrap: wrap; justify-content: flex-start; - flex-direction: column; + flex-direction: row; + column-gap: 16px; @include rwd($break-flow) { - flex-direction: row; + //flex-direction: row; + padding: 0 30px; + column-gap: 30px; } } .l-checkout__payments__box { display: flex; flex-direction: column; - width: calc(33.333% - 20px); background: #FFFFFF; border-radius: 10px; overflow: hidden; transition: box-shadow $ease-out 250ms; box-shadow: 0px 0px 0px rgba(55, 170, 156, 0); margin-bottom: 30px; - margin-right: 30px; + width: calc(50% - 8px); - &:nth-child(3) { - margin-right: 0; + &.narrow-wide { + flex-direction: row; + width: 100%; } - - &:nth-child(5) { - margin-right: 0; - width: calc(67.4% - 20px); + + @include rwd($break-flow) { + width: calc(33.333% - 20px); } - h3 { margin: 0; font-weight: bold; @@ -289,9 +309,12 @@ } } .l-checkout__payments__box__btn-wrp { - padding: 20px; + padding: 0 20px 20px 20px; margin-bottom: 0; margin-top: auto; + @include rwd($break-flow) { + padding-top: 20px; + } } p { margin-top: 0; @@ -313,8 +336,8 @@ outline: 0; cursor: pointer; font-weight: 600; - font-size: 20px; - line-height: 25px; + font-size: 16px; + line-height: 24px; display: flex; align-items: center; justify-content: center; @@ -322,14 +345,25 @@ color: #083F4D; transition: background $ease-out 250ms; + @include rwd($break-flow) { + font-size: 20px; + line-height: 25px; + } + &:hover { background: rgba(#92BD39, 0.75); } } &.is-active { - box-shadow: 0px 0px 20px rgba(55, 170, 156, 0.35); + box-shadow: 0px 0px 20px rgba(55, 170, 156, 0.35); + background: #083F4D; + color: white; + @include rwd($break-flow) { + background: white; + color: black; + } h3 { color: white; background: #083F4D; @@ -344,23 +378,28 @@ } &.l-checkout__payments__box--xl { - flex-direction: row; - & > div { - display: flex; - &:first-child { - width: 50%; - flex-wrap: wrap; - max-width: 340px; - margin-right: 20px; + width: 100%; + @include rwd($break-flow) { + width: calc(67.4% - 20px); + width: calc(67.4% - 20px); + flex-direction: row; + & > div { + display: flex; + &:first-child { + width: 50%; + flex-wrap: wrap; + max-width: 340px; + margin-right: 20px; + } + + &:last-child { + width: 49%; + align-items: center; + justify-content: center; + } + } } - &:last-child { - width: 49%; - align-items: center; - justify-content: center; - } - } - h3 { width: 100%; } @@ -369,6 +408,14 @@ width: 100%; } + &.once { + h3 { + text-indent: 0; + padding-left: 0; + } + } + } + &.l-checkout__payments__box--special { button { border-color: #FFA500; background-color: #FFA500; @@ -376,23 +423,23 @@ background: darken(#FFA500, 5%); } } - - &.once { - h3 { - text-indent: 0; - padding-left: 0; - } - } } } //Amount .l-checkout__amount { display: flex; - align-items: flex-end; - justify-content: flex-end; - padding-right: 30px; + flex-direction: column; + padding: 0 16px; + row-gap: 16px; + @include rwd($break-flow) { + flex-direction: row; + align-items: flex-end; + justify-content: flex-end; + padding-right: 30px; + } + button { border: none; height: 56px; @@ -405,13 +452,19 @@ align-items: center; justify-content: center; text-align: center; - margin-left: 32px; color: #FFFFFF; - width: 340px; + + @include rwd($break-flow) { + margin-left: 32px; + width: 340px; + } + } .l-checkout__input { - width: 340px; + @include rwd($break-flow) { + width: 340px; + } } } @@ -462,9 +515,15 @@ //Cols .l-checkout__cols { display: flex; - padding: 0 30px; + flex-direction: column; margin-top: 50px; + padding: 0 16px; + @include rwd($break-flow) { + padding: 0 30px; + flex-direction: row; + } + &.bt-w { margin-top: 30px; padding-top: 20px; @@ -473,6 +532,7 @@ } .l-checkout__col { + @include rwd($break-flow) { &:nth-child(1) { width: 402px; padding-right: 62px; @@ -500,15 +560,28 @@ } } } + } } -.l-checkout__footer__img { - display: flex; - margin-right: 30px; - margin-left: auto; - margin-top: 30px; +.l-checkout__secure { + margin-top: 30px; + margin-right: 30px; + text-align: right; + font-size: 15px; + color: #888; + + .l-checkout__secure__padlock { + margin-right: 5px; + vertical-align: baseline; + } + + .l-checkout__secure__img { + margin-left: 10px; + vertical-align: bottom; + } } + //Form .l-checkout__form { display: flex; @@ -709,6 +782,8 @@ flex-wrap: wrap; margin-top: 12px; margin-bottom: 52px; + margin-left: 16px; + margin-right: 16px; } .l-checkout__footer > img { @@ -723,7 +798,12 @@ .l-checkout__footer__content__item { display: flex; + flex-direction: column; + @include rwd($break-flow) { + flex-direction: row; + } + &:not(:last-child) { padding-bottom: 30px; margin-bottom: 30px; @@ -732,17 +812,21 @@ } .l-checkout__footer__content h3 { + @include rwd($break-flow) { font-weight: 600; font-size: 21.5px; line-height: 140%; letter-spacing: -0.01em; color: #083F4D; width: 318px; + } } .l-checkout__footer__content__item > div { + @include rwd($break-flow) { width: 100%; padding-left: 120px; + } } .l-checkout__footer__content__item > div p { @@ -831,3 +915,18 @@ } } } + + +.payments-recurring { + .l-checkout__payments__box { + width: 100%; + &.is-active { + background: white; + color: black; + } + @include rwd($break-flow) { + width: calc(33.333% - 20px); + //margin-right: 30px; + } + } +} diff --git a/src/wolnelektury/static/2022/styles/layout/_navigation.scss b/src/wolnelektury/static/2022/styles/layout/_navigation.scss index e7f551ddd..04e4dff1f 100644 --- a/src/wolnelektury/static/2022/styles/layout/_navigation.scss +++ b/src/wolnelektury/static/2022/styles/layout/_navigation.scss @@ -148,12 +148,23 @@ body { max-width: 1140px; border-radius: 10px; padding: 10px 50px; - width: 100%; - margin-bottom: 10px; + width: auto; + + margin-top: 18px; + margin-bottom: 18px; background-color: #FBC40F; position: relative; display: none; + margin-left: 16px; + margin-right: 16px; + flex-direction: column; + column-gap: 48px; + + @include rwd($break-flow) { + flex-direction: row; + } + &.show { display: flex; } @@ -165,9 +176,8 @@ body { line-height: 100%; letter-spacing: -0.02em; color: #333333; - margin: 0; + margin: 20px 0; min-width: 189px; - margin-right: 48px; } p { diff --git a/src/wolnelektury/static/2022/styles/local.scss b/src/wolnelektury/static/2022/styles/local.scss index 548c0b14a..982350906 100644 --- a/src/wolnelektury/static/2022/styles/local.scss +++ b/src/wolnelektury/static/2022/styles/local.scss @@ -4,26 +4,6 @@ $green: #92BD39; $red: #FF4C54; -.l-change-pop { - transition: 350ms all; - - p { - a { - color: $teal; - } - } -} - - -.is-open .l-change-pop { - height: 0; - margin-top: 0; - margin-bottom: 0; - padding-top: 0; - padding-bottom: 0; -} - - .ui-autocomplete a { display: block; transition: none; @@ -207,6 +187,7 @@ $red: #FF4C54; padding: 5px 10px; margin-left: 5px; border-radius: 15px; + white-space: nowrap; a { color: currentColor; diff --git a/src/wolnelektury/templates/2022/base.html b/src/wolnelektury/templates/2022/base.html index 5c65e0362..ca76cd90a 100644 --- a/src/wolnelektury/templates/2022/base.html +++ b/src/wolnelektury/templates/2022/base.html @@ -33,18 +33,6 @@
{% endif %} -
-

Przekaż 1,5%

-

- Przekaż 1,5% podatku na Wolne Lektury KRS 00000 70056
- Ufunduj darmowe książki dla tysięcy dzieciaków.
- WIĘCEJ -

- -
- {% block global-content %}