{% docstring %} Renders a hero `section` wrapped in a `` tag. The background image will pull the `image` from the section if `use_image` is set to `True` oterwise, Calico will try to use `background`. Most text will be rendered inside of an `
` tag. If `cta` is present, it will be rendered as a link after the `
` tag. Markdown from that section will be yielded at the end of the `
` tag. Attributes: image: (optional) Path to the image to use if `use_image` is `True`. This will always be used inside a `` tag inside the `` if present. svg: (optional) if `svg` is provided instead of `img`, calico will try to include the widget named in this property (ex: `svg.gitlab`) background: (optional) Path to the image to use if `use_image` is `False` style: (optional) Adds `style` to `
` use_image: (defaults to `False`) Whether to use `image` or `background` as background image. use_title: (defaults to `False`) Whether to use the `title` of the section inside an `

` tag inside of `
`. use_subtitle: (defaults to `False`) Whether to use the `subtitle` of the section after the `

` tag inside of `
`. Is only useful if `use_title` is `True`. title: (optional) Will be rendered as `

` inside of `
` if `use_title` is `True` subtitle: (optional) Will be rendered after `

` inside of `
` if `use_title` and `use_subtitle` are both `True` cta: (optional) Call to action object. Rendered as an `` tag after `
` - `class`: (defaults to `'btn btn-primary btn-lg px-4 me-md-2'`) the class to apply to the cta `` tag - `link`: (defaults to `'#'`) cta link - `text`: cta text {% enddocstring %} {% with img=section|section_or_obj_background:object %} {% if img %} {% endif %} {% if section.image %} {% elif section.svg %} {% endif %}
{% if section.use_title %}

{{object.metadata.title}}

{% elif section.title %}

{{section.title}}

{% endif %} {% if section.use_subtitle %} {{object.metadata.subtitle|markdown}} {% elif section.subtitle %} {{section.subtitle|markdown}} {% endif %} {{yield}}
{% if section.cta %}
{{ section.cta.text }} {% endif %} {% endwith %}