Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,688 --> 00:00:04,291
Now to fill it all with some life,
2
00:00:04,291 --> 00:00:05,819
we need some data.
3
00:00:05,819 --> 00:00:08,440
We need some dummy events.
4
00:00:08,440 --> 00:00:10,076
Now later in this course,
5
00:00:10,076 --> 00:00:14,350
we will learn how we can fetch data from a database
6
00:00:14,350 --> 00:00:16,730
or from the file system.
7
00:00:16,730 --> 00:00:18,690
But we haven't learned about this yet.
8
00:00:18,690 --> 00:00:20,520
And therefore, for the moment,
9
00:00:20,520 --> 00:00:25,330
we'll just use a dummy JavaScript array as a data source
10
00:00:25,330 --> 00:00:29,002
but again, that will of course change throughout the course.
11
00:00:29,002 --> 00:00:31,564
Nonetheless, for the moment attached,
12
00:00:31,564 --> 00:00:36,564
you find a dummy-data JS file attached to this lecture,
13
00:00:36,600 --> 00:00:38,370
and you can download this file
14
00:00:38,370 --> 00:00:41,910
and add it to your root project folder.
15
00:00:41,910 --> 00:00:46,280
So here, I added dummy-data JS to my project,
16
00:00:46,280 --> 00:00:48,630
next to the package.json file.
17
00:00:48,630 --> 00:00:52,167
And this is a file with an array of dummy data,
18
00:00:52,167 --> 00:00:54,480
which I prepared for you,
19
00:00:54,480 --> 00:00:59,480
and with some functions that allow us to query that data.
20
00:00:59,596 --> 00:01:04,140
And I'll dive into those functions once we start using them.
21
00:01:04,140 --> 00:01:06,870
Now, in that dummy data JS file,
22
00:01:06,870 --> 00:01:11,580
this dummy data which is set up there also uses some images.
23
00:01:11,580 --> 00:01:15,360
It also needs some images to be part of the project
24
00:01:15,360 --> 00:01:19,610
to then later correctly display our events.
25
00:01:19,610 --> 00:01:22,870
And therefore, you also need to add a couple of images
26
00:01:22,870 --> 00:01:23,960
to your project.
27
00:01:23,960 --> 00:01:26,524
Now for that you can use any images you want.
28
00:01:26,524 --> 00:01:30,590
Just make sure that you do store them in the same folder
29
00:01:30,590 --> 00:01:32,073
I will store them in in a second,
30
00:01:32,073 --> 00:01:34,042
and that you give them the same name.
31
00:01:34,042 --> 00:01:36,324
But you can then use any images you want.
32
00:01:36,324 --> 00:01:39,830
A great source if you don't know where to get images from
33
00:01:39,830 --> 00:01:41,336
is unsplash.com.
34
00:01:41,336 --> 00:01:43,940
There you can get free images,
35
00:01:43,940 --> 00:01:47,650
and that is where I will collect a couple of images.
36
00:01:47,650 --> 00:01:50,347
For example, if you search for programming,
37
00:01:50,347 --> 00:01:53,443
I'll use this image from James Harrison.
38
00:01:53,443 --> 00:01:56,792
And in my project in the public folder now,
39
00:01:56,792 --> 00:01:59,490
I'll add an images sub folder
40
00:01:59,490 --> 00:02:02,730
and download and store the image in there,
41
00:02:02,730 --> 00:02:06,510
this coding event JPG file now.
42
00:02:06,510 --> 00:02:11,360
and make sure you name your file also coding-event.
43
00:02:11,360 --> 00:02:14,280
So download any image you want maybe also this one,
44
00:02:14,280 --> 00:02:17,535
but named coding-event and store it in the images folder
45
00:02:17,535 --> 00:02:20,010
or if you named it differently
46
00:02:20,010 --> 00:02:23,590
or have a different extension, go to the dummy data JS file,
47
00:02:23,590 --> 00:02:27,219
and adjust this image path appropriately,
48
00:02:27,219 --> 00:02:29,883
so the image name and the extension.
49
00:02:30,920 --> 00:02:33,240
And with that I'll collect two more images
50
00:02:33,240 --> 00:02:35,238
for my other two pieces of dummy data.
51
00:02:35,238 --> 00:02:38,650
For the next one, I'll search for introvert
52
00:02:38,650 --> 00:02:40,917
because the next event is about introverts,
53
00:02:40,917 --> 00:02:44,800
just so that you don't have a strange impression of me.
54
00:02:44,800 --> 00:02:48,311
And here I'll pick this image from Ahmed Nishaath,
55
00:02:48,311 --> 00:02:51,075
and you can download this one as well
56
00:02:51,075 --> 00:02:55,131
and store this in the images folder.
57
00:02:55,131 --> 00:03:00,131
In my case, under a name of introvert-event.jpg
58
00:03:00,200 --> 00:03:01,770
again, if you have a different name
59
00:03:01,770 --> 00:03:05,263
adjusted in the dummy data JS file appropriately.
60
00:03:05,263 --> 00:03:06,591
And last but not least,
61
00:03:06,591 --> 00:03:10,064
you can search for networking on Unsplash
62
00:03:10,064 --> 00:03:14,130
and then you might also find the same image I'm using here.
63
00:03:14,130 --> 00:03:17,959
This image here about a networking event as it seems,
64
00:03:17,959 --> 00:03:21,173
which I now all the downloaded and stored here
65
00:03:21,173 --> 00:03:24,437
but again, you can of course use any images you want.
66
00:03:24,437 --> 00:03:26,255
So now we got the dummy data,
67
00:03:26,255 --> 00:03:28,664
and we get the images set up.
68
00:03:28,664 --> 00:03:31,260
And it's important that the images
69
00:03:31,260 --> 00:03:33,440
are stored in the public folder.
70
00:03:33,440 --> 00:03:36,540
It doesn't have to be a folder named images then.
71
00:03:36,540 --> 00:03:40,520
It can be any folder or directly in the public folder,
72
00:03:40,520 --> 00:03:42,483
but you should store them in the public folder
73
00:03:42,483 --> 00:03:46,420
because the public folder also is a special folder
74
00:03:46,420 --> 00:03:49,150
in next JS projects.
75
00:03:49,150 --> 00:03:51,220
Whatever is stored in there,
76
00:03:51,220 --> 00:03:54,043
typically images or funds or something like this
77
00:03:54,043 --> 00:03:58,876
is then served statically by next JS,
78
00:03:58,876 --> 00:04:03,240
which means you can reference it in your CSS code
79
00:04:03,240 --> 00:04:04,484
or in your HTML code.
80
00:04:04,484 --> 00:04:07,875
You can easily include images stored in the public folder,
81
00:04:07,875 --> 00:04:12,242
because next JS will make sure to serve any contents
82
00:04:12,242 --> 00:04:14,599
that's stored in the public folder
83
00:04:14,599 --> 00:04:18,327
as part of your overall application.
84
00:04:18,327 --> 00:04:21,570
So it will statically serve any content in there.
85
00:04:21,570 --> 00:04:23,850
It makes the content in there available
86
00:04:23,850 --> 00:04:25,580
to the visitors of your website.
87
00:04:25,580 --> 00:04:29,880
And therefore you can easily then embed public content
88
00:04:29,880 --> 00:04:32,560
in your HTML code and so on.
89
00:04:32,560 --> 00:04:35,833
And we will utilize that fraud in this course.
90
00:04:35,833 --> 00:04:38,060
Therefore, now we got the images
91
00:04:38,060 --> 00:04:39,184
and the dummy data in place.
92
00:04:39,184 --> 00:04:42,320
Let's now start working on those page components
93
00:04:42,320 --> 00:04:44,253
and let's fill them with some life.
7428
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.