Ressort Header

A template component for displaying ressort (section) and subressort page headers with optional features including editor image, introduction text, content navigation, RSS feed, and social media links.

Purpose

The Ressort Header component provides consistent header styling for:

Features

Usage

Ressort Header (Default)

{% include "@template-components/ressort-header/ressort-header.twig" with {
  type: "ressort",
  title: "Heute im Recht",
  show_rss: true,
  introduction: "Optionale, einleitende Worte zum Ressort oder Thema.",
  content_navigation: {
    items: [
      { label: "Rechtsprechung", url: "#", active: true },
      { label: "Rechtspolitik & Gesetzgebung", url: "#" },
      { label: "Gesetzesvorhaben", url: "#" }
    ]
  }
} only %}

Subressort Header

{% include "@template-components/ressort-header/ressort-header.twig" with {
  type: "subressort",
  title: "Subressort",
  show_rss: true,
  breadcrumbs: {
    items: [
      { label: "Home", url: "/" },
      { label: "Ressort", url: "/ressort" },
      { label: "Subressort" }
    ]
  },
  introduction: "Optionale, einleitende Worte zum Ressort oder Thema.",
  content_navigation: {
    items: [
      { label: "Rechtsprechung", url: "#", active: true },
      { label: "Rechtspolitik & Gesetzgebung", url: "#" }
    ]
  }
} only %}

With Editor Image

{% include "@template-components/ressort-header/ressort-header.twig" with {
  type: "ressort",
  title: "Heute im Recht",
  show_rss: true,
  editor_image: {
    src: "/path/to/editor.jpg",
    alt: "Editor Name"
  },
  introduction: "Introduction text..."
} only %}

With Social Links

{% include "@template-components/ressort-header/ressort-header.twig" with {
  type: "ressort",
  title: "Heute im Recht",
  show_rss: true,
  introduction: "Introduction text...",
  social_links: [
    {
      type: "linkedin",
      url: "https://www.linkedin.com/company/example",
      label: "LinkedIn"
    },
    {
      type: "mail",
      url: "mailto:contact@example.com",
      label: "E-Mail"
    }
  ]
} only %}

Properties

Property Type Required Description
type string Yes Layout type: "ressort" or "subressort"
title string Yes Main heading text
show_rss boolean No Display RSS feed button
introduction string No Introduction paragraph
editor_image object No Editor avatar image
breadcrumbs object No Breadcrumb navigation (subressort only)
content_navigation object No Horizontal navigation
social_links array No Social media link buttons
attributes object No Additional HTML attributes
classes array No Additional CSS classes

Editor Image Object

Property Type Required Description
src string Yes Image source URL
alt string Yes Alternative text

Social Links Array

Property Type Required Description
type string Yes Icon type: "linkedin" or "mail"
url string No Link URL
label string No Accessible label

Layout Types

Ressort

Visual characteristics:

Use when: Creating main section landing pages

Subressort

Visual characteristics:

Use when: Creating subsection pages with hierarchical navigation

Responsive Behavior

Mobile (< 768px)

Ressort:

Subressort:

Desktop (≥ 768px)

Ressort:

Subressort:

Spacing

Gap values:

Typography

Ressort heading:

Subressort heading:

Introduction:

Accessibility

Semantic HTML

ARIA

Keyboard Navigation

Integration with Drupal

The component automatically loads required dependencies:

dependencies:
  - circle_dot/template-components-breadcrumbs
  - circle_dot/pattern-content-navigation

In Page Templates

{% block content %}
  {{ include('@template-components/ressort-header/ressort-header.twig', {
    type: node.bundle,
    title: node.label,
    show_rss: true,
    introduction: node.field_introduction.value,
    content_navigation: navigation_items
  }) }}

  {# Page content #}
{% endblock %}

Browser Support

Related Components

Design Tokens

Colors:

Spacing:

Typography:

Information

Folder
src/components/template-components/ressort-header

Files

Schema
Mocks
Template
// src/components/template-components/ressort-header/ressort-header.twig

{{ attach_library("circle_dot/template-components-ressort-header") }}

<div class="RessortHeader u-container RessortHeader--{{ type }} {{ classes|join(' ') }}" {{ attributes }}>
	<div class="RessortHeader-content">
		{% if editor_image %}
			<div class="RessortHeader-editor">
				{% include "@elements/image/image.twig" with {
					uri: editor_image.uri,
					width: editor_image.width,
					height: editor_image.height,
					alt: editor_image.alt,
					rounded: true,
					classes: ["RessortHeader-editorImage"],
				} only %}
			</div>
		{% endif %}

		<div class="RessortHeader-titleWrapper">
			<h1 class="RessortHeader-title">{{ title }}</h1>
			{% if show_rss and rss_url %}
				<div class="RessortHeader-rss">
					{% include "@elements/button/button.twig" with {
						label: "RSS Feed",
						icon: "rss",
						icon_only: true,
						size: "small",
						modifiers: ["tertiary"],
						url: rss_url,
					} only %}
				</div>
			{% endif %}
		</div>

		{% if introduction %}
			<div class="RessortHeader-introduction">
				{{ introduction|raw }}
			</div>
		{% endif %}

		{% if content_navigation %}
			<div class="RessortHeader-navigation">
				{% include "@patterns/content-navigation/content-navigation.twig" with content_navigation only %}
			</div>
		{% endif %}

		{% if social_links %}
			<div class="RessortHeader-social">
				{% for link in social_links %}
					{% set icon_name = link.type %}
					{% include "@elements/button/button.twig" with {
						label: link.label,
						icon: icon_name,
						icon_only: true,
						url: link.url,
						modifiers: ["tertiary"],
					} only %}
				{% endfor %}
			</div>
		{% endif %}
	</div>
</div>

Error: schema is invalid: data/properties must be object

Variants

Ressort 1 - Heading only
Open

Ressort 1 - Heading only mock data

Raw
Resolved
Ressort 2 - Heading + RSS
Open

Ressort 2 - Heading + RSS mock data

Raw
Resolved
Ressort 3 - Heading + RSS + Introduction
Open

Ressort 3 - Heading + RSS + Introduction mock data

Raw
Resolved
Ressort 4 - Heading + RSS + Introduction + Sub-navigation
Open

Ressort 4 - Heading + RSS + Introduction + Sub-navigation mock data

Raw
Resolved
Ressort 5 - Heading + RSS + Introduction + Sub-navigation + Editor photo
Open

Ressort 5 - Heading + RSS + Introduction + Sub-navigation + Editor photo mock data

Raw
Resolved
Ressort 6 - Full (all features)
Open

Ressort 6 - Full (all features) mock data

Raw
Resolved
Subressort 1 - Heading only
Open

Subressort 1 - Heading only mock data

Raw
Resolved
Subressort 2 - Heading + RSS
Open

Subressort 2 - Heading + RSS mock data

Raw
Resolved
Subressort 3 - Heading + RSS + Introduction
Open

Subressort 3 - Heading + RSS + Introduction mock data

Raw
Resolved
Subressort 4 - Heading + RSS + Introduction + Sub-navigation
Open

Subressort 4 - Heading + RSS + Introduction + Sub-navigation mock data

Raw
Resolved
Subressort 5 - Heading + RSS + Introduction + Sub-navigation + Editor photo
Open

Subressort 5 - Heading + RSS + Introduction + Sub-navigation + Editor photo mock data

Raw
Resolved
Subressort 6 - Full (all features)
Open

Subressort 6 - Full (all features) mock data

Raw
Resolved
Author - Maximilian Amos
Open

Author - Maximilian Amos mock data

Raw
Resolved
Search
Open

Search mock data

Raw
Resolved