All language subtitles for 6. Styling The Hero Block

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian Download
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:01,140 --> 00:00:08,310 We're definitely a great starting point for the hero block but let's go ahead and start right away on 2 00:00:08,340 --> 00:00:16,610 making this look exactly like we have designed one of the first steps that I would like to do is to 3 00:00:16,610 --> 00:00:22,600 get this animation all the way over here against the right edge of the screen. 4 00:00:22,820 --> 00:00:31,430 And since the container for these items you can see the container here since this container has a direction 5 00:00:31,610 --> 00:00:41,330 of row the horizontal direction is actually the main axis so to align items along our main axis for 6 00:00:41,330 --> 00:00:45,430 the container we need to use the justify property. 7 00:00:45,590 --> 00:00:53,320 And we said that we want for the animation to be aligned against the right end of the screen. 8 00:00:53,330 --> 00:00:58,360 So we're going to use the Flex and property. 9 00:00:58,430 --> 00:01:02,190 Let's go ahead and save that and we'll see our page refresh. 10 00:01:02,300 --> 00:01:09,680 And now that animation is pushed all the way over to the end that'll give it the nice a flush look with 11 00:01:09,680 --> 00:01:11,100 the edge of the screen. 12 00:01:11,180 --> 00:01:18,580 But now we need all of our text and buttons to come down and be censored with this in the middle now 13 00:01:18,610 --> 00:01:24,450 since we're wanting to move this item down in the vertical direction. 14 00:01:24,520 --> 00:01:31,580 And we've already established that the main axis is the horizontal direction for this container. 15 00:01:31,600 --> 00:01:39,220 And so we use the justify prop. So to align these items along the vertical axis of this container we're 16 00:01:39,220 --> 00:01:47,560 going to want to use the line items property and we're going to want to set that equal to just a center. 17 00:01:47,670 --> 00:01:53,480 And that should center up our text with the animation for go ahead and save that. 18 00:01:53,620 --> 00:02:00,910 We will see that that was the case that already looks a lot closer to what our design file looks like. 19 00:02:00,940 --> 00:02:06,160 But let's start going in and styling those buttons as well as our text. 20 00:02:06,160 --> 00:02:12,580 We're going to start with that text and we're actually going to replace this div with a typography component. 21 00:02:12,610 --> 00:02:22,990 So what's come up and we will import the typography typography components from material dash UI slash 22 00:02:22,990 --> 00:02:26,110 core slash typography. 23 00:02:26,320 --> 00:02:34,210 Let's go down and get rid of the div now and we can put our typography component and replace that closing 24 00:02:34,210 --> 00:02:38,460 tag as well oh girl Ivy. 25 00:02:38,500 --> 00:02:38,910 There we go. 26 00:02:40,910 --> 00:02:47,660 Now here I'm also going to make a slight executive decision on the design and the more and more that 27 00:02:47,660 --> 00:02:54,440 I've been looking at this the more that I think I would like the text to be centered instead of it being 28 00:02:54,440 --> 00:02:56,200 left aligned like this. 29 00:02:56,420 --> 00:03:01,790 So instead of being left aligned like that I think I'd really prefer all to just be centered and from 30 00:03:01,790 --> 00:03:05,270 my testing I really think that that just ends up looking the best. 31 00:03:05,270 --> 00:03:08,320 So let's go ahead and all our typography components. 32 00:03:08,390 --> 00:03:14,900 We can add in a line property to change the text alignment of the items within it and let's set that 33 00:03:15,020 --> 00:03:16,400 to center. 34 00:03:16,430 --> 00:03:23,780 So we'll go ahead and save that to see our text now centered and styled since we added the typography 35 00:03:23,810 --> 00:03:25,270 component. 36 00:03:25,400 --> 00:03:30,560 We're going to want that text to be pretty large though since it's the main text on this page. 37 00:03:30,620 --> 00:03:39,710 So let's go ahead and we're going to add a variance on the typography component of H to we can save 38 00:03:39,710 --> 00:03:43,960 that and we'll see the page refresh with that much larger style. 39 00:03:44,000 --> 00:03:51,590 So let's go ahead and open up our theme dot J.S. file and we'll come up above the age 3 and let's add 40 00:03:51,590 --> 00:04:03,000 in H 2 variant and open up and add the comma down below and let's change the font family to a railway 41 00:04:03,540 --> 00:04:16,950 and a font weight of seven hundred a font size of 2.5 rem and a color of our arc blue. 42 00:04:16,950 --> 00:04:22,110 So let's use the bag ticks to inject the arc blue color. 43 00:04:22,230 --> 00:04:24,240 So let's go ahead and we'll save this. 44 00:04:24,240 --> 00:04:30,360 Now see the page refresh and you can see that looks exactly like our design. 45 00:04:30,370 --> 00:04:36,080 The only difference is that there actually should be a little bit more spacing between these words here. 46 00:04:36,130 --> 00:04:44,140 And so I actually want to come and add one more style to this a line height set to one point five. 47 00:04:44,140 --> 00:04:46,430 So we'll save that and we'll see that. 48 00:04:46,430 --> 00:04:52,960 Now there is much more spacing in between those which I think gives it a bit of a better look let's 49 00:04:52,960 --> 00:05:00,280 go back to the landing page now and we can close out of the themed J.S. and I'll point out right now 50 00:05:00,310 --> 00:05:07,750 that if we go and we start to resize the screen there it kind of starts to get jumbled and it doesn't 51 00:05:07,750 --> 00:05:14,740 look the best and as we continue to shrink it down you'll see it actually does resize pretty well here. 52 00:05:14,800 --> 00:05:21,700 But I want to go and make sure they re sizes too being stacked on top of each other instead of being 53 00:05:21,700 --> 00:05:28,720 laid out horizontally at a smaller breakpoint because you can see they here at this larger break point 54 00:05:28,990 --> 00:05:36,040 is already stacked on top of each other when in reality it should look like this all the way until I 55 00:05:36,040 --> 00:05:38,250 get down to a small enough size. 56 00:05:38,260 --> 00:05:42,300 So here here it's obviously breaking much too early. 57 00:05:42,340 --> 00:05:45,520 So let's go ahead and on each of those grid items. 58 00:05:45,520 --> 00:05:52,840 So the grid item for our text grid item for the animation sets this grid item and that grid item. 59 00:05:52,870 --> 00:05:57,580 Let's go ahead and we're going to add the small prop. 60 00:05:57,670 --> 00:06:00,590 Go ahead and set this for both of them. 61 00:06:00,670 --> 00:06:06,970 And if you remember from the documentation walkthrough if we just set a breakpoint without any of the 62 00:06:06,970 --> 00:06:10,900 numbers on it it's going to set the auto property. 63 00:06:10,900 --> 00:06:17,470 And so that means that they are automatically going to share this space until they get below the specified 64 00:06:17,500 --> 00:06:22,820 breakpoint at which point they will each receive their own line. 65 00:06:22,830 --> 00:06:26,640 Let's go ahead and save that and we'll see the page refreshes. 66 00:06:26,640 --> 00:06:32,040 And now at that breakpoint where before they were stacked it is now still horizontal. 67 00:06:32,040 --> 00:06:40,830 And as we go and refresh this it stays horizontal and you can see it now just resized our text to maintain 68 00:06:41,100 --> 00:06:47,820 the horizontal look until we get to the small brake point at which point when we get underneath it will 69 00:06:47,820 --> 00:06:49,850 turn to stacking. 70 00:06:49,860 --> 00:06:57,150 So by specifying these small breakpoint ensures that only at the extra small breakpoint will actually 71 00:06:57,150 --> 00:06:59,490 snap to being stacked. 72 00:06:59,490 --> 00:07:06,780 So all of these break points above is going to maintain the horizontal look by sharing the space and 73 00:07:06,810 --> 00:07:10,310 shrinking down the items as necessary. 74 00:07:10,310 --> 00:07:15,370 I'm going to bring this back up to size now back up to here. 75 00:07:15,540 --> 00:07:23,010 Now you saw when we were resizing that window they when we were at a very small size here you can see 76 00:07:23,350 --> 00:07:27,990 that actually that makes the animation pretty small right there. 77 00:07:28,260 --> 00:07:32,060 And I think that's actually a bit smaller than I would like it to be. 78 00:07:32,070 --> 00:07:39,420 And if we come and make the screen all the way large you can see it actually gets way too big and messes 79 00:07:39,420 --> 00:07:40,710 up the design. 80 00:07:40,710 --> 00:07:48,280 So I'm going to go ahead and a shrink that back down and to make sure it never gets too big or too small. 81 00:07:48,360 --> 00:07:56,400 We can set a minimum width with the men width property and a maximum width with the max width property. 82 00:07:56,490 --> 00:07:59,660 So let's go ahead and on our Waddy component. 83 00:07:59,910 --> 00:08:10,920 Let's add a class name equal to classes dot animation and we'll go up to our styles object up here and 84 00:08:10,920 --> 00:08:23,340 we'll open this up and we'll add the animation class with a max with set to 50 m and a men with set 85 00:08:23,400 --> 00:08:26,750 to twenty one m. 86 00:08:26,840 --> 00:08:31,060 I also want to push the animation off of the top edge right here. 87 00:08:31,070 --> 00:08:37,180 How it's flush with the app bar as well as put in a little more space between the text. 88 00:08:37,220 --> 00:08:47,790 So let's go ahead and we'll add a margin top of to M and A margin left of 10 percent. 89 00:08:47,810 --> 00:08:53,420 And so that's going to make that margin between the text responsive based on the screen size so that 90 00:08:53,420 --> 00:08:59,980 it shouldn't ever be too much and it didn't actually take effect because I made a little mistake. 91 00:09:00,020 --> 00:09:07,340 We need to put the class name not on the NYT component but on the item wrapping it. 92 00:09:07,370 --> 00:09:11,960 So let's go ahead and save that now and we'll see the page refresh. 93 00:09:11,960 --> 00:09:16,490 And now there is a little gap where it is being pushed down a little bit. 94 00:09:16,490 --> 00:09:18,090 Thanks to our margin. 95 00:09:18,230 --> 00:09:24,710 But to illustrate the difference here between M and percent you can see that this margin at the top 96 00:09:24,950 --> 00:09:27,020 is set to 2 m. 97 00:09:27,170 --> 00:09:33,800 And so it creates this nice little gap here and no matter if we change the screen size it's always going 98 00:09:33,800 --> 00:09:37,580 to be that same little gap right up there. 99 00:09:37,580 --> 00:09:44,600 It's just the animations resizing so it might be hard to tell but it is that same a little 2 AM gap. 100 00:09:44,630 --> 00:09:51,440 Now what makes it responsive is the number of pixels that make up that gap is going to be different 101 00:09:51,440 --> 00:09:57,860 on each device and we'll make it proportional based on the screen size but then it generates the fixed 102 00:09:57,860 --> 00:10:02,140 proportional value with percentage though. 103 00:10:02,210 --> 00:10:09,560 If you look at the spacing between the text and the animation here as I resize the page that amount 104 00:10:09,560 --> 00:10:18,350 of spacing actually increases because 10 percent of this screen size is a much larger area than 10 percent 105 00:10:18,620 --> 00:10:20,970 of that screen size. 106 00:10:21,020 --> 00:10:27,800 So hopefully that makes a little more sense to you guys of why you would switch between em and percentages 107 00:10:27,950 --> 00:10:30,920 but that's definitely given us the look that we wanted. 108 00:10:30,920 --> 00:10:37,490 And like I said if we now open this up and we keep increasing it you can see there's a point at which 109 00:10:37,490 --> 00:10:40,520 the animation no longer grows larger. 110 00:10:40,610 --> 00:10:47,510 And if we start shrinking it down you'll see there's a point where it no longer shrinks and it'll start 111 00:10:47,510 --> 00:10:56,300 getting closer to the text and here you can see where the buttons now stack on top of each other. 112 00:10:56,370 --> 00:11:02,160 And it really is squishing the text down until we reached the break point where it stacks on top of 113 00:11:02,160 --> 00:11:02,760 one another. 114 00:11:03,150 --> 00:11:08,060 So this look right here right there even though it's just for a little bit. 115 00:11:08,220 --> 00:11:12,460 We definitely want to avoid that that is not the look that we want. 116 00:11:12,480 --> 00:11:17,850 So let's go ahead and work on styling those buttons in the next video. 13300

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.