{#- This macro is for interal use within GOV.UK Frontend. It isn't intended for external use and may receive undocumented breaking changes in non-breaking releases of Frontend. #} {% from "govuk_frontend_jinja/macros/attributes.html" import govukAttributes %} {% macro govukLogo(params) %} {#- Default options #} {%- set useLogotype = params.useLogotype | default(true) %} {#- Calculate how wide the logo needs to be for the given parameters. #} {%- set svgWidth = 32 %} {%- set svgWidth = svgWidth + 130 if useLogotype else svgWidth %} {%- set _tudorCrown %} {%- endset %} {%- set _logotype %} {%- endset %} {#- The SVG needs `focusable="false"` so that Internet Explorer does not treat it as an interactive element - without this it will be 'focusable' when using the keyboard to navigate. #} {%- if params.ariaLabelText %}{{ params.ariaLabelText }}{% endif %} {{ _tudorCrown | safe | trim | indent(2) }} {% if useLogotype %} {{ _logotype | safe | trim | indent(2) }} {% endif %} {% endmacro %}