# Conflicts: # harp.json # public/_includes/_hero-home.jade # public/_includes/_scripts-include.jade # public/docs/_examples/quickstart/js/package.1.json # public/docs/_includes/_side-nav.jade # public/docs/js/latest/cookbook/ts-to-js.jade # public/docs/ts/latest/_data.json # public/docs/ts/latest/api/_data.json # public/docs/ts/latest/cookbook/_data.json # public/docs/ts/latest/cookbook/aot-compiler.jade # public/docs/ts/latest/cookbook/ngmodule-faq.jade # public/docs/ts/latest/cookbook/rc4-to-rc5.jade # public/docs/ts/latest/glossary.jade # public/docs/ts/latest/guide/_data.json # public/docs/ts/latest/guide/attribute-directives.jade # public/docs/ts/latest/guide/browser-support.jade # public/docs/ts/latest/guide/forms.jade # public/docs/ts/latest/guide/lifecycle-hooks.jade # public/docs/ts/latest/guide/ngmodule.jade # public/docs/ts/latest/guide/router.jade # public/docs/ts/latest/guide/style-guide.jade # public/docs/ts/latest/guide/template-syntax.jade # public/docs/ts/latest/guide/testing.jade # public/docs/ts/latest/guide/upgrade.jade # public/docs/ts/latest/quickstart.jade # public/docs/ts/latest/tutorial/_data.json # public/docs/ts/latest/tutorial/toh-pt5.jade # public/docs/ts/latest/tutorial/toh-pt6.jade
38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
//- template: public/_includes/_hero
|
|
//- 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;
|
|
//- renamer :: String -> String
|
|
//- Renames `Let` and `Var` into `Const`
|
|
- var renamer = function renamer(docType) {
|
|
- return (docType === 'Let' || docType === 'Var') ? 'Const' : docType
|
|
- }
|
|
|
|
if current.path[4] && current.path[3] == 'api'
|
|
- var textFormat = 'is-standard-case'
|
|
|
|
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").
|
|
安全风险
|
|
|
|
//- CLEAR FLOAT ELEMENTS
|
|
.clear
|
|
|
|
if subtitle
|
|
h2.hero-subtitle #{subtitle}
|
|
else if docType
|
|
h2.hero-subtitle #{renamer(capitalize(docType))}
|
|
|
|
if current.path[3] == 'api' && current.path[1] == 'dart'
|
|
block breadcrumbs
|
|
|