\n \n \n \n\n\n\nSTEP 4: Adding structure\nSo, for the sake of this example, I will have 4 sections on my index.html: Navigation, About, Portfolio, and Contact. Bootstrap has a grid structure implemented already, so all we need to do is structure it in the HTML. (Refer to http://getbootstrap.com/css/#grid-example-basic)\n\nNote: All of this will go inside the body tag\n\nNAVIGATION \n\n\n\nNotice that the links are simply hashtags, that is because you will be making anchors (links that lead to a specific section on the same page)\n\nABOUT SECTION\nJust so you know, I'm not following any specific guidline here and I am just making this page as we go. I want to have two columns for my about section: one for a picture, and another with space to write about myself. I do this by making a
tag and then inside that tag making a row tag with column tags inside. I made a placeholder about image and put it inside a folder that I called \"images\". Therefore, when linking the image, I linked it to \"images/about.jpg\". You can use a sample image for the mean time.\n\nSo, first put this code inside the body section\n\n
\n\nThen inside that tag, paste this code:\n\n\n
\n\t
\n\t\t\n\t
\t\n\t\n\t
\n\t\t

About

\n\t\t\t

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor.\n\t\t\tAenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus\n\t\t\tmus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa\n\t\t\tquis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo,\n\t\t\trhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium.\n\t\t\tInteger tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus.\n\t\t\tAenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus\n\t\t\tin, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque\n\t\t\trutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi.\n\t\t\tNam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper\n\t\t\tlibero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar,\n\t\t\thendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero\n\t\t\tvenenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo.\n\t\t\tSed fringilla mauris sit amet nibh. \n\t\t\t

\n\t\t\t\n\t
\t\t\t\n
\n\nPORTFOLIO SECTION\nBootstrap has a thumbnail class that you can use to style a portfolio grid of images. I created another placeholder image and put it in the same \"images\" folder.\n\n\n\t\t
\n\t\t\t\n\t\t\t

Portfolio

\n\t\t
\n\t\t\n\t\t
\n\t\t\t
\n\t\t\t\t\"...\"\n\t\t\t
\n\t\t\t
\n\t\t\t\t\"...\"\n\t\t\t
\n\t\t\t
\n\t\t\t\t\"...\"\n\t\t\t
\n\t\t\t
\n\t\t\t\t\"...\"\n\t\t\t
\n\n\t\t
\n\nCONTACT SECTION\n\nBootstrap also has form styling, so we will create a dummy form here for you to use in the contact section:\n\n\n\t\t
\n\t\t\t\n\t\t\t

Contact

\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\t\n\t\t\t \n\t\t\t
\n\t\t\t
\n\t\t
\n\t\t\n \n\nNotice that the form and portfolio section are in rows and then inside the rows there are columns.\n\nI hope the long post didn't intimidate you. I tried to simplify it as much as possible. I hope the slideshow is helpful. In the last part of this series I will teach you how to upload and host this one-page website.","inlineStyleRanges":[],"entityRanges":[]}],"entityMap":{}}},"metadata":{"fb":{"app_id":"294433960607715"},"og":{"title":"DIY One-Page Website: Part 3/4 - Begin Building","site_name":"Vingle","type":"vingle_production:card","url":"https://www.vingle.net/posts/402800","image":"https://images.vingle.net/upload/t_ca_l/z3apxxsrvitqkjess1vd.jpg","description":"In this lesson, I will teach you how to start building your one-page website with a CSS framework called Bootstrap. A CSS framework is a skeleton, or building block that works as a template when starting your site. Bootstrap is built by Twitter and has many features including a responsive design that allows your website to fit in any screen size, even mobile devices. I am showing you a quick way to build a page, but I highly encourage you to research more about Bootstrap and get a basic unde...","locale":"en_US","locale:alternate":"ko_KR"},"article":{"published_time":"2014-07-11T06:03:22+09:00","modified_time":"2014-07-11T06:03:22+09:00","author":"TechAtHeart","section":"Web & Mobile Design","tag":"Web & Mobile Design"},"al":{"iphone":{"app_name":"Vingle","url":"vingle://cards/402800","app_store_id":"637534820"},"android":{"app_name":"Vingle","url":"vingle://cards/402800","package":"com.vingle.android"},"web":{"url":"https://www.vingle.net/posts/402800","should_fallback":"true"}},"dable":{"item_id":"card402800","author":"TechAtHeart"}}}},"editor":{"meta":{"isSaving":false,"hasTriedSaving":false,"hasFailedSaving":false,"isFetching":false,"hasTriedFetching":false,"hasFailedFetching":false,"needsVerification":false},"data":{"post":{}}},"cardDeck":{"meta":{"isLoading":false,"hasFailedFetching":false,"hasFailedDeleting":false,"currentPost":null,"isUnsubscriptionDialogOpen":false},"data":null},"sidebar":{"isOpen":false,"isLoading":false,"followingCollections":[],"isFailed":false},"loginModal":{"isOpen":false},"globalDialog":{"isVerificationDialogOpen":false,"isAdminPublishManageDialogOpen":false},"comments":{"meta":{"isFailed":false,"hasReportedBefore":false,"paging":{},"isFailedFetching":false,"isReportDialogOpen":false,"isLoading":false,"isDeleting":false,"reportTargetCommentId":null,"isPosting":false,"isFailedPosting":false},"data":{"comments":[]}},"collectionModal":{"meta":{"isSaving":false,"isSavingError":false,"isMyCard":false,"cardId":"","isFetched":false,"isLoading":false,"isOpen":false,"isOnCoverPage":false,"isError":false},"data":{"collections":[],"selectedCollections":[]}},"notificationDropdown":{"meta":{"isLoading":false,"isFailedFetching":false,"isOpen":false,"mineIsFinished":false,"commonIsFinished":false,"commonPage":1,"minePage":1},"data":{"mine":[],"common":[]}},"toast":{"toasts":[]},"signIn":{"isLoading":false,"hasFailed":false,"username":"","password":""},"signUpGender":{"gender":null},"routing":{"location":null},"postReportDialog":{"isOpen":false,"interest":[],"postId":""}}
3 years ago
TechAtHeart
in English ยท 2,490 Views
likes 7clips 4comments 0
DIY One-Page Website: Part 3/4 - Begin Building
In this lesson, I will teach you how to start building your one-page website with a CSS framework called Bootstrap. A CSS framework is a skeleton, or building block that works as a template when starting your site. Bootstrap is built by Twitter and has many features including a responsive design that allows your website to fit in any screen size, even mobile devices. I am showing you a quick way to build a page, but I highly encourage you to research more about Bootstrap and get a basic understanding of what you are downloading and using. WHAT YOU NEED: - Basic understanding of HTML + CSS - Bootstrap Framework - Text Editor (Notepad++) Follow the slideshow for helpful screen captures STEP 1: Download Bootstrap at http://getbootstrap.com/getting-started/#download and extract zip file STEP 2: Create a folder for your website. I am calling mine "demo site". Copy the extracted files into this new folder. You should have a 'css', 'js', and 'fonts' folder. STEP 3: Create and save your index.html in the main folder. In order to use the boostrap framework you need to link the CSS files as well as the Javascript files. In this lesson, you don't need to know Javascript. The basic template of your html website will be as follows: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Demo One Page Site</title> <!-- Link Bootstrap CSS Stylesheet --> <link href="css/bootstrap.min.css" rel="stylesheet"> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <!-- You will put code here--> <!-- KEEP THIS AT BOTTOM --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> </body> </html> STEP 4: Adding structure So, for the sake of this example, I will have 4 sections on my index.html: Navigation, About, Portfolio, and Contact. Bootstrap has a grid structure implemented already, so all we need to do is structure it in the HTML. (Refer to http://getbootstrap.com/css/#grid-example-basic) Note: All of this will go inside the body tag NAVIGATION <nav class="navbar navbar-default navbar-static-top" role="navigation"> <div class="container"> <ul class="nav navbar-nav"> <li><a href="#about">About</a></li> <li><a href="#portfolio">Portfolio</a></li> <li><a href="#contact">Contact</a></li> </ul> </div> </nav> Notice that the links are simply hashtags, that is because you will be making anchors (links that lead to a specific section on the same page) ABOUT SECTION Just so you know, I'm not following any specific guidline here and I am just making this page as we go. I want to have two columns for my about section: one for a picture, and another with space to write about myself. I do this by making a <div class="container> </div> tag and then inside that tag making a row tag with column tags inside. I made a placeholder about image and put it inside a folder that I called "images". Therefore, when linking the image, I linked it to "images/about.jpg". You can use a sample image for the mean time. So, first put this code inside the body section <div class="container> </div> Then inside that tag, paste this code: <!-- ABOUT SECTION --> <div class="row"> <div class="col-md-4"> <img src="images/about.jpg" align="center" /> </div> <div class="col-md-8"> <a name="about"></a> <h1>About</h1> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. </p> </div> </div> PORTFOLIO SECTION Bootstrap has a thumbnail class that you can use to style a portfolio grid of images. I created another placeholder image and put it in the same "images" folder. <!-- PORTFOLIO SECTION --> <div class="row"> <a name="portfolio"></a> <h1>Portfolio</h1> </div> <div class="row"> <div class="col-xs-6 col-md-3"> <a href="#" class="thumbnail"><img src="images/placeholder.jpg" alt="..."></a> </div> <div class="col-xs-6 col-md-3"> <a href="#" class="thumbnail"><img src="images/placeholder.jpg" alt="..."></a> </div> <div class="col-xs-6 col-md-3"> <a href="#" class="thumbnail"><img src="images/placeholder.jpg" alt="..."></a> </div> <div class="col-xs-6 col-md-3"> <a href="#" class="thumbnail"><img src="images/placeholder.jpg" alt="..."></a> </div> </div> CONTACT SECTION Bootstrap also has form styling, so we will create a dummy form here for you to use in the contact section: <!-- CONTACT SECTION --> <div class="row"> <a name="contact"></a> <h1>Contact</h1> <div class="col-md-4"> <form role="form"> <div class="form-group"> <label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email"> </div> <div class="form-group"> <label for="yourmessage">Message</label> <input type="textbox" class="form-control" id="yourmessage" placeholder="Your Message"> </div> <button type="submit" class="btn btn-default">Submit</button> </form> </div> </div> </div> Notice that the form and portfolio section are in rows and then inside the rows there are columns. I hope the long post didn't intimidate you. I tried to simplify it as much as possible. I hope the slideshow is helpful. In the last part of this series I will teach you how to upload and host this one-page website.
TechAtHeart clipped in 1 collections
0 comments