Skip to content

Commit

Permalink
Issue #3415664 by sime, joshua1234511, richardgaunt, alexskrypnyk, fi…
Browse files Browse the repository at this point in the history
…onamorrison23: Contextual links are broken (#1311)

Co-authored-by: Joshua Fernandes <“[email protected]”>
Co-authored-by: richardgaunt <[email protected]>
Co-authored-by: Richard Gaunt <[email protected]>
  • Loading branch information
4 people authored Oct 22, 2024
1 parent e4d7c0a commit 4c4afb9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,6 @@
cursor: move;
background-color: #fff;
position: relative;

div.contextual {
display: contents;

ul {
border: 1px solid;

li {
list-style: none;
display: list-item;
}
}
}
}

.block.block-layout-builder [tabindex='-1'] {
Expand Down
7 changes: 7 additions & 0 deletions web/themes/contrib/civictheme/includes/layout.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@ function civictheme_preprocess_layout__three_columns(array &$variables): void {
$variables['is_contained'] = $variables['settings']['is_contained'] ?? FALSE;
$variables['vertical_spacing'] = $variables['settings']['vertical_spacing'] ?? 'auto';
}

/**
* Implements hook_preprocess_HOOK().
*/
function civictheme_preprocess_block__layout_builder(array &$variables): void {
$variables['modifier_class'] = FALSE;
}
28 changes: 28 additions & 0 deletions web/themes/contrib/civictheme/templates/misc/links.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{#
/**
* @file
* CivicTheme templete override implementation for a set of links.
*/
#}
{% if links -%}
{%- if heading -%}
{%- if heading.level -%}
<{{ heading.level }}{{ heading.attributes }}>{{ heading.text }}</{{ heading.level }}>
{%- else -%}
<h2{{ heading.attributes }}>{{ heading.text }}</h2>
{%- endif -%}
{%- endif -%}
<ul{{ attributes }} class="{{ modifier_class }}">
{%- for item in links -%}
<li{{ item.attributes }}>
{%- if item.link -%}
{{ item.link }}
{%- elseif item.text_attributes -%}
<span{{ item.text_attributes }}>{{ item.text }}</span>
{%- else -%}
{{ item.text }}
{%- endif -%}
</li>
{%- endfor -%}
</ul>
{%- endif %}

0 comments on commit 4c4afb9

Please sign in to comment.