contao-themes-net/theme-components-bundle

theme components bundle for Contao 4

1.6.0 2024-02-26 15:54 UTC

README

A collection of elements without styling for our Contao Themes. Contained Elements:

  • Contentbox
  • Teaserbox
  • Price Table
  • Feature Element
  • Slider Element
  • Content Wrapper
  • Contrast switcher icon
  • Size icon insert tag with backlink

Available insert tags

{{comp::contrast}}
{{comp::size::barrierefreiheit.html#fontSize}}

Where link can be replaced by a alias or a Uri in the comp::size::link insert tag. If no link is specified, the tag generates a link to the root page.

The insert tags can be placed anywhere you like, and the appearance depends on your theme or styling.

This symbol stands for switch between high and low contrast:

img.png

and this for change font size:

img_1.png

But these are only two examples. The appearance depends on your theme and styling.

The SVG icons are taken from: https://github.com/google/material-design-icons (See also the enclosed license under LICENSE_MATERIAL_DESIGN_ICONS).

Available CSS classes

The bundle provides several CSS classes for high contrast mode:

# excerpt

.hc-invert,
.hc-invert-pictures img,
.hc-invert-pictures svg {
    filter: invert(1);
}

.hc-greyscale,
.hc-greyscale-pictures img,
.hc-greyscale-pictures svg {
    filter: grayscale(1);
}

.hc-bg-black {
    background: black !important;
    color: white !important;
}

These classes can be used to control how the website behaves when high contrast is applied. All classes can be found here.

Configuration

You have the option to configure the use of high contrast and font size to a small extent. This is done in the start point of the website for the entire page tree below. You can find the options under ► pageswebsite start page under the legend ► WCAG settings (Web Content Accessibility Guidelines). WCAG here stands for the official Web Content Accessibility Guide. img_3.png

Here you can de/activate features (i.e. insert tags) individually and define the assignment between the page explaining the font size change and the icon.

German

Dieses Bundle bringt verschiedene Elemente mit Templates (ohne Styling) für unsere Contao Themes mit. Enthaltene Elemente:

  • Contentbox
  • Teaserbox
  • Preistabelle
  • Feature-Element
  • Slider-Element
  • Inhaltscontainer
  • Kontrastwechsler Icon
  • Insert Tag für Schriftgröße mit Backlink-Funktion

Verfügbare Insert-Tags

Das Bundle stellt die zwei Insert-Tags bereit:

{{comp::contrast}}
{{comp::size::link}}

Wobei link beim Insert-Tag comp::size::link durch einen alias oder eine Uri ersetzt werden kann. Wird kein link angegeben, so generiert das Tag einen Link auf die Root-Page. Die Insert-Tags können beliebig platziert werden, wobei das Aussehen von Ihrem Theme oder Styling abhängig ist.

Dabei steht dieses Symbol für hohen Kontrast umschalten:

img.png

und dieses für Schriftgröße ändern:

img_1.png

Das sind aber nur zwei Beispiele. Die Darstellung ist von Deinem Theme und vom Styling abhängig.

The SVG icons stammen aus: https://github.com/google/material-design-icons (Siehe dazu auch die beiliegende Lizenz unter LICENSE_MATERIAL_DESIGN_ICONS).

Verfügbare CSS-Klassen

Das Bundle stellt mehrere CSS Klassen für den hohen Kontrast Modus bereit:

# Auszug

.hc-invert,
.hc-invert-pictures img,
.hc-invert-pictures svg {
    filter: invert(1);
}

.hc-greyscale,
.hc-greyscale-pictures img,
.hc-greyscale-pictures svg {
    filter: grayscale(1);
}

.hc-bg-black {
    background: black !important;
    color: white !important;
}

Mit diesen Klassen kann gesteuert werden, wie sich die Website bei der Anwendung von hohem Kontrast verhält. Alle Klassen sind hier zu finden.

Konfiguration

Es gibt die die Möglichkeit, die Verwendung von hohem Kontrast und Schriftgröße in geringen Umfang zu konfigurieren. Das geschieht im Startpunkt der Website für den gesamten darunter liegenden Seitenbaum. Die Optionen ist unter ► SeitenWebsite-Startseite unter der Legende ► WCAG-Einstellungen (Web Content Accessibility Guidelines) zu finden. WCAG steht hier für die offiziellen Richtlinien zur barrierefreihen Gestaltung von Websites.

img_2.png

Hier können Sie Features (sprich Insert-Tags) einzeln de/aktivieren und die Zuordnung zwischen der Seite zur Erläuterung der Schriftgrößenänderung und dem Icon festlegen.

DEV

run before commit

vendor/bin/ecs check src tests