add templates
This commit is contained in:
parent
89795faddc
commit
dd9156270d
5 changed files with 435 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.idea/
|
137
gulpfile.js
Normal file
137
gulpfile.js
Normal file
|
@ -0,0 +1,137 @@
|
|||
var gulp = require('gulp');
|
||||
var sass = require('gulp-sass');
|
||||
var header = require('gulp-header');
|
||||
var cleanCSS = require('gulp-clean-css');
|
||||
var rename = require("gulp-rename");
|
||||
var uglify = require('gulp-uglify');
|
||||
var autoprefixer = require('gulp-autoprefixer');
|
||||
var pkg = require('./package.json');
|
||||
var browserSync = require('browser-sync').create();
|
||||
|
||||
// Set the banner content
|
||||
var banner = ['/*!\n',
|
||||
' * Start Bootstrap - <%= pkg.title %> v<%= pkg.version %> (<%= pkg.homepage %>)\n',
|
||||
' * Copyright 2013-' + (new Date()).getFullYear(), ' <%= pkg.author %>\n',
|
||||
' * Licensed under <%= pkg.license %> (https://github.com/BlackrockDigital/<%= pkg.name %>/blob/master/LICENSE)\n',
|
||||
' */\n',
|
||||
'\n'
|
||||
].join('');
|
||||
|
||||
// Copy third party libraries from /node_modules into /vendor
|
||||
gulp.task('vendor', function() {
|
||||
|
||||
// Bootstrap
|
||||
gulp.src([
|
||||
'./node_modules/bootstrap/dist/**/*',
|
||||
'!./node_modules/bootstrap/dist/css/bootstrap-grid*',
|
||||
'!./node_modules/bootstrap/dist/css/bootstrap-reboot*'
|
||||
])
|
||||
.pipe(gulp.dest('./vendor/bootstrap'))
|
||||
|
||||
// ChartJS
|
||||
gulp.src([
|
||||
'./node_modules/chart.js/dist/*.js'
|
||||
])
|
||||
.pipe(gulp.dest('./vendor/chart.js'))
|
||||
|
||||
// DataTables
|
||||
gulp.src([
|
||||
'./node_modules/datatables.net/js/*.js',
|
||||
'./node_modules/datatables.net-bs4/js/*.js',
|
||||
'./node_modules/datatables.net-bs4/css/*.css'
|
||||
])
|
||||
.pipe(gulp.dest('./vendor/datatables/'))
|
||||
|
||||
// Font Awesome
|
||||
gulp.src([
|
||||
'./node_modules/@fortawesome/**/*',
|
||||
])
|
||||
.pipe(gulp.dest('./vendor'))
|
||||
|
||||
// jQuery
|
||||
gulp.src([
|
||||
'./node_modules/jquery/dist/*',
|
||||
'!./node_modules/jquery/dist/core.js'
|
||||
])
|
||||
.pipe(gulp.dest('./vendor/jquery'))
|
||||
|
||||
// jQuery Easing
|
||||
gulp.src([
|
||||
'./node_modules/jquery.easing/*.js'
|
||||
])
|
||||
.pipe(gulp.dest('./vendor/jquery-easing'))
|
||||
|
||||
});
|
||||
|
||||
// Compile SCSS
|
||||
gulp.task('css:compile', function() {
|
||||
return gulp.src('./scss/**/*.scss')
|
||||
.pipe(sass.sync({
|
||||
outputStyle: 'expanded'
|
||||
}).on('error', sass.logError))
|
||||
.pipe(autoprefixer({
|
||||
browsers: ['last 2 versions'],
|
||||
cascade: false
|
||||
}))
|
||||
.pipe(header(banner, {
|
||||
pkg: pkg
|
||||
}))
|
||||
.pipe(gulp.dest('./css'))
|
||||
.pipe(browserSync.stream());
|
||||
});
|
||||
|
||||
// Minify CSS
|
||||
gulp.task('css:minify', ['css:compile'], function() {
|
||||
return gulp.src([
|
||||
'./css/*.css',
|
||||
'!./css/*.min.css'
|
||||
])
|
||||
.pipe(cleanCSS())
|
||||
.pipe(rename({
|
||||
suffix: '.min'
|
||||
}))
|
||||
.pipe(gulp.dest('./css'))
|
||||
.pipe(browserSync.stream());
|
||||
});
|
||||
|
||||
// CSS
|
||||
gulp.task('css', ['css:compile', 'css:minify']);
|
||||
|
||||
// Minify JavaScript
|
||||
gulp.task('js:minify', function() {
|
||||
return gulp.src([
|
||||
'./js/*.js',
|
||||
'!./js/*.min.js'
|
||||
])
|
||||
.pipe(uglify())
|
||||
.pipe(rename({
|
||||
suffix: '.min'
|
||||
}))
|
||||
.pipe(header(banner, {
|
||||
pkg: pkg
|
||||
}))
|
||||
.pipe(gulp.dest('./js'))
|
||||
.pipe(browserSync.stream());
|
||||
});
|
||||
|
||||
// JS
|
||||
gulp.task('js', ['js:minify']);
|
||||
|
||||
// Default task
|
||||
gulp.task('default', ['css', 'js', 'vendor']);
|
||||
|
||||
// Configure the browserSync task
|
||||
gulp.task('browserSync', function() {
|
||||
browserSync.init({
|
||||
server: {
|
||||
baseDir: "./"
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Dev task
|
||||
gulp.task('dev', ['css', 'js', 'browserSync'], function() {
|
||||
gulp.watch('./scss/*.scss', ['css']);
|
||||
gulp.watch('./js/*.js', ['js']);
|
||||
gulp.watch('./*.html', browserSync.reload);
|
||||
});
|
159
templates/dashboard.php
Normal file
159
templates/dashboard.php
Normal file
|
@ -0,0 +1,159 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: jedi
|
||||
* Date: 12/27/18
|
||||
* Time: 4:46 AM
|
||||
*/
|
||||
?>
|
||||
<!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, shrink-to-fit=no">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<title>SB Admin - Tables</title>
|
||||
|
||||
<!-- Bootstrap core CSS-->
|
||||
<link href="../vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom fonts for this template-->
|
||||
<link href="../vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- Page level plugin CSS-->
|
||||
<link href="../vendor/datatables/dataTables.bootstrap4.css" rel="stylesheet">
|
||||
|
||||
<!-- Custom styles for this template-->
|
||||
<link href="../css/sb-admin.css" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
|
||||
<body id="page-top">
|
||||
|
||||
<nav class="navbar navbar-expand navbar-dark bg-dark static-top">
|
||||
|
||||
<a class="navbar-brand mr-1" href="../index.html">Start Bootstrap</a>
|
||||
|
||||
<button class="btn btn-link btn-sm text-white order-1 order-sm-0" id="sidebarToggle" href="#">
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
|
||||
<!-- Navbar Search -->
|
||||
<form class="d-none d-md-inline-block form-inline ml-auto mr-0 mr-md-3 my-2 my-md-0">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-primary" type="button">
|
||||
<i class="fas fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- Navbar -->
|
||||
<ul class="navbar-nav ml-auto ml-md-0">
|
||||
<li class="nav-item dropdown no-arrow mx-1">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-bell fa-fw"></i>
|
||||
<span class="badge badge-danger">9+</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="alertsDropdown">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown no-arrow mx-1">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="messagesDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-envelope fa-fw"></i>
|
||||
<span class="badge badge-danger">7</span>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="messagesDropdown">
|
||||
<a class="dropdown-item" href="#">Action</a>
|
||||
<a class="dropdown-item" href="#">Another action</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#">Something else here</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item dropdown no-arrow">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-user-circle fa-fw"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="userDropdown">
|
||||
<a class="dropdown-item" href="#">Settings</a>
|
||||
<a class="dropdown-item" href="#">Activity Log</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">Logout</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</nav>
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
include "templates/sidebar.php";
|
||||
?>
|
||||
|
||||
<?php
|
||||
include "templates/table.php";
|
||||
?>
|
||||
<!-- /.content-wrapper -->
|
||||
|
||||
</div>
|
||||
<!-- /#wrapper -->
|
||||
|
||||
<!-- Scroll to Top Button-->
|
||||
<a class="scroll-to-top rounded" href="#page-top">
|
||||
<i class="fas fa-angle-up"></i>
|
||||
</a>
|
||||
|
||||
<!-- Logout Modal-->
|
||||
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
|
||||
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
|
||||
<a class="btn btn-primary" href="../login.html">Logout</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bootstrap core JavaScript-->
|
||||
<script src="../vendor/jquery/jquery.min.js"></script>
|
||||
<script src="../vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<!-- Core plugin JavaScript-->
|
||||
<script src="../vendor/jquery-easing/jquery.easing.min.js"></script>
|
||||
|
||||
<!-- Page level plugin JavaScript-->
|
||||
<script src="../vendor/datatables/jquery.dataTables.js"></script>
|
||||
<script src="../vendor/datatables/dataTables.bootstrap4.js"></script>
|
||||
|
||||
<!-- Custom scripts for all pages-->
|
||||
<script src="../js/sb-admin.min.js"></script>
|
||||
|
||||
<!-- Demo scripts for this page-->
|
||||
<script src="../js/demo/datatables-demo.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
49
templates/sidebar.php
Normal file
49
templates/sidebar.php
Normal file
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: jedi
|
||||
* Date: 12/27/18
|
||||
* Time: 4:51 AM
|
||||
*/
|
||||
?>
|
||||
<!-- Sidebar -->
|
||||
<ul class="sidebar navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="../index.html">
|
||||
<i class="fas fa-fw fa-tachometer-alt"></i>
|
||||
<span>Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/">
|
||||
<i class="fas fa-fw fa-archive"></i>
|
||||
<span>Items</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="pagesDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-fw fa-folder"></i>
|
||||
<span>Pages</span>
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="pagesDropdown">
|
||||
<h6 class="dropdown-header">Login Screens:</h6>
|
||||
<a class="dropdown-item" href="../login.html">Login</a>
|
||||
<a class="dropdown-item" href="../register.html">Register</a>
|
||||
<a class="dropdown-item" href="../forgot-password.html">Forgot Password</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<h6 class="dropdown-header">Other Pages:</h6>
|
||||
<a class="dropdown-item" href="../404.html">404 Page</a>
|
||||
<a class="dropdown-item" href="../blank.html">Blank Page</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="../charts.html">
|
||||
<i class="fas fa-fw fa-chart-area"></i>
|
||||
<span>Charts</span></a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../tables.html">
|
||||
<i class="fas fa-fw fa-table"></i>
|
||||
<span>Tables</span></a>
|
||||
</li>
|
||||
</ul>
|
89
templates/table.php
Normal file
89
templates/table.php
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: jedi
|
||||
* Date: 12/27/18
|
||||
* Time: 4:48 AM
|
||||
*/
|
||||
?>
|
||||
<div id="content-wrapper">
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- Breadcrumbs-->
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="#">Dashboard</a>
|
||||
</li>
|
||||
<li class="breadcrumb-item active">Tables</li>
|
||||
</ol>
|
||||
|
||||
<!-- DataTables Example -->
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">
|
||||
<i class="fas fa-table"></i>
|
||||
Data Table Example</div>
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Descrption</th>
|
||||
<th>Tags</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Descrption</th>
|
||||
<th>Tags</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach( get_items() as $item){
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $item["id"]; ?></td>
|
||||
<td><?php echo $item["desc"]; ?></td>
|
||||
<td>
|
||||
<?php
|
||||
foreach(explode(",",$item["tags"]) as $tag){
|
||||
?>
|
||||
<span class="label label-default"><?php echo $tag; ?></span>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo $item["id"]; ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer small text-muted">Updated yesterday at 11:59 PM</div>
|
||||
</div>
|
||||
|
||||
<p class="small text-center text-muted my-5">
|
||||
<em>More table examples coming soon...</em>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
<!-- /.container-fluid -->
|
||||
|
||||
<!-- Sticky Footer -->
|
||||
<footer class="sticky-footer">
|
||||
<div class="container my-auto">
|
||||
<div class="copyright text-center my-auto">
|
||||
<span>Copyright © j3d1 2018</span>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</div>
|
Loading…
Reference in a new issue