2016-04-18 15:57:16 -04:00
|
|
|
// Refer to jade.template.html and addJadeDataDocsProcessor to figure out where the context of this jade file originates
|
|
|
|
- var textFormat = '';
|
2015-08-19 19:12:16 -04:00
|
|
|
- var headerTitle = title + (typeof varType !== 'undefined' ? (': ' + varType) : '');
|
2016-04-18 15:57:16 -04:00
|
|
|
- var capitalize = function capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); }
|
|
|
|
- var useBadges = docType || stability;
|
2016-04-22 17:25:55 -04:00
|
|
|
|
2016-05-16 11:35:01 -04:00
|
|
|
// renamer :: String -> String
|
|
|
|
// Renames `Let` and `Var` into `Const`
|
|
|
|
- var renamer = function renamer(docType) {
|
|
|
|
- return (docType === 'Let' || docType === 'Var') ? 'Const' : docType
|
|
|
|
- }
|
|
|
|
|
2015-05-01 09:04:23 -04:00
|
|
|
if current.path[4] && current.path[3] == 'api'
|
2015-07-28 02:39:47 -04:00
|
|
|
- var textFormat = 'is-standard-case'
|
2015-05-01 09:04:23 -04:00
|
|
|
|
2015-02-26 09:45:32 -05:00
|
|
|
header(class="hero background-sky")
|
2016-04-26 12:15:34 -04:00
|
|
|
div(class="inner-header")
|
|
|
|
h1(class="hero-title text-display-1 #{textFormat}") #{headerTitle}
|
|
|
|
if useBadges
|
2016-04-22 17:25:55 -04:00
|
|
|
span(class="badges")
|
|
|
|
if docType
|
|
|
|
span(class="status-badge").
|
2016-05-16 11:35:01 -04:00
|
|
|
#{renamer(capitalize(docType))}
|
2016-04-22 17:25:55 -04:00
|
|
|
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)}
|
2016-05-09 14:22:34 -04:00
|
|
|
if security
|
|
|
|
span(class="status-badge security-risk-badge").
|
|
|
|
Security Risk
|
2015-03-01 09:42:31 -05:00
|
|
|
|
|
|
|
if subtitle
|
|
|
|
h2.hero-subtitle.text-subhead #{subtitle}
|
|
|
|
|
|
|
|
else if current.path[0] == "docs"
|
2016-04-18 15:57:16 -04:00
|
|
|
!= partial("_version-dropdown")
|