Mise en exergue

Documentation du tag

Returns a highlight item. Takes a dict as parameter, with the following structure:

data_dict = {
    "content": "Content of the highlight item (can include html)",
    "size_class": "(Optional) string with name of text-size related classes",
    "extra_classes": "(Optional) string with names of extra classes",
}

Relevant size_classes:

  • fr-text--sm
  • fr-text--lg

Relevant extra_classes:

  • Color classes (See the list), for example fr-highlight--green-emeraude

All of the keys of the dict can be passed directly as named parameters of the tag.

Tag name: dsfr_highlight

Usage: {% dsfr_highlight data_dict %}

Exemples

Exemple 1

{'content': 'Contenu de la mise en exergue', 'size_class': 'fr-text--sm'}

Contenu de la mise en exergue

Exemple 2

{'content': 'Mise en exergue avec bordure colorée',
 'extra_classes': 'fr-highlight--green-emeraude'}

Mise en exergue avec bordure colorée