From 52b01950baa229bb6d5acd9ece8b3816f777fff0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Valenta?= <tomas@imaniti.org>
Date: Fri, 24 May 2024 11:29:03 +0200
Subject: [PATCH] finish center page

---
 .../program/secondary_card_program.html       |  2 +-
 .../header/district/center_header.html        |  2 +-
 .../main_section/newsletter_section.html      |  2 +-
 .../main_section/newsletter_section.yaml      |  1 -
 .../small_newsletter_section.html             | 19 +++++++++++++++++++
 .../small_newsletter_section.yaml             |  3 +++
 .../templates/district/center/center.html     |  6 ++++++
 .../components/card_program/CardProgram.vue   |  6 +++---
 .../card_program/CardProgramItem.vue          |  4 ++--
 9 files changed, 36 insertions(+), 9 deletions(-)
 create mode 100644 majak_uistyleguide/templates/patterns/organisms/main_section/small_newsletter_section.html
 create mode 100644 majak_uistyleguide/templates/patterns/organisms/main_section/small_newsletter_section.yaml

diff --git a/majak_uistyleguide/templates/patterns/molecules/program/secondary_card_program.html b/majak_uistyleguide/templates/patterns/molecules/program/secondary_card_program.html
index 9e526a3..5fbfe5d 100644
--- a/majak_uistyleguide/templates/patterns/molecules/program/secondary_card_program.html
+++ b/majak_uistyleguide/templates/patterns/molecules/program/secondary_card_program.html
@@ -1,4 +1,4 @@
-<div class="bg-grey-180 py-24">
+<div class="bg-grey-180">
   <div
     class="__js-root container--wide"
     id="{{ id }}"
diff --git a/majak_uistyleguide/templates/patterns/organisms/header/district/center_header.html b/majak_uistyleguide/templates/patterns/organisms/header/district/center_header.html
index af42a8c..7a7b062 100644
--- a/majak_uistyleguide/templates/patterns/organisms/header/district/center_header.html
+++ b/majak_uistyleguide/templates/patterns/organisms/header/district/center_header.html
@@ -15,7 +15,7 @@
 
   <div
     class="
-      opacity-0 absolute top-0 left-0
+      opacity-0 absolute top-0 left-0 overflow-hidden
 
       py-8
 
diff --git a/majak_uistyleguide/templates/patterns/organisms/main_section/newsletter_section.html b/majak_uistyleguide/templates/patterns/organisms/main_section/newsletter_section.html
index 53dad05..cbd123e 100644
--- a/majak_uistyleguide/templates/patterns/organisms/main_section/newsletter_section.html
+++ b/majak_uistyleguide/templates/patterns/organisms/main_section/newsletter_section.html
@@ -8,7 +8,7 @@
       {{ second_line }}
     </h2>
     <p class="xl:mt-[-1rem]">
-      Fake news tam nenajdeš, ale dozvíš se, co chystáme doopravdy!
+      {{ section_label }}
     </p>
 
     <div class="flex flex-col gap-2 mt-12 items-start">
diff --git a/majak_uistyleguide/templates/patterns/organisms/main_section/newsletter_section.yaml b/majak_uistyleguide/templates/patterns/organisms/main_section/newsletter_section.yaml
index 78f1590..31699e1 100644
--- a/majak_uistyleguide/templates/patterns/organisms/main_section/newsletter_section.yaml
+++ b/majak_uistyleguide/templates/patterns/organisms/main_section/newsletter_section.yaml
@@ -2,4 +2,3 @@ context:
   first_line: 'Odebírej náš'
   second_line: 'newsletter'
   section_label: 'Fake news tam nenajdeš, ale dozvíš se, co chystáme doopravdy!'
-  section_text: 'Odebírej náš newsletter'
diff --git a/majak_uistyleguide/templates/patterns/organisms/main_section/small_newsletter_section.html b/majak_uistyleguide/templates/patterns/organisms/main_section/small_newsletter_section.html
new file mode 100644
index 0000000..00b88fd
--- /dev/null
+++ b/majak_uistyleguide/templates/patterns/organisms/main_section/small_newsletter_section.html
@@ -0,0 +1,19 @@
+<div
+  class="newsletter-section"
+  style="background-image:url('../../../../../static/images/background-images/bg-newsletter.webp')"
+>
+  <div class="container--medium py-16">
+    <h2 class="head-9xl">
+      {{ header }}
+    </h2>
+    <p class="xl:mt-[-1rem]">
+      {{ section_label }}
+    </p>
+
+    <div class="flex flex-col gap-2 mt-4 items-start">
+      {% include 'patterns/atoms/form_fields/form_input_backgroundless.html' with placeholder='Tvůj email' classes='mb-3 w-full md:w-96' %}
+      {% include 'patterns/atoms/form_fields/form_checkbox.html' with label='Souhlasím se zpracováním osobních údajů' classes='mb-3' %}
+      {% include 'patterns/atoms/buttons/round_button.html' with button_text='Odebírat' %}
+    </div>
+  </div>
+</div>
diff --git a/majak_uistyleguide/templates/patterns/organisms/main_section/small_newsletter_section.yaml b/majak_uistyleguide/templates/patterns/organisms/main_section/small_newsletter_section.yaml
new file mode 100644
index 0000000..2ad519e
--- /dev/null
+++ b/majak_uistyleguide/templates/patterns/organisms/main_section/small_newsletter_section.yaml
@@ -0,0 +1,3 @@
+context:
+  header: 'Odebírej newsletter centra'
+  section_label: 'Lorem ipsum dolor sit amet.'
diff --git a/majak_uistyleguide/templates/patterns/templates/district/center/center.html b/majak_uistyleguide/templates/patterns/templates/district/center/center.html
index 5a88328..b3d309c 100644
--- a/majak_uistyleguide/templates/patterns/templates/district/center/center.html
+++ b/majak_uistyleguide/templates/patterns/templates/district/center/center.html
@@ -3,6 +3,12 @@
 
 <main role="main">
   {% include "patterns/molecules/program/secondary_card_program.html" %}
+
+  <div class="container--wide my-6 lg:my-12">
+    asdf
+  </div>
+
+  {% include 'patterns/organisms/main_section/small_newsletter_section.html' %}
 </main>
 
 {% include 'patterns/organisms/layout/footer.html' %}
diff --git a/src/js/components/card_program/CardProgram.vue b/src/js/components/card_program/CardProgram.vue
index ab443ee..def9fd5 100644
--- a/src/js/components/card_program/CardProgram.vue
+++ b/src/js/components/card_program/CardProgram.vue
@@ -6,10 +6,10 @@
   <div
     :class="
       (
-        (backgroundClass) ?
+        (backgroundClass !== null) ?
         backgroundClass :
         'bg-pirati-yellow'
-      ) + 'py-16'
+      ) + ' py-16'
     "
   >
     <div class="container--wide">
@@ -31,7 +31,7 @@
           :title="point.title"
           :renderedContent="point.renderedContent"
           :points="point.points"
-          :openPointBackgroundClass="openPointBackgroundClass"
+          :openPointBackgroundClass="point.openPointBackgroundClass"
         />
       </ul>
     </div>
diff --git a/src/js/components/card_program/CardProgramItem.vue b/src/js/components/card_program/CardProgramItem.vue
index 9917209..21c0d3b 100644
--- a/src/js/components/card_program/CardProgramItem.vue
+++ b/src/js/components/card_program/CardProgramItem.vue
@@ -46,8 +46,8 @@
           'w-0 [&_*]:!text-[0rem] [&_*]:!p-0 [&_*]:!gap-0 [&_*]:!leading-[0px] [&_*]:!delay-0 [&_*]:!duration-0 !h-0'
             :
           'p-6 xl:p-12'
-        ) + (
-          (openPointBackgroundClass) ?
+        ) + ' ' + (
+          (openPointBackgroundClass !== null) ?
           openPointBackgroundClass :
           'bg-white'
         )
-- 
GitLab