Skip to content

Add Subheader Component with Menu Control

There are lots of unknown pieces with this issue. We need a mechanism to show/hide the navigation in the template.

To Do:

  • create a hazdev-subheader component
    • include a "menu" button that toggles the menu
      • is hidden if no [navigation] exists?
    • accepts input bound parameter
      • title: string program title? (e.g. "Earthquake Hazards Program")
      • cooperator: Cooperator contributor logo?
  • component spans width of page below the hazdev-header
  • create a visual separation for the subheader, options are:
    • background color that matches banner
    • bottom border for subheader
<!-- template.component.html -->
<gov-banner></gov-banner>
<hazdev-header [showSearch]="showSearch">
  <ng-content select=".header-content"></ng-content>
</hazdev-header>

<!-- hazdev-subheader goes here -->
<hazdev-subheader [title]="title" [cooperator]="cooperator"></hazdev-subheader>

<div *ngIf="navigation; else pageContent" class="grid-row grid-gap">
  <div class="tablet:grid-col-3 desktop:grid-col-2">
    <usa-sidenav [navigation]="navigation">
      <ng-content select="[usa-sidenav-header]" usa-sidenav-header></ng-content>
      <ng-content select="[usa-sidenav-footer]" usa-sidenav-footer></ng-content>
    </usa-sidenav>
  </div>
  <div class="tablet:grid-col-9 desktop:grid-col-10">
    <ng-container *ngTemplateOutlet="pageContent"></ng-container>
  </div>
</div>

Displayed in the sub header component, in order:

  • menu button (to expand/collapse naviation), text will read "menu"
  • title (e.g. "Earthquakes Hazard Program")
  • "in cooperation with {{ cooperator.name }}"
Edited by Eddie J Hunter