This commit is contained in:
armansansd 2021-10-18 13:00:56 +02:00
parent 3b008b5a74
commit dd4d9df8e5
3 changed files with 32 additions and 38 deletions

File diff suppressed because one or more lines are too long

View File

@ -42,6 +42,15 @@ function popsu_preprocess_field(&$variables){
if ($element['#field_name'] == 'field_texte') { if ($element['#field_name'] == 'field_texte') {
$variables['attributes']['class'][] = 'crop'; $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();
}
}
} }
} }

View File

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