18F/web-design-standards

View on GitHub
packages/templates/usa-base/includes/_banner.twig

Summary

Maintainability
Test Coverage
{% set settings = {
  'en': {
    'banner': {
      'id': 'gov-banner-default',
      'text': 'An official website of the United States government',
      'action': 'Here’s how you know',
      'aria_label': 'Official website of the United States government'
    },
    'domain': {
      'heading': 'Official websites use .gov',
      'text': 'A <strong>.gov</strong> website belongs to an official government organization in the United States.'
    },
    'https': {
      'heading': 'Secure .gov websites use HTTPS',
      'pretext': 'A <strong>lock</strong>',
      'posttext': 'or <strong>https://</strong> means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.'
    }
  },
  'es': {
    'banner': {
      'id': 'gov-banner-lang-es',
      'text': 'Un sitio oficial del Gobierno de Estados Unidos',
      'action': 'Así es como usted puede verificarlo',
      'aria_label': 'Un sitio oficial del Gobierno de Estados Unidos'
    },
    'domain': {
      'heading': 'Los sitios web oficiales usan .gov',
      'text': 'Un sitio web <strong>.gov</strong> pertenece a una organización oficial del Gobierno de Estados Unidos.'
    },
    'https': {
      'heading': 'Los sitios web seguros .gov usan HTTPS',
      'pretext': 'Un <strong>candado</strong>',
      'posttext': 'o <strong>https://</strong> significa que usted se conectó de forma segura a un sitio web .gov. Comparta información sensible sólo en sitios web oficiales y seguros.'
    }
  }
} %}

{% include "@components/usa-banner/src/usa-banner.twig" with settings[lang] %}