This commit is contained in:
armansansd
2023-03-31 12:35:52 +01:00
parent 6e2753bb7e
commit 217e7d336f
6 changed files with 17151 additions and 255 deletions

File diff suppressed because one or more lines are too long

View File

@@ -53,6 +53,7 @@ function popsu_preprocess_node(&$variables){
$node = &$variables['node'];
if($node->hasField('field_programme') && $node->get('field_programme')->getString() != ""){
$variables['attributes']['class'][] = 'programme-' . $node->get('field_programme')->getString();
}
}
@@ -71,6 +72,7 @@ function popsu_preprocess_field(&$variables){
$nid = $item->getValue()['target_id'];
//dump($nid);
$variables['items'][$id]['attributes'] = new Attribute();
$variables['items'][$id]['attributes']->addClass("programme-".$nid);
}
@@ -87,6 +89,7 @@ function popsu_preprocess_views_view_unformatted(&$variables) {
foreach ($rows as $id => $row) {
$variables['rows'][$id]['attributes'] = new Attribute();
$c = $variables['rows'][$id]['content']["#row"]->nid;
$variables['rows'][$id]['attributes']->addClass("programme-".$c);
}
}else{
@@ -106,6 +109,7 @@ function popsu_preprocess_views_view_unformatted(&$variables) {
}else if(isset($row['content']['#node'])){
$r = $row['content']['#node'];
if ($r->hasField('field_programme') && $r->get('field_programme')->getString() != "" ) {
$c = $r->get('field_programme')->getString();
$variables['rows'][$id]['attributes'] = new Attribute();
$variables['rows'][$id]['attributes']->addClass("programme-".$c);
@@ -212,7 +216,6 @@ function popsu_preprocess_views_view_field(&$variables){
$entity->getEntityTypeId().'-'.$entity->bundle(),
$entity->getEntityTypeId().'-'.$entity->bundle().'-'.$entity->id(),
);
// get the entity link and url
$link = $entity->toLink();
$url = $entity->toLink()->getUrl();

View File

@@ -639,6 +639,7 @@
}
}
.body:after{
pointer-events: none;
content: "";
opacity: 1;
position: absolute;