angular-cn/public/_includes/_hero.jade

28 lines
1.1 KiB
Plaintext

// Refer to jade.template.html and addJadeDataDocsProcessor to figure out where the context of this jade file originates
- var textFormat = '';
- var headerTitle = title + (typeof varType !== 'undefined' ? (': ' + varType) : '');
- var capitalize = function capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); }
- var useBadges = docType || stability;
if current.path[4] && current.path[3] == 'api'
- var textFormat = 'is-standard-case'
header(class="hero background-sky")
h1(class="hero-title text-display-1 #{textFormat}") #{headerTitle}
if useBadges
span(class="badges")
if docType
span(class="status-badge").
#{capitalize(docType)}
if stability
span(layout="row" class="status-badge")
// badge circle is filled based on stability by matching a css selector in _hero.scss
span(class="status-circle status-#{stability}")
span Stability: #{capitalize(stability)}
if subtitle
h2.hero-subtitle.text-subhead #{subtitle}
else if current.path[0] == "docs"
!= partial("_version-dropdown")