Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit d26afa9

Browse files
Adam-Meisenwardbell
authored andcommitted
docs(toh-6): Move styles from sample.css to heroes.component.css
closes #1751 Move additional styles from `sample.css` to `hero-search.component.css`. Edit tutorial to reflect the removal of `sample.css` and the change to `heroes.component.css`. Edit tutorial to reflect the addition of `hero-search.component.css` file. Edit `hero-search.component.ts` to include styles from `hero-search.component.css`. Remove reference to `/public/docs/_examples/toh-6/ts/sample.css` from `/public/docs/_examples/toh-6/ts/index.html`.
1 parent b93fb12 commit d26afa9

File tree

5 files changed

+22
-16
lines changed

5 files changed

+22
-16
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
/* #docregion */
2-
.error {color:red;}
3-
button.delete-button{
4-
float:right;
5-
background-color: gray !important;
6-
color:white;
7-
}
8-
92
.search-result{
103
border-bottom: 1px solid gray;
114
border-left: 1px solid gray;
@@ -21,4 +14,3 @@ button.delete-button{
2114
width: 200px;
2215
height: 20px;
2316
}
24-

public/docs/_examples/toh-6/ts/app/hero-search.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Hero } from './hero';
1111
@Component({
1212
selector: 'hero-search',
1313
templateUrl: 'app/hero-search.component.html',
14+
styleUrls: ['app/hero-search.component.css'],
1415
providers: [HeroSearchService]
1516
})
1617
export class HeroSearchComponent implements OnInit {

public/docs/_examples/toh-6/ts/app/heroes.component.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* #docregion */
12
.selected {
23
background-color: #CFD8DC !important;
34
color: white;
@@ -57,3 +58,10 @@ button {
5758
button:hover {
5859
background-color: #cfd8dc;
5960
}
61+
/* #docregion additions */
62+
.error {color:red;}
63+
button.delete-button{
64+
float:right;
65+
background-color: gray !important;
66+
color:white;
67+
}

public/docs/_examples/toh-6/ts/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77

88
<link rel="stylesheet" href="styles.css">
9-
<link rel="stylesheet" href="sample.css">
109

1110
<!-- Polyfill(s) for older browsers -->
1211
<script src="node_modules/core-js/client/shim.min.js"></script>

public/docs/ts/latest/tutorial/toh-pt6.jade

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ block add-new-hero-via-detail-comp
319319
The user can *delete* an existing hero by clicking a delete button next to the hero's name.
320320
Add the following to the heroes component HTML right after the hero name in the repeated `<li>` tag:
321321
+makeExcerpt('app/heroes.component.html', 'delete')
322-
322+
:marked
323+
Add the following to the bottom of the `HeroesComponent` CSS file:
324+
+makeExcerpt('app/heroes.component.css', 'additions')
323325
:marked
324326
Now let's fix-up the `HeroesComponent` to support the *add* and *delete* actions used in the template.
325327
Let's start with *add*.
@@ -415,7 +417,9 @@ block observables-section-intro
415417
The component template is simple &mdash; just a text box and a list of matching search results.
416418

417419
+makeExample('app/hero-search.component.html')
418-
420+
:marked
421+
We'll also want to add styles for the new component.
422+
+makeExample('app/hero-search.component.css')
419423
:marked
420424
As the user types in the search box, a *keyup* event binding calls the component's `search` method with the new search box value.
421425

@@ -559,6 +563,7 @@ block filetree
559563
.file hero-detail.component.html
560564
.file hero-detail.component.ts
561565
.file hero-search.component.html (new)
566+
.file hero-search.component.css (new)
562567
.file hero-search.component.ts (new)
563568
.file hero-search.service.ts (new)
564569
.file rxjs-operators.ts
@@ -572,7 +577,6 @@ block filetree
572577
.file typings ...
573578
.file index.html
574579
.file package.json
575-
.file sample.css (new)
576580
.file styles.css
577581
.file systemjs.config.json
578582
.file tsconfig.json
@@ -597,30 +601,32 @@ block file-summary
597601
`toh-6/ts/app/app.component.ts,
598602
toh-6/ts/app/heroes.component.ts,
599603
toh-6/ts/app/heroes.component.html,
604+
toh-6/ts/app/heroes.component.css,
600605
toh-6/ts/app/hero-detail.component.ts,
601606
toh-6/ts/app/hero-detail.component.html,
602607
toh-6/ts/app/hero.service.ts,
603-
toh-6/ts/app/in-memory-data.service.ts,
604-
toh-6/ts/sample.css`,
608+
toh-6/ts/app/in-memory-data.service.ts`,
605609
null,
606610
`app.comp...ts,
607611
heroes.comp...ts,
608612
heroes.comp...html,
613+
heroes.comp...css,
609614
hero-detail.comp...ts,
610615
hero-detail.comp...html,
611616
hero.service.ts,
612-
in-memory-data.service.ts,
613-
sample.css`
617+
in-memory-data.service.ts`
614618
)
615619

616620
+makeTabs(
617621
`toh-6/ts/app/hero-search.service.ts,
618622
toh-6/ts/app/hero-search.component.ts,
619623
toh-6/ts/app/hero-search.component.html,
624+
toh-6/ts/app/hero-search.component.css,
620625
toh-6/ts/app/rxjs-operators.ts`,
621626
null,
622627
`hero-search.service.ts,
623628
hero-search.component.ts,
624629
hero-search.service.html,
630+
hero-search.component.css,
625631
rxjs-operators.ts`
626632
)

0 commit comments

Comments
 (0)