armansansd 2 years ago
parent
commit
dd4d9df8e5

File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/popsu/assets/css/styles.min.css


+ 9 - 0
web/themes/custom/popsu/popsu.theme

@@ -42,6 +42,15 @@ function popsu_preprocess_field(&$variables){
     if ($element['#field_name'] == 'field_texte') {
       $variables['attributes']['class'][] = 'crop';
     }
+    if($element["#field_name"] == "field_programme"){
+      
+      foreach ($variables["items"] as $id => $item) {
+        $item['attributes']['class'] = new Attribute();
+        $c = $item['content']['#options']['entity']->nid->getString();
+        $item['attributes']->addClass("programme-".$c);
+        // kint($variables["items"]);die();
+      }
+    }
   }
   
 }

+ 22 - 37
web/themes/custom/popsu/sass/pages/_themes.scss

@@ -2,42 +2,28 @@
     .field_logo{
         display: block;
     }
-    &.programme-1{
-        // .field_programme{
-        //     background: $col-1;
-        // }
-        
-    }
-    &.programme-2{
-        // .field_programme{
-        //     background: $col-2;
-        // }
-    }
-    &.programme-3{
-        
-        // .field_programme{
-        //     background: $col-eur;
-        // }
-    }
-    &.programme-4{
-        // .field_programme{
-        //     background: $col-1;
-        // }
-    }
-    &.programme-5{
-        // .field_programme{
-        //         background: $col-mond;
-        // }
-    }
-    &.programme-6{
-        // .field_programme{
-        //         background: $col-ter;
-        // }
-    }
-    &.programme-7{
-        // .field_programme{
-        //         background: $col-met;
-        // }
+    .field_programme>div{
+        &.programme-1{
+           background: $col-1; 
+        }
+        &.programme-2{
+            background: $col-2;
+        }
+        &.programme-3{
+            background: $col-eur;
+        }
+        &.programme-4{
+           background: $col-1;
+        }
+        &.programme-5{
+            background: $col-mond;
+        }
+        &.programme-6{
+            background: $col-ter;
+        }
+        &.programme-7{
+            background: $col-met;
+        }
     }
     .block-region-first{
         padding: 1rem;
@@ -83,7 +69,6 @@
                 color: white;
                 font-weight: 600;
                 padding: .3rem .5rem;
-                background-color: red;
                 margin-right: .5rem;
                 margin-bottom: .5rem;
             }

Some files were not shown because too many files changed in this diff