Change the movie list text by adjusting the code in
movie-list.component.css
to accomplish the following:
movies
class).1.movies {
2 color: purple;
3 font-size: 1.3vw;
4}
5
6h3 {
7 text-align: center;
8}
Add two more items to the movies
array.
movies = ['The Manchurian Candidate', 'Oceans 8', 'The Incredibles', 'Hidden Figures'];
fav-photos
Component¶The fav-photos
component has been generated, but it is incomplete. The
page needs more images, which also need to be smaller in size.
In the FavPhotosComponent
class, assign a better section heading to
the photosTitle
variable.
photosTitle = 'Random Images';
In the .html
file for this component, use placeholders in the img
tags to display your chosen images.
<img src="{{image1}}" alt="Oops! Missing photo!">
Use the .css
file for this component to make all the images be the
same size.
img {
width: 40%;
height: auto;
}
The page needs a set of links to favorite websites.
Generate a fav-links
component. Open fav-links.component.ts
and
shorten the tag name to just fav-links
.
@Component({
selector: 'fav-links',
templateUrl: './fav-links.component.html',
styleUrls: ['./fav-links.component.css']
})
Inside each <a>
tag, set the href
attribute equal to a
placeholder for an element in the favLinks
array:
<a href = "{{favLinks[0]}}">LaunchCode</a> <br>
<a href = "{{favLinks[1]}}">WebElements</a>
Rearrange the tags fav-photos
, fav-links
, page-title
, etc. to
create a specific page layout:
app.component.html
has <div>
tags to set up a three-column row.
Use this to arrange the movie list, images, and chore list.
<div class="col-3">
<movie-list></movie-list>
</div>
<div class="col-3">
<fav-photos></fav-photos>
</div>
<div class="col-3">
<chores-list></chores-list>
</div>
Add a horizontal line below the three lists with the <hr>
tag.
<!-- three lists are here -->
</div>
<hr>
<fav-links></fav-links>