Figma To Real Website | Responsive Homepage | HTML, CSS & JavaScript | Part 12

GTCoding
4 Jan 202210:37

Summary

TLDRThis tutorial series guides viewers through converting a sigma design into a fully functional website using HTML, CSS, and JavaScript. The instructor demonstrates the responsive design on various devices, including mobile and iPad Pro, and provides a clean-up of the code for better efficiency. The video concludes with deploying the website using Netlify and customizing it with a subscription box. Viewers are encouraged to watch the entire playlist for a comprehensive understanding of the design process.

Takeaways

  • πŸ˜€ The tutorial series focuses on converting a design into a functional website using HTML, CSS, and JavaScript.
  • πŸ”§ The website's code has been completed and is displayed correctly in the Chrome browser, including all sections and responsive designs.
  • πŸ“± Responsive design testing is done using the 'Toggle device toolbar' feature in Chrome's developer tools to ensure the website looks good on mobile devices.
  • πŸ› οΈ The tutorial includes a step-by-step guide to clean up and improve the CSS code for better efficiency and design consistency.
  • πŸ“ CSS properties that are redundant, like font-family set in child elements when already defined in the parent, are removed to streamline the code.
  • 🎨 The hero section's text color is centralized in the parent division to avoid repetition and simplify the CSS structure.
  • ✨ Adjustments are made to the layout of achievement cards to improve the visual balance and alignment of text and images.
  • πŸ‘Œ Padding and alignment issues in input fields are addressed to ensure a better user experience across different devices.
  • πŸ“± Media queries are utilized to adjust the padding of input fields specifically for mobile views, maintaining responsiveness.
  • πŸš€ The website is deployed using Netlify, a service that allows easy drag-and-drop deployment and updates.
  • πŸ”„ The process of updating the live website is demonstrated, showing how to redeploy changes made to the source code.

Q & A

  • What is the main focus of the tutorial series presented in the script?

    -The main focus of the tutorial series is to show how to convert a sigma design into a real website using HTML, CSS, and JavaScript.

  • What browser is used to demonstrate the website design in the video?

    -The Chrome browser is used to demonstrate the website design.

  • How can viewers see the responsive design of the website on different devices?

    -Viewers can see the responsive design by right-clicking on the browser, selecting 'Inspect', and then clicking on the 'Toggle device toolbar' button to simulate different devices.

  • What is the source code link mentioned in the script, and where can it be found?

    -The source code link is provided in the description of the video for viewers to check out and follow along with the tutorial.

  • What is the first improvement suggested in the CSS file of the website?

    -The first improvement suggested is to remove the redundant font family setting of 'Poppins' from elements where it has already been set in the body.

  • How does the script suggest optimizing the CSS for the hero section?

    -The script suggests moving the color setting of white from the 'h1' and paragraph elements to their parent division, which is the hero section, to avoid redundancy.

  • What issue is identified with the achievement cards in the script, and how is it resolved?

    -The issue identified is the redundant color and font family settings for the text and paragraph within the achievement cards. It is resolved by removing these settings and applying them to the parent division instead.

  • What changes are made to the CSS for the image and text alignment within the achievement cards?

    -The changes include setting the flex to one for both the 's3' and the image to ensure they have the same width, reducing the image height, and adding negative margin left to align the image correctly with the text.

  • How is the padding issue with the input field in the app section addressed in the script?

    -The padding issue is addressed by specifying more padding on the right side of the input field to prevent the text from going under the button.

  • What service is used to deploy the website in the script, and how is it used?

    -Netlify is used to deploy the website. The process involves signing up or logging in with a GitHub account, going to 'Sites', and dragging and dropping the site folder to deploy it.

  • How can viewers update the deployed website, as demonstrated in the script?

    -Viewers can update the website by making changes to the local source code and then re-deploying the updated folder to the Netlify account.

Outlines

00:00

πŸ› οΈ Website Design and Code Cleanup

In this paragraph, the speaker introduces a tutorial series on converting a sigma design into a functional website using HTML, CSS, and JavaScript. They demonstrate the completed design in a Chrome browser, showcasing responsive design features for mobile and tablet devices. The speaker also explains the process of cleaning up the code by removing redundant CSS properties and centralizing the alignment of text. The focus is on refining the website's code for better organization and performance.

05:02

πŸ“± Responsive Design Adjustments and Deployment

The speaker continues by discussing adjustments made to the website's responsive design, specifically addressing issues with input field padding and ensuring text does not overlap with buttons. They provide a step-by-step guide on how to adjust padding for different devices using CSS media queries. The paragraph concludes with instructions on deploying the website using Netlify, a service that allows for easy website updates and customizations.

10:04

πŸŽ‰ Finalizing the Tutorial Series

In the final paragraph, the speaker wraps up the tutorial series by encouraging viewers to like the video if they enjoyed the content and to ask questions in the comments for any doubts. They also remind viewers of the availability of the source code in the video description and thank them for watching, signaling the end of the series with a friendly sign-off.

Mindmap

Keywords

πŸ’‘HTML

HTML, or HyperText Markup Language, is the standard markup language used to create web pages. It is the backbone of the web, defining the structure and layout of the content. In the video, HTML is essential for converting the sigma design into a real website, as it is used to write the code that structures the website's sections and elements.

πŸ’‘CSS

CSS stands for Cascading Style Sheets, a stylesheet language used for describing the presentation of a document written in HTML or XML. In the context of the video, CSS is used to style the website, including the layout, colors, and fonts, ensuring that the design is visually appealing and matches the Figma design.

πŸ’‘JavaScript

JavaScript is a programming language that allows interactive web pages and is an essential part of web applications. In the video, JavaScript is mentioned alongside HTML and CSS as one of the technologies used to create the website, although specific uses are not detailed in the transcript.

πŸ’‘Responsive Design

Responsive design is an approach to web design that makes web pages render well on different devices and window or screen sizes. The video script mentions designing responsive versions of the website, which means adjusting the layout to look good on both mobile devices and larger screens, like an iPad Pro.

πŸ’‘Figma

Figma is a cloud-based interface design tool and digital design platform where designs are created and shared. In the video, the Figma design is the original design that the tutorial series aims to replicate as a functioning website using HTML, CSS, and JavaScript.

πŸ’‘Chrome Browser

The Chrome browser, developed by Google, is a widely used web browser. In the script, the presenter uses the Chrome browser to demonstrate how the website looks after the code has been written, including its appearance when inspected for responsiveness.

πŸ’‘Code Cleanup

Code cleanup refers to the process of revising and reorganizing code to make it more efficient, readable, and maintainable. In the video, the presenter focuses on cleaning up the CSS code by removing redundant font family declarations and other optimizations.

πŸ’‘Deployment

Deployment in the context of web development refers to the process of making a website live on a server so that it can be accessed via the internet. The video script discusses deploying the completed website online using a service called Netlify.

πŸ’‘Netlify

Netlify is a platform that offers hosting and serverless backend services for web applications. In the video, the presenter uses Netlify to deploy the website, making it accessible online with a simple drag-and-drop process.

πŸ’‘Media Query

A media query is a CSS technique used to apply different style rules for different devices based on characteristics such as screen size, resolution, and orientation. In the video, a media query is used to adjust the padding of the input field for mobile devices, ensuring the design is responsive.

πŸ’‘Font Family

The term 'font family' in web design refers to a set of fonts that have a similar design feel and can be used together within a website. In the video, the font family 'Poppins' is mentioned multiple times as being set for various elements, and the presenter optimizes the code by removing redundant font family declarations.

Highlights

Introduction to the tutorial series on converting a sigma design into a real website using HTML, CSS, and JavaScript.

Completion of coding with a demonstration of the website's appearance in the Chrome browser.

Design responsiveness showcased with a toggle to view the website on mobile devices.

Navigation menu functionality displayed on different device layouts.

Source code link provided in the video description for viewers to follow along.

Recommendation to watch the entire playlist for a comprehensive understanding of the design process.

CSS file review to identify areas for code improvement.

Redundant font family declarations removed for cleaner code.

CSS inheritance utilized to streamline color and font settings for child elements.

Achievement cards' text color and paragraph color standardized for consistency.

Space adjustment between number and star image in the achievement cards for better aesthetics.

Flex properties applied to elements to ensure equal width and alignment.

CSS specificity and overriding properties to ensure correct text alignment and spacing.

Removal of redundant CSS properties to simplify the codebase.

Input field padding adjustments for improved user interface on desktop views.

Media query modifications to ensure consistent padding on mobile devices.

Deployment of the website using Netlify with a step-by-step guide.

Custom domain setup and site name editing in Netlify for personalization.

Subscription box integration suggestion using email services for functionality.

Demonstration of website update process and immediate reflection on the live site.

Encouragement for viewers to customize the code to fit their needs.

Closing remarks with an invitation to like the video and ask questions in the comments.

Transcripts

play00:00

hi everybody welcome to gt coding in

play00:01

this tutorial series i showed you how to

play00:03

convert this sigma design into a real

play00:05

website using html css and javascript

play00:08

and we have already completed writing

play00:10

all the code so if you go to our chrome

play00:11

browser

play00:13

this is how the design looks so if we

play00:14

scroll down we can see that all the

play00:15

sections are displayed correctly

play00:19

and we have also designed the responsive

play00:21

versions so if i right click over here

play00:22

and click on inspect and here we can

play00:24

click on this button called toggle

play00:25

device toolbar

play00:28

and this is how it will look on a mobile

play00:29

device

play00:30

so here we can see we have all the

play00:31

sections displayed

play00:33

just like we have in the figma design

play00:36

and we also have this button over here

play00:37

for the navigation menus and

play00:40

we can see that the menus are displayed

play00:41

over here and if i go ahead and select

play00:43

another device from here let's select

play00:45

ipad

play00:47

and this is how it will look on an ipad

play00:50

so we have a different layout we have

play00:52

two columns for the footer

play00:54

and

play00:55

let's select a larger device so if i

play00:57

select ipad pro

play00:59

we have a different design

play01:02

so we have completed writing all the

play01:03

code for this design now in this video

play01:05

we will just clean up some of the code

play01:08

and then we'll deploy this website

play01:09

online now i will leave the link of the

play01:11

source code in the description of this

play01:12

video so you can go ahead and check that

play01:13

out but i recommend you to watch all the

play01:15

videos in the playlist and write the

play01:17

code along with me so that you'll

play01:19

understand how everything is

play01:21

designed alright so let's get started

play01:24

[Music]

play01:29

right here i'm in the source code of our

play01:30

website and this is the css file

play01:33

so let's take a look at this css and

play01:35

let's see what we can improve so here

play01:37

you can see in the body we have set a

play01:39

font family of poppins and sanserif so

play01:41

whenever we have this font family set to

play01:43

pop ins in any of the elements we can

play01:45

just delete that so let's scroll down

play01:47

and

play01:49

here you can see in the nav element

play01:50

inside the anchor tag we have the phone

play01:53

family set to pop ins but we have

play01:54

already set the phone family to poppins

play01:56

in the body so we can just delete this

play01:58

line of code

play02:00

and if you go back to our design we can

play02:02

see that we don't have any problems

play02:04

all right let's scroll down

play02:06

and now you can see in the hero section

play02:08

we have

play02:10

these elements over here and

play02:12

for the h1 and for the paragraph we have

play02:14

set a color of white so we can just cut

play02:17

this line of code from here and add it

play02:19

to the parent division which is the hero

play02:20

section so i'll just add it over here

play02:24

and we can just delete this line of code

play02:26

color of white from the h1

play02:29

and here in the paragraph we can just

play02:31

delete the font family line

play02:34

let's go back to the website and we can

play02:36

see we don't have any problems

play02:39

right let's scroll down and

play02:41

here are the achievement cards

play02:43

if we scroll down we can see that we

play02:45

have set the color of

play02:47

the text to

play02:49

dark blue color and even for the

play02:51

paragraph we have set a color of

play02:53

dark blue color so we can just cut this

play02:55

line of code from here

play02:57

and we can just add this to the parent

play02:58

division which is the achievement card

play03:00

division so let's scroll up and

play03:03

let's paste it over here

play03:06

and we can also delete the color from

play03:08

the s3

play03:10

and we'll also remove the font family

play03:12

pop-ins from here

play03:14

and also from the paragraph

play03:16

all right let's go back to our website

play03:19

and we don't have any problems

play03:21

now the next thing we will do is we will

play03:23

decrease the space between

play03:25

this number and this star image so let's

play03:28

go back to our code here we can see we

play03:30

have this content division and in that

play03:32

we have this div and in that we have the

play03:34

s3 and the image so if you go back to

play03:36

the html file

play03:38

and let's scroll up

play03:39

and here we can see we have the

play03:40

achievement cards and here inside the

play03:42

content division we have a div

play03:45

and in that we have the s3 and the image

play03:47

so first of all let's add a background

play03:49

color to this div and let's see

play03:51

the space that it takes so i'll just add

play03:53

a background color over here

play03:55

and i'll just set it to red

play03:57

and this is the space that it takes and

play03:59

one more thing that i notice over here

play04:01

is that this paragraph is not center

play04:04

aligned

play04:05

so let's go back and

play04:07

let's go over here to the paragraph and

play04:09

here let's tap text align center

play04:12

all right now let's go back to our css

play04:14

and what i will do is i will set the

play04:16

flex to one for the s3 and the image so

play04:20

that both of them will have the same

play04:22

width so here i'll just type achievement

play04:24

card img

play04:26

and let's set the flex to one

play04:29

and here also i'll just set the flex to

play04:31

one

play04:33

and now we can see both of them have the

play04:34

same width and now i'll just reduce the

play04:36

height of this image

play04:38

so here i'll just type height and i'll

play04:40

just set the height to 42 pixels

play04:42

and now i'll just add some negative

play04:44

margin left to this image

play04:46

so let's type margin left and i'll just

play04:49

type

play04:50

negative 24 pixels

play04:52

and now we can see it looks alright so

play04:53

i'll just remove this background color

play04:57

all right now let's go back to our css

play04:59

and let's scroll down

play05:02

and here in the section paragraph we

play05:04

have set a font family of poppins so we

play05:06

can just remove this

play05:10

and if we scroll down we don't have any

play05:11

problems

play05:12

and here inside the app section we have

play05:14

this

play05:15

font family set to pop in so i'll just

play05:17

delete this line of code

play05:19

and here for the input field we have set

play05:20

a font family of pop-ins but we have to

play05:22

specify the font family in input fields

play05:26

so if i remove this font family line

play05:28

from here and if i go back to our

play05:30

website

play05:32

we can see it doesn't have the correct

play05:33

font so we have to specify the phone

play05:35

family in the input fields

play05:38

now one issue that we have with the

play05:40

input field is that we don't have the

play05:41

correct padding

play05:43

so if i just type something over here

play05:46

we can see that the text goes under the

play05:48

button

play05:50

so we have to add some more padding over

play05:52

here on the right so here i'll just type

play05:55

padding and set the padding to 8 pixels

play05:58

top and for the left i'll just set a

play05:59

padding of 160 pixels

play06:03

and for the bottom i'll just have a

play06:05

padding of 8 pixels and for the left we

play06:07

will have a padding of 32 pixels right

play06:09

now let's go back

play06:10

and

play06:11

now we can see we have the correct

play06:13

padding

play06:16

so we can see that it doesn't go under

play06:18

the button right now that we have added

play06:20

this padding of right for this input

play06:22

field we have to check whether we have

play06:24

the correct padding for the mobile

play06:25

version

play06:26

so let's open

play06:28

the mobile version

play06:31

and let's type something over here

play06:36

and here also we have a padding of 160

play06:38

for the right so we have to reset the

play06:40

padding over here in the mobile device

play06:42

so let's go back to our css

play06:44

and let's scroll down

play06:47

and here in the media query for 700

play06:49

pixels i'll just scroll down

play06:52

and i'll just add the selector of the

play06:55

input field over here so just a footer

play06:58

form input

play06:59

and i just add a padding of 8 pixels top

play07:02

and bottom and 32 pixels left and right

play07:04

let's go back and let's see whether we

play07:06

have the correct padding

play07:07

and now we can see we have the correct

play07:09

padding all right that's pretty much it

play07:11

with the code of our website so

play07:13

everything looks alright

play07:15

now you can go ahead and customize this

play07:16

code to your needs all right now the

play07:18

final thing we need to do is deploy this

play07:20

website online so let's go back to our

play07:22

browser now for deploying our website

play07:24

we're going to use this service called

play07:25

netlify so you can just sign up for free

play07:28

or you can just log in using your github

play07:30

account so just log in

play07:33

and then you have to go to sites and you

play07:34

can just drag and drop your

play07:36

site folder over here so here's my

play07:38

folder which has all the files so here

play07:41

you can see we have the images

play07:43

in the html javascript and the css files

play07:46

so i'll just drag and drop this over

play07:48

here

play07:56

and here we can see that the site has

play07:58

already been deployed now you can just

play08:00

go over here to domain settings

play08:02

and you can just add a custom domain if

play08:04

you want or you can just change this

play08:06

name

play08:08

so let's go over here to edit site name

play08:11

and i'll just type

play08:13

my new website

play08:15

let's see whether we have the name

play08:17

available

play08:18

let's add some number over here

play08:21

right now we can see we have this url my

play08:24

new website 123.net life.app so let's

play08:27

open this

play08:29

and this is how it looks we can see that

play08:31

everything looks all right

play08:33

now for the subscription box you can go

play08:34

ahead and sign up for an email

play08:36

subscription service or an email

play08:38

newsletter service so you can go ahead

play08:40

and get the code and paste it over here

play08:42

in place of this input box and then the

play08:45

input field will be functional

play08:47

right now let's check out the mobile

play08:49

version

play08:53

and we can see it looks alright

play08:58

let's check out the ipad

play09:00

pro version

play09:02

and everything looks alright

play09:04

now if you want to update this website

play09:05

you can go ahead and do that pretty

play09:08

easily

play09:09

so here we can see in the title we have

play09:12

document so i'll just change this to

play09:13

welcome and let's update our website

play09:16

let's go back to our source code

play09:18

and let's go to our index.html file and

play09:21

let's scroll up and here in the title

play09:23

i'll just type welcome

play09:25

now let's save it and now let's drag and

play09:28

drop this updated folder into our

play09:29

netlify account

play09:31

so i'll just go back to

play09:33

deploys

play09:35

and now if we scroll down we can see

play09:36

that we can just drag and drop the

play09:38

updated site folder over here this is my

play09:41

updated folder so i'll just drag and

play09:42

drop this over here

play09:48

and we can see it is being uploaded and

play09:51

here we can see it has been published so

play09:53

let's open this website

play09:54

and let's see whether the title is

play09:57

displayed

play09:59

and now we can see that welcome is

play10:00

displayed over here so everything is

play10:02

working all right

play10:03

all right so that's it for this video so

play10:05

this was the final video in this

play10:07

playlist so if you enjoyed this series

play10:09

please click on the like button and if

play10:11

you have any doubts you can ask in the

play10:12

comments below and i will also leave the

play10:14

link of the source code in the

play10:15

description of this video alright so

play10:16

that's it for this video thanks a lot

play10:18

for watching have a nice day

play10:21

[Music]

play10:36

you

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Web DevelopmentHTML CodingCSS StylingJavaScriptResponsive DesignWebsite TutorialMobile OptimizationWeb DeploymentNetlify ServiceCode Cleanup