layout stuff
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 11 May 2023 13:47:16 +0000 (15:47 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 11 May 2023 13:47:24 +0000 (15:47 +0200)
22 files changed:
requirements/requirements.txt
src/catalogue/models/tag.py
src/catalogue/templates/catalogue/2022/author_box.html
src/catalogue/templates/catalogue/2022/author_detail.html
src/catalogue/templates/catalogue/2022/fragment_box.html
src/catalogue/views.py
src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py [new file with mode: 0644]
src/club/models.py
src/club/templates/club/2022/donation_step1_form.html
src/search/views.py
src/wolnelektury/settings/apps.py
src/wolnelektury/settings/contrib.py
src/wolnelektury/static/2022/images/payments-2.png [new file with mode: 0644]
src/wolnelektury/static/2022/images/payments-padlock.png [new file with mode: 0644]
src/wolnelektury/static/2022/more.scss
src/wolnelektury/static/2022/styles/layout/_article.scss
src/wolnelektury/static/2022/styles/layout/_checkout.scss
src/wolnelektury/static/2022/styles/layout/_navigation.scss
src/wolnelektury/static/2022/styles/local.scss
src/wolnelektury/templates/2022/base.html
src/wolnelektury/templates/2022/main_page.html
src/wolnelektury/templates/forms/includes/built_form.html

index 0e16c96..3fb38a5 100644 (file)
@@ -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
index 2ade345..1051741 100644 (file)
@@ -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
index 499a2a0..35a3ea0 100644 (file)
@@ -1,20 +1,32 @@
 <div class="row">
-  <h2>O autorze</h2>
+  <h2>
+    {% 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 %}
+  </h2>
   <div>
-    {% if author.photo %}
+    {% if tag.photo %}
       <figure class="l-author__photo">
-        <img src="{{ author.photo.url }}" alt="{{ author.name }}" style="width: 238px;">
+        <img src="{{ tag.photo.url }}" alt="{{ tag.name }}" style="width: 238px;">
         <figcaption>
-          {{ author.photo_attribution|safe }}
+          {{ tag.photo_attribution|safe }}
         </figcaption>
       </figure>
     {% endif %}
     <article class="l-author__info">
-      <h3><a href="{{ author.get_absolute_url }}">{{ author.name }}</a></h3>
+      {% if tag.category == 'set' %}
+        {% load chunks %}
+        {% chunk 'polka-how-to' %}
+      {% else %}
+      <h3><a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a></h3>
       <div class="l-article__overlay" data-max-height="327">
-        {{ author.description|safe }}
+        {{ tag.description|safe }}
       </div>
       <button class="l-article__read-more" aria-label="Kliknij aby rozwinąć" data-label="Czytaj więcej" data-action="Zwiń tekst">Czytaj więcej</button>
+      {% endif %}
     </article>
   </div>
 </div>
index 716a4b5..dc673b2 100644 (file)
@@ -84,7 +84,7 @@
   {% if tags %}
     <section class="l-section">
       <div class="l-author">
-        {% with author=tags.0 %}
+        {% with tag=tags.0 %}
           {% include 'catalogue/2022/author_box.html' %}
         {% endwith %}
         {% choose_cites 3 author=tags.0 as cites %}
index f98d0b5..2522ce6 100644 (file)
@@ -1,6 +1,10 @@
 <a class="l-author__quotes__slider__item" href="{{ fragment.get_absolute_url }}">
   <em>
-    {{ fragment.short_text|safe }}
+    {% if fragment.short_text %}
+      {{ fragment.short_text|safe }}
+    {% else %}
+      {{ fragment.text|safe }}
+    {% endif %}
   </em>
   <p>{{ fragment.book.pretty_title }}</p>
 </a>
index de614ea..16b66f0 100644 (file)
@@ -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 (file)
index 0000000..0c696b2
--- /dev/null
@@ -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
+        )
+    ]
index 5912b8b..8338b55 100644 (file)
@@ -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']
index bd45826..2f98869 100644 (file)
     </div>
   </div>
 
+  {% with amounts=club.get_amounts %}
   <div class="l-checkout__payments payments-once">
-    {% for amount in club.singleamount_set.all %}
-      <div class="l-checkout__payments__box once{% if not schedule.monthly and schedule.amount == amount.amount or not schedule and club.default_single_amount == amount.amount %} is-active{% endif %}{% if forloop.last %} l-checkout__payments__box--xl{% endif %}">
+    {% for amount in amounts.single %}
+      <div class="l-checkout__payments__box once{% if not schedule.monthly and schedule.amount == amount.amount or not schedule and club.default_single_amount == amount.amount %} is-active{% endif %}{% if amount.narrow_wide %} narrow-wide{% endif %}{% if amount.wide %} l-checkout__payments__box--special{% if not amount.wide_not_wide %} l-checkout__payments__box--xl{% endif %}{% endif %}">
         <div>
           <h3>{{ amount.amount }} zł</h3>
           <div class="l-checkout__payments__box__btn-wrp">
@@ -41,8 +42,8 @@
 
 
   <div class="l-checkout__payments payments-recurring">
-    {% for amount in club.monthlyamount_set.all %}
-      <div class="l-checkout__payments__box{% if schedule.monthly and schedule.amount == amount.amount or not schedule and amount.amount == club.default_monthly_amount %} is-active{% endif %}">
+    {% for amount in amounts.monthly %}
+      <div class="l-checkout__payments__box{% if schedule.monthly and schedule.amount == amount.amount or not schedule and amount.amount == club.default_monthly_amount %} is-active{% endif %}{% if amount.narrow_wide %} narrow-wide{% endif %}{% if amount.wide and not amount.wide_not_wide %} l-checkout__payments__box--xl{% endif %}">
         <h3>{{ amount.amount }} zł <span>/mies.</span></h3>
         <div class="l-checkout__payments__box__btn-wrp">
           <p>{{ amount.description|safe }}</p>
     </div>
     <button>Dalej</button>
   </div>
+  {% endwith %}
 </form>
 
-<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>
+
 <div class="l-checkout__cols bt-w">
   <div class="l-checkout__col full">
     <div class="l-checkout__form">
index e5eb3a2..5acbffa 100644 (file)
@@ -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 = [
index 7410808..fe42e04 100644 (file)
@@ -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',
index bf0cbcf..f2247fa 100644 (file)
@@ -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 (file)
index 0000000..3460761
Binary files /dev/null and b/src/wolnelektury/static/2022/images/payments-2.png differ
diff --git a/src/wolnelektury/static/2022/images/payments-padlock.png b/src/wolnelektury/static/2022/images/payments-padlock.png
new file mode 100644 (file)
index 0000000..094335d
Binary files /dev/null and b/src/wolnelektury/static/2022/images/payments-padlock.png differ
index 7bdd833..7505aab 100644 (file)
@@ -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%;
index 9930b59..8655bab 100644 (file)
 }
 
 .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;
   margin-bottom: 38px;
   padding-bottom: 20px;
   border-bottom: 1px solid #D9D9D9;
+  margin-left: 16px;
+  margin-right: 16px;
   * {
     margin-top: 0;
     font-weight: $regular;
index 26203f5..b4423dd 100644 (file)
@@ -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 {
   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 {
 //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;
       text-align: center;
       letter-spacing: -0.01em;
       color: #083F4D;
+      display: none;
+      @include rwd($break-flow) {
+          display: block;
+      }
     }
 
     &.is-completed {
 //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;
     }
   }
   .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;
     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;
     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;
   }
 
   &.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%;
     }
       width: 100%;
     }
 
+    &.once {
+      h3 {
+        text-indent: 0;
+        padding-left: 0;
+      }
+    }
+  }
+  &.l-checkout__payments__box--special {
     button {
       border-color: #FFA500;
       background-color: #FFA500;
         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;
     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;
+      }
   }
 }
 
 //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;
 }
 
 .l-checkout__col {
+  @include rwd($break-flow) {
   &:nth-child(1) {
     width: 402px;
     padding-right: 62px;
       }
     }
   }
+  }
 }
 
-.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;
   flex-wrap: wrap;
   margin-top: 12px;
   margin-bottom: 52px;
+  margin-left: 16px;
+  margin-right: 16px;
 }
 
 .l-checkout__footer > img {
 
 .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;
 }
 
 .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 {
         }
     }
 }
+
+
+.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;
+        }
+    }
+}
index e7f551d..04e4dff 100644 (file)
@@ -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 {
index 548c0b1..9823509 100644 (file)
@@ -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;
index 5c65e03..ca76cd9 100644 (file)
       </div>
     {% endif %}
 
-    <div class="l-container l-change-pop">
-      <h3>Przekaż 1,5%</h3>
-      <p>
-        Przekaż 1,5% podatku na Wolne Lektury KRS 00000 70056<br>
-        Ufunduj darmowe książki dla tysięcy dzieciaków.<br>
-        <a href="/info/wesprzyj-nas/">WIĘCEJ</a>
-      </p>
-      <!-- button class="l-change-pop__close">
-           <i class="icon icon-close"></i>
-           </button -->
-    </div>
-
     {% block global-content %}
       <div class="l-container">
         <div class="l-breadcrumb">
       </main>
     {% endblock %}
 
-    <div class="l-container l-change-pop">
+    <div class="l-main">
+    <div class="l-change-pop">
       <h3>Zmieniamy się!</h3>
       <p>
         Jeżeli to czytasz jesteś jedną z osób, której prezentujemy nowy wygląd części stron.
         Będziemy bardzo! wdzięczni za Twoją opinię – <a href='/formularz/ux-strona-ksiazki-T1/' target="_blank">możesz nam ją przesłać tutaj</a>.
         Jeżeli wolisz klasyczny wygląd - wystarczy, że <a class="quit-experiment" href="#">klikniesz tutaj</a>
       </p>
-      <!-- button class="l-change-pop__close">
-           <i class="icon icon-close"></i>
-           </button -->
+    </div>
     </div>
 
 
index ccd527c..5517123 100644 (file)
 
 
   <section class="l-section">
-    <div class="l-collections js-new-books-slider">
+    <div class="l-collections js-collections">
       <div class="l-collections__header">
         <h3><a href="/katalog/nowe/">Nowości</a></h3>
         <div class="l-your-books__header__actions">
           <button class="js-next-slide"><i class="icon icon-arrow-right"></i></button>
         </div>
       </div>
-      <div class="l-books">
+      <div class="l-books" style="display:block;">
         {% for book in last_published %}
           {% include 'catalogue/2022/book_box.html' %}
         {% endfor %}
index 85d1e62..cef827f 100644 (file)
@@ -1,5 +1,6 @@
 {% load honeypot %}
 {% load more %}
+{% load i18n %}
 
 
 <h1>{{ form.title }}</h1>
@@ -13,6 +14,7 @@
     {{ form.intro|first_part:"---"|safe }}
   </div>
 
+  {% if form_published %}
   {% if request.EXPERIMENTS.layout.value %}
     {{ form_for_form.as_p }}
     {% if form_for_form.fields %}
@@ -26,6 +28,9 @@
       {% endif %}
     </table>
   {% endif %}
+  {% else %}
+  <p class="l-change-pop show">FORMULARZ ZAMKNIĘTY</p>
+  {% endif %}
 
 
   <div class="form-info" style="margin-top:2em;">