Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,440 --> 00:00:07,170
Before we star on the responsive design for this page let's actually fix real quick.
2
00:00:07,260 --> 00:00:13,860
The fact that these text inputs are not spanning the correct length of the page and that this is actually
3
00:00:13,860 --> 00:00:22,290
not correctly centers and the reason for that is actually my mistake and that is here on the grid item
4
00:00:22,290 --> 00:00:26,360
container with a style of Macs with 20.
5
00:00:26,400 --> 00:00:30,350
This is the container wrapping all of our items here.
6
00:00:30,660 --> 00:00:39,090
But we did not set this as a direction of home which gives us the stacking layout and since he was in
7
00:00:39,090 --> 00:00:44,850
the default direction of row it's essentially trying to force all of these inputs onto the same line
8
00:00:44,910 --> 00:00:47,160
which is why I was having a weird layout before.
9
00:00:47,610 --> 00:00:53,390
So let's go ahead and save that now and you see that it does indeed jump to the center.
10
00:00:53,400 --> 00:00:59,950
AND NOW WE CAN GO AHEAD AND ON EACH OF THESE TEXT FIELD components let's add the full width prop and
11
00:00:59,970 --> 00:01:07,470
go ahead and copy that paste onto this text field phone text field and onto our multiplying text field
12
00:01:07,890 --> 00:01:10,860
and we can save that see the page refresh.
13
00:01:11,040 --> 00:01:18,030
And now all of our text fields are spanning the full width of their container and all of that is now
14
00:01:18,030 --> 00:01:23,530
perfectly centered within its section now that that's straightened out.
15
00:01:23,620 --> 00:01:26,750
We can go ahead and let's start sizing this down.
16
00:01:26,830 --> 00:01:27,130
Right.
17
00:01:27,130 --> 00:01:34,570
Until we get to the point where we jump to the medium breakpoint here we're obviously going to have
18
00:01:34,570 --> 00:01:40,720
to start changing some styles but I think the most obvious is that we need this to now instead of being
19
00:01:40,720 --> 00:01:46,300
sitting next to each other like that we're gonna want all of that content centered up so let's scroll
20
00:01:46,300 --> 00:01:53,290
down to where we have our container with a class name of background and let's add a direction to this
21
00:01:53,290 --> 00:01:58,540
container and that's going to check a matches medium variable.
22
00:01:58,540 --> 00:02:04,720
And if that is true then we're going to set this to a column layout otherwise we'll leave it at the
23
00:02:04,720 --> 00:02:11,380
default of row and that of course means we need to come up and underneath or actually above our matches
24
00:02:11,400 --> 00:02:12,070
s.
25
00:02:12,220 --> 00:02:20,170
Let's create the constant of matches medium equal to our use media query calling the theme dot breakpoints
26
00:02:20,260 --> 00:02:28,710
dot down for medium then go ahead and save that and we will see the page refresh and the content is
27
00:02:28,710 --> 00:02:33,690
now in the column centered layout but let's go ahead and center up that text.
28
00:02:33,690 --> 00:02:40,800
So if we come down and we find the typography variant H2 for simple software let's go ahead and add
29
00:02:40,830 --> 00:02:47,970
in a line with a matches medium ternary statement setting center if that is true.
30
00:02:48,030 --> 00:02:56,980
Otherwise leaving it on defined you go ahead and let's copy that align property and paste it onto the
31
00:02:56,980 --> 00:03:03,490
other typography component as well and we can save that and we'll see the text refresh here to now be
32
00:03:03,490 --> 00:03:11,230
center aligned now if we continue shrinking the page down you'll see that these small breakpoint all
33
00:03:11,250 --> 00:03:17,990
the button the other content it all jumps to being centered here for the call to action section.
34
00:03:17,990 --> 00:03:18,730
You can see that.
35
00:03:19,070 --> 00:03:23,510
So let's go ahead and let's actually change all of these matches small.
36
00:03:23,690 --> 00:03:27,390
I think it's just these three you know just these three right here.
37
00:03:27,470 --> 00:03:33,350
We're going to change all of these two matches medium because we actually just want this entire page
38
00:03:33,590 --> 00:03:40,040
to switch over to its responsive styles for the medium section so we can go ahead and save that now
39
00:03:40,160 --> 00:03:43,270
and the page will refresh and it won't look any different.
40
00:03:43,280 --> 00:03:50,630
But once we go up now you see on the medium breakpoint we have our centered content.
41
00:03:50,700 --> 00:03:54,670
You can see actually that the estimate button still isn't perfectly centered.
42
00:03:54,810 --> 00:04:01,700
And that's because we need to come up and on our learn button and estimate button breakpoints or styles.
43
00:04:01,980 --> 00:04:05,060
So they have the style estimate button style learned button.
44
00:04:05,100 --> 00:04:07,620
They each have a small breakpoint.
45
00:04:07,620 --> 00:04:10,210
So let's change that to medium as well.
46
00:04:10,350 --> 00:04:12,790
Change that to medium and we can save this.
47
00:04:12,900 --> 00:04:20,420
And now that content is perfectly centered when we get to the medium breakpoint like this however remember
48
00:04:20,420 --> 00:04:25,730
on the regular call to action that we actually switch to a mobile background.
49
00:04:25,730 --> 00:04:27,650
So I'm going to want to do the same thing here.
50
00:04:27,860 --> 00:04:35,510
So let's come up and underneath our background let's import the mobile background from assets.
51
00:04:35,510 --> 00:04:41,620
Mobile background JPEG and then we can add inside of our background style.
52
00:04:41,780 --> 00:04:46,360
A theme break points down for medium.
53
00:04:46,370 --> 00:04:55,090
And here we can open that up and change our background image to the U.R.L. parentheses.
54
00:04:55,220 --> 00:05:02,540
Dollar sign braces with the mobile background we can save that and our page will jump and the mobile
55
00:05:02,540 --> 00:05:08,180
background is now in effect and you can see once we start sizing it down that starts to look really
56
00:05:08,180 --> 00:05:14,980
nice once the beach appears now once we're at this breakpoint we definitely don't want our content sitting
57
00:05:14,980 --> 00:05:16,450
up at the top like that.
58
00:05:16,450 --> 00:05:23,650
So let's scroll back down and find our large eight and extra large nine container for the background
59
00:05:23,890 --> 00:05:30,790
and we have our line items set to censor but once we're in the column layout of the medium breakpoint
60
00:05:31,120 --> 00:05:37,660
to move this content down in the center vertically we're going gonna have to specify the main axis since
61
00:05:37,660 --> 00:05:44,020
we're now in the column layout and we'll do that with the justify and we'll set this equal to a matches
62
00:05:44,230 --> 00:05:46,530
medium center.
63
00:05:46,720 --> 00:05:54,460
Otherwise undefined we can save that and that will refresh and we have some centred content.
64
00:05:54,520 --> 00:06:00,940
Now if we scroll back up here we can see the our contact us section is touching the very tops and very
65
00:06:00,940 --> 00:06:04,120
bottom of the space allotted to it.
66
00:06:04,120 --> 00:06:11,050
So let's go ahead and give it some extra spacing there by coming up and we'll find are large for extra
67
00:06:11,050 --> 00:06:21,060
large three container and let's go ahead and add a style of margin bottom matches medium.
68
00:06:21,080 --> 00:06:23,610
That's true we'll set it to five M..
69
00:06:23,770 --> 00:06:29,740
Otherwise zero because we're not going to want this unless we're at this stacked layout and we'll go
70
00:06:29,740 --> 00:06:37,750
ahead and set the margin top and we can go ahead and copy that same value with our ternary statement
71
00:06:38,020 --> 00:06:40,570
and go ahead and paste that in and hit save.
72
00:06:40,630 --> 00:06:47,650
And so we'll have that same margin bottom and top values and you can see that that gives us a nice padded
73
00:06:47,740 --> 00:06:56,290
look to our contact form now I also want to go ahead and let's center up this text for this layout.
74
00:06:56,430 --> 00:07:03,720
So on our typography variant H2 for contact us let's add in a line with the ternary statement for matches
75
00:07:03,720 --> 00:07:04,530
medium.
76
00:07:04,650 --> 00:07:05,580
That's true.
77
00:07:05,580 --> 00:07:06,720
Set it to center.
78
00:07:06,840 --> 00:07:13,980
Otherwise undefined and we'll go ahead and copy this and we'll set that for the typography variant.
79
00:07:13,980 --> 00:07:16,600
Body 1 4 we are waiting as well.
80
00:07:16,600 --> 00:07:18,370
You can go ahead and save that.
81
00:07:18,420 --> 00:07:22,660
And now both of those texts have been centered.
82
00:07:22,800 --> 00:07:24,050
We're almost finished.
83
00:07:24,180 --> 00:07:28,160
And you see how the text fields they look a little close to each other there.
84
00:07:28,190 --> 00:07:29,310
But I guess it's OK.
85
00:07:29,430 --> 00:07:35,580
But once we click on this you see that label it goes up right underneath the line for the other text
86
00:07:35,580 --> 00:07:37,980
inputs and that looks a little too close.
87
00:07:38,220 --> 00:07:41,460
So we're gonna find the grid item.
88
00:07:41,670 --> 00:07:45,290
See the grid item container wrapping our text fields.
89
00:07:45,330 --> 00:07:47,140
This is for the phone icon.
90
00:07:47,190 --> 00:07:54,510
Scroll down find the container wrapping all of our text fields and then find the individual item wrapping
91
00:07:54,510 --> 00:08:03,480
each text field and on each item let's add a style of margin the bottom set to zero point five m and
92
00:08:03,510 --> 00:08:10,340
we'll actually go ahead and copy that and we can paste that onto each of those three items.
93
00:08:10,410 --> 00:08:11,410
We can save that.
94
00:08:11,430 --> 00:08:15,820
We'll see that are text fields now spaced a little farther out.
95
00:08:15,870 --> 00:08:21,300
If I go and select that you can see we now have spacing between the label and the line which definitely
96
00:08:21,300 --> 00:08:23,680
gives it a better look.
97
00:08:23,690 --> 00:08:28,910
Another thing to notice is if we go ahead and start typing in this text field you see it gives us that
98
00:08:28,910 --> 00:08:32,950
black text that honestly doesn't really fit with the rest of our theme.
99
00:08:33,020 --> 00:08:36,150
So let's go ahead and in our theme dot J.S. file.
100
00:08:36,260 --> 00:08:39,670
We'll scroll down to where we had created our overrides section.
101
00:08:39,890 --> 00:08:46,400
And for the M UI input we're going to create a new section above underline and this will be to specify
102
00:08:46,400 --> 00:08:51,270
the route styles for our M UI input and then the route style.
103
00:08:51,290 --> 00:08:59,480
Let's give it a color of ARC Gray and a font weight of three hundred and if we go ahead and save that
104
00:08:59,480 --> 00:09:03,450
we'll see the page refresh and I can come over and start typing.
105
00:09:03,620 --> 00:09:09,020
And now I think that that looks a lot better and a lot more consistent with the feel of our application
106
00:09:10,460 --> 00:09:16,370
let's go ahead and close out of the theme not J.S. file now and I'll clear out this text that entered
107
00:09:16,670 --> 00:09:17,630
so we can come back.
108
00:09:17,810 --> 00:09:23,720
Now the very last thing that we need to do to finish up the styling for this page is the thing that
109
00:09:23,720 --> 00:09:29,480
I always nitpick is once we get too small we've got a bit too much spacing up here.
110
00:09:29,630 --> 00:09:37,720
And if you remember if we come on up we actually are setting a margin top of 5 m up here.
111
00:09:37,850 --> 00:09:43,230
But I want to go ahead and we still have our matches small variable up there.
112
00:09:43,250 --> 00:09:49,700
So let's go ahead and use that and we'll go ahead and create a nested ternary statement and on this
113
00:09:49,760 --> 00:09:56,810
margin top property in front of the matches medium because it matches medium it will be true for the
114
00:09:56,810 --> 00:09:59,590
medium and these small break points.
115
00:09:59,630 --> 00:10:04,130
But let's put the matches small breakpoint in front of here.
116
00:10:04,130 --> 00:10:07,940
And if that is true let's set it to just 1 m.
117
00:10:08,030 --> 00:10:09,460
Otherwise we'll check.
118
00:10:09,460 --> 00:10:15,150
Matches medium and if that's true we'll set it for 5 m otherwise we'll leave it at 0.
119
00:10:15,410 --> 00:10:21,380
So we can go ahead and save that now and we'll see that that puts us much closer to the top of the screen
120
00:10:21,590 --> 00:10:24,740
just like our other pages on the mobile breakpoints.
121
00:10:24,740 --> 00:10:28,920
So I think that that looks a bit better and more consistent with our application.
122
00:10:28,970 --> 00:10:32,860
And with that you can see we're already at the smallest breakpoint.
123
00:10:32,870 --> 00:10:34,310
Everything looks good.
124
00:10:34,310 --> 00:10:41,600
We can size all the way up and it continues to create the layout that we have been going for and the
125
00:10:41,600 --> 00:10:44,270
layout straight out of our design file.
126
00:10:44,270 --> 00:10:50,390
So we've done a great job of continuing to create these responsive styles and to create exactly what
127
00:10:50,390 --> 00:10:51,530
we had designed.
128
00:10:51,530 --> 00:10:56,960
But let's go ahead and we'll start working with the inputs now and figure out how we can go ahead and
129
00:10:56,960 --> 00:11:02,660
validate these values to make sure they're putting in a valid email and a valid phone number.
130
00:11:02,720 --> 00:11:06,740
So let's go ahead and check out what we're going to do for that in the next video.
14556
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.