George Kalpakas
fa0c65efe5
build(docs-infra): remove dependency on FontAwesome ( #27250 )
...
We were only using two FontAwesome icons (`link` and `twitter`). The
twitter icon is already available as an SVG (used in the topbar) and a
similar link icon is available via 'Material Icons', which we are
already brining in.
This commit removes the dependency on FontAwesome and uses the available
icons instead.
_Before:_

_After:_

PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas
af952cad62
fix(docs-infra): ensure material icons are cached for offline access ( #27250 )
...
In order for 'Material Icons' to work offline, their `.woff2` file needs
to have been cached by the SW. This file is not requested by the
browser, until an element needs to use the icon font.
In order to speed up the initial page load and avoid FOUC, we use
inlined SVGs for all icons in the app shell. As a result, the `.woff2`
file may not be requested, when a user visits angular.io. If they go
offline before visiting a page that does actually use 'Material Icons',
then such icons will not work correctly (e.g. the `error_outline` icon
used in the error page for failed requests due to network
unanvailability).
This commit fixes this, by adding a non-visible element that needs the
'Material Icons' font on the main component. Thids ensures that the
`.woff2` file will always be loaded, even if the page does not use any
material icons.
(Note: The element is inserted lazily to avoid affecting the initial
rendering.)
PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas
27b196f585
fix(docs-infra): remove hard-coded color from inlined SVG icons ( #27250 )
...
This allows the icons to inherit the color of their HTMLElement parent.
PR Close #27250
2018-12-05 13:26:27 -08:00
George Kalpakas
2adf03e54a
fix(docs-infra): inline SVG icons used in page load sensitive UI ( #27250 )
...
These icons are part of the app shell and used on every load (on both
desktop and mobile). Inlining them ensures they are rendered asap.
PR Close #27250
2018-12-05 13:26:26 -08:00
George Kalpakas
33977a2ad5
refactor(docs-infra): move minified lunr
script to the generated
directory ( #27250 )
...
PR Close #27250
2018-12-05 13:26:26 -08:00
onlyflix
4001bb44d2
fix(docs-infra): don't call setSearch when not clicking in the searchBox and no searchResults ( #26590 )
...
Fix to call locationService.setSearch less often to avoid unnecessary
downloading of favicons
Fixes #26544
PR Close #26590
2018-11-26 09:26:34 -08:00
Zhicheng WANG
f31ef52623
fix: 高亮显示活动
2018-11-13 08:51:28 +08:00
Brandon Roberts
affcbbdd7e
feat(docs-infra): add getting started widgets ( #26059 )
...
PR Close #26059
2018-11-02 10:34:53 -07:00
Zhicheng Wang
deeeaa9647
docs: 修正坏链
2018-10-22 18:47:41 +08:00
Zhicheng Wang
a9ac90d3df
Merge remote-tracking branch 'en/master' into aio
...
# Conflicts:
# aio/content/guide/ajs-quick-reference.md
# aio/content/guide/animations.md
# aio/content/guide/aot-compiler.md
# aio/content/guide/architecture-components.md
# aio/content/guide/architecture-modules.md
# aio/content/guide/architecture-next-steps.md
# aio/content/guide/architecture-services.md
# aio/content/guide/architecture.md
# aio/content/guide/attribute-directives.md
# aio/content/guide/bootstrapping.md
# aio/content/guide/browser-support.md
# aio/content/guide/cheatsheet.md
# aio/content/guide/comparing-observables.md
# aio/content/guide/component-interaction.md
# aio/content/guide/component-styles.md
# aio/content/guide/dependency-injection-in-action.md
# aio/content/guide/dependency-injection-pattern.md
# aio/content/guide/dependency-injection.md
# aio/content/guide/deployment.md
# aio/content/guide/displaying-data.md
# aio/content/guide/dynamic-component-loader.md
# aio/content/guide/elements.md
# aio/content/guide/feature-modules.md
# aio/content/guide/form-validation.md
# aio/content/guide/forms.md
# aio/content/guide/glossary.md
# aio/content/guide/hierarchical-dependency-injection.md
# aio/content/guide/i18n.md
# aio/content/guide/lazy-loading-ngmodules.md
# aio/content/guide/lifecycle-hooks.md
# aio/content/guide/ngmodule-faq.md
# aio/content/guide/ngmodule-vs-jsmodule.md
# aio/content/guide/ngmodules.md
# aio/content/guide/npm-packages.md
# aio/content/guide/observables-in-angular.md
# aio/content/guide/observables.md
# aio/content/guide/pipes.md
# aio/content/guide/practical-observable-usage.md
# aio/content/guide/providers.md
# aio/content/guide/quickstart.md
# aio/content/guide/reactive-forms.md
# aio/content/guide/router.md
# aio/content/guide/rx-library.md
# aio/content/guide/security.md
# aio/content/guide/service-worker-communications.md
# aio/content/guide/service-worker-getting-started.md
# aio/content/guide/service-worker-intro.md
# aio/content/guide/setup-systemjs-anatomy.md
# aio/content/guide/setup.md
# aio/content/guide/singleton-services.md
# aio/content/guide/structural-directives.md
# aio/content/guide/styleguide.md
# aio/content/guide/template-syntax.md
# aio/content/guide/testing.md
# aio/content/guide/typescript-configuration.md
# aio/content/guide/universal.md
# aio/content/guide/updating.md
# aio/content/guide/upgrade.md
# aio/content/guide/user-input.md
# aio/content/guide/visual-studio-2015.md
# aio/content/marketing/docs.md
# aio/content/navigation.json
# aio/content/tutorial/toh-pt0.md
# aio/content/tutorial/toh-pt1.md
# aio/content/tutorial/toh-pt2.md
# aio/content/tutorial/toh-pt3.md
# aio/content/tutorial/toh-pt4.md
# aio/content/tutorial/toh-pt5.md
# aio/content/tutorial/toh-pt6.md
# aio/ngsw-manifest.json
# aio/package.json
# aio/src/app/custom-elements/api/api-list.component.html
# aio/src/app/custom-elements/api/api-list.component.ts
# aio/src/index.html
# aio/tools/transforms/templates/api/base.template.html
# aio/tools/transforms/templates/api/class.template.html
# aio/tools/transforms/templates/api/directive.template.html
# aio/tools/transforms/templates/api/enum.template.html
# aio/tools/transforms/templates/api/includes/class-overview.html
# aio/tools/transforms/templates/api/includes/deprecation.html
# aio/tools/transforms/templates/api/includes/export-as.html
# aio/tools/transforms/templates/api/includes/info-bar.html
# aio/tools/transforms/templates/api/includes/interface-overview.html
# aio/tools/transforms/templates/api/includes/selectors.html
# aio/tools/transforms/templates/api/lib/directiveHelpers.html
# aio/tools/transforms/templates/api/lib/githubLinks.html
# aio/tools/transforms/templates/api/lib/memberHelpers.html
# aio/tools/transforms/templates/api/package.template.html
# aio/yarn.lock
# packages/common/http/src/module.ts
# packages/common/src/common_module.ts
# packages/common/src/directives/ng_for_of.ts
# packages/common/src/directives/ng_if.ts
# packages/common/src/directives/ng_template_outlet.ts
# packages/common/src/location/location.ts
# packages/common/src/pipes/async_pipe.ts
# packages/common/src/pipes/json_pipe.ts
# packages/common/src/pipes/number_pipe.ts
# packages/common/src/pipes/slice_pipe.ts
# packages/core/src/change_detection/change_detector_ref.ts
# packages/core/src/di/injectable.ts
# packages/core/src/linker/template_ref.ts
# packages/core/src/linker/view_container_ref.ts
# packages/core/src/metadata/di.ts
# packages/core/src/metadata/ng_module.ts
# packages/core/src/render/api.ts
# packages/forms/src/directives/form_interface.ts
# packages/forms/src/directives/ng_form.ts
# packages/forms/src/directives/ng_model.ts
# packages/forms/src/directives/reactive_directives/form_control_name.ts
# packages/forms/src/directives/select_control_value_accessor.ts
# packages/forms/src/directives/validators.ts
# packages/forms/src/form_providers.ts
# packages/forms/src/model.ts
# packages/forms/src/validators.ts
# packages/router/src/config.ts
# packages/router/src/router.ts
# packages/router/src/router_module.ts
# packages/router/src/router_state.ts
2018-10-21 17:43:29 +08:00
Pete Bacon Darwin
2a78dcbd5a
feat(docs-infra): remove stable & experimental from status selector ( #26595 )
...
PR Close #26595
2018-10-19 14:35:52 -07:00
William Marques
fc6dad40ac
fix(docs-infra): rename "title" by "header" to avoid unwanted tooltips ( #26396 )
...
Closes #26174
PR Close #26396
2018-10-17 11:05:29 -07:00
George Kalpakas
95d0626a1e
ci(docs-infra): reduce flakyness ( #26459 )
...
PR Close #26459
2018-10-15 15:23:36 -07:00
Pete Bacon Darwin
7777a99fe5
fix(docs-infra): highlight current CLI command in navigation menu ( #26388 )
...
Previously CLI was being treated like the API page, where the top level item
had to be highlighted for any command page. But now the CLI commands all
have their own navigation item, which can be selected, so there is no need
to special case CLI paths any more.
Closes #26373
PR Close #26388
2018-10-12 09:02:11 -07:00
George Kalpakas
9320ec0f43
build(docs-infra): upgrade Angular to 7.0.0-rc.0 and TypeScript to 3.1.1 ( #26202 )
...
PR Close #26202
2018-10-08 13:43:31 -07:00
George Kalpakas
10e414f617
test(docs-infra): fix tests ( #26202 )
...
PR Close #26202
2018-10-08 13:43:31 -07:00
Pete Bacon Darwin
f29b218060
feat(docs-infra): generate Angular CLI command reference ( #25363 )
...
PR Close #25363
2018-09-26 11:24:02 -07:00
Zhicheng Wang
7b2200ff5b
chore: remove noindex for robots
2018-09-24 10:48:53 +08:00
Pete Bacon Darwin
a880686081
fix(docs-infra): ensure that only search is removed from URL on click ( #26056 )
...
When we have navigated to the site via a URL that contains a search
query param, the site shows the search results.
We want to remove that query param from the URL when the search
results are closed, but the current implementation is also removing
other query params unnecessarily.
Now only the search param is removed when the search results are
closed.
See https://github.com/angular/angular/pull/25479/files#r219497804
for more context.
PR Close #26056
2018-09-21 10:29:24 -07:00
Pete Bacon Darwin
026b60cd70
build(docs-infra): expose deprecated status on items more clearly ( #25750 )
...
PR Close #25750
2018-09-21 10:26:48 -07:00
Pete Bacon Darwin
96f9f03d25
build(docs-infra): improve search quality ( #25750 )
...
PR Close #25750
2018-09-21 10:26:48 -07:00
Pete Bacon Darwin
bc5cb8153e
build(docs-infra): separate NgModules from Classes in API docs ( #25734 )
...
PR Close #25734
2018-09-19 16:18:24 -07:00
Sergej
8f0fcc3f71
feat(docs-infra): Add opensearch description ( #25479 )
...
Enables Chrome users to search angular.io and its subdomains from the browsers navigation bar.
Not sure if compatible with Firefox yet.
The queried term in the URL is removed after closing the search-results.
PR Close #25479
2018-09-19 15:31:49 -07:00
Zhicheng Wang
9e94c2a119
docs: 样式微调
2018-09-15 08:13:04 +08:00
Zhicheng Wang
ad4a674b65
docs: 添加外部导航链接
2018-09-11 12:57:12 +08:00
Pete Bacon Darwin
234661b3d6
feat(docs-infra): disable "status" selector in API list when displaying only packages ( #25718 )
...
Closes #25708
PR Close #25718
2018-09-05 09:28:28 -07:00
George Kalpakas
f71cce7f9b
build(docs-infra): remove the dependency on rxjs-compat
( #19795 )
...
PR Close #19795
2018-08-27 16:30:42 -04:00
George Kalpakas
b6ccd9f7bd
fix(docs-infra): correctly show icon for fetch error when offline ( #19795 )
...
PR Close #19795
2018-08-27 16:30:42 -04:00
Alex Rickabaugh
be24f9f0cb
feat(docs-infra): Convert AIO to use the new Service Worker 5.0.0. ( #19795 )
...
AIO is currently using a beta version of @angular/service-worker.
Since that was implemented, the SW has been rewritten and released
as part of Angular 5.0.0. This commit updates AIO to use the latest
implementation, with an appropriate configuration file that caches
the various AIO assets in useful ways.
PR Close #19795
2018-08-27 16:30:42 -04:00
Pete Bacon Darwin
a224df43af
feat(docs-infra): support sending Google Analytics events ( #25042 )
...
PR Close #25042
2018-08-01 17:04:19 -07:00
Pete Bacon Darwin
e8d4211d5c
feat(docs-infra): allow notification bar to show arbitrary content ( #25020 )
...
This change generalises the notification bar rendering to allow
more complex content to be displayed.
Now you must provide the full HTML of the notification message
when using `<aio-notification>`.
Also you can control whether clicking the content triggers the
notification to close or not.
This will support the new notification specified in "Other Items : 3" of
[#24140 ](https://github.com/angular/angular/issues/24140#issuecomment-397480410 )
PR Close #25020
2018-07-27 09:29:40 -07:00
Pete Bacon Darwin
6a4d66d432
style(docs-infra): remove unnecessary call to console.log() ( #25020 )
...
PR Close #25020
2018-07-27 09:29:39 -07:00
Zhicheng Wang
2d485c6589
Merge remote-tracking branch 'en/master' into aio
...
# Conflicts:
# aio/content/guide/animations.md
# aio/content/guide/aot-compiler.md
# aio/content/guide/api-page-class.md
# aio/content/guide/architecture-components.md
# aio/content/guide/architecture-modules.md
# aio/content/guide/architecture-services.md
# aio/content/guide/architecture.md
# aio/content/guide/attribute-directives.md
# aio/content/guide/browser-support.md
# aio/content/guide/component-interaction.md
# aio/content/guide/component-styles.md
# aio/content/guide/dependency-injection-in-action.md
# aio/content/guide/dependency-injection-pattern.md
# aio/content/guide/dependency-injection.md
# aio/content/guide/deployment.md
# aio/content/guide/displaying-data.md
# aio/content/guide/elements.md
# aio/content/guide/form-validation.md
# aio/content/guide/forms.md
# aio/content/guide/frequent-ngmodules.md
# aio/content/guide/glossary.md
# aio/content/guide/hierarchical-dependency-injection.md
# aio/content/guide/http.md
# aio/content/guide/i18n.md
# aio/content/guide/language-service.md
# aio/content/guide/lifecycle-hooks.md
# aio/content/guide/ngmodule-api.md
# aio/content/guide/ngmodule-faq.md
# aio/content/guide/npm-packages.md
# aio/content/guide/observables.md
# aio/content/guide/pipes.md
# aio/content/guide/providers.md
# aio/content/guide/quickstart.md
# aio/content/guide/reactive-forms.md
# aio/content/guide/releases.md
# aio/content/guide/router.md
# aio/content/guide/rx-library.md
# aio/content/guide/security.md
# aio/content/guide/service-worker-config.md
# aio/content/guide/service-worker-getting-started.md
# aio/content/guide/set-document-title.md
# aio/content/guide/setup.md
# aio/content/guide/structural-directives.md
# aio/content/guide/styleguide.md
# aio/content/guide/template-syntax.md
# aio/content/guide/testing-observables.md
# aio/content/guide/testing.md
# aio/content/guide/typescript-configuration.md
# aio/content/guide/universal.md
# aio/content/guide/upgrade.md
# aio/content/guide/user-input.md
# aio/content/guide/visual-studio-2015.md
# aio/content/guide/webpack.md
# aio/content/marketing/resources.json
# aio/content/navigation.json
# aio/content/tutorial/toh-pt0.md
# aio/content/tutorial/toh-pt1.md
# aio/content/tutorial/toh-pt4.md
# aio/content/tutorial/toh-pt5.md
# aio/content/tutorial/toh-pt6.md
# aio/src/app/custom-elements/api/api-list.component.ts
# aio/src/app/custom-elements/live-example/live-example.component.html
# aio/src/app/custom-elements/live-example/live-example.component.ts
# aio/src/app/layout/doc-viewer/doc-viewer.component.ts
# aio/src/styles/main.scss
# aio/tools/transforms/remark-package/services/renderMarkdown.js
2018-07-27 10:51:18 +08:00
Zhicheng Wang
0977e1f442
fix: 文字微调
2018-07-27 08:09:27 +08:00
Pete Bacon Darwin
74b250b146
feat(docs-infra): enable filtering by package on API list page ( #24631 )
...
PR Close #24631
2018-07-13 19:45:55 -04:00
Pete Bacon Darwin
d8c828c9b1
build(docs-infra): implement the 'package' API template ( #24631 )
...
PR Close #24631
2018-07-13 19:45:54 -04:00
George Kalpakas
e01b539ee5
refactor: infer type for it()
assertion functions ( #19904 )
...
PR Close #19904
2018-07-06 13:48:02 -07:00
Stefanie Fluin
a26965812b
feat(docs-infra): Add GitHub and Twitter external icon links to topnav toolbar ( #24542 )
...
PR Close #24542
2018-06-20 16:50:15 -07:00
George Kalpakas
c2e131119b
refactor(aio): rename method (loadContainingCustomElements --> loadContainedCustomElements) ( #23944 )
...
PR Close #23944
2018-05-29 18:00:33 -04:00
George Kalpakas
7866684f2b
fix(aio): avoid loading the ToC component until it is necessary ( #23944 )
...
PR Close #23944
2018-05-29 18:00:33 -04:00
George Kalpakas
6e05ae02a2
fix(aio): show embedded ToC ( #23944 )
...
On narrow screens (where there is not enough room on the right to show
the floating ToC), an embedded ToC is shown (via an `<aio-toc embedded>`
element in the document). Since ToC was not a custom element, the
component was not instantiated for the embedded element.
This commit fixes it by making `aio-toc` a custom element and loading it
manually for the floating ToC (if necessary).
PR Close #23944
2018-05-29 18:00:33 -04:00
George Kalpakas
431a42a238
feat(aio): add component for lazy-loading custom element ( #23944 )
...
PR Close #23944
2018-05-29 18:00:33 -04:00
George Kalpakas
7a9c987e56
refactor(aio): order custom elements by selector ( #23944 )
...
PR Close #23944
2018-05-29 18:00:33 -04:00
George Kalpakas
ae86cb3be0
fix(aio): do not load custom elements again while already loading ( #23944 )
...
PR Close #23944
2018-05-29 18:00:33 -04:00
Pete Bacon Darwin
ddd6124802
feat(aio): display code-tabs in a Material Design "card" ( #24027 )
...
This helps to connect the "content" of the tab to its label.
Closes #23985
PR Close #24027
2018-05-29 16:52:06 -04:00
George Kalpakas
f8c6947205
fix(aio): avoid unnecessary re-calculations in live-examples ( #23960 )
...
With `plnkrs`, we used to choose a different plnkr mode (normal vs
embedded) based on the size of the screen. This affected the layout of
the plnkr page ("embedded" plnkr mode was usable on small screens, while
"normal" mode wasn't). This is not to be confused with the live-example
mode we use today to determine whether the live-example should be a link
(that open StackBlitz on a new page) or embedded into the document
(using an iframe).
Since we no longer need to change the live-example URL based on the
screen size, there is no need to listen for rezise events on Window. The
necessary properties can be computed once and certain variables are
obsolete.
PR Close #23960
2018-05-21 16:10:12 -04:00
George Kalpakas
41fea84957
fix(aio): allow setting live-example title from content ( #23960 )
...
Previously, it was possible to set the live-example title as content in
the `<live-example>` element. This relied on our custom loader
functionality that extracted the content from the DOM element before
passing it to the Angular compiler and stored it on a property for later
retrieval.
Since we switched to custom elements (and got rid of the custom loader),
the property is no longer populated with the contents. As a result, many
live examples show the default title ("live example") instead of the one
specified as content.
This commit fixes it by projecting the content into an invisible node
for later retrieval (similar to what we do in other components, such as
the `CodeExampleComponent`).
PR Close #23960
2018-05-21 16:10:12 -04:00
George Kalpakas
a7b07defe1
refactor(aio): clean up attribute-utils
( #23960 )
...
PR Close #23960
2018-05-21 16:10:12 -04:00
Zhicheng Wang
f7a6ccbb5d
fix: merge code & fix some issues
2018-05-16 08:19:28 +08:00
Zhicheng Wang
8136953a09
Merge branch 'en-master' into aio
...
# Conflicts:
# aio/content/examples/dynamic-component-loader/src/app/ad-banner.component.ts
# aio/content/examples/reactive-forms/src/app/hero-list/hero-list.component.ts
# aio/content/examples/upgrade-module/src/systemjs.config.1.js
# aio/content/guide/aot-compiler.md
# aio/content/guide/architecture-components.md
# aio/content/guide/architecture-modules.md
# aio/content/guide/architecture-next-steps.md
# aio/content/guide/architecture-services.md
# aio/content/guide/architecture.md
# aio/content/guide/bootstrapping.md
# aio/content/guide/cheatsheet.md
# aio/content/guide/comparing-observables.md
# aio/content/guide/component-styles.md
# aio/content/guide/dependency-injection-in-action.md
# aio/content/guide/dependency-injection.md
# aio/content/guide/deployment.md
# aio/content/guide/docs-style-guide.md
# aio/content/guide/dynamic-component-loader.md
# aio/content/guide/elements.md
# aio/content/guide/glossary.md
# aio/content/guide/hierarchical-dependency-injection.md
# aio/content/guide/http.md
# aio/content/guide/lifecycle-hooks.md
# aio/content/guide/ngmodule-faq.md
# aio/content/guide/npm-packages.md
# aio/content/guide/observables.md
# aio/content/guide/providers.md
# aio/content/guide/quickstart.md
# aio/content/guide/reactive-forms.md
# aio/content/guide/releases.md
# aio/content/guide/router.md
# aio/content/guide/service-worker-config.md
# aio/content/guide/service-worker-devops.md
# aio/content/guide/service-worker-getting-started.md
# aio/content/guide/service-worker-intro.md
# aio/content/guide/setup.md
# aio/content/guide/singleton-services.md
# aio/content/guide/styleguide.md
# aio/content/guide/testing.md
# aio/content/guide/typescript-configuration.md
# aio/content/guide/universal.md
# aio/content/guide/updating.md
# aio/content/guide/upgrade.md
# aio/content/marketing/features.html
# aio/content/navigation.json
# aio/content/tutorial/toh-pt0.md
# aio/content/tutorial/toh-pt3.md
# aio/content/tutorial/toh-pt4.md
# aio/content/tutorial/toh-pt5.md
# aio/content/tutorial/toh-pt6.md
# aio/package.json
# aio/src/app/documents/document.service.ts
# aio/src/app/layout/doc-viewer/doc-viewer.component.ts
# aio/src/app/shared/toc.service.ts
# aio/tools/transforms/templates/api/base.template.html
# aio/yarn.lock
2018-05-15 23:26:31 +08:00