All language subtitles for 6. Using Menus - Styling

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,130 --> 00:00:07,520 Now that we've actually got the menu hooked up for our application I want to go ahead and start styling 2 00:00:07,520 --> 00:00:13,820 it to make it consistent with the look of the header as well as add a little bit of functionality for 3 00:00:13,820 --> 00:00:17,690 managing which menu item we have selected. 4 00:00:17,760 --> 00:00:24,630 The first thing that I want to change is when you hover over this menu the white background here we 5 00:00:24,630 --> 00:00:29,700 definitely don't want something totally jarring and different like that and it would actually look a 6 00:00:29,700 --> 00:00:34,720 lot more integrated if it was just the same color as this app bar. 7 00:00:34,980 --> 00:00:41,700 So I think we want to go ahead and set that to our primary arc blue color but again since the menu is 8 00:00:41,700 --> 00:00:49,530 built on top of other material UI components we can't just add the coloring to the menu itself. 9 00:00:49,530 --> 00:00:57,730 The underlying component handling the menu in the background here is actually the paper component if 10 00:00:57,730 --> 00:01:03,580 you want to know how I know that and how you can find that out for other material UI components if you 11 00:01:03,580 --> 00:01:05,730 come up to the documentation. 12 00:01:05,740 --> 00:01:13,900 And this is here still on components and then under navigation and menus and then you scroll all the 13 00:01:13,900 --> 00:01:21,500 way down to our menu API and here you can scroll down and you'll see at the very bottom. 14 00:01:21,700 --> 00:01:29,560 These for our CSX style sheet names and the rule names you can see the real name paper and that is the 15 00:01:29,560 --> 00:01:38,730 styles applied to the paper component in the menu component so if we want to pass on styles to the paper 16 00:01:38,760 --> 00:01:48,750 component in our menu from the API what we can do is come to the menu and instead of setting a class 17 00:01:49,290 --> 00:01:53,460 a class name instead of doing this we're going to set. 18 00:01:53,460 --> 00:02:01,890 Class is classes and we're going to set this equal to our brackets and inside of this an object with 19 00:02:01,890 --> 00:02:09,210 the property paper and that is coming from our paper component and the name that we have right here. 20 00:02:09,210 --> 00:02:10,690 This rule name. 21 00:02:10,770 --> 00:02:15,360 So if we wanted to target the list we would use list but the paper. 22 00:02:15,660 --> 00:02:20,730 And then we make the value of this whatever class we want to set. 23 00:02:20,730 --> 00:02:29,610 So let's create classes from our classes object dot menu and of course that means we need to come up 24 00:02:29,610 --> 00:02:33,040 above and inside of our styles object. 25 00:02:33,090 --> 00:02:38,380 Let's create a menu menu style. 26 00:02:38,520 --> 00:02:47,430 First things first of course is our background color and we'll set that equal to our theme dot palette 27 00:02:48,150 --> 00:02:56,770 dot com in dot blue if we save this and then we come back over to our application and now we hover over 28 00:02:57,010 --> 00:03:01,310 the services tab you see our blue background. 29 00:03:01,330 --> 00:03:07,090 So that style is properly being passed down to the paper component. 30 00:03:07,150 --> 00:03:14,570 But now we want to make sure the each menu item looks like the other tabs in the header we'll start 31 00:03:14,570 --> 00:03:23,480 by actually setting a color here for the font of white which will set the font color for all of the 32 00:03:23,480 --> 00:03:25,900 text inside of the entire menu. 33 00:03:25,970 --> 00:03:32,410 And if we save this we can flip over and see that the text is now white now. 34 00:03:32,420 --> 00:03:39,910 A few more things is I'm don't necessarily like how the menu is floating above the header. 35 00:03:39,920 --> 00:03:45,890 I think the for this application it would look much better more integrated within it. 36 00:03:45,890 --> 00:03:52,670 And so we can do that by coming down to our menu component and let's go ahead and here underneath all 37 00:03:52,670 --> 00:03:56,810 the rest of the props and make sure you're on your menu components. 38 00:03:56,870 --> 00:04:00,720 Let's give it an elevation of zero. 39 00:04:00,890 --> 00:04:08,360 And this will change its default material UI elevation and drop shadow to these zero preset in the theme 40 00:04:08,570 --> 00:04:16,250 which is obviously none so if we save this we'll now see you when we hover over the tab then our menu 41 00:04:16,280 --> 00:04:23,240 looks perfectly integrated with the page and that is really I think a clean look of what we were really 42 00:04:23,240 --> 00:04:24,320 going for. 43 00:04:24,320 --> 00:04:29,400 So now we obviously just need to make sure that all of that text is styled correctly. 44 00:04:29,430 --> 00:04:35,190 So what's come down to the first menu item and add a classes. 45 00:04:35,210 --> 00:04:39,440 So we'll need to be passing the styles down here as well. 46 00:04:39,440 --> 00:04:44,470 And here we'll set that equal to the route. 47 00:04:44,660 --> 00:04:55,930 Make sure that's an all in an object the route class with a class's name of menu item again if you need 48 00:04:55,930 --> 00:05:04,360 to know which components style to pass down directly to go and check the component API on the material 49 00:05:04,390 --> 00:05:12,720 UI documentation page so now what's come up and create the menu items style and we'll do that. 50 00:05:12,720 --> 00:05:18,560 Setting it equal to our theme theme. 51 00:05:18,580 --> 00:05:21,000 And Dot typography Dot. 52 00:05:21,000 --> 00:05:21,880 Tab. 53 00:05:22,050 --> 00:05:28,590 Since all of these styles that we have for the rest of the tabs are already stored right there so you 54 00:05:28,590 --> 00:05:35,160 can already start to see why we set these styles in our theme and how that's already going to begin 55 00:05:35,370 --> 00:05:40,380 making our layouts more consistent and convenient. 56 00:05:40,410 --> 00:05:42,240 We'll go ahead and save that. 57 00:05:42,270 --> 00:05:48,840 And now if we come over and hover over we see that these services tab here at the top is looking good. 58 00:05:48,840 --> 00:05:53,520 And that's because we haven't actually set the class names on any of the other menu items yet. 59 00:05:53,970 --> 00:06:02,160 So let's scroll back down here and copy our classes route menu item and go ahead and put that on all 60 00:06:02,160 --> 00:06:05,640 of the rest of the menu items as well. 61 00:06:05,640 --> 00:06:12,900 Then you can save that and you'll see now when we hover over the all of the tabs look exactly like the 62 00:06:12,900 --> 00:06:20,240 rest of the tabs in the header and other small detail that we can change though is the the rest of the 63 00:06:20,240 --> 00:06:24,570 tabs and when they are not active you see that they're a little darker here. 64 00:06:24,590 --> 00:06:32,280 They're not as bright as the highlighted tab and that is actually a lower opacity that is being set. 65 00:06:32,690 --> 00:06:39,200 So I think that if we wanted our menu items to maintain that same look and feel as the rest of the header 66 00:06:39,470 --> 00:06:44,300 we could go ahead and do the same effect here to do this. 67 00:06:44,310 --> 00:06:52,260 We can go ahead and come back up to our menu items style which we already have set and we can add an 68 00:06:52,650 --> 00:07:01,020 ampersand colon hover property and set this equal to an object that contains these styles we want to 69 00:07:01,020 --> 00:07:06,190 apply when a menu item is being hovered over here. 70 00:07:06,230 --> 00:07:16,090 I would like to set an opacity of 1 and then outside of the hover underneath our tab let's set an opacity 71 00:07:16,510 --> 00:07:18,660 of zero point seven. 72 00:07:18,790 --> 00:07:25,300 And I actually have gone in and checked and this is the same opacity being set on the other tabs. 73 00:07:25,300 --> 00:07:32,050 So if we go ahead and we save this this is going to set a lower opacity for all of the tabs in less 74 00:07:32,050 --> 00:07:36,640 we are hovering over it in which it will receive the full brightness. 75 00:07:36,670 --> 00:07:43,540 So if we come over here and hover over we can now see that the rest of those tabs have the same look 76 00:07:43,600 --> 00:07:44,930 as all of the rest. 77 00:07:44,950 --> 00:07:53,090 And now when we hover over it it gets that highlighted to look giving it an extra interactive feel one 78 00:07:53,090 --> 00:08:00,440 last tiny stylistic choice that I personally would like to make here is how at the bottom of the menu 79 00:08:00,470 --> 00:08:02,830 you see we have these rounded corners. 80 00:08:02,900 --> 00:08:08,750 I actually would like it to just be sharp and I think that that kind of is more consistent with the 81 00:08:08,750 --> 00:08:10,480 feel of my application. 82 00:08:10,490 --> 00:08:20,270 So if we go ahead and on our menu style let's go ahead and set a border radius of 0 pixels and that 83 00:08:20,270 --> 00:08:26,360 will just make sure that now if we hover over it we have those sharp corners which I think I just kind 84 00:08:26,360 --> 00:08:30,310 of like a little bit more this looks really good now though. 85 00:08:30,310 --> 00:08:36,100 And if we come down and we switch between all of the different pages you can see that the navigation 86 00:08:36,100 --> 00:08:38,410 still works as well as a hovering. 87 00:08:38,410 --> 00:08:43,440 And the services tab is being maintained as active. 88 00:08:43,470 --> 00:08:49,560 The only thing that could make this better though is if we actually were able to keep track of which 89 00:08:49,560 --> 00:08:51,850 menu item we have selected. 90 00:08:51,870 --> 00:08:57,870 So if we're on the Web site development page when we hover over this there should maybe be a little 91 00:08:57,870 --> 00:09:02,210 indicator that the Web site development page is already active. 92 00:09:02,250 --> 00:09:05,400 So let's go ahead and set that up in the next video. 10569

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