From c2b1133715a07a3687c7506301763569f789bbde Mon Sep 17 00:00:00 2001
From: Quido Zientek <quido@codero.cz>
Date: Wed, 31 Aug 2022 11:56:05 +0200
Subject: [PATCH] [FIX] small fixes mainly patterns

---
 .../articles/article-carousel-item.mustache    |  8 +++++---
 .../articles/person-article-preview.mustache   |  8 +++++---
 .../how-we-work/work-article-preview.mustache  | 10 +++++++---
 main/templates/main/blocks/news_block.html     |  8 +++++---
 .../main/includes/person_article_preview.html  |  8 +++++---
 .../main/includes/work_article_preview.html    | 18 +++++++++++-------
 6 files changed, 38 insertions(+), 22 deletions(-)

diff --git a/main/styleguide/source/_patterns/molecules/articles/article-carousel-item.mustache b/main/styleguide/source/_patterns/molecules/articles/article-carousel-item.mustache
index ca9b195c..b6f8605e 100644
--- a/main/styleguide/source/_patterns/molecules/articles/article-carousel-item.mustache
+++ b/main/styleguide/source/_patterns/molecules/articles/article-carousel-item.mustache
@@ -6,9 +6,11 @@
     </a>
     <div class="flex flex-col justify-between items-start">
       <span class="text-green-500 mb-2">23.2.2022</span>
-      <a href="#" class="font-alt leading-5 text-base uppercase lg:text-base mb-2">
-        Komentář Lukáše Koláříka: Kriminalita ve virtuálním prostoru není imaginární,
-        ale skutečná. Jak nenaletět internetovým šmejdům?
+      <a href="#">
+        <h4 class="font-alt leading-5 text-base uppercase lg:text-base mb-2">
+          Komentář Lukáše Koláříka: Kriminalita ve virtuálním prostoru není imaginární,
+          ale skutečná. Jak nenaletět internetovým šmejdům?
+        </h4>
       </a>
       {{> atoms-button-animated(btn-text: "Zjistit více") }}
     </div>
diff --git a/main/styleguide/source/_patterns/molecules/articles/person-article-preview.mustache b/main/styleguide/source/_patterns/molecules/articles/person-article-preview.mustache
index 31436844..7b10b8bc 100644
--- a/main/styleguide/source/_patterns/molecules/articles/person-article-preview.mustache
+++ b/main/styleguide/source/_patterns/molecules/articles/person-article-preview.mustache
@@ -3,9 +3,11 @@
     <span class="mb-1 bg-green-500 mr-1 px-1">Duben 2022</span>
     <span class="mb-1 bg-violet-600 mr-1 px-1">#ENERGETIKA</span>
   </div>
-  <h4 class="head-3xl mb-4">
-    Ukončili jsme povinné přimíchávání biopaliv první generace do pohonných hmot
-  </h4>
+  <a href="#">
+    <h4 class="head-3xl mb-4">
+      Ukončili jsme povinné přimíchávání biopaliv první generace do pohonných hmot
+    </h4>
+  </a>
   <p class="mb-6">
     Povinné přimíchávání biopaliv do benzínu a nafty jsme chtěli zcela zrušit už
     v minulém volebním období. Tehdy jsme zabránili zvýšení podílu biosložky,
diff --git a/main/styleguide/source/_patterns/molecules/how-we-work/work-article-preview.mustache b/main/styleguide/source/_patterns/molecules/how-we-work/work-article-preview.mustache
index 4011e526..76bbdf35 100644
--- a/main/styleguide/source/_patterns/molecules/how-we-work/work-article-preview.mustache
+++ b/main/styleguide/source/_patterns/molecules/how-we-work/work-article-preview.mustache
@@ -1,7 +1,11 @@
 <div class="p-7 flex flex-col max-w-xl border border-grey-150 mb-8">
-  <img src="https://i.picsum.photos/id/689/576/281.jpg?hmac=yIwOFV185zFy4fwVE3lF1UDqLDAm_bpLr9LZprQ26eo" alt=""
-       class="mb-7">
-  <h2 class="head-2xl mb-4">Konec mezinárodní ostudy. Evropská komise uzavřela řízení o střetu zájmů</h2>
+  <a href="#">
+    <img src="https://i.picsum.photos/id/689/576/281.jpg?hmac=yIwOFV185zFy4fwVE3lF1UDqLDAm_bpLr9LZprQ26eo" alt=""
+         class="mb-7 w-full">
+  </a>
+  <a href="#">
+    <h2 class="head-2xl mb-4">Konec mezinárodní ostudy. Evropská komise uzavřela řízení o střetu zájmů</h2>
+  </a>
   <div class="flex font-bold mb-4 text-xs text-white uppercase">
     <span class="bg-green-500 mr-1 p-2">Duben 2022</span>
     <span class="bg-violet-600 mr-1 p-2">#ENERGETIKA</span>
diff --git a/main/templates/main/blocks/news_block.html b/main/templates/main/blocks/news_block.html
index 1ff8f751..128ad14f 100644
--- a/main/templates/main/blocks/news_block.html
+++ b/main/templates/main/blocks/news_block.html
@@ -9,11 +9,13 @@
       <div class="flex flex-wrap mb-5 lg:mb-10">
         {% image article_main.image original as article_img %}
         <a href="{{ article_main.url }}">
-        <img src="{{ article_img.url }}" draggable="false" alt="" class="lg:max-w-lg lg:mr-11 h-fit">
-          </a>
+          <img src="{{ article_img.url }}" draggable="false" alt="" class="lg:max-w-lg lg:mr-11 h-fit">
+        </a>
         <div class="flex flex-col max-w-xl items-start">
           <span class="text-green-500 head-3xl mt-10 mb-4 lg:mb-8">{{ article_main.date }}</span>
-          <a href="{{ article_main.url }}" class="head-4xl mb-5 lg:mb-10">{{ article_main.title }}</a>
+          <a href="{{ article_main.url }}">
+            <h4 class="head-4xl mb-5 lg:mb-10">{{ article_main.title }}</h4>
+          </a>
           <p class="leading-6 mb-4 lg:mb-8">{{ article_main.perex }}</p>
           {% include 'main/includes/button_animated.html' with btn_link=article_main.url btn_text="Číst dále" %}
         </div>
diff --git a/main/templates/main/includes/person_article_preview.html b/main/templates/main/includes/person_article_preview.html
index b209759f..0a3b272e 100644
--- a/main/templates/main/includes/person_article_preview.html
+++ b/main/templates/main/includes/person_article_preview.html
@@ -6,9 +6,11 @@
           <span class="bg-violet-600 mb-1 mr-1 px-1">{{ tag }}</span>
         {% endfor %}
       </div>
-      <h4 class="head-3xl mb-4">
-        {{ article_page.title }}
-      </h4>
+      <a href="{{ article_page.url }}">
+        <h4 class="head-3xl mb-4">
+          {{ article_page.title }}
+        </h4>
+      </a>
       <p class="mb-6">
         {{ article_page.perex }}
       </p>
diff --git a/main/templates/main/includes/work_article_preview.html b/main/templates/main/includes/work_article_preview.html
index 47c4a79e..84aa4959 100644
--- a/main/templates/main/includes/work_article_preview.html
+++ b/main/templates/main/includes/work_article_preview.html
@@ -2,13 +2,17 @@
 
 <div class="p-7 flex flex-col max-w-xl border border-grey-150 mb-8">
   {% image article_page.image max-500x500 as image %}
-  <img
-    src='{{ image.url }}' alt=""
-    class="mb-7"
-  >
-  <h2 class="head-2xl mb-4">
-    {{ article_page.title }}
-  </h2>
+  <a href="{{ article_page.url }}">
+    <img
+      src='{{ image.url }}' alt=""
+      class="mb-7 w-full"
+    >
+  </a>
+  <a href="{{ article_page.url }}">
+    <h2 class="head-2xl mb-4">
+      {{ article_page.title }}
+    </h2>
+  </a>
   <div class="flex font-bold mb-4 text-xs text-white uppercase">
     <span class="bg-green-500 mr-1 p-2">{{ article_page.date }}</span>
     {% for tag in article_page.tags.all %}
-- 
GitLab