rdrew 2 weeks ago
parent
commit
9e4d761ea6
  1. 15
      olivesnews.theme
  2. 2
      templates/block/block--views-block--download-media-issue-block-1.html.twig
  3. 2
      templates/content/node--islandora-object.html.twig

15
olivesnews.theme

@ -44,6 +44,20 @@ function olivesnews_preprocess_html(&$variables) {
'href' => $variables['olivesnews_path'] . '/css/components/navigation/nav-primary-no-js.css?' . $query_string,
],
];
// Use routeMatch — this is the modern, preferred way.
$node = \Drupal::routeMatch()->getParameter('node');
if ($node instanceof \Drupal\node\NodeInterface) {
// Add a simple node-ID class (most common format today).
$variables['attributes']['class'][] = 'node-' . $node->id();
// Optional: Add the classic Drupal 7-style class if you prefer / need it for legacy CSS.
// $variables['attributes']['class'][] = 'page-node-' . $node->id();
// Optional extras people often add at the same time:
// $variables['attributes']['class'][] = 'node-type-' . $node->bundle();
// $variables['attributes']['class'][] = 'node-' . $node->bundle();
}
}
@ -728,3 +742,4 @@ function olivesnews_preprocess_mirador(&$variables) {
]);
}
*/

2
templates/block/block--views-block--download-media-issue-block-1.html.twig

@ -49,7 +49,7 @@ layout ? 'layout--' ~ layout|clean_class,
{{ title_suffix }}
{% block content %}
<details>
<summary>Show All Pages</summary>
<summary class="main">Show All Pages</summary>
<div{{ content_attributes.addClass('block__content') }}>
{{ content }}
</div>

2
templates/content/node--islandora-object.html.twig

@ -12,7 +12,7 @@ view_mode ? 'node--view-mode-' ~ view_mode|clean_class,
]
%}
<details>
<summary>About</summary>
<summary class="button">About</summary>
<article{{ attributes.addClass(classes) }}>
<header class="{{ layout }}">
{{ title_prefix }}

Loading…
Cancel
Save