{#
/**
 * Skip Links Component
 *
 * Accessibility feature to allow passing over the nav and going directly to the content.
 *
 * Note that this component has 2 pieces:
 * - the link
 * - the target the link jumps to
 * These are provided in separate twig files for your convenience. To implement the Skip Links
 * component in your project, you should not include this .twig file; instead, you should
 * include the _link.twig and _target.twig files separately at the appropriate respecetive
 * places in your markup.
 *
 * Available variables:
 * - attributes: Additional HTML attributes for the link.
 * - modifier_class: Additional CSS class(es) to change look or behavior of the link.
 * - link_text: The text for the link when in focus - defaults to 'Skip to main content'
 * - target_id: The id of the element in the page to skip to - defaults to 'su-main-content-1891'
 * - target_text: The text to be read by the screenreader when the user clicks the skiplink - defaults to 'Main Content'
 */
#}
{#
  Template Include Paths
  Override these if you want to include a different template.
#}
{%- if template_path_skiplink is empty -%}
  {%- set template_path_skiplink = "@decanter/components/skiplinks/link.twig" -%}
{%- endif -%}
{%- if template_path_skiptarget is empty -%}
  {%- set template_path_skiptarget = "@decanter/components/skiplinks/target.twig" -%}
{%- endif -%}

<header>
  {% include template_path_skiplink with
    {
      "target_id": target_id,
      "link_text": link_text,
      "attributes": attributes,
      "modifier_class": modifier_class
    }
    only
  %}
</header>
<main>
  {% include template_path_skiptarget with
    {
      "target_id": target_id,
      "target_text": target_text
    }
    only
  %}
</main>
