This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@@ -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();
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user