浏览代码

fix bug with modern template's menu when it's too populated

Olivier Massot 5 年之前
父节点
当前提交
3fbe2a52d7

+ 19 - 21
ot_templating/Resources/Private/Partials/Classic/Donors.html

@@ -9,30 +9,28 @@
                       fromParents="{fromParents}">
                       fromParents="{fromParents}">
 
 
         <f:if condition="{donors -> f:count()} > 0">
         <f:if condition="{donors -> f:count()} > 0">
-            <f:then>
-                <div class="donors-panel">
-                    <header>
-                        <f:if condition="{fromParents}==1">
-                            <f:then>
-                                <h3>Partenaires de notre réseau</h3>
-                            </f:then>
-                            <f:else>
-                                <h3>Nos partenaires</h3>
-                            </f:else>
-                        </f:if>
+            <div class="donors-panel">
+                <header>
+                    <f:if condition="{fromParents}==1">
+                        <f:then>
+                            <h3>Partenaires de notre réseau</h3>
+                        </f:then>
+                        <f:else>
+                            <h3>Nos partenaires</h3>
+                        </f:else>
+                    </f:if>
 
 
-                    </header>
-                    <div class="box-content">
-                        <div class="donor-list {f:if(condition: '{staticDisplay} == 1', then: '', else: 'carousel')}">
-                            <f:for each="{donors}" as="donor">
-                                <div class="donor-card">
-                                    <img src="{donor.logo}" alt="{donor.name}"/>
-                                </div>
-                            </f:for>
-                        </div>
+                </header>
+                <div class="box-content">
+                    <div class="donor-list {f:if(condition: '{settings.staticDonors}==0', then: 'carousel')}">
+                        <f:for each="{donors}" as="donor">
+                            <div class="donor-card">
+                                <img src="{donor.logo}" alt="{donor.name}"/>
+                            </div>
+                        </f:for>
                     </div>
                     </div>
                 </div>
                 </div>
-            </f:then>
+            </div>
         </f:if>
         </f:if>
     </ot:donors.getAll>
     </ot:donors.getAll>
 </div>
 </div>

+ 2 - 4
ot_templating/Resources/Private/Partials/Classic/Header.html

@@ -12,10 +12,8 @@
     <f:render partial="Classic/NoScriptWarning" />
     <f:render partial="Classic/NoScriptWarning" />
 
 
     <f:if condition="{settings.displayCarousel}==1">
     <f:if condition="{settings.displayCarousel}==1">
-        <then>
-            <f:comment><!-- Render the carousel defined in partial/Carousel.html--></f:comment>
-            <f:render partial="Classic/Carousel" />
-        </then>
+        <f:comment><!-- Render the carousel defined in partial/Carousel.html--></f:comment>
+        <f:render partial="Classic/Carousel" />
     </f:if>
     </f:if>
 
 
     <f:comment><!-- Render the navbar defined in partial/Navbar.html--></f:comment>
     <f:comment><!-- Render the navbar defined in partial/Navbar.html--></f:comment>

+ 2 - 1
ot_templating/Resources/Private/Partials/Modern/Donors.html

@@ -21,9 +21,10 @@
                             </h2>
                             </h2>
                         </div>
                         </div>
                     </div>
                     </div>
+                    {f:if(condition: '{settings.staticDonors}==1', then: '<h1>Hello</h1>')}
                     <div class="col-lg-12 col-md-12">
                     <div class="col-lg-12 col-md-12">
                         <div class="clients-list partners-list grayscale">
                         <div class="clients-list partners-list grayscale">
-                            <div class="owl-carousel"
+                            <div class="{f:if(condition: '{settings.staticDonors}==0', then: 'owl-carousel')}"
                                  data-nav-dots="false"
                                  data-nav-dots="false"
                                  data-md-items="4"
                                  data-md-items="4"
                                  data-sm-items="3"
                                  data-sm-items="3"

+ 3 - 1
ot_templating/Resources/Private/Partials/Modern/Header.html

@@ -13,4 +13,6 @@
 
 
 </header>
 </header>
 
 
-<f:render partial="Modern/Carousel" arguments="{_all}" />
+<f:if condition="{settings.displayCarousel}==1">
+    <f:render partial="Modern/Carousel" arguments="{_all}" />
+</f:if>

+ 3 - 3
ot_templating/Resources/Private/Partials/Modern/NextEvents.html

@@ -28,7 +28,7 @@
                                fromParents="{fromParents}"
                                fromParents="{fromParents}"
                                fromChildren="{fromChildren}">
                                fromChildren="{fromChildren}">
 
 
-                <f:if condition="{events -> f:count()} > 0 || {showEmpty}">
+                <f:if condition="{events -> f:count()} > 0 || {showEmpty}">
 
 
                     <div class="col-lg-12 col-md-12">
                     <div class="col-lg-12 col-md-12">
                         <div class="text-center">
                         <div class="text-center">
@@ -53,10 +53,10 @@
 
 
                                 <f:if condition="{fromParents}||{fromChildren}">
                                 <f:if condition="{fromParents}||{fromChildren}">
                                     <f:then>
                                     <f:then>
-                                        <a href="https://{event.subDomain}.opentalent.fr" target="_blank">                                   >
+                                <a href="https://{event.subDomain}.opentalent.fr" target="_blank">                                   >
                                     </f:then>
                                     </f:then>
                                     <f:else>
                                     <f:else>
-                                        <a href="{f:uri.page(pageUid: eventsPageUid, additionalParams: '{eventId: event.id}')}">
+                                <a href="{f:uri.page(pageUid: eventsPageUid, additionalParams: '{eventId: event.id}')}">
                                     </f:else>
                                     </f:else>
                                 </f:if>
                                 </f:if>
                                     <img class="img-fluid"
                                     <img class="img-fluid"

+ 53 - 0
ot_templating/Resources/Public/assets/Modern/style/custom.css

@@ -146,8 +146,61 @@
         color: #323232 !important;
         color: #323232 !important;
     }
     }
 
 
+    .mega-menu .drop-down-multilevel {
+        border: solid 1px rgba(75, 75, 75, .2);
+        box-shadow: 4px 4px 2px 1px rgba(75, 75, 75, .2);
+    }
+
     /* **** Fix mega menu issues ***** */
     /* **** Fix mega menu issues ***** */
 
 
+    /* Fix bug with long menus */
+    .mega-menu .menu-bar {
+        width: 90%;
+    }
+
+    .mega-menu > section.menu-list-items .menu-bar {
+        min-height: 90px;
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: flex-end;
+    }
+
+    .mega-menu .menu-bar a {
+        text-align: center;
+    }
+
+    .mega-menu > section.menu-list-items .menu-bar > ul {
+        display: flex;
+        flex-direction: row;
+        flex-wrap: wrap;
+        align-items: center;
+    }
+
+    @media(min-width:991px) {
+        .mega-menu > section.menu-list-items .menu-bar > ul {
+            display: flex !important;
+        }
+    }
+
+    .mega-menu > section.menu-list-items .menu-bar > ul > li {
+        position: relative;
+        min-height: 45px;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+    }
+
+    .mega-menu .drop-down-multilevel {
+        width: auto;
+        min-width: 240px;
+    }
+
+    .menu-list-items {
+        height: auto !important;
+        min-height: 90px;
+    }
+
     /* Prevent hidden submenus to overflow from the screen */
     /* Prevent hidden submenus to overflow from the screen */
     body {
     body {
         overflow-x: hidden;
         overflow-x: hidden;

+ 0 - 1
ot_templating/Resources/Public/assets/Modern/style/responsive.css

@@ -2229,4 +2229,3 @@ h2 {font-size: 22px; line-height: 30px;}
 }
 }
 
 
 
 
- 

+ 1 - 1
ot_templating/Resources/Public/assets/Modern/style/style.css

@@ -2170,4 +2170,4 @@ img.bottom-img { top: 0; }
     {
     {
      .newsletter.fancy button { padding: 14px 20px;  }
      .newsletter.fancy button { padding: 14px 20px;  }
     }
     }
-}
+}