Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,120 --> 00:00:06,200
Now that we have access in the landing page to our set value and set selected index functions what's
2
00:00:06,210 --> 00:00:13,710
come up to our landing page file and on each of the buttons that we had just added to navigate.
3
00:00:13,740 --> 00:00:20,520
We also need to add the select value to set the correct active tab.
4
00:00:20,640 --> 00:00:30,150
So we'll start with the Free Estimate button here in the hero block and we'll add the on click function
5
00:00:30,540 --> 00:00:39,600
and we'll set this equal to our props dot set value and we'll set the value to five.
6
00:00:39,630 --> 00:00:46,380
Remember to clear the screen because when we go to slash estimate we don't want any active tab to be
7
00:00:46,380 --> 00:00:46,970
set.
8
00:00:47,190 --> 00:00:50,580
And we also need to make this an arrow function.
9
00:00:50,730 --> 00:00:55,680
It's telling us here we have a problem though because we actually have not come up to our landing page
10
00:00:55,710 --> 00:00:59,970
a function call and brought in our props which will be passed.
11
00:00:59,970 --> 00:01:01,460
So now we have that.
12
00:01:01,680 --> 00:01:08,070
And let's actually copy our on click handler right here and we'll use that for the rest of our buttons.
13
00:01:08,100 --> 00:01:17,250
So on our revolution button we need to be setting the second index and down on the custom software button.
14
00:01:17,250 --> 00:01:25,620
We need to paste the on click handler and set the first value for our services tab but then we need
15
00:01:25,620 --> 00:01:36,060
to wrap this in a pair of brackets add a semicolon and also call props to set selected index to one
16
00:01:36,180 --> 00:01:43,260
as well and that will make sure we're correctly marking our custom software development menu item as
17
00:01:43,260 --> 00:01:44,120
being selected.
18
00:01:44,670 --> 00:01:46,230
So we'll continue.
19
00:01:46,230 --> 00:01:54,510
And on the button here for the Iaw and Android app block we'll do the same thing as well setting the
20
00:01:54,510 --> 00:02:05,070
value to one for services wrapping in brackets adding a semicolon and also calling set selected index.
21
00:02:05,070 --> 00:02:08,740
But now passing in two will continue.
22
00:02:08,820 --> 00:02:19,690
And the Web site button here passing in on click sets the value of 1 Wrap with brackets semicolon prompts
23
00:02:19,730 --> 00:02:23,370
does set selected index of three.
24
00:02:24,240 --> 00:02:32,160
Now we can continue and in the revolution blog here for our button we'll just need to set a value of
25
00:02:32,400 --> 00:02:37,830
2 again for the revolution and continue to the information blog.
26
00:02:38,190 --> 00:02:46,830
And on this first button here for the and more this is going to about us and we'll need to set the third
27
00:02:47,400 --> 00:02:49,020
third index.
28
00:02:49,290 --> 00:02:57,840
And finally on the button below for you contact us we will set the fourth active index.
29
00:02:57,840 --> 00:02:59,210
And now we're almost done.
30
00:02:59,220 --> 00:03:06,240
But remember we have the estimate button here in our call to action as well as the more and more button.
31
00:03:06,660 --> 00:03:12,420
So we need to pass our set value function down to the call to action as well.
32
00:03:12,420 --> 00:03:21,180
So here where we're calling our call to action let's pass in the set value function equal to our props
33
00:03:21,380 --> 00:03:23,390
dot set value function.
34
00:03:23,490 --> 00:03:26,130
And with that set we can his save.
35
00:03:26,190 --> 00:03:28,650
Go over to our call to action.
36
00:03:28,740 --> 00:03:36,150
And here let's come to the first button for the learn more we'll paste in our on click handler and we'll
37
00:03:36,150 --> 00:03:38,550
again call prop start asset value.
38
00:03:38,640 --> 00:03:40,610
And this is going to the revolution.
39
00:03:40,620 --> 00:03:47,580
So we'll set the second index but we also need to remember to come up to our function call and bring
40
00:03:47,580 --> 00:03:49,650
in our props.
41
00:03:49,680 --> 00:03:56,310
And then we can come down to the estimate button for the last time and we will set the props set value
42
00:03:56,430 --> 00:03:57,630
of five.
43
00:03:57,780 --> 00:04:00,780
We can hit save the page or refresh.
44
00:04:00,810 --> 00:04:07,890
And now on our home page any of these buttons should properly navigate us as well as manage the active
45
00:04:07,890 --> 00:04:08,650
tab.
46
00:04:08,670 --> 00:04:15,540
So if we come over to this Learn More button and navigate to the revolution you can see we're now on
47
00:04:15,570 --> 00:04:18,750
the revolution page for come back to the home.
48
00:04:18,750 --> 00:04:21,780
We can come and use the estimate button.
49
00:04:21,780 --> 00:04:25,270
Go to the estimate that clears off the active tab.
50
00:04:25,440 --> 00:04:26,910
We can go back home.
51
00:04:26,910 --> 00:04:30,690
Let's check the Iaw and Android app development page.
52
00:04:30,690 --> 00:04:33,060
You can see services is marked as active.
53
00:04:33,070 --> 00:04:37,830
And let's see in the menu I OS and Android app development is as well.
54
00:04:37,830 --> 00:04:41,990
So it looks like everything should be wired up correctly.
55
00:04:42,000 --> 00:04:44,820
Let's go through and test all these just to make sure.
56
00:04:44,850 --> 00:04:47,970
So custom software custom software.
57
00:04:47,980 --> 00:05:01,770
Very nice Web sites Web sites and Web sites the revolution again the revolution here in the info blog
58
00:05:02,850 --> 00:05:05,040
all seems to be working.
59
00:05:05,160 --> 00:05:11,610
But I want to come back down to the info blog and I'll point out one small little thing I noticed and
60
00:05:11,610 --> 00:05:15,090
so here we are in the smallest screen size.
61
00:05:15,090 --> 00:05:22,270
If I go ahead and click this check that out nothing happens and oh now it works.
62
00:05:22,320 --> 00:05:28,980
But that first time you see some pretty weird behavior it's jumping over and then the next time we click
63
00:05:28,980 --> 00:05:30,870
it it'll navigate us.
64
00:05:30,870 --> 00:05:32,040
So that's really weird.
65
00:05:32,100 --> 00:05:38,490
And I figured out that the reason for this is because of the absolute positioning that we're using to
66
00:05:38,490 --> 00:05:39,720
set this up.
67
00:05:39,720 --> 00:05:47,400
So if we come back to the landing page here and let's find the information block we're setting a position
68
00:05:47,430 --> 00:05:55,110
of absolute onto the container that is positioning these and that is causing some weird behavior with
69
00:05:55,110 --> 00:05:56,210
our click event.
70
00:05:56,220 --> 00:06:01,950
So to fix this let's go ahead and we'll do the same thing that we had done in our call to action where
71
00:06:01,950 --> 00:06:09,170
instead of using the div to set our background it's actually we'll go ahead and get rid of that div
72
00:06:09,610 --> 00:06:17,880
OK and we'll come up and we will get rid of this position absolute get rid of that.
73
00:06:17,880 --> 00:06:28,100
And now let's apply that style to our grid container and we'll apply the class name here of classes
74
00:06:28,340 --> 00:06:30,970
dot info background.
75
00:06:30,990 --> 00:06:36,830
If we go ahead and save that we'll see the page refresh and it looks exactly the same.
76
00:06:36,830 --> 00:06:44,000
But now if we click the links were navigated directly so that went ahead and avoided our conflict.
77
00:06:44,120 --> 00:06:51,520
And I think that that is the very last thing we needed for our entire home page to be working.
78
00:06:51,590 --> 00:06:56,050
I noticed really quickly there on our button in the call to action.
79
00:06:56,090 --> 00:06:59,350
We still have the old grey hover effect right there.
80
00:06:59,360 --> 00:07:04,430
So even though it's working and all wired up we need to get rid of that grey hover effect.
81
00:07:04,430 --> 00:07:10,060
So we had done that already here on the landing page for our estimate button.
82
00:07:10,220 --> 00:07:18,050
If you remember wherever that style is that we use the hover selector to set the background color to
83
00:07:18,050 --> 00:07:25,070
this nice light color and let's copy that and then go to the call to action and we'll scroll up here
84
00:07:25,070 --> 00:07:28,900
to the estimate button style and above our breakpoint.
85
00:07:28,910 --> 00:07:31,250
Let's just add that hover style.
86
00:07:31,250 --> 00:07:32,480
Give it a comma.
87
00:07:32,480 --> 00:07:39,110
Save the file and once the page refreshes you can see we now have the nice looking hover effect.
88
00:07:39,110 --> 00:07:41,210
So everything else should be good.
89
00:07:41,210 --> 00:07:44,540
I think I'm happy with how all this looks pretty good.
90
00:07:45,080 --> 00:07:48,790
Another small issue that I've noticed is the here.
91
00:07:48,800 --> 00:07:57,770
If we shrink down our page all the way to our extra small breakpoint and we scroll down to the information
92
00:07:57,770 --> 00:07:59,720
section well here.
93
00:07:59,720 --> 00:08:07,480
If we go ahead and scroll over you can see that there's actually some horizontal scrolling going on.
94
00:08:07,510 --> 00:08:12,830
There is a little bit of extra padding on the page and that is something you always want to look out
95
00:08:12,830 --> 00:08:15,140
for as you're working with your designs.
96
00:08:15,230 --> 00:08:20,810
So make sure every now and then to try and horizontal you scroll to see if there's anything accidentally
97
00:08:20,810 --> 00:08:22,820
causing an overflow.
98
00:08:22,820 --> 00:08:30,590
In this case we can go and increase the size of this page a little bit and will inspect the page and
99
00:08:30,590 --> 00:08:34,600
here you can make this bigger or smaller.
100
00:08:34,670 --> 00:08:38,720
And here you can scroll over and to find the culprit.
101
00:08:38,720 --> 00:08:45,410
You'll go through all the different divs here and you'll try and find the one which extends over the
102
00:08:45,410 --> 00:08:51,650
boundary so you can see when I highlight over this div is covering up just the section on the screen
103
00:08:51,650 --> 00:08:55,550
that it takes up and that extra white border is not being covered.
104
00:08:56,030 --> 00:09:02,420
However we need to expand the divs within this to make sure that none of the child that divs are causing
105
00:09:02,420 --> 00:09:03,260
the problem.
106
00:09:03,260 --> 00:09:09,800
So if I come down and on this about us section let's open that div up and when we hover over it's child
107
00:09:10,010 --> 00:09:15,440
we can see now that its boundaries are extending over into that extra space.
108
00:09:15,440 --> 00:09:19,390
So this is what is causing the extra padding.
109
00:09:19,640 --> 00:09:27,350
We can click on this and we'll see here that the spacing is being set on the grid item is setting a
110
00:09:27,350 --> 00:09:31,220
width of 100 percent plus 80 pixels.
111
00:09:31,250 --> 00:09:33,020
So we definitely don't want that.
112
00:09:33,050 --> 00:09:37,580
We don't want it to be more than 100 percent more than the space available to it.
113
00:09:37,700 --> 00:09:39,090
That doesn't make too much sense.
114
00:09:39,140 --> 00:09:46,340
So we can actually just get rid of the spacing property on our grid item container within the information
115
00:09:46,340 --> 00:09:52,030
block so we'll get rid of that and instead we'll come to the inner most wrapping grid.
116
00:09:52,100 --> 00:10:00,050
So this grid container around our typography components and let's add a style here and we're going to
117
00:10:00,050 --> 00:10:06,730
make this a ternary statement but first we'll set the margin bottom property.
118
00:10:06,830 --> 00:10:08,890
And this is for our about us section.
119
00:10:08,900 --> 00:10:14,430
So we're replacing this a spacing here with a margin so we'll check our matches.
120
00:10:14,630 --> 00:10:18,100
X x s variable.
121
00:10:18,230 --> 00:10:24,940
And if that is true and where in this column layout let's give it a margin bottom of 10 m.
122
00:10:25,220 --> 00:10:27,940
Otherwise we'll just leave it at 0.
123
00:10:27,980 --> 00:10:34,850
So we can save this and the page will refresh and you can see we've still got nice spacing here but
124
00:10:34,850 --> 00:10:39,820
we no longer have the horizontal scrolling through we had seen before.
125
00:10:39,860 --> 00:10:42,130
So that's another little bug to look out for.
126
00:10:42,140 --> 00:10:45,380
And an easy process for discovering and fixing it.
127
00:10:45,410 --> 00:10:47,750
So I hope you guys are really proud of this.
128
00:10:47,750 --> 00:10:48,840
This looks great.
129
00:10:48,860 --> 00:10:50,720
We've put in a lot of work so far.
130
00:10:50,720 --> 00:10:56,720
So definitely go and take a break after this and do something non coding related for a while to refresh
131
00:10:56,720 --> 00:11:02,870
your brain before we get back to now working with even more complex layouts as we begin to build the
132
00:11:02,870 --> 00:11:05,630
rest of the Web site in the next section.
13874
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.