Desain Template Dengan Bootswatch di Codeigniter

Setting Template dengan bootswatch.com

Desain Template ini adalah perbaikan dari file master ci_tutorial yang kalian download bermasa'alah atau file cssnya sudah tidak terhubung lagi,jadi saya buatkan solusi untuk kalian perbaiki anda tinggal kopikan code js dan css updatenya dibawah ini dan CATATAN anda Harus download filenya agar supaya file css dan jsnya tidak dapart berubah lagi dan agar supaya kita dapat mengaksesnya secara offline, semoga ini bisa membantu masalah css yg sudah tidak aktif lagi, terima kasih.
1. Tambahkan Code Html ini di folder template dengan nama file header.php

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?php echo ucwords($title); ?></title>
  <!-- <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>template/dist/bootstrap.css"> -->
  <!-- <link rel="stylesheet" type="text/css" href="https://bootswatch.com/_assets/css/custom.min.css"> -->
  <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
  <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.6/semantic.min.css">
  <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.15/css/dataTables.semanticui.min.css">
  <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>template/dist/sweetalert.css">
  
  <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>assets/css/bootstrap.css">
  <link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>assets/css/jquery-ui.css">
  <script src="<?php echo base_url() ?>assets/js/jquery-3.3.1.js"></script>
  <script src="<?php echo base_url() ?>assets/js/bootstrap.js"></script>
  <script src="<?php echo base_url() ?>assets/js/jquery-ui.js"></script>

  <!-- <script type="text/javascript" src="https://bootswatch.com/_vendor/jquery/dist/jquery.min.js"></script> -->

  <script type="text/javascript" src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
  <script type="text/javascript" src="https://bootswatch.com/_vendor/popper.js/dist/umd/popper.min.js"></script>
  <script type="text/javascript" src="https://cdn.datatables.net/1.10.15/js/dataTables.semanticui.min.js"></script>
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.6/semantic.min.js"></script>
  <!-- <script type="text/javascript" src="https://bootswatch.com/_vendor/bootstrap/dist/js/bootstrap.min.js"></script> -->
  <!-- <script type="text/javascript" src="https://bootswatch.com/_assets/js/custom.js"></script> -->
  <script src="<?php echo base_url() ?>template/dist/sweetalert.min.js"></script>
  <script src="<?php echo base_url() ?>template/dist/sweetalert-dev.js"></script>
  <style type="text/css" media="screen">
    th,td{
      text-align: center;
    }
  </style>
</head>


2. Tambahkan Code Html ini di folder template dengan nama file nav_header.php


<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
  <!-- <a class="navbar-brand" href="#">Home</a> -->
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor01" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>

  <div class="collapse navbar-collapse" id="navbarColor01">
     <div class="btn-group" role="group" aria-label="Button group with nested dropdown">
      <button type="button" class="btn btn-primary">Master Data</button>
      <div class="btn-group" role="group">
        <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
        <div class="dropdown-menu" aria-labelledby="btnGroupDrop1" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 36px, 0px); top: 0px; left: 0px; will-change: transform;">
          <a class="dropdown-item" href="<?php echo base_url('C_users') ?>"><span class="fa fa-user"></span> Data Users</a>
           <a class="dropdown-item" href="<?php echo base_url('C_mahasiswa') ?>"><span class="fa fa-user"></span> Data Mahasiswa</a>
            <a class="dropdown-item" href="<?php echo base_url('c_combo') ?>"><span class="fa fa-user"></span> Combo test</a>
         <a class="dropdown-item" href="<?php echo base_url('c_autocomplete') ?>"><span class="fa fa-user"></span> Auto Complete</a>
      
      
        </div>
      </div>
    </div>
     <div class="btn-group" role="group" aria-label="Button group with nested dropdown">
      <button type="button" class="btn btn-primary">Laporan</button>
      <div class="btn-group" role="group">
        <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
        <div class="dropdown-menu" aria-labelledby="btnGroupDrop1" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 36px, 0px); top: 0px; left: 0px; will-change: transform;">
          <a class="dropdown-item" href="<?php echo base_url('Report') ?>" target="_blank"><span class="fa fa-print"></span> Report Data Users</a>
        </div>
      </div>
    </div>
    <div class="btn-group" role="group" aria-label="Button group with nested dropdown">
      <button type="button" class="btn btn-primary">SMS Getaway</button>
      <div class="btn-group" role="group">
        <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
        <div class="dropdown-menu" aria-labelledby="btnGroupDrop1" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 36px, 0px); top: 0px; left: 0px; will-change: transform;">
          <a class="dropdown-item" href="<?php echo base_url('pesan') ?>"><span class="fa fa-send"></span> Perorangan</a>
          <a class="dropdown-item" href="#"><span class="fa fa-send"></span> Kebanyak</a>
        </div>
      </div>
    </div>

    <div class="btn-group" role="group" aria-label="Button group with nested dropdown">
      <button type="button" class="btn btn-primary">Send Email</button>
      <div class="btn-group" role="group">
        <button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button>
        <div class="dropdown-menu" aria-labelledby="btnGroupDrop1" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 36px, 0px); top: 0px; left: 0px; will-change: transform;">
          <a class="dropdown-item" href="#"><span class="fa fa-send"></span> Mahasiswa</a>
        </div>
      </div>
    </div>
   
   
  
</div>
 <ul class="nav nav-pills nav-stacked my-2 my-lg-0">
        <li class="nav-item dropdown" style="float: right;">
         <a class="nav-link active" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">

          <?php
          // $data = array('username', 'level', 'foto');
          $level = $this->session->userdata('level'); ?>
          <?php if (!empty($level)): ?>
             <img style="border-radius: 100%;height: 35px;width: 40px;" src="<?php echo base_url('uploads/'.$this->session->userdata('foto')) ?>" alt=""> 
                  <?php  echo "Selamat Datang " .strtoupper($this->session->userdata('username')); ?>
          <?php else: ?>
            
          <?php endif ?>
         
     
          
            <?php
              if(!empty($authUrl)) {
                  echo '';
              }
              else{
                     ?>
              <img style="border-radius: 100%;height: 35px;width: 40px;" src="<?php echo $this->session->userdata('picture_url')?>" alt="">
              <?php
               echo $this->session->userdata('email');
              }
            
            
          ?>
         
          <span class="caret"></span></a>
          <div class="dropdown-menu" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 38px, 0px); top: 0px; left: 0px; will-change: transform;">
            <a class="dropdown-item" href="#"><i class="fa fa-user"></i>  Profil</a>
            <a class="dropdown-item" href="#"><i class="fa fa-cog"></i> Setting</a>
            <a class="dropdown-item" onclick="return confirm('yakin Ingin Keluar??')" href="<?php echo base_url('c_tutorial/keluar') ?>"><i class="fa fa-sign-out"></i> Logout</a>
          </div>
        </li>

    </ul>
</nav>
<ol class="breadcrumb">
  <li class="breadcrumb-item"><a href="#">Home</a></li>
  <li class="breadcrumb-item"><a href="#"><?php echo anchor($this->uri->segment(1),ucwords($title)); ?></a></li>
  <li class="breadcrumb-item active">Data</li>
</ol>


Subscribe to receive free email updates:

0 Response to "Desain Template Dengan Bootswatch di Codeigniter"

Post a Comment