Skip to content

Commit

Permalink
data: add details to facet blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
protitude committed Sep 4, 2024
1 parent 134770a commit ab3de80
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
24 changes: 24 additions & 0 deletions components/04-templates/_oda_reports.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,30 @@
}

.path-reports {

.sidebar-left {

details {
background: inherit;
border-top: none;
border-left: none;
border-right: none;
margin: 0;
}

summary {
border: none;
font-weight: normal;
background: inherit;
margin: 0;
padding: 0;
&:after {
top: 5px;
}
}

}

main {

.row-wrapper {
Expand Down
41 changes: 41 additions & 0 deletions templates/block/block--facet-block.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{#
/**
* @file
* Theme override to display a block.
*
* Available variables:
* - plugin_id: The ID of the block implementation.
* - label: The configured label of the block if visible.
* - configuration: A list of the block's configuration values.
* - label: The configured label for the block.
* - label_display: The display settings for the label.
* - provider: The module or other provider that provided this block plugin.
* - Block plugin specific settings will also be stored here.
* - content: The content of this block.
* - attributes: array of HTML attributes populated by modules, intended to
* be added to the main container tag of this template.
* - id: A valid HTML ID and guaranteed unique.
* - title_attributes: Same as attributes, except applied to the main title
* tag that appears in the template.
* - title_prefix: Additional output populated by modules, intended to be
* displayed in front of the main title tag that appears in the template.
* - title_suffix: Additional output populated by modules, intended to be
* displayed after the main title tag that appears in the template.
*
* @see template_preprocess_block()
*/
#}
{% if content|render|trim is not empty %}
<details {{ bem('block') }} open>
<summary>
{{ title_prefix }}
{% if label %}
<h2{{ title_attributes.addClass('h2') }}>{{ label }}</h2>
{% endif %}
{{ title_suffix }}
</summary>
{% block content %}
{{ content }}
{% endblock %}
</details>
{% endif %}

0 comments on commit ab3de80

Please sign in to comment.