1.0.1 • Published 2 years ago

@nycopportunity/pattern-application-header v1.0.1

Weekly downloads
-
License
GPL-3.0+
Repository
github
Last release
2 years ago

Application Header (WIP)

Shared Application Header for the NYC Opportunity UI Patterns Framework. Currently a work–in-progress.

npm install @nycopportunity/pattern-application-header

Styles

The Application Header Pattern includes two stylesheets. One that sets default design tokens and display properties using CSS Custom Properties and one that applies the tokens to the menu CSS selectors. The tokens can be used as is or overridden.

@import '@nycopportunity/pattern-application-header/src/tokens';
@import '@nycopportunity/pattern-application-header/src/menu';

Markup

<div class="o-application-header">
  <div>
    <a class="o-application-header__link" href="#">
      <svg aria-hidden="true" class="o-application-header__link" fill="none" height="15" viewBox="0 0 45 15" width="45" xmlns="http://www.w3.org/2000/svg">
        <path d="M44.063 6.55068L45 5.62603V2.81301L42.187 0H32.813L30 2.81301V0.939041L29.063 0H25.313L24.376 0.939041V2.81301L22.5 4.68904L20.626 2.81301V0.939041L19.687 0H15.937L15 0.939041L14.063 0H10.313L9.37603 0.939041V4.68904L4.68699 0H0.936986L0 0.939041V14.063L0.936986 15H4.68699L5.62603 14.063V10.313L10.313 15H14.063L15 14.063V6.56301L19.687 11.25V14.063L20.626 15H24.376L25.313 14.063V11.25L30 6.56301V12.189L32.813 15H42.187L45 12.189V9.37603L44.063 8.43699H39.374V9.37603H35.626V5.62603H39.374V6.55068H44.063Z" fill="white"></path>
        <path d="M44.3322 0.632879C44.4205 0.632879 44.4966 0.62466 44.4966 0.52192C44.4966 0.435619 44.4123 0.425345 44.3425 0.425345H44.2007V0.632879H44.3322ZM44.2027 1.03562H44.0856V0.326715H44.3548C44.5253 0.326715 44.6137 0.386304 44.6137 0.530139C44.6137 0.659592 44.5356 0.710961 44.4288 0.72329L44.6281 1.03562H44.4966L44.3137 0.731509H44.2048V1.03562H44.2027ZM44.3281 0.139728C44.0507 0.139728 43.8349 0.357537 43.8349 0.669866C43.8349 0.961646 44.024 1.2 44.3281 1.2C44.6034 1.2 44.8192 0.984249 44.8192 0.669866C44.8192 0.357537 44.6034 0.139728 44.3281 0.139728ZM44.3281 1.31096C43.9603 1.31096 43.6973 1.03562 43.6973 0.669866C43.6973 0.283564 43.989 0.0287695 44.3281 0.0287695C44.663 0.0287695 44.9548 0.283564 44.9548 0.669866C44.9568 1.05411 44.6651 1.31096 44.3281 1.31096Z" fill="white"></path>
      </svg>
    </a>
    <div class="o-application-header__divider">|</div>
    <div class="o-application-header__name">Opportunity Standard</div>
  </div>
  <div>
    <a class="o-application-header__link" href="#">Profile</a>
    <div class="o-application-header__divider">|</div>
    <a class="o-application-header__link" href="#">Log Out</a>
  </div>
</div>