Minggu, 04 Maret 2018

Tutorial Membuat Template Toko Online Dengan Bootstrap

Assalamualaikum.Wr.Wb. Saudara - saudara sekalian, ana disini akan berbagi sedikit ilmu mengenai bagaimana cara membuat tampilan website dengan bootstrap. Ok langsung saja ke TKP!!!
Langkah - langkah :
1. Ketikan coding ini pada text editor anda

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>RajanyaMotor</title>
    <link rel="stylesheet" href="assets/css/bootstrap.min.css">
</head>
<body class="bg-white">

    <div class="bg-dark p-2 text-white">
        <div class="d-flex">
      <div class="ml-5 mr-auto p-2">
        <a class="text-white" href="index.html">Home</a>
        <a class="text-white ml-3" href="#">About</a>
        <a class="text-white ml-3" href="#">Contact</a>
      </div>
          <div class="mr-5 p-2">
        <a class="text-white" href="#">Login</a>
      </div>
        </div>
    </div>

    <nav class="navbar navbar-expand-lg navbar-light bg-light p-4 mb-5">
    <a class="navbar-brand ml-5" href="index.html">RajanyaMotor</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" >
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarNav">
      <ul class="navbar-nav mr-auto">
        <div class="input-group ml-5">
          <input type="text" class="form-control" placeholder="Search">
          <div class="input-group-append">
            <button class="btn btn-primary" type="button">Search</button>
          </div>
        </div>
      </ul>
      <ul class="navbar-nav navbar-right mr-5">
        <li class="nav-item">
          <a class="nav-link" href="#">Cart</a>
        </li>
      </ul>
    </div>
  </nav>

  <div class="container mb-5">
    <div class="row">
      <div class="col-lg-3">
        <div class="card">
          <div class="card-header">Categories</div>
          <div class="list-group list-group-flush">
            <a href="#" class="list-group-item list-group-item-action">Matic</a>
            <a href="#" class="list-group-item list-group-item-action">Injection</a>
          </div>
        </div>
      </div>
      <div class="col-lg-9">
        <div id="slider" class="carousel slide" data-ride="carousel">
          <ol class="carousel-indicators">
            <li data-target="#slider" data-slide-to="0" class="active"></li>
            <li data-target="#slider" data-slide-to="1"></li>
          </ol>
          <div class="carousel-inner">
            <div class="carousel-item active">
              <img class="d-block w-100" src="image/slider1.jpg">
            </div>
            <div class="carousel-item">
              <img class="d-block w-100" src="image/slider2.jpg">
            </div>
          </div>
          <a class="carousel-control-prev" href="#slider" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
          </a>
          <a class="carousel-control-next" href="#slider" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
          </a>
        </div>
        <div class="row mt-4">
          <div class="col-lg-12 mb-4">
            <div class="card">
              <div class="card-body">
                <div class="d-flex text-uppercase font-weight-bold">
                  <div class="mr-auto">Latest Product</div>
                  <a href="#">View All</a>
                </div>
              </div>
            </div>
          </div>
          <div class="col-lg-4 mb-3">
            <div class="card">
              <img src="image/gambar.jpg" class="card-img-top">
              <div class="card-body">
                <div class="mb-3">
                  <div class="font-weight-bold">Matic Suzuki</div>
                  <div class="text-danger">Rp.14.000.000</div>                  
                </div>
                <a href="#" class="btn btn-outline-primary btn-sm btn-block">Buy</a>
              </div>
            </div>
          </div>
          <div class="col-lg-4 mb-3">
            <div class="card">
              <img src="image/gambar1.jpg" class="card-img-top">
              <div class="card-body">
                <div class="mb-3">
                  <div class="font-weight-bold">Matic Viar</div>
                  <div class="text-danger">Rp.16.200.000</div>                  
                </div>
                <a href="#" class="btn btn-outline-primary btn-sm btn-block">Buy</a>
              </div>
            </div>
          </div>
          <div class="col-lg-4 mb-3">
            <div class="card">
              <img src="image/gambar2.jpg" class="card-img-top">
              <div class="card-body">
                <div class="mb-3">
                  <div class="font-weight-bold">Matic Yamaha</div>
                  <div class="text-danger">Rp.16.000.000</div>                  
                </div>
                <a href="#" class="btn btn-outline-primary btn-sm btn-block">Buy</a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <hr>

  <footer class="m-5 pl-5 pr-5">
    <div class="row">
      <div class="col-lg-4">
        <h5>Categories</h5>
        <ul class="list-unstyled text-small">
          <li><a class="text-muted" href="#">Motor Matic</a></li>
          <li><a class="text-muted" href="#">Motor Injection</a></li>
        </ul>
      </div>
      <div class="col-lg-4">
        <h5>Top Brands</h5>
        <ul class="list-unstyled text-small">
          <li><a class="text-muted" href="#">E&M</a></li>
        </ul>
      </div>
      <div class="col-lg-4">
        <h5>About</h5>
        <ul class="list-unstyled text-small">
          <li><a class="text-muted" href="#">Team</a></li>
          <li><a class="text-muted" href="#">Locations</a></li>
          <li><a class="text-muted" href="#">Privacy</a></li>
          <li><a class="text-muted" href="#">Terms</a></li>
        </ul>
      </div>
    </div>
  </footer>

  <script src="assets/js/jquery-3.2.1.min.js"></script>
  <script src="assets/js/bootstrap.min.js"></script>
</body>
</html>

Dan hasilnya akan seperti dibawah ini






















Catatan untuk css nya kalian bisa download bootstrap versi apa saja, kemudian taruh file nya didalam folder tersebut.