All language subtitles for Create and style the first page.en

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
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 Download
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:00.05 --> 00:00:01.08 - [Instructor] In the previous movie, 2 00:00:01.08 --> 00:00:04.04 we created the starting structure of the files 3 00:00:04.04 --> 00:00:06.05 that we're going to need, the basics of our project. 4 00:00:06.05 --> 00:00:08.07 Now we want to bring those up in a text editor, 5 00:00:08.07 --> 00:00:09.09 so that we can work with them. 6 00:00:09.09 --> 00:00:11.02 For most text editors, you can simply 7 00:00:11.02 --> 00:00:15.08 drag the directory onto the icon for the text editor, 8 00:00:15.08 --> 00:00:18.05 in order to open up the entire project in a project view, 9 00:00:18.05 --> 00:00:20.06 all at once, I've already done that here. 10 00:00:20.06 --> 00:00:22.08 It works the same way whether you're using TextMate, 11 00:00:22.08 --> 00:00:24.09 or Sublime, or something else. 12 00:00:24.09 --> 00:00:27.01 The overall idea is that my project is now visible 13 00:00:27.01 --> 00:00:30.02 in one column, I can navigate the files that I want to edit, 14 00:00:30.02 --> 00:00:32.07 and I can edit them over in the window on the right. 15 00:00:32.07 --> 00:00:36.02 Let's begin by opening up the index.php page. 16 00:00:36.02 --> 00:00:39.00 It's immediately inside the public directory. 17 00:00:39.00 --> 00:00:41.07 Inside this file, you'll see that I've included 18 00:00:41.07 --> 00:00:44.09 a very simple HTML5 template. 19 00:00:44.09 --> 00:00:46.07 Nothing special about this, it's just the beginning 20 00:00:46.07 --> 00:00:49.02 of an HTML5 document, that we could then 21 00:00:49.02 --> 00:00:51.00 serve up to the public. 22 00:00:51.00 --> 00:00:54.07 PHP pages are just HTML pages that have 23 00:00:54.07 --> 00:00:56.09 PHP embedded in them, so this makes sense, 24 00:00:56.09 --> 00:00:59.00 that we would have this as a starting point. 25 00:00:59.00 --> 00:01:01.08 Now let's think for a moment, index.php, 26 00:01:01.08 --> 00:01:03.08 inside the public directory, is going to be 27 00:01:03.08 --> 00:01:06.04 the root of our website. 28 00:01:06.04 --> 00:01:08.02 That's because we're going to tell our web server 29 00:01:08.02 --> 00:01:11.00 that the document root that it should serve to the public 30 00:01:11.00 --> 00:01:13.09 is this public directory, so for example, 31 00:01:13.09 --> 00:01:19.01 if we had a globebank.com as our URL, then globebank.com 32 00:01:19.01 --> 00:01:23.02 would load up index.php as its default page. 33 00:01:23.02 --> 00:01:27.01 So I'm going to put in here for the title, just Globe Bank. 34 00:01:27.01 --> 00:01:29.09 And then in the body, for now, I'm going to put 35 00:01:29.09 --> 00:01:35.09 h1, Globe Bank: Coming Soon. 36 00:01:35.09 --> 00:01:37.00 Now we're going to come back and work 37 00:01:37.00 --> 00:01:38.08 on the public site later, for now, 38 00:01:38.08 --> 00:01:41.06 I just want to have a placeholder here that we can look at. 39 00:01:41.06 --> 00:01:43.01 Let's save that file, and let's 40 00:01:43.01 --> 00:01:44.08 bring it up in our web browser, 41 00:01:44.08 --> 00:01:46.09 so we can see that it's working. 42 00:01:46.09 --> 00:01:50.04 At this point, you should have already installed PHP, 43 00:01:50.04 --> 00:01:52.07 and have it enabled for your web server. 44 00:01:52.07 --> 00:01:54.07 You'll also want to make sure that your web server, 45 00:01:54.07 --> 00:01:56.05 whichever one you choose to use, 46 00:01:56.05 --> 00:01:59.00 is running, and able to serve files 47 00:01:59.00 --> 00:02:01.03 when your browser requests them. 48 00:02:01.03 --> 00:02:03.01 If you need help with any of that, 49 00:02:03.01 --> 00:02:04.08 you can refer to the course on installing 50 00:02:04.08 --> 00:02:08.06 and setting up PHP with MySQL. 51 00:02:08.06 --> 00:02:11.00 I'm going to navigate to that project. 52 00:02:11.00 --> 00:02:13.09 Now for me, in development, my web document for development, 53 00:02:13.09 --> 00:02:18.06 is localhost, and then ~kevinskoglund. 54 00:02:18.06 --> 00:02:20.05 Now yours may be different, you'll have to use 55 00:02:20.05 --> 00:02:23.01 whatever is your default, it might just simply be 56 00:02:23.01 --> 00:02:26.03 localhost on its own, or it might be something different. 57 00:02:26.03 --> 00:02:27.07 Change it to fit your needs, but that's 58 00:02:27.07 --> 00:02:29.05 going to be my document root. 59 00:02:29.05 --> 00:02:32.02 And from there, then I'll need to have my project, 60 00:02:32.02 --> 00:02:36.04 which is globe_bank, and then the public directory. 61 00:02:36.04 --> 00:02:39.02 That's how I'm going to navigate to that index.php page. 62 00:02:39.02 --> 00:02:40.08 Now when we launch this to the public, 63 00:02:40.08 --> 00:02:43.04 remember, the public's not going to type all that. 64 00:02:43.04 --> 00:02:47.01 The public's just going to type our URL, globebank.com, 65 00:02:47.01 --> 00:02:49.02 and it's going to go to this exact same spot, 66 00:02:49.02 --> 00:02:50.07 right here, to start with. 67 00:02:50.07 --> 00:02:52.03 So all of that is just for development, 68 00:02:52.03 --> 00:02:53.09 that's why we're going to have that full root path 69 00:02:53.09 --> 00:02:55.09 in there while we're developing. 70 00:02:55.09 --> 00:02:58.04 And you see that I get Globe Bank: Coming Soon. 71 00:02:58.04 --> 00:03:00.00 So that's great, we now know that we're able 72 00:03:00.00 --> 00:03:03.03 to locate the correct file via our browser, 73 00:03:03.03 --> 00:03:04.06 and our web server was able to handle 74 00:03:04.06 --> 00:03:07.00 the fact that it was a PHP file, with no problem. 75 00:03:07.00 --> 00:03:09.00 All right, so now let's go back over to our project, 76 00:03:09.00 --> 00:03:12.01 and now, let's take a look at this staff page, 77 00:03:12.01 --> 00:03:14.09 staff/index.php. 78 00:03:14.09 --> 00:03:16.06 Now here, let's just change the title. 79 00:03:16.06 --> 00:03:18.07 Let's make it GBI, just the initials 80 00:03:18.07 --> 00:03:23.03 for Globe Bank International, and let's add in here, 81 00:03:23.03 --> 00:03:29.05 to our body, a little bit more, let's add a header tag, 82 00:03:29.05 --> 00:03:39.05 and let's do one for navigation. 83 00:03:39.05 --> 00:03:41.05 Just mistyped that, there we go, 84 00:03:41.05 --> 00:03:46.03 and let's do one for footer. 85 00:03:46.03 --> 00:03:48.07 Okay, those are just some basic HTML5 tags. 86 00:03:48.07 --> 00:03:51.07 Inside the header, we'll put h1, 87 00:03:51.07 --> 00:03:59.07 and let's make this one just say, GBI Staff Area. 88 00:03:59.07 --> 00:04:00.09 That's indented a little too far, 89 00:04:00.09 --> 00:04:02.04 let's take one of those out. 90 00:04:02.04 --> 00:04:05.06 For the navigation, let's put in ul tags. 91 00:04:05.06 --> 00:04:09.04 We'll put in one li tag, which is going to be a link, 92 00:04:09.04 --> 00:04:17.02 a href="index.php", and, it's going to be Menu. 93 00:04:17.02 --> 00:04:23.03 And then let's close our li tag, and close our ul tag. 94 00:04:23.03 --> 00:04:24.09 And then down here in the footer, 95 00:04:24.09 --> 00:04:28.02 let's put © that'll be the HTML entity 96 00:04:28.02 --> 00:04:33.06 for the copyright symbol, 2017 Globe Bank. 97 00:04:33.06 --> 00:04:35.02 Okay, so we can save that file, 98 00:04:35.02 --> 00:04:38.01 and we should be able to bring this up in our browser. 99 00:04:38.01 --> 00:04:39.07 But before we do that, I'm just going to go ahead 100 00:04:39.07 --> 00:04:42.01 and add in our first bit of PHP code here. 101 00:04:42.01 --> 00:04:45.04 I'm just going to drop in, instead of 2017 for the date, 102 00:04:45.04 --> 00:04:51.00 we're going to go put in php echo date, capital Y. 103 00:04:51.00 --> 00:04:52.05 That'll call the PHP date function, 104 00:04:52.05 --> 00:04:54.00 it'll return the current year. 105 00:04:54.00 --> 00:04:56.02 So now we've actually got our first bit of PHP code, 106 00:04:56.02 --> 00:04:57.00 and we're going to make sure that 107 00:04:57.00 --> 00:04:58.08 that is working correctly, as well. 108 00:04:58.08 --> 00:05:00.04 If not, you'll need to troubleshoot that, 109 00:05:00.04 --> 00:05:02.05 and make sure you've got PHP working. 110 00:05:02.05 --> 00:05:06.03 So let's go back now, now, in order to get to this page, 111 00:05:06.03 --> 00:05:09.08 it's in the public directory, and then, inside staff. 112 00:05:09.08 --> 00:05:11.05 Now we could type out index.php, 113 00:05:11.05 --> 00:05:15.02 but by default, it should render that index.php page. 114 00:05:15.02 --> 00:05:17.04 And sure enough, here it is, GBI Staff Area, 115 00:05:17.04 --> 00:05:18.09 and you see we've got Menu link, 116 00:05:18.09 --> 00:05:22.00 and the PHP code did load up correctly. 117 00:05:22.00 --> 00:05:25.02 We did get the year's 2017. 118 00:05:25.02 --> 00:05:26.06 Now if you're watching this in the future, 119 00:05:26.06 --> 00:05:28.08 your year will be different, that's not a problem. 120 00:05:28.08 --> 00:05:30.03 Just make sure that you did, in fact, 121 00:05:30.03 --> 00:05:32.00 get a year there, and not an error 122 00:05:32.00 --> 00:05:34.06 saying the PHP code didn't render. 123 00:05:34.06 --> 00:05:37.01 Okay, so we've now got it working, but this is pretty ugly. 124 00:05:37.01 --> 00:05:39.04 What we need to do is introduce a style sheet, 125 00:05:39.04 --> 00:05:42.03 so that we can style this code, and to do that, 126 00:05:42.03 --> 00:05:44.03 I'm just going to hide these files for a moment, 127 00:05:44.03 --> 00:05:47.02 and I'm going to go here to this staff.css file. 128 00:05:47.02 --> 00:05:48.08 I've already got a style sheet written up, 129 00:05:48.08 --> 00:05:51.05 we'll take a look at it, but I'm going to drag it 130 00:05:51.05 --> 00:05:54.04 into my stylesheets directory of my project. 131 00:05:54.04 --> 00:05:56.08 Then I can come in here, to my project again, 132 00:05:56.08 --> 00:05:58.08 and let's take a look at what's in there. 133 00:05:58.08 --> 00:06:00.08 So you can see, I've just got some basic styling. 134 00:06:00.08 --> 00:06:03.00 You can pause the movie if you want to copy this down, 135 00:06:03.00 --> 00:06:05.05 it's also included in the exercise files. 136 00:06:05.05 --> 00:06:10.04 So you go down here, you see we've got a header, header h1. 137 00:06:10.04 --> 00:06:12.07 I've got navigation, I've got some styling 138 00:06:12.07 --> 00:06:15.06 on the navigation ul and li elements. 139 00:06:15.06 --> 00:06:18.02 I've got content, which we're going to add in later. 140 00:06:18.02 --> 00:06:20.06 I've got in the footer, and then I've got some styles here 141 00:06:20.06 --> 00:06:23.01 that we're going to be using as we go on. 142 00:06:23.01 --> 00:06:24.04 I wanted to go ahead and add them now, 143 00:06:24.04 --> 00:06:26.02 so that we don't have to come back to them. 144 00:06:26.02 --> 00:06:28.01 I'm styling some of the different elements 145 00:06:28.01 --> 00:06:30.07 that we're going to be using as we create forms, 146 00:06:30.07 --> 00:06:32.09 and create all the different parts of the website. 147 00:06:32.09 --> 00:06:34.02 So there we go, we've got our errors. 148 00:06:34.02 --> 00:06:36.08 So that's it, it's a pretty simple style sheet, altogether. 149 00:06:36.08 --> 00:06:39.03 Again, it's included in your exercise files. 150 00:06:39.03 --> 00:06:40.05 Now we need to tell our page 151 00:06:40.05 --> 00:06:42.07 that it's going to use that style sheet. 152 00:06:42.07 --> 00:06:45.04 So the way we do that is we come up here into the head 153 00:06:45.04 --> 00:06:48.06 of our index.php that's in the staff page, 154 00:06:48.06 --> 00:06:54.09 and we're going to add a link tag, with rel=stylesheet, 155 00:06:54.09 --> 00:06:58.05 and the media for that is going to be all. 156 00:06:58.05 --> 00:07:00.04 Everyone should get this style sheet, 157 00:07:00.04 --> 00:07:04.02 href=, and I'm just go leave that blank for now, 158 00:07:04.02 --> 00:07:05.07 and then close out the rest of the tag. 159 00:07:05.07 --> 00:07:08.08 Okay, so now we need the path to the style sheet. 160 00:07:08.08 --> 00:07:10.05 So what is the path to this style sheet? 161 00:07:10.05 --> 00:07:11.07 If you've worked with HTML before, 162 00:07:11.07 --> 00:07:13.04 then you already know how you do this. 163 00:07:13.04 --> 00:07:16.04 You need to navigate backwards one directory, 164 00:07:16.04 --> 00:07:18.06 because we're in the staff directory now, 165 00:07:18.06 --> 00:07:21.00 and we need to go out of the staff directory, 166 00:07:21.00 --> 00:07:24.07 and then into the stylesheets directory to get to staff.css. 167 00:07:24.07 --> 00:07:27.05 So that means that we've got to go .., which means 168 00:07:27.05 --> 00:07:30.01 go backwards a directory to the parent directory, 169 00:07:30.01 --> 00:07:33.03 and then locate the stylesheets directory, 170 00:07:33.03 --> 00:07:35.09 and then staff.css. 171 00:07:35.09 --> 00:07:41.01 Now this href is telling it to go backwards in the URL. 172 00:07:41.01 --> 00:07:44.03 This is a browser path, not a file path. 173 00:07:44.03 --> 00:07:45.09 Now they're very similar, because it also 174 00:07:45.09 --> 00:07:47.08 happens to be the file path, as well, 175 00:07:47.08 --> 00:07:48.08 but I just wanted to make that point. 176 00:07:48.08 --> 00:07:50.07 We're going to come back to it a couple of times. 177 00:07:50.07 --> 00:07:53.01 This is the browser path, it's telling the browser 178 00:07:53.01 --> 00:07:55.00 to back up one level, and then 179 00:07:55.00 --> 00:07:57.09 look for stylesheets, staff.css. 180 00:07:57.09 --> 00:08:00.04 So let's save it, and let's go back and try it, 181 00:08:00.04 --> 00:08:03.01 see if it worked out, let's reload our page. 182 00:08:03.01 --> 00:08:04.07 And there you go, now there's not a lot there 183 00:08:04.07 --> 00:08:07.05 at the moment, because I don't have my content element, 184 00:08:07.05 --> 00:08:10.01 I think that's the one that probably gives it the real meat. 185 00:08:10.01 --> 00:08:15.07 Let's add that, div id="content". 186 00:08:15.07 --> 00:08:19.01 And there we go, save it, go back, 187 00:08:19.01 --> 00:08:21.05 and I think that should probably give it, 188 00:08:21.05 --> 00:08:23.06 yeah, a nice big chunk of space here, 189 00:08:23.06 --> 00:08:25.04 that we can fill in below. 190 00:08:25.04 --> 00:08:27.06 And then we've got one link on the page, which is Menu. 191 00:08:27.06 --> 00:08:29.02 If we click that, you can see it just brings us 192 00:08:29.02 --> 00:08:32.00 back to this same page, index.php. 193 00:08:32.00 --> 00:08:33.03 So for now, make sure that you're able 194 00:08:33.03 --> 00:08:35.09 to bring up pages in your browser, 195 00:08:35.09 --> 00:08:38.03 make sure that PHP works, so that you have 196 00:08:38.03 --> 00:08:40.02 a date at the bottom of the footer, 197 00:08:40.02 --> 00:08:43.05 and that you are able to access the style sheet, 198 00:08:43.05 --> 00:08:44.06 that you do have the ability 199 00:08:44.06 --> 00:08:46.09 to link to the staff style sheet. 16038

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