From adbc924d3cf449ad5b47b3040bfdf427f97ea5d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Bedna=C5=99=C3=ADk?= <jan.bednarik@gmail.com>
Date: Wed, 17 Feb 2021 02:11:04 +0100
Subject: [PATCH] uniweb: Update styleguide

---
 uniweb/templates/uniweb/base.html              | 18 +++++++-----------
 .../templates/uniweb/blocks/advanced_text.html |  2 +-
 .../uniweb/blocks/advanced_text_columns.html   |  4 ++--
 .../uniweb/blocks/advanced_title.html          |  6 +++++-
 uniweb/templates/uniweb/blocks/gallery.html    |  2 +-
 .../templates/uniweb/blocks/picture_list.html  |  2 +-
 uniweb/templates/uniweb/blocks/table.html      |  2 +-
 uniweb/templates/uniweb/blocks/text.html       |  2 +-
 .../templates/uniweb/blocks/text_columns.html  |  4 ++--
 uniweb/templates/uniweb/blocks/title.html      |  6 +++++-
 uniweb/templates/uniweb/snippet_sections.html  |  2 --
 11 files changed, 26 insertions(+), 24 deletions(-)

diff --git a/uniweb/templates/uniweb/base.html b/uniweb/templates/uniweb/base.html
index d8bd8508..3b09ebab 100644
--- a/uniweb/templates/uniweb/base.html
+++ b/uniweb/templates/uniweb/base.html
@@ -14,14 +14,11 @@
   {% include "shared/favicon_snippet.html" %}
 
   <!-- Styles -->
-  <link href="{% static "styleguide18/assets/css/styles.css" %}" rel="stylesheet" media="all" />
-  <link href="{% static "styleguide18/assets/css/pattern-scaffolding.css" %}" rel="stylesheet" media="all" />
+  <link href="https://styleguide.pir-test.eu/2.3.x/css/styles.css" rel="stylesheet" media="all" />
+  <link href="https://styleguide.pir-test.eu/2.3.x/css/pattern-scaffolding.css" rel="stylesheet" media="all" />
   <link href="{% static "shared/vendor/fancybox/jquery.fancybox.min.css" %}" rel="stylesheet">
 
   <style type="text/css">
-    .inline-block {
-      display: inline-block;
-    }
     .head-alt-md, .head-alt-lg {
       line-height: 1.25;
     }
@@ -33,7 +30,6 @@
       background-position: 0 0;
       padding: 0 0 1em 35px !important;
     }
-
   </style>
 
   {% if page.root_page.matomo_id %}
@@ -50,7 +46,7 @@
           <div class="container container--default navbar__content" :class="{'navbar__content--initialized': true}">
             <div class="navbar__brand my-4 flex items-center lg:pr-8 lg:my-0">
               <a href="/">
-                <img src="{% static "styleguide18/assets/images/logo-round-white.svg" %}" class="w-8" />
+                <img src="https://styleguide.pir-test.eu/2.3.x/images/logo-round-white.svg" class="w-8" />
               </a>
               <a href="/" class="pl-4 font-bold text-xl lg:border-r lg:border-grey-300 lg:pr-8">{{ page.root_page.seo_title }}</a>
             </div>
@@ -76,7 +72,7 @@
     </ui-app>
   </nav>
 
-  <div class="container container--default {% if page.root_page.narrow_layout %}max-w-screen-lg{% endif%} lg:py-4">
+  <div class="container container--default py-8 lg:py-24 {% if page.root_page.narrow_layout %}max-w-screen-lg{% endif%}">
   {% block content %}{% endblock %}
   </div>
 
@@ -86,7 +82,7 @@
         <div class="footer__main py-4 lg:py-16 container container--default">
           <section class="footer__brand">
             <a href="https://www.pirati.cz">
-              <img src="{% static "styleguide18/assets/images/logo.svg" %}" alt="logo pirátské strany" class="w-32 md:w-40 pb-6" />
+              <img src="https://styleguide.pir-test.eu/2.3.x/images/logo-full-white.svg" alt="logo pirátské strany" class="w-32 md:w-40 pb-6" />
             </a>
             <p class="para hidden md:block md:mb-4 lg:mb-0 text-grey-200">
               <span class="copyleft inline-block">&copy;</span> {% now "Y" %} Piráti. Všechna práva vyhlazena. Sdílejte a nechte ostatní sdílet za stejných podmínek.
@@ -127,8 +123,8 @@
     </ui-app>
   </footer>
 
-  <script src="{% static "styleguide18/assets/js/vue.2.6.11.js" %}"></script>
-  <script src="{% static "styleguide18/assets/js/main.bundle.js" %}"></script>
+  <script src="{% static "styleguide.2.3.x/js/vue.2.6.11.js" %}"></script>
+  <script src="https://styleguide.pir-test.eu/2.3.x/js/main.bundle.js"></script>
   <script src="{% static "shared/vendor/jquery/jquery-3.4.1.min.js" %}"></script>
   <script src="{% static "shared/vendor/lazysizes/lazysizes.min.js" %}"></script>
   <script src="{% static "shared/vendor/fancybox/jquery.fancybox.min.js" %}"></script>
diff --git a/uniweb/templates/uniweb/blocks/advanced_text.html b/uniweb/templates/uniweb/blocks/advanced_text.html
index eb024d1d..eaffab4c 100644
--- a/uniweb/templates/uniweb/blocks/advanced_text.html
+++ b/uniweb/templates/uniweb/blocks/advanced_text.html
@@ -1,4 +1,4 @@
 {% load wagtailcore_tags %}
-<div class="content-block px-4 py-2 clearfix{% if first %} mt-8 lg:mt-12{% endif %} {{ css_class|join:" " }}">
+<div class="content-block px-4 py-2 clearfix {{ css_class|join:" " }}">
   {{ block.value.text|richtext }}
 </div>
diff --git a/uniweb/templates/uniweb/blocks/advanced_text_columns.html b/uniweb/templates/uniweb/blocks/advanced_text_columns.html
index 1d4f9576..97aa88fb 100644
--- a/uniweb/templates/uniweb/blocks/advanced_text_columns.html
+++ b/uniweb/templates/uniweb/blocks/advanced_text_columns.html
@@ -1,9 +1,9 @@
 {% load wagtailcore_tags %}
 <div class="lg:flex clearfix">
-  <div class="content-block lg:w-1/2 lg:pr-5 px-4 py-2{% if first %} mt-8 lg:mt-12{% endif %} {{ css_class|join:" " }}">
+  <div class="content-block lg:w-1/2 lg:pr-5 px-4 py-2 {{ css_class|join:" " }}">
     {{ block.value.left_text|richtext }}
   </div>
-  <div class="content-block lg:w-1/2 lg:pl-5 px-4 py-2{% if first %} mt-8 lg:mt-12{% endif %} {{ css_class|join:" " }}">
+  <div class="content-block lg:w-1/2 lg:pl-5 px-4 py-2 {{ css_class|join:" " }}">
     {{ block.value.right_text|richtext }}
   </div>
 </div>
diff --git a/uniweb/templates/uniweb/blocks/advanced_title.html b/uniweb/templates/uniweb/blocks/advanced_title.html
index 1a5fb116..c230dae8 100644
--- a/uniweb/templates/uniweb/blocks/advanced_title.html
+++ b/uniweb/templates/uniweb/blocks/advanced_title.html
@@ -1 +1,5 @@
-<h1 class="head-alt-md md:head-alt-lg px-4 pt-4 pb-2 lg:mt-16 {{ css_class|join:" " }}">{{ block.value.title }}</h1>
+{% if first %}
+<h1 class="head-alt-md md:head-alt-lg max-w-5xl px-4 pt-4 pb-2 {{ css_class|join:" " }}">{{ block.value.title }}</h1>
+{% else %}
+<h1 class="head-alt-md md:head-alt-lg max-w-5xl px-4 pt-4 pb-2 lg:mt-16 {{ css_class|join:" " }}">{{ block.value.title }}</h1>
+{% endif %}
diff --git a/uniweb/templates/uniweb/blocks/gallery.html b/uniweb/templates/uniweb/blocks/gallery.html
index 84fe4d69..450b7e4c 100644
--- a/uniweb/templates/uniweb/blocks/gallery.html
+++ b/uniweb/templates/uniweb/blocks/gallery.html
@@ -1,5 +1,5 @@
 {% load wagtailimages_tags %}
-<div class="content-block w-full px-4 my-6 grid grid-cols-4 gap-4{% if first %} mt-8 lg:mt-12{% endif %}">
+<div class="content-block w-full px-4 my-6 grid grid-cols-4 gap-4">
   {% for picture in block.value %}
     {% image picture width-2000 as img %}
     {% image picture fill-300x200 as thumb %}
diff --git a/uniweb/templates/uniweb/blocks/picture_list.html b/uniweb/templates/uniweb/blocks/picture_list.html
index 92b4102e..deaa7867 100644
--- a/uniweb/templates/uniweb/blocks/picture_list.html
+++ b/uniweb/templates/uniweb/blocks/picture_list.html
@@ -1,6 +1,6 @@
 {% load wagtailcore_tags wagtailimages_tags %}
 {% image block.value.picture max-25x25 as img %}
-<div class="content-block px-4 py-2 clearfix{% if first %} mt-8 lg:mt-12{% endif %} {{ css_class|join:" " }}">
+<div class="content-block px-4 py-2 clearfix {{ css_class|join:" " }}">
   <ul class="ul-picture">
     {% for text in block.value.items %}
       <li style="background-image: url('{{ img.url }}');">{{ text|richtext }}</li>
diff --git a/uniweb/templates/uniweb/blocks/table.html b/uniweb/templates/uniweb/blocks/table.html
index e2ccf4a6..3f2b07f0 100644
--- a/uniweb/templates/uniweb/blocks/table.html
+++ b/uniweb/templates/uniweb/blocks/table.html
@@ -1,6 +1,6 @@
 {% load table_block_tags %}
 
-<div class="my-6{% if first %} mt-8 lg:mt-12{% endif %}">
+<div class="my-6">
   <table class="table table--bordered table--condensed mx-auto">
     {% if table_caption %}
        <caption class="head-heavy-sm my-4">{{ table_caption }}</caption>
diff --git a/uniweb/templates/uniweb/blocks/text.html b/uniweb/templates/uniweb/blocks/text.html
index fe369c3a..e4cd088d 100644
--- a/uniweb/templates/uniweb/blocks/text.html
+++ b/uniweb/templates/uniweb/blocks/text.html
@@ -1,4 +1,4 @@
 {% load wagtailcore_tags %}
-<div class="content-block px-4 py-2 clearfix{% if first %} mt-8 lg:mt-12{% endif %}">
+<div class="content-block px-4 py-2 clearfix">
   {{ block.value|richtext }}
 </div>
diff --git a/uniweb/templates/uniweb/blocks/text_columns.html b/uniweb/templates/uniweb/blocks/text_columns.html
index cbb8962c..d8eaf4d5 100644
--- a/uniweb/templates/uniweb/blocks/text_columns.html
+++ b/uniweb/templates/uniweb/blocks/text_columns.html
@@ -1,9 +1,9 @@
 {% load wagtailcore_tags %}
 <div class="lg:flex clearfix">
-  <div class="content-block lg:w-1/2 lg:pr-5 px-4 py-2{% if first %} mt-8 lg:mt-12{% endif %}">
+  <div class="content-block lg:w-1/2 lg:pr-5 px-4 py-2">
     {{ block.value.left_text|richtext }}
   </div>
-  <div class="content-block lg:w-1/2 lg:pl-5 px-4 py-2{% if first %} mt-8 lg:mt-12{% endif %}">
+  <div class="content-block lg:w-1/2 lg:pl-5 px-4 py-2">
     {{ block.value.right_text|richtext }}
   </div>
 </div>
diff --git a/uniweb/templates/uniweb/blocks/title.html b/uniweb/templates/uniweb/blocks/title.html
index a09530cd..66816eb1 100644
--- a/uniweb/templates/uniweb/blocks/title.html
+++ b/uniweb/templates/uniweb/blocks/title.html
@@ -1 +1,5 @@
-<h1 class="head-alt-md md:head-alt-lg px-4 pt-4 pb-2 lg:mt-16">{{ block.value }}</h1>
+{% if first %}
+<h1 class="head-alt-md md:head-alt-lg max-w-5xl mb-4 px-4">{{ block.value }}</h1>
+{% else %}
+<h1 class="head-alt-md md:head-alt-lg max-w-5xl px-4 pt-4 pb-2 lg:mt-16">{{ block.value }}</h1>
+{% endif %}
diff --git a/uniweb/templates/uniweb/snippet_sections.html b/uniweb/templates/uniweb/snippet_sections.html
index ce47cb33..f05dfd24 100644
--- a/uniweb/templates/uniweb/snippet_sections.html
+++ b/uniweb/templates/uniweb/snippet_sections.html
@@ -1,9 +1,7 @@
 {% load wagtailcore_tags wagtailimages_tags %}
 
-<section class="mb-8 lg:mb-16">
 {% for block in page.content %}
 
   {% include_block block with first=forloop.first %}
 
 {% endfor %}
-</section>
-- 
GitLab