浏览代码

fixed mobile responsive display

Bachir Soussi Chiadmi 8 年之前
父节点
当前提交
74f8c52af3

+ 40 - 29
sites/all/themes/gui/materiobasetheme/css/styles.css

@@ -3675,9 +3675,7 @@ body.home-v2 #main {
       vertical-align: middle; }
     @media only screen and (max-width: 40em) {
       #tool-bar .inner-content {
-        padding: 0; }
-        #tool-bar .inner-content h1 {
-          line-height: 0.5; } }
+        padding: 0; } }
   .oldie #tool-bar {
     background-color: #B1ADAD;
     padding: 0 10px; }
@@ -6454,11 +6452,12 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull {
     padding: 0; }
 
 /*
- _____ _____ _____ _____ __    _____ _____ _____ _ _ _ _____
-|   __|     |     |  _  |  |  |   __|   | |   __| | | |   __|
-|__   |-   -| | | |   __|  |__|   __| | | |   __| | | |__   |
-|_____|_____|_|_|_|__|  |_____|_____|_|___|_____|_____|_____|
-
+         _                 __
+   _____(_)___ ___  ____  / /__  ____  ___ _      _______
+  / ___/ / __ `__ \/ __ \/ / _ \/ __ \/ _ \ | /| / / ___/
+ (__  ) / / / / / / /_/ / /  __/ / / /  __/ |/ |/ (__  )
+/____/_/_/ /_/ /_/ .___/_/\___/_/ /_/\___/|__/|__/____/
+                /_/
 */
 body.node-type-simplenews #content .inner-content {
   text-align: center; }
@@ -6473,6 +6472,17 @@ body.node-type-simplenews #content article.node.node-simplenews {
   padding: 1em 0; }
   body.node-type-simplenews #content article.node.node-simplenews tbody {
     border-top: 0px; }
+  @media only screen and (max-width: 40em) {
+    body.node-type-simplenews #content article.node.node-simplenews {
+      max-width: 100%;
+      overflow-x: hidden; }
+      body.node-type-simplenews #content article.node.node-simplenews table, body.node-type-simplenews #content article.node.node-simplenews tbody, body.node-type-simplenews #content article.node.node-simplenews tr, body.node-type-simplenews #content article.node.node-simplenews td {
+        display: block;
+        max-width: 100%; }
+      body.node-type-simplenews #content article.node.node-simplenews img {
+        max-width: 100%; }
+      body.node-type-simplenews #content article.node.node-simplenews p {
+        padding-right: 1em; } }
 
 /*
  _____ _____ _____ _____    _____ _____ _____ _____ _____ _____ _____
@@ -7516,7 +7526,8 @@ body.home-v2 #center {
         font-size: 0.756em; }
         @media only screen and (max-width: 40em) {
           #home-v2 > .panel-panel > div > .panel-pane.intro-video .field-name-body p {
-            width: 48%; } }
+            width: 100%;
+            text-align: center; } }
     @media only screen and (max-width: 40em) {
       #home-v2 > .panel-panel > div > .panel-pane.intro-video {
         margin-top: 0.5em; } }
@@ -7770,16 +7781,12 @@ body.home-v2 #center {
       z-index: 10; }
     @media only screen and (max-width: 40em) {
       #home-v2 > .panel-panel > div > .panel-pane.showroom {
-        height: 210px;
         margin-top: 10px; }
         #home-v2 > .panel-panel > div > .panel-pane.showroom .pane-content .field-name-field-bandeau {
           position: absolute;
-          width: 200%;
+          width: 400%;
           height: 100%;
           overflow: hidden; }
-          #home-v2 > .panel-panel > div > .panel-pane.showroom .pane-content .field-name-field-bandeau img {
-            margin-top: -100px;
-            margin-left: -200px; }
         #home-v2 > .panel-panel > div > .panel-pane.showroom .pane-content .group-content-wrapper {
           width: auto;
           padding: 2%;
@@ -8067,10 +8074,25 @@ body.home-v2 #center {
   @media only screen and (max-width: 40em) {
     #home-v2 > .panel-panel > div > .pane-news-home-v2 {
       background-color: transparent; }
-      #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel.panel-col-first {
-        max-width: 100%; }
-      #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel:not(.panel-col-first) {
-        display: none; }
+      #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel {
+        width: 100%; }
+        #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel .inside {
+          margin: 0; }
+        #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel .node {
+          max-width: 100%;
+          margin: 0; }
+          #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel .node .field-name-body {
+            width: 100%;
+            padding: 0; }
+            #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel .node .field-name-body p {
+              max-width: 100%;
+              padding: 1em; }
+        #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel .node-simplenews .field-name-body a {
+          padding: 0;
+          display: block;
+          height: 100%; }
+          #home-v2 > .panel-panel > div > .pane-news-home-v2 #mini-panel-news_home_v2 .center-wrapper .panel-panel .node-simplenews .field-name-body a img {
+            max-width: 100%; }
       #home-v2 > .panel-panel > div > .pane-news-home-v2:after {
         z-index: -1;
         opacity: 0.4; } }
@@ -8089,17 +8111,6 @@ body.home-v2 #center {
       *display: inline;
       min-width: 20%; }
 
-/*
-         _                 __
-   _____(_)___ ___  ____  / /__  ____  ___ _      _______
-  / ___/ / __ `__ \/ __ \/ / _ \/ __ \/ _ \ | /| / / ___/
- (__  ) / / / / / / /_/ / /  __/ / / /  __/ |/ |/ (__  )
-/____/_/_/ /_/ /_/ .___/_/\___/_/ /_/\___/|__/|__/____/
-                /_/
-*/
-.node-type-simplenews img {
-  max-width: none !important; }
-
 /*
               _     _ _           _   _
              | |   | (_)         | | (_)

+ 2 - 2
sites/all/themes/gui/materiobasetheme/js/script.js

@@ -333,11 +333,11 @@
         // showroom Image BGD
         $('.panel-pane.showroom .field-name-field-bandeau img', '#home-v2')
           .attr('data-400-bottom-top', 'transform:translateY(-20em);')
-          .attr('data-100-top-bottom', 'transform:translateY(5em);');
+          .attr('data-200-top-bottom', 'transform:translateY(5em);');
         // database TXT
         $('.panel-pane.bdd .group-content-wrapper', '#home-v2')
           .attr('data-400-center-top', 'transform:translateX(40em);opacity:0;')
-          .attr('data-100-center-center', 'transform[quadratic]:translateX(0em);opacity[quadratic]:1;');
+          .attr('data-200-center-center', 'transform[quadratic]:translateX(0em);opacity[quadratic]:1;');
         // database IMG
         $('.panel-pane.bdd .field-name-field-bandeau img', '#home-v2')
           .attr('data-400-bottom-top', 'transform:translateX(0em);')

文件差异内容过多而无法显示
+ 0 - 0
sites/all/themes/gui/materiobasetheme/js/script.min.js


+ 49 - 26
sites/all/themes/gui/materiobasetheme/scss/styles.scss

@@ -947,7 +947,8 @@ $headerouterheight:$headerheight+$headerpaddingtop+$headerpaddingbottom;
       //  margin: 5px;
     }
     @media #{$small-only}{
-      padding:0; h1{line-height:0.5;}
+      padding:0;
+      // h1{line-height:0.5;}
     }
   }
   // text-align:right;
@@ -2177,14 +2178,19 @@ body.print-body-materiau{
     #edit-mimemail, #edit-locale, #edit-timezone{padding:0;}
   }
 } // user
-
 /*
- _____ _____ _____ _____ __    _____ _____ _____ _ _ _ _____
-|   __|     |     |  _  |  |  |   __|   | |   __| | | |   __|
-|__   |-   -| | | |   __|  |__|   __| | | |   __| | | |__   |
-|_____|_____|_|_|_|__|  |_____|_____|_|___|_____|_____|_____|
-
+         _                 __
+   _____(_)___ ___  ____  / /__  ____  ___ _      _______
+  / ___/ / __ `__ \/ __ \/ / _ \/ __ \/ _ \ | /| / / ___/
+ (__  ) / / / / / / /_/ / /  __/ / / /  __/ |/ |/ (__  )
+/____/_/_/ /_/ /_/ .___/_/\___/_/ /_/\___/|__/|__/____/
+                /_/
 */
+// .node-type-simplenews{
+//   img{
+//     max-width: none !important;
+//   }
+// }
 body.node-type-simplenews{
   #content{
     .inner-content{
@@ -2197,6 +2203,20 @@ body.node-type-simplenews{
       tbody{
         border-top:0px;
       }
+
+      @media #{$small-only}{
+        max-width: 100%;
+        overflow-x: hidden;
+        // .field-name-body{position: relative;}
+        table, tbody, tr,td{
+          display: block;
+          max-width: 100%;
+        }
+        img{max-width: 100%;}
+        p{
+          padding-right: 1em;
+        }
+      }
     }
   }
 }
@@ -2989,7 +3009,8 @@ body.home-v2{
           font-size:0.756em;
 
           @media #{$small-only}{
-            width:48%;
+            width:100%;
+            text-align: center;
           }
         }
       }
@@ -3163,12 +3184,11 @@ body.home-v2{
         z-index:10;
       }
       @media #{$small-only}{
-        height:210px;
+        // height:210px;
         margin-top: 10px;
         .pane-content{
           .field-name-field-bandeau{
-            position:absolute; width:200%; height:100%; overflow:hidden;
-            img{margin-top:-100px; margin-left:-200px;}
+            position:absolute; width:400%; height:100%; overflow:hidden;
           }
           .group-content-wrapper{
             width:auto;
@@ -3414,8 +3434,24 @@ body.home-v2{
     @media #{$small-only}{
       background-color: transparent;
       #mini-panel-news_home_v2 .center-wrapper{
-        .panel-panel.panel-col-first{max-width:100%;}
-        .panel-panel:not(.panel-col-first){display:none;}
+        .panel-panel{
+          width:100%;
+          .inside{margin:0;}
+          .node{
+            max-width: 100%; margin:0;
+            .field-name-body{
+              width: 100%; padding:0;
+              p{max-width: 100%; padding: 1em;}
+            }
+          }
+          .node-simplenews{
+            .field-name-body a{
+              padding: 0; display: block; height:100%;
+              img{max-width: 100%;}
+            }
+          }
+        }
+        // .panel-panel:not(.panel-col-first){display:none;}
       }
       &:after{z-index: -1; opacity:0.4;}
     }
@@ -3435,19 +3471,6 @@ body.home-v2{
 
 } // homeV2
 
-/*
-         _                 __
-   _____(_)___ ___  ____  / /__  ____  ___ _      _______
-  / ___/ / __ `__ \/ __ \/ / _ \/ __ \/ _ \ | /| / / ___/
- (__  ) / / / / / / /_/ / /  __/ / / /  __/ |/ |/ (__  )
-/____/_/_/ /_/ /_/ .___/_/\___/_/ /_/\___/|__/|__/____/
-                /_/
-*/
-.node-type-simplenews{
-  img{
-    max-width: none !important;
-  }
-}
 /*
               _     _ _           _   _
              | |   | (_)         | | (_)

部分文件因为文件数量过多而无法显示