# Conflicts: # public/_data.json # public/_includes/_footer.jade # public/_includes/_hero-home.jade # public/_includes/_hero.jade # public/_includes/_main-nav.jade # public/_includes/_util-fns.jade # public/docs/_includes/_side-nav.jade # public/docs/ts/latest/_data.json # public/docs/ts/latest/cookbook/a1-a2-quick-reference.jade # public/docs/ts/latest/glossary.jade # public/docs/ts/latest/guide/_data.json # public/docs/ts/latest/guide/animations.jade # public/docs/ts/latest/guide/ngmodule.jade # public/docs/ts/latest/guide/router.jade # public/docs/ts/latest/guide/security.jade # public/docs/ts/latest/guide/server-communication.jade # public/docs/ts/latest/guide/style-guide.jade # public/docs/ts/latest/guide/testing.jade # public/docs/ts/latest/index.jade # public/docs/ts/latest/quickstart.jade # public/docs/ts/latest/testing/_data.json # public/docs/ts/latest/testing/application-under-test.jade # public/docs/ts/latest/testing/first-app-tests.jade # public/docs/ts/latest/testing/index.jade # public/docs/ts/latest/testing/jasmine-testing-101.jade # public/docs/ts/latest/testing/testing-an-angular-pipe.jade # public/index.jade # public/resources/css/main.scss # public/resources/css/module/_side-nav.scss
40 lines
1.2 KiB
Plaintext
40 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
|
|
|