2016-07-15 17:10:12 -04:00
|
|
|
// template: public/_includes/_hero
|
|
|
|
//- Refer to jade.template.html and addJadeDataDocsProcessor to figure out where the context of this jade file originates
|
2016-04-18 15:57:16 -04:00
|
|
|
- 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-07-15 17:10:12 -04:00
|
|
|
//- renamer :: String -> String
|
|
|
|
//- Renames `Let` and `Var` into `Const`
|
2016-05-16 11:35:01 -04:00
|
|
|
- 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
|
|
|
|
2016-09-12 11:34:29 -04:00
|
|
|
header.hero.background-sky
|
|
|
|
h1(class="hero-title #{textFormat}") #{headerTitle}
|
|
|
|
|
|
|
|
if useBadges
|
|
|
|
if stability
|
|
|
|
span(class="badge is-#{stability}").
|
|
|
|
#{capitalize(stability)}
|
|
|
|
if security
|
|
|
|
span(class="badge is-deprecated").
|
|
|
|
Security Risk
|
|
|
|
|
|
|
|
//CLEAR FLOAT ELEMENTS
|
|
|
|
.clear
|
2015-03-01 09:42:31 -05:00
|
|
|
|
|
|
|
if subtitle
|
2016-09-12 11:34:29 -04:00
|
|
|
h2.hero-subtitle #{subtitle}
|
|
|
|
|
|
|
|
else if docType
|
|
|
|
h2.hero-subtitle #{renamer(capitalize(docType))}
|
|
|
|
|
|
|
|
|
|
|
|
if current.path[3] == 'api' && current.path[1] == 'dart'
|
|
|
|
block breadcrumbs
|
|
|
|
|