Placeholder Image

字幕表 動画を再生する

  • Hello.

  • My name is Kevin.

  • And just in case you don't know me normally confined me over on my own YouTube channel where I talked mostly about CSS with weekly tips, tricks and tutorials.

  • I am so extremely excited to be here on free code camps Channel to bring you this tutorial or we're going to be looking at how to build out this page.

  • Now, this page has a lot of fun things to build out, and we're gonna have a lot of fun with it, because for me, I'm a CSS evangelist.

  • I love CSS, and one of my big goals with this not only is to build up the school page with you, but I also hoping to not only show you some of the cool things you do a CSS.

  • We're gonna call Paige.

  • We're going to see some cool CSS stuff.

  • But I'm also CSS gets a bad rap in a big goal of mine is too.

  • I hope you see the light a little bit.

  • I'm a big fan of it.

  • I'm hoping my enthusiasm comes through and wears off on you a little bit and helps you fall in love with CSS and see that?

  • Maybe it's not as bad as you might have thought it was.

  • If you're one of the you know, if you get a little frustrated by it every now and then we're gonna be building this out with just some plain old HTML and CSS and a little bit of JavaScript.

  • And near the end, it's a really simple build.

  • Um, structuring this way, it's all gonna be static files.

  • But I want to allow you to do what you want with it.

  • So if you're if you're coming from like reactor of you and you're looking for a portfolio, you could take everything you're learning in this and apply it to making something like that.

  • Or maybe you want to just up the game a little bit with a static site generator.

  • You want to build this with Jekyll or upgraded with eleventy or something like that and just make something really cool.

  • I want to leave the door open for as many people as possible.

  • So whether you're just trying to get something together, you're just comfortable with each moment.

  • CSS will be good to go.

  • But if you do have these, you know if you do want to take this and do something bigger with it, or bring in the language Is that you know, you should have no problem at all doing that now.

  • One thing is really important.

  • Before we get into it, though, is I am assuming you already know a little bit of HTML and CSS.

  • Um, this is not an introduction to each dementia.

  • Four people have already started using it in your building a portfolio now.

  • So hopefully you've done a little bit of stuff along the way to put into that portfolio s.

  • So we are going to be looking at using flex box and grid and custom properties and doing lots of fun things.

  • And while we're doing it, I'm going to do my best to explain why I'm choosing these options and how they're working out all of that.

  • But they're not in depth tutorials into any of those topics, because then this would just drag it out forever.

  • We do want to keep it a secret.

  • Spices we can.

  • I'm not gonna skim through it too much.

  • But assuming you already have some knowledge on these topics now, if you've never used one of those things that custom properties air grid before.

  • Don't let that scare you away.

  • They're not that scary.

  • They're not that complicated on.

  • Hopefully, they're a nice introduction in this project for you to get started with them.

  • And you could take what you learn here and start applying it outside of this project as well.

  • Now, if you want to be able to access this project, you can use the link that you're seeing right here on the screen.

  • Right now, that link will bring you to an Adobe X D file and I want to show you a few things with that file.

  • So it's going Take a look at it right now.

  • So when you click that link, you're gonna be brought to this page right here where you're gonna see the mobile and desktop options to look at.

  • You can choose the one you want to look at.

  • Let's go check.

  • The mobile went out first.

  • Now, one thing I don't like about this is it brings you to this comment view.

  • So you want to leave me a comment?

  • You're more than welcome to, but you can see here.

  • It's even flashing at us.

  • It's telling us that we want to come and look at this.

  • Specs One here.

  • If I go in the special and see, I can see the colors that have used to get the hex codes of stuff you want.

  • You can see the fonts that have used the font waits that had used and all of that information, and you can come through and look through everything there is in here.

  • You can click on things to get information.

  • You can copy the text that I've used, you can get the text properties, the font sizes of individual things.

  • Everything you need for all of it is here.

  • Now, there's obviously like the top of the left property.

  • Hopefully, you're not gonna be using.

  • Those are even the width and the heightened all of that.

  • But you can get the individual properties actually should have been looking up here.

  • You can see the font, the weight, the size, all of that stuff.

  • And if ever you need to go back, you click on portfolio website and then we can go and look over here at the full screen version of it, and you can get all the different things that you need to get from that.

  • So mace and easy to do, and you'll also right now it's not set up.

  • You'll also be able to download the assets from all of this as well.

  • So if you want the images that I've used is.

  • But ideally, you'd be using your own images anyway and not necessarily be, since this would be your portfolio site.

  • But if you want the sizes or stuff like that, the link should unlock all of that for you, and you should be able to download the assets if you want them.

  • So now we know everything we need to know to get started.

  • What are we waiting for?

  • Let's go.

  • All right, so here we are about to start the project.

  • I'm so excited because I love starting new projects.

  • So what we're going to be doing in this is just setting the very basics of it up, and one part of that just really quickly is I have supplied all of the images here in the Images folder, so those are the ones I will be using.

  • If you don't want to be falling along within scramble.

  • You want to be doing this on your own in your own court editor having your own full house.

  • What you can do is, um, in your script editor.

  • You can click on the little gear icon that you see there.

  • When you click on that, you'll get some options.

  • One of the Mr Download, the Zip, and when you download that, it will give you all of the images, along with any code that I have on the screen when you hit that download zip.

  • So if you do want to download it later on, when I have some work than to compare to what you've done, you can also do that if you run into any issues or something like that, if you are coating it on your own.

  • Or if you were completely in the script editor and then you want to download all the files at the end, you can do that.

  • This could be something you're doing with your own images.

  • You don't have to be using mine.

  • You know, if this is for your portfolio, please use your own images and set everything up the way you want to be setting it up.

  • So we do have a few things we're going to have to do to start this up.

  • So the basic document structure here, we're going to need our doc type html and we need an HTML open and html closed just like that.

  • Now, if you want, you can also come on your HTML and set the language to be English.

  • Or if you're setting up your sight for another language, of course you can go ahead and do that to whatever language your website is in.

  • It's not 100% essential to do that, but it does help things.

  • Know what language you're?

  • What's a dozen?

  • Of course, we're going to need a head so we can do our opening close head and we're gonna need a body and we can close our body like that.

  • So for the rest of this video, we're gonna be working in the head and then in the next one will graduate off into the party of our document.

  • So if we come and look here, the first thing we do is a meta tag for the car set of ut F meet Ah, that's just pretty much standard.

  • And there is one more meta tag we're gonna need here which is our view port.

  • So name is equal to view port and we're gonna do some content in here and are content is going to be equal to with equals the vice with coma, the initial scale is equal to 1.0.

  • This is to make sure that your website actually functions properly on small devices as well as big ones.

  • If you do not include this and you open your website on a phone or a tablet or any other mobile device, it will be like the desktop site zoomed out on your phone, which will just look terrible.

  • Eso This just ensures that everything will work responsibly and everything will be great.

  • And here we can do our title.

  • Ah, even calling mine Dev Jane Port Folio website.

  • The last couple of things that I'm gonna do here as I'm gonna add a couple of links, one of them is going to be to normalize, which this is actually already brought in by scrim bus.

  • If you're downloading through that little gear icon that I showed you, it will come.

  • It generally comes off a normalized in there already cause scramble by default uses normalized if you don't know what normalize is.

  • It's a CSS file That pretty much helps even out all the differences between the different browsers because there's not huge ones.

  • But there are some differences between them.

  • Still, it irons out some bugs, tries to make them all behave in the same way.

  • It just makes it a little bit easier tohave the website looking the same in all of our browsers.

  • And the other thing that I'm gonna bring in right now is the link to fund.

  • Awesome is you can actually copy this directly from the scream editor here.

  • But both of these I have got from cdn Js dot com.

  • So if you want to get other links two things you can always do that.

  • Now I have linked to the all thing year of fun.

  • Awesome.

  • I'm not gonna be doing a deep dive into what font awesome is, but we're using it for the social icons down at the bottom.

  • You only really need to access the brands one.

  • But I'm putting me all here just in case on your site.

  • You do wanna have access to more of them, but if you only need the brands you could always change that over either go to fund.

  • Awesome.

  • They will give you a unique link to use.

  • That's for if you only want the brands or, of course, from CD and Js.

  • You can also get that Brian's link.

  • We're also going to need to get into the Google funds as well as our own.

  • CSS file has added links here as well.

  • I'm not gonna be doing that.

  • I'm gonna wait until we're writing our own CSS before we go ahead and do that.

  • So because we will be waiting until then to put both of those in for now, we are completely done.

  • We're going to be moving into the bodies, setting up the header in the next video.

  • Look forward to seeing you there.

  • All right, so here's the entire project that we will be building.

  • And just as a reminder, you can access everything you need for this by clicking the link that is on the screen right now that will bring you to the adobe X d sort of link file thing that I have.

  • So it gives you access to all the text, the colors, the font information and fun size is the fund families all of that, if you want to follow along with how I've set it up.

  • But of course, you could just follow along with what I'm doing as well, but it can also make it so you can see it on your screen while we're coating because that could be convenient.

  • If not, I have also broken the different sections down into different slides that I'll be referencing back to as encoding things up.

  • But for this 1st 1 where we're doing the head or only header as the logo and the navigation in it, which is hidden away right now.

  • So I'm not gonna be opening this up too often in this video.

  • But both of those are there.

  • And again, if you do need to get that link, I mean a link to it in the description of every video.

  • So if ever you didn't click on it or you close the tab, you'll easily be able to access it again.

  • So let's come in here into my body, and the first thing we'll do is put in a header, and I'll close that header off and inside of my head.

  • Er, we're going to have a couple of things.

  • I'm intuitive class of logo and close, Def.

  • And inside of there, I'm gonna put an image.

  • SRC is gonna go to my image folder dev jane dot PNG Um, I'm gonna put in all tag on this, so it's for my alter text.

  • I'm gonna leave it blank, though, and a lot of people think that if you have all that, you have to put something on it.

  • You need to have the altar there.

  • It's important that you have your alternative text, but if it's something decorative and a logo, it's generally decorative.

  • You can have that just is a blank like that is perfectly fine.

  • You don't need to put logo cause if the person hears logo, it doesn't help them if they cannot see it in the first place.

  • So we can just leave it like that.

  • There is no problem whatsoever.

  • And then let's come down to here.

  • And I've put this in a div because maybe you want to set this up is an S o b g, or do other things with it.

  • So, you know, we could do a lot of different things and I were always styling the Div that it's inside.

  • Maybe this is text is different options that you can do.

  • I am trying to make this as a template e as possible.

  • The next thing we need in here is a button I'm gonna give this e class of knave toggle cause name sort of speaks for itself.

  • That's gonna be the toggle button that we can click on to open and close our navigation.

  • And I will give it an area label of toggle Naveed Gatien because there's no label for it.

  • There's no text that tells us what this button is being used for.

  • So it is important to put a nary a label on there to help out a little bit for accessibility reasons.

  • And inside of that, a man into a span class of hamburger close span.

  • There's nothing actually in there.

  • It's a blanket.

  • Just gonna be something we're going to style up and make it look like our hamburger because we're gonna animate that and do some fun things with it as well.

  • Last but not least, in her header, we're gonna have our knave itself and I give this a class of Navin, You might say that's a little redundant, and it kind of is.

  • But it's the way I like to work, so we're going to stick with it.

  • If you don't want to have it, you don't need it.

  • But when I'm writing my CSS for the most part, I like to be selecting classes and just single costs is I'm gonna make a couple of exceptions in here for, say, the logo, maybe, and a few other things.

  • Yet you're gonna see that I do like putting my classes on everything.

  • And I'm gonna be using a system called them as well.

  • And so we have double underscore list, and I realized that might drive some people a little bit crazy having the double underscore there.

  • The reason I'm doing a double underscore is with the Ben System.

  • This is saying that my this list is a a sub component of my navigation here.

  • We're also never have items are not links.

  • Everything is gonna have a class, and it's gonna it just makes it a little bit easier when you're reading the CSS later.

  • You know, if something belongs as part of something bigger or is it a modification of something you're gonna see.

  • We're gonna have a few examples of that throughout this project, and it's maybe a little bit longer to do a double underscore.

  • We're gonna have times where there's a double hyphen, but it is a choice that I'm making very specifically because a I I do think them is a like them that I also think it's gonna make it easy if you want to go into the CSS later to modify it to quickly be able to identify what you want to change and to be able to change it very fast.

  • Um, so in here we're gonna have our allies.

  • So Ally class will be have item, and then in there we can have our links a nature if we're gonna set these all up after.

  • So I'm just gonna leave it as a hashtag for the moment and that 1st 1 can be our home section, and I'm just gonna copy this paste paste faced just like baton.

  • Obviously, if you wanted to add or remove sections from this, it would be very, very easy to do.

  • And for our header, that is everything that we need.

  • So in the next video, we'll explore the introduction section or that main section that has the picture with the name, innit?

  • Look forward to seeing you there.

  • It's have decided we're gonna be doing the intro section as well as this because both of them are relatively simple.

  • So we're gonna do both of those in one shot before moving on to the next one.

  • Um, looking at here, it might look a little bit complicated, but, you know, with the green barley maybe going How are we gonna do that?

  • Don't worry about that.

  • Looking at it, we just need to know what are the different pieces of content we have here.

  • So let's come here.

  • I'm gonna put a comment at the top.

  • This is gonna be introduction.

  • I'm just to try and make it a little bit easier.

  • And it could be a bigger comment if you wanted to, and we do.

  • A section on this is so section class is equal to intro, and I'm also gonna give this an I d of home.

  • You don't know the The idea could be different, but it's what We're eventually going to set these up, and actually, we're here, so we might as Well, do it.

  • We can set my, um, link of home right away to work on that.

  • So it's the only reason I'm putting an I d on it.

  • I personally don't use ideas for styling things.

  • I only use I d s for anchors like this, or sometimes for JavaScript functionality and some other stuff.

  • But I used my classes for styling use ideas for anchoring because that's sort of what they're good for.

  • And clothes section in this section, we have a couple of things were going over each one.

  • Ah, I will give this a class.

  • And remember, I told you everything is gonna have a class on it.

  • So it is gonna have a class of section title because it is a title of my section.

  • But I'm also gonna be modifying that a little bit.

  • So we're also going to call it my section title intro, and I realized again, that's a little bit long.

  • People may not like writing all of this, and them is a choice that I am making.

  • But in this case, I do think is a worthwhile case because it makes it really obvious what's going on.

  • So the double hyphen here is saying that it's a modifier class.

  • So it's gonna modify this section title, um, to be a little bit different from the default section title because there are some changes that we do need to make to that.

  • So in my section title intro we do have a bit of text in here, So most of it I'm gonna copy and paste.

  • But for now, I'm just gonna write Hi, I am because here we do need our strong tag as a short bit of text Jane Smith and close, Strong and Weaken Oops.

  • There's my clothes of my age one there And then we can come in with a paragraph Class is equal to section sub title and I'm gonna do a section subtitle intro because it's going to need some modifications on their means.

  • A Front and Dev Close paragraph And last but not least, we do need the picture.

  • So we have an image.

  • The image is our image folder and the name of it is deaf Jane 01 So thev jane 01 dot j p g.

  • Again.

  • You can feel free to replace these with your own pictures, a different dimensions on these pictures should work.

  • Okay, but if you do want to use it, just download everything.

  • You can check the dimensions on the picture itself, and you should be good to go.

  • That is it for that section.

  • So it's come down and do the next one here, which will be my service is I like having just a comments at the top of things.

  • Or sometimes if we have lots of clothes dibs, I might put some comments to say what those are actually closing.

  • Not that it's hard to navigate, but it just gives you a little visual clue when you're scrolling through a whole bunch of stuff where a new section of content is starting.

  • Eso here we could do my section class equals My service's could just be Service's, I guess, and we'll do that for the I.

  • D.

  • Service's come back up into my, uh, links or my my links here from a navigation and add service is there.

  • So this is going to link with the I D down here and we can close that section off and inside that section, let's just go quick, take a quick look at what we want So we have a title with a little underscore on it.

  • So that's gonna be another little modifier.

  • Classic is we're just going to do that is a pseudo element on the title, and then we need three columns and a button down at the bottom.

  • We can have an H two class is equal to section title, and that will be a section.

  • Title service is what I do close each too.

  • And so that's seeming the title.

  • The and we can control the color of the underlying with a pseudo limit all on there and then we need to have three columns.

  • So for the three columns here, I'm gonna do a div.

  • Class of service is so that's going to help us create.

  • The three dibs are the three columns that we need.

  • And inside each one of those, I will have a diff class called Service.

  • So it's my individual service.

  • We can close that, Dev and inside each one of those will have an H three closed h three and each one will also have a paragraph.

  • I'm gonna put a comment here, close close service because we will have a whole bunch of dibs and the inventing on that is a little off.

  • So copy paste paste and I'll come through and do the text on that offscreen afterward.

  • We do.

  • I forgot to close.

  • My service is so we can say that That's my clothes service's.

  • And then here I need to have a a a h ref is equal to I don't know what we'll call it yet they be my work.

  • We'd probably just call it work.

  • And then the class will be equal to be tien and close A And in my work s O that is the structure that we're are going to need for that section.

  • When we're off screen, I will come through and put all the Texans.

  • When you start the next video, everything will be exactly the same.

  • But the text will be there, and we can continue on with the next section we have in the site.

  • All of the Texas in place.

  • I also forgot the closing paragraph.

  • So those are also there now and we can move on to the next section of our site so that one will be just call it about me and let's go to get Look at what we're going to need for this one.

  • So just like the title up above it is pretty simple.

  • There might be a few things in here you may not be sure, but but the overall organization and structure of this one's pretty simple.

  • The next one will be to sort is gonna finish off all the HTML in this one because there isn't too much to do.

  • And then we get into the fun part, which is our CSS.

  • So here we need a new section.

  • Glass will be a vote me and we could give it the I D is equal to about I am Canadian.

  • So a boot boot me.

  • Uh, let's might as well come up right now and a link that about and I think this one will just call it work.

  • So we'll put that in right away.

  • That's what we already had that set up for our link there.

  • So that is good clothes section.

  • And inside this section, what do we have?

  • We have another title.

  • So h two, we're going to see this a lot classes equal to section title and then section title about this one is who I am close each to We will throw our paragraph on here for a subtitle So class is equal to section Subtitle and section Subtitle about close it close paragraph Some people like using headings as subtitles, but in general it's kind of frowned upon a heading, sort of the next level of content.

  • So you have your age to than if you had, like a subsection to your h two and yet a several h three's that would make sense a little bit like here we have our what I do is the section and then we have subsections.

  • We have design and development.

  • We hav e commerce.

  • We have WordPress.

  • So by having those different sections in here, that's more weight heading is used for.

  • It's less a title and then a subtitle.

  • So just using a class on a paragraph is generally a little bit.

  • Have a better way to do it.

  • You could also, if you wanted to actually put in a new header and close header for each one of these section for every single section like that as well.

  • So you're saying this is the header for that section?

  • I'm not gonna bother with that, but if you wanted to.

  • It's, you know, it's very valid to work that way.

  • A cz well, eso in there, we have that.

  • And then I'm gonna have one more thing.

  • I'm never Div class equals.

  • We'll call it a vote me body.

  • So it's like a subsection once again.

  • That's why we have the double underscore here we have about me and then this is a subsection to that.

  • So, um, it's a component of my about me.

  • So I'm putting a div.

  • That's why we have the double underscore there.

  • And then in that Dave, we're gonna put in the paragraph two paragraphs of text.

  • Close paragraph.

  • Um, this is important.

  • That and you know, you could technically get up to five paragraphs in here or have only one paragraph if you wanted to, and it wouldn't cause any issues whatsoever.

  • But it's important that we group it all together just to be ableto handle exactly where it's gonna go inside of this section on.

  • And then after that, we have one more thing we're gonna need, which is our image.

  • I don't know if it's really a bus, but we'll stick with that.

  • And that's image.

  • Have jane 0.2 dot j p g.

  • There we go.

  • So that is good clothes section.

  • And as they mentioned, we're gonna finish off all of the HTML for this one.

  • Eso this is going to be my work.

  • My work.

  • Ah, this one's gonna be pretty simple.

  • So, sir, section class will equal my work.

  • I d we said would be work.

  • Um, so in here will, once again, we're going to need our H two class equals section title.

  • I don't know if we're going to need to have a modifier class on that, So I'm gonna leave it like that right now.

  • We might need one to change the color of it because the color of this one is going to be white, and that's a little bit different.

  • Um, we're gonna see, but and actually, I'm looking at it now because these have a background on them and this one doesn't.

  • We might be coming back in here to make some small changes later on.

  • But for now, let's leave it like this.

  • And also I haven't put any text.

  • I'll do that off screens.

  • You don't have to see me copying and pasting the class is equal to section subtitle and the part that see me the most important here is we're gonna put a native class.

  • I'm gonna give this a class of port folio inside the portfolio we're gonna have Each one of them is gonna be in a We're gonna replace the h rough on this eventually.

  • But for now, we'll just put a hash tag with the class of portfolio port Fully Port Folio Double underscore item because it's the individual item closed, eh?

  • And then inside each one of those links, we will have an image SRC I'll put the 1st 1 pork vote Can't spell portfolio today.

  • Port Folio 01 dot jpeg mail T.

  • I'm gonna leave blank for now, but that could be something you fill in on your own if you want to put a little description of what the project is and the class on each one of these will be portfolio double underscore.

  • I am G because it's the portfolio image Court Folio portfolio Adam 01 I'm gonna speed this up as I do it because I think a little comment on each one of these will make it easier when you're setting everything up.

  • All right, so that is done.

  • Let's hit safe.

  • Because I haven't saved yet.

  • And let's see, hopefully everything is actually showing up on here, so it looks like everything is there.

  • We didn't get any errors.

  • My images are all loading in, so we're off to a good start on all of that.

  • I'm gonna close that off because we don't really need it right now.

  • And last but not least, Footer.

  • Awesome.

  • We're right at the end.

  • The footer is pretty straightforward.

  • So we knew.

  • Footer, close, footer.

  • And in here we're gonna have a couple of things we need in h ref of mail to hello at jane dot Dev With it, we'll put a comment on here.

  • Class is also gonna be foot our link.

  • And that can just say hello at jane dot Dev.

  • Close a Ah, we play replaced with your own email address.

  • Right, s.

  • So there you could just make sure that this and this year are your own email address.

  • If you are planning on using this for your own in a site, you Well, you have a class of social social list.

  • Close you Well, I'm not doing this as, like, a foot or thing.

  • And Bill, this is my foot or link.

  • And actually, that should be a double underscore on there.

  • I'm not doing this because technically, could be something that could be used in other places.

  • It doesn't necessarily have to be in the footer.

  • Um, so I'm not calling it like footer social list or something like that, but it could be if you wanted it to, um, we'll have an ally with an A in it.

  • Close.

  • Pay close.

  • L I The list item itself will have a class.

  • You guessed it of social social list item A lot like our navigation class is equal to social list.

  • Linc, um, this is a place where you could have another class on this, also of like on styled list that you could use for both of them and just remove, you know, because both of them, there's a lot of similarities between the two lists, and then on top of that, they'll have some modifications to it.

  • So if you wanted to take that approach to it instead of the way I'm doing it here, that would be perfectly acceptable and result in a little bit drier code in the long run, so I'd be all for that.

  • Um, for now, that's what some eight trips on these They're just gonna go to the generic, cites him to speed this up.

  • Well, I put them all on, all right.

  • And there we go and you'll see before, and I've just put in ABC We should have a D on that last one.

  • What did I do wrong for the D in the wrong spot?

  • So a B c d.

  • As the links?

  • Because when I put in the front awesome gonna bring I'll explain a little bit of how that's working, just in case you want to change it up for your own icons.

  • So when we do the foot or I'll go into more detail on that, for now, that is everything will probably be jumping back into the HTML a little bit as we write our CSS.

  • Just in case there's a thing or two along the way that we need ad.

  • But for the most part that is done.

  • That is the structure of everything we need.

  • So from there we can go ahead and start stopping this up.

  • The fun parts are starting.

  • In the next video, our rights were going to be jumping into actually styling things up, which is always the most fun.

  • If you want to get a different font information that waits the colors, sizes all of that just the colors in general that I used in this You can click here once again to get to that adobe X D link.

  • Now, do you get started on this in this video, we're just gonna be setting up some of the general things.

  • I'm gonna be doing a lot of CSS custom properties in here.

  • If you're not super familiar with them, they're going to make sense pretty quickly.

  • So we're gonna be starting with that.

  • We're gonna be setting up our basic fonts and getting all of that set up in this one.

  • So, um, the first thing we need to do is actually create a CSS file.

  • So if you're in your own co editor, you can do that.

  • How you're used to doing If you're following along here in scrim ba, you can right click in Scream ba where it says files and you can make a new file.

  • They're actually before you do that?

  • I mean, to make a new folder called CSS.

  • And then inside my new CSS folder, I'm gonna make a new file called Style dot CSS and we can get started in here.

  • But before you write anything, nothing will show up because we're not linked.

  • Somebody come down here and linked to my own CSS file CSS.

  • And just so we can make sure that it's all working, why don't we come into there and say Body background is red and see if that worked So I'll save that file.

  • I'll save the changes I made there, and now we can see that my body is definitely coming in as red.

  • So that is fantastic.

  • Really quickly.

  • Before we move on, you might have noticed there was a white background on that.

  • If you did download these images and you want to follow along with exactly these ones, you might have to download again.

  • Just there was a weird white box on that.

  • The head a bit of a, um, extra spacing on it.

  • Because of the shadow that I'd put on, I have removed it.

  • It is updated.

  • I'm really sorry about that.

  • You can grab the new images.

  • Now, if you are following along.

  • But again, I'm assuming that you're doing this using your own images to replace these ones.

  • But that has been fixed.

  • So if you want to download the images again, you can do that story once again.

  • And we can now get rid of our body background, read on that it save, and we can see that that his disappears.

  • Before we actually start writing any CSS, I'm going to do one more thing where I'm gonna come in here and put a link to the Google funds that I used in my document or in my design, eso update these with your own fonts if you do.

  • Now, if you like the funds I've used, these are the ones gonna be using.

  • The 1st 1 is the source saws the code version, which is the mono space font that was here.

  • I only use the regular, but I want to make it really easy for you to update.

  • So if you did want to switch this out for like, for 300 or the 500 or whatever it is, you just update the numbers here or add new numbers to it and the same thing.

  • I'm using the light and the black.

  • But if ever you need it more, you could just change.

  • Those numbers are going over to Google funds.

  • Just switch this out completely with the ones you want to be using.

  • We're also I'm using a whole bunch of custom property, so it's gonna make it really easy for you to update this all the funds throughout the whole site.

  • But you might have to just switch out of that link right there with the funds you want abusing to do.

  • It s o coming into here.

  • The very first thing I'm gonna do is a star comma star before comma star after, um, to set up my box sizing border box.

  • Because I do that on every single project.

  • It just makes our life so much easier.

  • If you're not too sure about Bach sizing border box, it's just changing how padding is calculated to make it with Inuit.

  • Instead of adding on to the total with of something, it just makes our lives so much easier when we're setting things up at the other thing to do is come on here on my route to set up some custom properties.

  • So the first thing I'd do is have a fun family of If this was my own project, I'd probably call it font family saws and then fought family code or font family motto or something like that.

  • Because I do want this to be something that could be used for other purposes.

  • I am gonna call this font family primary and a fun family secondary.

  • Ah, just in case you end up using different fonts from what I'm using in here, I do think that makes the most sense to do.

  • So my primary one is my source songs pro.

  • So we can bring that in right there.

  • And my code is that one right there.

  • I'm just copying and pasting these directly from Google funds.

  • The next thing I'm gonna do is set up my fault.

  • Wait, Someone of a fault.

  • Wait Regular, which is gonna be my 300 Andy Font hopes that should have a double hyphen.

  • And here front weight of bold, which will be my 900 now.

  • If you're not used to custom properties, you haven't used them.

  • This is not like them where I'm doing this out of, you know, just for fun.

  • This is how custom properties do you have to work with the double hyphen on here.

  • I have a color of the background.

  • Which is this gonna be my f f f?

  • We'll have a color text, which is my 30 30 30.

  • Actually, a long time I do that.

  • I'm gonna call this color light color dark because again, we might want to be doing this.

  • You might want to change these colors around for your own design and a color accent, which is my 16 e zero b g, which is the main greenish color that I used throughout this whole site.

  • Amaryllis, Epsom font sizes, I'm gonna say a font size of each one of three ram.

  • I always set my font sizes in rims font size each to 2.25 rim font Size H three will be one point when that's right.

  • One of 25 room.

  • These are all things I calculated already.

  • Based on my mark up and just playing around a little bit with it, we'll stick with one room on my body.

  • And the nice thing with font sizes are the nice thing with, um if you've ever used something like sass where you've set up using variables, variables are awesome.

  • They're amazing.

  • But these CSS native ones are great because you can actually change them within the media query, which was not something you could do inside of sass or less, or any of those other ones you might have been using.

  • I'm gonna be setting up a pretty generic media clear here of 800 pixels.

  • But I do think it works well for this design.

  • But it could be something that you could look at changing in your own if you find that it's not working.

  • But I think it's gonna work well for what we're doing here.

  • And what I'm gonna do is redefine my font.

  • Size is here to make them bigger at larger screen sizes.

  • Remember, fun sized each too.

  • Your 0.75 Bram on size H three will be 1.5 gram and my fun sized body will be 1.125 rim And that way, at once we hit this.

  • We don't have to redefine it with inner actual CSS these air being redefined here, so everything should just magically change for us a CZ, long as it's been properly set up using those so that we can come all the way to here.

  • But I can't just put custom properties update these for your own design.

  • And that's why I'm so used to We need comments that looked like this.

  • There we go, Uh, custom properties the Rio, and then we can do general styles.

  • So in my General Stiles, what are we gonna do?

  • Let's just make some room here and then come back up s so the first thing we're gonna select our body and this it the background on here have var color like so let's hit save and the amazing With this with the custom property is now, if you decide to change the color of its agency right now, we have the white background on there.

  • But if I change this to, let's say accent, it's going to change the background color to everything to accent like that where the accent color is coming in or if we change it too dark, we can quickly change the color scheme of our whole site.

  • So it's bring that back upto light for now and then we have light on.

  • There are color will be our of our color dark.

  • So if you needed to change anything, you can just invert that all this, then you'd have a dark color scheme which we're going to sort of be using when we get down to that, at least to change the font colors.

  • Or when we get to my work area, we can easily set that dark background on it.

  • Just like that.

  • Other things on here we're going to want to set.

  • We do have a margin of zero.

  • We'll put our fund family on here.

  • We're gonna put our Vier font family primary on there.

  • We're going to have our font size of our font size body, and now you can sort of see where that f s or F w and all of that that I used along the way Why I did it.

  • I'm gonna line height.

  • I use a 1.6 as sort of a default line height that I like to use on everything.

  • Um so hit save and we come back.

  • We should see a lot of those things coming in.

  • The fonts are working and a few other things were getting there.

  • We're almost done with the general set up.

  • Another general thing that I like to do is just setting my image is to have a display, a block which gets rid of some issues that sometimes come up with images and also setting a max whip of 100% on them just so they don't grow bigger and overflow with side of their parents.

  • Next step, we're gonna come and just set up our basic type typography.

  • Just a word I have way too much trouble pronouncing, sometimes not prancing but spelling for something I read a lot, so we never h one h two and h three are all gonna have a lion hight line Height of gonna try 1.1 and adjust from there.

  • But because they're gonna be a bigger font sizes in general, if they break on two lines, they definitely need this smaller line.

  • Hide on them and I'm gonna put a margin of zero.

  • For now, that might have to get revisited, but in general, the headings you want to get rid of the margins and maybe keep a bit of a merchant top, maybe a small margin bottom, But we're just gonna do a bit of a reset on there and then I'm h one on the set, a font size of Are you going to do our fun size?

  • Teach one.

  • And you probably guess what we're gonna do for the other one's just gonna coffee this, actually, And we can set that up within each too.

  • And that as an h three and over here we can have our h two and my each three.

  • So we saved that.

  • We come take a look.

  • We should have some nice big font sizes everywhere.

  • Except that's really small.

  • Let's just go take a look.

  • I forgot to put room here 4.5.

  • Nothing will not work.

  • So we'll have a nice big font size at large screen sizes.

  • But when we get to the smaller ones, you can see it's automatically adjusting when I change my screen size.

  • And if we come lower down on the site again, we should see those titles get bigger and smaller automatically with our media queries.

  • So that is really, really cool.

  • One of the things I love about custom properties, they do take a little bit more time to actually set up.

  • But then once you're using things and creating things, man, I can just go so so much faster.

  • So I think we're gonna and this one here, we're going to skip over the header and the navigation.

  • For now, we're gonna come back to that in a little bit, because for now, I just want to start doing the general typography.

  • But for our section titles and subtitles, and then we'll sort of go through the site a little bit from there.

  • All right, so Azzam mention we're gonna do a little bit more.

  • Typography were never a section title.

  • We'll give this a little bit of styling.

  • Um, which at the moment I'm not sure if we need to do much on it, and we're gonna have our section subtitle I'm gonna start with subtitle because there's a bit more of it.

  • I'm gonna play with that first and then go back into the other one to modify it a little bit.

  • So our subtitle here is gonna have a margin of zero just cause I think it makes our life a lot easier because remember, we didn't do it is an H three.

  • Um this is actually a paragraph because it's paragraph the font size on it.

  • We do have to modify.

  • So the font size will be my bar font size each three.

  • Um, again, start seeing where these variables come in handy.

  • You don't have to remember the pixel value.

  • You don't have to would worry about the media queries or anything like that.

  • It just is going to work.

  • And then we had our section Subtitle intro.

  • We also had the section subtitle about that had similar styling on them, where they both had a background color on them of the var color accent and the fun family.

  • For both of those will be my bar font family secondary.

  • They're probably going to need a little bit of padding on them, but we'll come back to the padding in a little bit.

  • We're gonna have to play and modify a lot on these as time goes, just to get them to line up properly in the spaces.

  • Let's just go take a look and see.

  • I think that's working out pretty nicely, actually with how it is right now, I'm actually really happy with it.

  • I'm just gonna play with the spacing on it a little little bit just to see, because I think it's a little bit tight compared to what the original design was.

  • But it's not too bad.

  • Ian.

  • See here, the commas actually touching that.

  • So I think what we'll do is on my section title.

  • We'll give it a little bit of a margin.

  • Bottom of like 0.25 m.

  • That'll probably be enough to push it off.

  • Especially.

  • There's a large font size I always do margins and patting on my text using EMS.

  • I think it's the best thing is relative to the font size that way, and you can sort of work with it.

  • So I think that's really, really cool and handy.

  • I'm here since we're dealing with our section titles, everything on my I like to keep all my typography together, Which is why I'm working this way.

  • Amnesty have fought the fun family should be my fun, not my fine family.

  • Sorry, I find weight on this one should be the regular, which is awesome.

  • Except this obviously shouldn't because that should have a strong on it.

  • Let me just double check.

  • Did I put that I Do You have that on there.

  • So let's go and fix that since this should be saying strong Ah doo doo doo topography because it knew it up here.

  • I know it's sort of a typography, but strong.

  • It's a bit of a generic thing.

  • Font.

  • Wait, is var won't wait.

  • Bold.

  • There we go.

  • So we have that working.

  • Um, Now the question is, I'm gonna cheat a little bit.

  • This isn't something I normally do our very often do.

  • But I'm going to actually take my this and say that the strong tag that's nested in there is display block.

  • Just so the Jane Smith always ends up on its own line instead of sometimes being on a different line like that.

  • So, um, I'm not a big fan of using compounds electors, but every now and then, once you know the rules, you're allowed to break them sometimes.

  • So this is one of those times where I think it is perfectly fine to go in there and break it.

  • The font size on this does look a little bit smaller than what the original design called for, so I might play with that.

  • But we'll play around with the overall look.

  • And if we still find that it's too small, um, maybe we could even change both of them to be the H two sides instead, and it will see will come back to that once the design is starting to come together a little bit.

  • But looking at the small screen sizes, honestly, we're getting close already.

  • Toe what we need.

  • There's not a ton of work that needs to be done at the small screens to get everything here to work.

  • Obviously, these need some fixing up.

  • Um, and overall, there is some work to be done, but we are getting close s.

  • So what we're gonna do is we're gonna end this video here and then in the next video, we are going to go in and set up the grid before this and make this work apple small and large screens.

  • Now, I know you might be wondering why we're not doing the navigation first, but I'm gonna come back to the navigation at the end and set that whole thing up because we're gonna get into a little bit of javascript and stuff to get that working.

  • So I'd rather just stick to CSS for now, Finish everything else.

  • Come back.

  • Style that and then add the JavaScript right at the very end.

  • Eso here.

  • What we can do is let's set up a bit of a comments, will say intro section and we can start styling it up.

  • Um, so the first thing you do is I'm gonna give it a position of ah relative.

  • I'm not sure, but I think we're gonna have some absolute positioning coming onto here.

  • So I'm doing that is a beautiful precursor for that.

  • Let's you know, we have I'm actually gonna say we're gonna turn this off, but let's just say for now I'm gonna say Knave has a display of none.

  • Just so it doesn't really get in the way too much will keep our logo with the top, even though that does

Hello.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

A2 初級

ポートフォリオサイトの構築と展開【完全チュートリアルコース (Build and deploy a portfolio website [Full Tutorial Course])

  • 0 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語