Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,760 --> 00:00:07,550
Now that our project is all set up let's open up our code editor find our app component HDMI file.
2
00:00:07,550 --> 00:00:10,690
We're going to add in some each CML to create the first card.
3
00:00:10,690 --> 00:00:15,410
So like just this one right here by itself we won't worry about the other two until we've really got
4
00:00:15,410 --> 00:00:17,220
this first one put together.
5
00:00:17,340 --> 00:00:23,560
I'm going to open up my code editor inside there I'll find once again the app directory inside there
6
00:00:23,590 --> 00:00:25,080
I'll find the app component.
7
00:00:25,120 --> 00:00:26,440
Each team will file.
8
00:00:26,440 --> 00:00:30,610
Remember this is the file that we change anytime we want to change what the user sees on the screen
9
00:00:31,880 --> 00:00:34,580
the inside of here we've got a lot of pre generated styling.
10
00:00:34,590 --> 00:00:39,120
And each team L so we will select everything inside and delete it.
11
00:00:39,120 --> 00:00:44,670
Now we can replace it with some H team l very similar to what we were looking at over here on the Bouma
12
00:00:44,730 --> 00:00:46,470
documentation page.
13
00:00:46,530 --> 00:00:49,200
Again we're not going to do an exact copy paste of this.
14
00:00:49,230 --> 00:00:51,710
We're gonna have some stuff that looks very similar.
15
00:00:51,730 --> 00:00:55,540
We're now going to write out a pretty good number of lines of HCM L in total.
16
00:00:55,560 --> 00:00:58,250
I think we've got to write out like maybe about 30 or so.
17
00:00:58,250 --> 00:01:05,020
So let's just get to it and get this part over with again inside my app component HDL file at the very
18
00:01:05,020 --> 00:01:05,370
top.
19
00:01:05,380 --> 00:01:09,840
I'll add in a deal with the class of card inside there.
20
00:01:09,860 --> 00:01:18,790
I'll add in another div with the class of hard dash image gonna close both positives off right away.
21
00:01:20,880 --> 00:01:28,960
Then inside the data with the card Image class I'll add in a figure with the class of image and is dash
22
00:01:29,440 --> 00:01:38,820
or by RE and I'll close off the figure and finally inside of the figure I'm going to add an image.
23
00:01:38,880 --> 00:01:42,060
And right now I'm going to leave at source property as empty.
24
00:01:42,220 --> 00:01:46,540
But this is going to be the image that gets displayed at the very top of each individual card.
25
00:01:46,550 --> 00:01:49,380
We'll figure out where we're going to pull these images from in just a moment.
26
00:01:49,380 --> 00:01:54,650
So that's why we're going to leave it as empty for right now that's all we have to do for the card image
27
00:01:54,650 --> 00:01:55,690
div.
28
00:01:55,730 --> 00:02:02,510
So after that first inner div right there you go down to the right above the closing overall card div
29
00:02:03,660 --> 00:02:10,880
and we'll add in the next big block I'm gonna put inside of here a day with the class of card dash content
30
00:02:12,140 --> 00:02:20,200
I'm going to close off that div then inside there I'm going to add in a div with the class of media
31
00:02:20,260 --> 00:02:31,100
dash content and close that one off inside of there we'll do a p tag with the class of title and is
32
00:02:31,160 --> 00:02:35,230
dash for lows off the p tag.
33
00:02:35,230 --> 00:02:39,030
And then inside of here we're going to put the title of our first card.
34
00:02:39,150 --> 00:02:42,040
The title of our first card from our mockup over here.
35
00:02:42,040 --> 00:02:43,670
It had said neat tree.
36
00:02:43,690 --> 00:02:50,860
They're going to put a neat tree inside that first paragraph element well put in neat tree right there.
37
00:02:50,870 --> 00:02:55,340
Next up we'll do the user name of the person who posted this thing so that's gonna go into a second
38
00:02:55,340 --> 00:03:05,280
paragraph element a class of sub Idol and is Dash six oh close off the paragraph then I'll put a user
39
00:03:05,280 --> 00:03:06,600
name inside of here.
40
00:03:06,780 --> 00:03:09,500
So our user names are going to look like Twitter handles in general.
41
00:03:09,530 --> 00:03:17,870
So we're going to have for this first one at nature I'll put in at Nature all right.
42
00:03:17,870 --> 00:03:21,860
Now the very last thing outside of the div with media content.
43
00:03:21,860 --> 00:03:29,390
So right after that closing element right there I'm gonna add in one more div with the class of content
44
00:03:30,990 --> 00:03:35,200
and inside of here is going to be the actual description of the card and the image.
45
00:03:35,440 --> 00:03:39,620
Essentially whatever is right here in the mockup I said saw awesome treat in my head today.
46
00:03:39,620 --> 00:03:40,900
Sure we can use that.
47
00:03:40,980 --> 00:03:49,730
I'll say saw this awesome tree bring my hike today and that should be at now at this point in time.
48
00:03:49,730 --> 00:03:55,120
I encourage you to do a quick double check of all the each smell inside this file.
49
00:03:55,160 --> 00:03:57,520
Make sure you've got all the appropriate closing elements.
50
00:03:57,560 --> 00:04:01,290
Make sure you don't have any titles specifically around stuff like subtitle right here.
51
00:04:01,310 --> 00:04:07,060
That is a word that for some reason my fingers never quite translate correctly into text once it's all
52
00:04:07,060 --> 00:04:07,520
it's good.
53
00:04:07,520 --> 00:04:13,330
I'll save the file flip back over to the application and we're going to see pretty much nothing.
54
00:04:13,440 --> 00:04:15,170
Huh that's interesting.
55
00:04:15,170 --> 00:04:19,460
Well if we look really closely at the very top left it looks like there's a broken image element right
56
00:04:19,460 --> 00:04:20,210
there.
57
00:04:20,210 --> 00:04:24,680
Remember right now we've got an image element without any source assigned to it.
58
00:04:24,680 --> 00:04:26,870
But this is that image.
59
00:04:26,870 --> 00:04:29,070
Let me tell you exactly what's going on here.
60
00:04:29,240 --> 00:04:34,640
I default when bonus shows a card element or when we use I should say when we use Bouma to style this
61
00:04:34,640 --> 00:04:39,060
card element it's going to apply a unlimited with to it.
62
00:04:39,110 --> 00:04:44,840
Right now our card element is trying to stretch the entire with the screen if you actually scroll down
63
00:04:44,840 --> 00:04:47,620
a little bit you'll actually see the rest of the card at the bottom.
64
00:04:48,090 --> 00:04:54,750
There's our title there's the user name and there's the content in order to really make this thing display
65
00:04:54,750 --> 00:04:55,540
correctly.
66
00:04:55,560 --> 00:04:57,450
We have to do two different things.
67
00:04:57,450 --> 00:05:00,590
First off obviously we need to put in a real image right here.
68
00:05:00,600 --> 00:05:04,750
The other thing we have to do is apply a whip constraint to the image as well.
69
00:05:04,900 --> 00:05:06,030
And I say it with constraints.
70
00:05:06,030 --> 00:05:11,790
I really just mean we need to add some custom CSX that's going to try to fix the width of this card
71
00:05:11,820 --> 00:05:16,580
to some particular value like maybe 300 pixels or something like that.
72
00:05:16,680 --> 00:05:21,300
That's the next two things we need to tackle to get this thing working correctly then the next video
73
00:05:21,300 --> 00:05:24,240
we're going to figure out how to add images into an angular project.
74
00:05:24,240 --> 00:05:27,390
We're also going to figure out how to add in some custom CSX as well.
7984
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.