Skip to content

Commit

Permalink
feat: header macro accepts logo_link
Browse files Browse the repository at this point in the history
  • Loading branch information
smotornyuk committed Sep 28, 2023
1 parent 6be75ce commit ef61fc6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% from "macros/nswdesignsystem/_header_main.html" import main with context %}

{% macro inner(site_title) %}
{% macro inner(site_title, logo_link="/") %}
<div class="nsw-header__inner">
<div class="nsw-header__main">
{{ main(site_title) }}
{{ main(site_title, logo_link) }}
</div>
<div class="nsw-header__menu">
<button type="button" class="js-open-nav" aria-expanded="false" aria-controls="main-nav">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{% macro main(title) %}
{% macro main(title, logo_link="/") %}
<div class="nsw-header__waratah">
<a href="/nsw-design-system/">
<a href="{{ logo_link }}">
{% include "snippets/nswdesignsystem/header_logo.html" %}
<span class="sr-only">{{ _("NSW Government") }}</span>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

{% from "macros/nswdesignsystem/_header_search_area.html" import search_area with context %}

{% macro header(site_title) %}
{% macro header(site_title, logo_link="/") %}
<header class="nsw-header">
<div class="nsw-header__container">
{{ inner(site_title) }}
{{ inner(site_title, logo_link) }}
{{ search_area() }}
</div>
</header>
Expand Down

0 comments on commit ef61fc6

Please sign in to comment.