JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html ng-app="bgpsApp">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.16/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
<!-- <link rel="stylesheet" href="css/index2.css"> -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css">
<title>Brahma GPS</title>
</head>
<body>
<header class="navbar-fixed-top" style="padding:15px 10px;border-bottom:solid 1px rgba(0,0,0,0.1);background-color: white;">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-5 col-lg-5">
<ul class="list-inline">
<li style="font-size:17px;color:grey;">
<i class="fa fa-bars" id="sidebarCollapse"></i>
</li>
<li style="font-size:20px;padding:10px;border-right:solid 1px rgba(0,0,0,0.1);"></li>
<li>
<span style="color:rgba(0,0,0,0.40);font-size:15px;margin-right:5px"></span>
<span style="font-size:20px;letter-spacing:4px"></span>
</li>
</ul>
</div>
<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4"></div>
<div class="col-xs-12 col-sm-12 col-md-3 col-lg-3">
</div>
</div>
</div>
<!-- <div class="logo_">
<div...
CSS
@import "https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700";
body {
font-family: 'Poppins', sans-serif;
background-color: white;
}
p {
font-family: 'Poppins', sans-serif;
font-size: 1.1em;
font-weight: 300;
line-height: 1.7em;
color: #999;
}
a,
a:hover,
a:focus {
color: inherit;
text-decoration: none;
transition: all 0.3s;
}
.navbar {
padding: 15px 10px;
background: #fff;
border: none;
border-radius: 0;
margin-bottom: 40px;
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}
.navbar-btn {
box-shadow: none;
outline: none !important;
border: none;
}
.line {
width: 100%;
height: 1px;
border-bottom: 1px dashed #ddd;
margin: 40px 0;
}
/* ---------------------------------------------------
SIDEBAR STYLE
----------------------------------------------------- */
#sidebar {
width: 250px;
position: fixed;
top: 89px;
left: 0;
height: 100vh;
z-index: 999;
background: #7386D5;
color: #fff;
transition: all 0.3s;
}
#sidebar .sidebar-header {
padding: 20px;
}
#sidebar ul.components {
padding: 20px 0;
border-bottom: 1px solid #47748b;
}
#sidebar ul p {
color: #fff;
padding: 10px;
}
#sidebar ul li a {
padding: 10px;
font-size: 1.1em;
display: block;
}
#sidebar ul li a:hover {
color: #7386D5;
background: #fff;
}
#sidebar.active {
min-width: 85px;
max-width: 85px;
text-align: center;
}
#sidebar.active ul li a i {
margin-right: 0;
display: block;
font-size: 1.8em;
margin-bottom: 5px;
}
#sidebar.active ul li a {
padding: 20px 10px;
text-align: center;
font-size: 0.85em;
}
#sidebar.active ul ul a {
padding: 10px !important;
}
#sidebar.active a[aria-expanded="false"]::before,
#sidebar.active a[aria-expanded="true"]::before {
top: auto;
bottom: 5px;
right: 50%;
-webkit-transform: translateX(50%);
-ms-transform: translateX(50%);
transform: translateX(50%);
}
#sidebar ul li.active>a,
a[aria-expanded="true"] {
color: #fff;
background:...
JavaScript
$(document).ready(function() {
$('#sidebarCollapse').on('click', function() {
$('#sidebar, #content').toggleClass('active');
$('.collapse.in').toggleClass('in');
$('a[aria-expanded=true]').attr('aria-expanded', 'false');
});
$.ajax({
url: '',
type: 'get',
dataType: 'json',
success: function(response) {
var table = $("#existingDevicesTable").DataTable({
columns: [{
data: 'id'
},
{
data: 'imei'
},
{
data: 'currentMobileNumber'
},
{
data: 'currentServiceProvider'
},
{
data: 'currentSimNumber'
},
{
data: 'remarks'
},
{
data: 'remarks'
},
{
data: 'remarks'
},
{
data: 'remarks'
},
{
data: 'remarks'
},
{
data: 'isActive',
render: function(data, type, row) {
if (data == true) {
return '<span style="color:#27C46B;">Active</span>'
} else {
return '<span style="color:#F63A49;">Inactive</span>'
}
}
},
{
data: null,
defaultContent: '<button type="button" class="btn btn-default editDeviceMasterBtn" style="font-size:12px;color:#F68300;"><i class="fa fa-pencil"></i></button>'
}
],
data: response.data.data,
retrieve: true,
fixedHeader: {
header: true,
footer: true
},
paging: true,
searching: true,
ordering: true,
scrollX: true,
deferRender: true,
"bScrollCollapse": true,
"sScrollY": "300px",
"lengthMenu": [
[10, 25, 50, 100, -1],
[10, 25, 50, 100, "All"]
]
});
}
});
});