Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,380 --> 00:00:03,850
All right. So this is the very last challenge of the module.
2
00:00:03,900 --> 00:00:05,580
Well done for getting it this far
3
00:00:05,580 --> 00:00:14,160
if you're still with me. The goal of this challenge is when you load up the home page it should have
4
00:00:14,370 --> 00:00:20,350
a link at the end of each truncated blog post with something that says Read more.
5
00:00:20,670 --> 00:00:27,660
And when we click on it then it should take us to the actual page of the blog post including all of
6
00:00:27,660 --> 00:00:29,160
the content.
7
00:00:29,220 --> 00:00:35,970
So that means we can read each and every blog post on its own individual page just by clicking on the
8
00:00:35,970 --> 00:00:39,820
Read more after the bit of truncated preview text.
9
00:00:40,290 --> 00:00:45,010
So think about what you've learned in this module and try to complete this challenge all by yourself.
10
00:00:45,060 --> 00:00:45,550
Good luck.
11
00:00:45,570 --> 00:00:50,290
I'll see you on the other side.
12
00:00:50,320 --> 00:00:52,610
So here's my first hint.
13
00:00:52,720 --> 00:00:57,410
In order for this to work the first thing that we need is an anchor tag
14
00:00:57,420 --> 00:01:04,660
right? Something that it will act as a link to link to that particular page. Inside our paragraph
15
00:01:04,660 --> 00:01:11,100
let's open it up fully so that we have one line which is going to be dedicated to our post content that's
16
00:01:11,110 --> 00:01:18,700
truncated and then we also add an anchor tag. And inside this anchor tag the text is just going to be Read
17
00:01:19,030 --> 00:01:28,950
More. The href has to point to a URL that will take us to the specific page.
18
00:01:29,060 --> 00:01:34,960
See if that was enough of a hint for you to now be able to complete this challenge.
19
00:01:35,040 --> 00:01:36,810
Now here's my second hint.
20
00:01:38,460 --> 00:01:40,420
We know that inside this home.
21
00:01:40,600 --> 00:01:41,250
ejs
22
00:01:41,250 --> 00:01:49,680
we already have access to the post.title for each and every post that's being listed over here
23
00:01:49,680 --> 00:01:50,070
right?
24
00:01:50,070 --> 00:01:51,820
We already have access to that.
25
00:01:52,080 --> 00:02:00,690
And we also know that if we navigate to posts/ simply just the title spelt out Day
26
00:02:00,810 --> 00:02:05,790
1 and we hit enter. Because of all the code that we've got in our routing,
27
00:02:05,790 --> 00:02:11,130
that alone can take us to the individual page of each blog post.
28
00:02:11,130 --> 00:02:15,470
That's my last and final hint. See if you can now complete the challenge.
2807
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.