Commit e3660f15 by Rinto

All in Update

parent 8824de27

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

APP_ENV=local
APP_KEY=base64:jR+lNAKpu+jYHGeJWK9aaz54NZ5os7VITGrSH5umbsU=
APP_KEY=base64:0nyB2l6Pdd8lRUK3ZuuS2SzoKcerisbO6qbei5V+iyA=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=localhost
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=pemesanan_bus
DB_DATABASE=pa21617d4ti04
DB_USERNAME=root
DB_PASSWORD=
......@@ -27,6 +27,6 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_APP_ID=
......@@ -27,6 +27,6 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
PUSHER_APP_ID=
*.DS_Store
*.log
*.zip
.idea
.sass-cache/
/nbproject/
/nbproject/private/
/node_modules/
/bower_components/
ad.js
TODO
test.html
/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
.env
{
"asi" : true,
"browser" : true,
"eqeqeq" : false,
"eqnull" : true,
"es3" : true,
"expr" : true,
"jquery" : true,
"latedef" : "nofunc",
"laxbreak" : true,
"nonbsp" : true,
"strict" : true,
"undef" : true,
"unused" : true,
// External variabls and plugins
"predef": [ "AdminLTEOptions", "FastClick", "moment", "Morris", "Chart" ]
}
// AdminLTE Gruntfile
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
watch: {
// If any .less file changes in directory "build/less/" run the "less"-task.
files: ["build/less/*.less", "build/less/skins/*.less", "dist/js/app.js"],
tasks: ["less", "uglify"]
},
// "less"-task configuration
// This task will compile all less files upon saving to create both AdminLTE.css and AdminLTE.min.css
less: {
// Development not compressed
development: {
options: {
// Whether to compress or not
compress: false
},
files: {
// compilation.css : source.less
"dist/css/AdminLTE.css": "build/less/AdminLTE.less",
// AdminLTE without plugins
"dist/css/alt/AdminLTE-without-plugins.css": "build/less/AdminLTE-without-plugins.less",
// Separate plugins
"dist/css/alt/AdminLTE-select2.css": "build/less/select2.less",
"dist/css/alt/AdminLTE-fullcalendar.css": "build/less/fullcalendar.less",
"dist/css/alt/AdminLTE-bootstrap-social.css": "build/less/bootstrap-social.less",
//Non minified skin files
"dist/css/skins/skin-blue.css": "build/less/skins/skin-blue.less",
"dist/css/skins/skin-black.css": "build/less/skins/skin-black.less",
"dist/css/skins/skin-yellow.css": "build/less/skins/skin-yellow.less",
"dist/css/skins/skin-green.css": "build/less/skins/skin-green.less",
"dist/css/skins/skin-red.css": "build/less/skins/skin-red.less",
"dist/css/skins/skin-purple.css": "build/less/skins/skin-purple.less",
"dist/css/skins/skin-blue-light.css": "build/less/skins/skin-blue-light.less",
"dist/css/skins/skin-black-light.css": "build/less/skins/skin-black-light.less",
"dist/css/skins/skin-yellow-light.css": "build/less/skins/skin-yellow-light.less",
"dist/css/skins/skin-green-light.css": "build/less/skins/skin-green-light.less",
"dist/css/skins/skin-red-light.css": "build/less/skins/skin-red-light.less",
"dist/css/skins/skin-purple-light.css": "build/less/skins/skin-purple-light.less",
"dist/css/skins/_all-skins.css": "build/less/skins/_all-skins.less"
}
},
// Production compresses version
production: {
options: {
// Whether to compress or not
compress: true
},
files: {
// compilation.css : source.less
"dist/css/AdminLTE.min.css": "build/less/AdminLTE.less",
// AdminLTE without plugins
"dist/css/alt/AdminLTE-without-plugins.min.css": "build/less/AdminLTE-without-plugins.less",
// Separate plugins
"dist/css/alt/AdminLTE-select2.min.css": "build/less/select2.less",
"dist/css/alt/AdminLTE-fullcalendar.min.css": "build/less/fullcalendar.less",
"dist/css/alt/AdminLTE-bootstrap-social.min.css": "build/less/bootstrap-social.less",
// Skins minified
"dist/css/skins/skin-blue.min.css": "build/less/skins/skin-blue.less",
"dist/css/skins/skin-black.min.css": "build/less/skins/skin-black.less",
"dist/css/skins/skin-yellow.min.css": "build/less/skins/skin-yellow.less",
"dist/css/skins/skin-green.min.css": "build/less/skins/skin-green.less",
"dist/css/skins/skin-red.min.css": "build/less/skins/skin-red.less",
"dist/css/skins/skin-purple.min.css": "build/less/skins/skin-purple.less",
"dist/css/skins/skin-blue-light.min.css": "build/less/skins/skin-blue-light.less",
"dist/css/skins/skin-black-light.min.css": "build/less/skins/skin-black-light.less",
"dist/css/skins/skin-yellow-light.min.css": "build/less/skins/skin-yellow-light.less",
"dist/css/skins/skin-green-light.min.css": "build/less/skins/skin-green-light.less",
"dist/css/skins/skin-red-light.min.css": "build/less/skins/skin-red-light.less",
"dist/css/skins/skin-purple-light.min.css": "build/less/skins/skin-purple-light.less",
"dist/css/skins/_all-skins.min.css": "build/less/skins/_all-skins.less"
}
}
},
// Uglify task info. Compress the js files.
uglify: {
options: {
mangle: true,
preserveComments: 'some'
},
my_target: {
files: {
'dist/js/app.min.js': ['dist/js/app.js']
}
}
},
// Build the documentation files
includes: {
build: {
src: ['*.html'], // Source files
dest: 'documentation/', // Destination directory
flatten: true,
cwd: 'documentation/build',
options: {
silent: true,
includePath: 'documentation/build/include'
}
}
},
// Optimize images
image: {
dynamic: {
files: [{
expand: true,
cwd: 'build/img/',
src: ['**/*.{png,jpg,gif,svg,jpeg}'],
dest: 'dist/img/'
}]
}
},
// Validate JS code
jshint: {
options: {
jshintrc: '.jshintrc'
},
core: {
src: 'dist/js/app.js'
},
demo: {
src: 'dist/js/demo.js'
},
pages: {
src: 'dist/js/pages/*.js'
}
},
// Validate CSS files
csslint: {
options: {
csslintrc: 'build/less/.csslintrc'
},
dist: [
'dist/css/AdminLTE.css'
]
},
// Validate Bootstrap HTML
bootlint: {
options: {
relaxerror: ['W005']
},
files: ['pages/**/*.html', '*.html']
},
// Delete images in build directory
// After compressing the images in the build/img dir, there is no need
// for them
clean: {
build: ["build/img/*"]
}
});
// Load all grunt tasks
// LESS Compiler
grunt.loadNpmTasks('grunt-contrib-less');
// Watch File Changes
grunt.loadNpmTasks('grunt-contrib-watch');
// Compress JS Files
grunt.loadNpmTasks('grunt-contrib-uglify');
// Include Files Within HTML
grunt.loadNpmTasks('grunt-includes');
// Optimize images
grunt.loadNpmTasks('grunt-image');
// Validate JS code
grunt.loadNpmTasks('grunt-contrib-jshint');
// Delete not needed files
grunt.loadNpmTasks('grunt-contrib-clean');
// Lint CSS
grunt.loadNpmTasks('grunt-contrib-csslint');
// Lint Bootstrap
grunt.loadNpmTasks('grunt-bootlint');
// Linting task
grunt.registerTask('lint', ['jshint', 'csslint', 'bootlint']);
// The default task (running "grunt" in console) is "watch"
grunt.registerTask('default', ['watch']);
};
The MIT License (MIT)
Copyright (c) 2014-2017 Abdullah Almsaeed
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<?php
namespace App\Models;
namespace App;
use Illuminate\Database\Eloquent\Model;
......
<?php
namespace App\Models;
namespace App;
use Illuminate\Database\Eloquent\Model;
......
......@@ -21,6 +21,16 @@ class ForgotPasswordController extends Controller
use SendsPasswordResetEmails;
/**
* Display the form to request a password reset link.
*
* @return \Illuminate\Http\Response
*/
public function showLinkRequestForm()
{
return view('adminlte::auth.passwords.email');
}
/**
* Create a new controller instance.
*
* @return void
......
......@@ -3,53 +3,51 @@
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Validator;
use App\User;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Create a new controller instance.
* Show the application's login form.
*
* @return void
* @return \Illuminate\Http\Response
*/
public function __construct()
public function showLoginForm()
{
//$this->middleware('guest', ['except' => 'logout']);
return view('adminlte::auth.login');
}
/**
* Where to redirect users after login.
*
* @var string
*/
protected $redirectTo = '/home';
// protected $username = 'username';
public function Login(Request $request){
$validator = Validator::make($request->all(), [
'username' => 'required|exists:users,username',
'password' => 'required',
], [
'username.required' => 'Username diperlukan!',
'username.exists' => 'Username tidak diketemukan',
'password.required' => 'Password diperlukan'
]);
if ($validator->fails()) {
return redirect('/')
->withErrors($validator)
->withInput();
} else {
if (Auth::attempt(['username' => $request->username, 'password' => $request->password])) {
if(Auth::user()->role == 'admin'){
return redirect()->intended('admin');
}elseif(Auth::user()->role == 'k_supir'){
return redirect()->intended('k_supir');
} else {
return redirect()->intended('klien');
}
} else {
$validator->errors()->add('password', 'Password tidak benar');
return redirect('/')
->withErrors($validator)
->withInput();
}
}
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest', ['except' => 'logout']);
}
}
......@@ -2,33 +2,103 @@
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use File;
use App\Http\Requests;
use App\Models\Bus;
use App\Models\Users;
use App\Models\Supir;
use App\Models\Pemesanan;
use App\Customer;
use App\User;
use Validator;
use App\Http\Controllers\Controller;
use App\User;
use Image;
use Illuminate\Foundation\Auth\RegistersUsers;
/**
* Class RegisterController
* @package %%NAMESPACE%%\Http\Controllers\Auth
*/
class RegisterController extends Controller
{
public function store(Request $request){
/*
|--------------------------------------------------------------------------
| Register Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users as well as their
| validation and creation. By default this controller uses a trait to
| provide this functionality without requiring any additional code.
|
*/
use RegistersUsers;
/**
* Show the application registration form.
*
* @return \Illuminate\Http\Response
*/
public function showRegistrationForm()
{
return view('adminlte::auth.register');
}
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/home';
protected $username = 'username';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
public function store(Request $request){
$input = $request->all();
Customer::create($customer);
}
if($username = DB::table('users')->where('username' , $input['username'])->first()){
return redirect()->back()->with('info','We are so sorry :( .Username is exists. Please choose another username');
}else{
User::create(['username' => $input['username'],'password' => bcrypt($input['password']),'role' => $input['role']])->id;
return redirect(url('/index'))->with('info','Data User Berhasil ditambah');
}
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email',
'username' => 'required|unique:users',
'password' => 'required|min:6|confirmed',
'status' => 'required',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'username' => $data['username'],
'password' => bcrypt($data['password']),
'status' => $data['status'],
]);
// return Customer::create([
// 'name' => $data['name'],
// 'email' => $data['email'],
// 'username' => $data['username'],
// 'password' => bcrypt($data['password']),
// ]);
}
}
......@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
use Illuminate\Http\Request;
class ResetPasswordController extends Controller
{
......@@ -21,6 +22,22 @@ class ResetPasswordController extends Controller
use ResetsPasswords;
/**
* Display the password reset view for the given token.
*
* If no token is present, display the link request form.
*
* @param \Illuminate\Http\Request $request
* @param string|null $token
* @return \Illuminate\Http\Response
*/
public function showResetForm(Request $request, $token = null)
{
return view('adminlte::auth.passwords.reset')->with(
['token' => $token, 'email' => $request->email]
);
}
/**
* Create a new controller instance.
*
* @return void
......
<?php
/*
* Taken from
* https://github.com/laravel/framework/blob/5.3/src/Illuminate/Auth/Console/stubs/make/controllers/HomeController.stub
*/
namespace App\Http\Controllers;
use App\Http\Requests;
use Illuminate\Http\Request;
/**
* Class HomeController
* @package App\Http\Controllers
*/
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard.
*
* @return Response
*/
public function index()
{
return view('adminlte::home');
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use App\Models\Batal;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use File;
use App\Http\Requests;
use App\Models\Bus;
use App\Models\Users;
use App\Models\Supir;
use App\Models\Pemesanan;
use App\Models\Konfirmasi;
use App\Models\Jadwal;
use Validator;
use App\Http\Controllers\Controller;
use App\User;
use Image;
class K_SupirController extends Controller
{
public function pemesanan(){
$key = Input::get('search');
$this->data['title'] = 'Pemesanan Bus IT Del';
if(isset($key)){
$this->data['pemesanan'] = Pemesanan::where('client_username','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['pemesanan'] = Pemesanan::orderBy('id','desc')->paginate(10);
}
$this->data['pemesanan'] = DB::table('pemesanan')->where('status','=','diproses')->get();
return view('k_supir.pemesanan.index',$this->data);
}
public function detailpemesanan($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['pemesanan'] = Pemesanan::find($id);
return view('k_supir.pemesanan.detail',$this->data);
}
public function tolak($id){
pemesanan::find($id)->delete();
return redirect(url('/k_supir/pemesanan'))->with('info','Pembatalan pemesanan berhasil dilakukan');
}
public function konfirmasi(Request $request, $id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['pemesanan'] = Pemesanan::find($id);
pemesanan::find($id)->delete();
$input = $request->all();
Konfirmasi::create($input);
return redirect(url('/k_supir/pemesanan'))->with('info','Pembatalan Berhasil dilakukan');
}
public function storebus(Request $request){
$this->validate($request, [
'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',
]);
$input = $request->all();
$image = $request->file('image');
$input['image'] = time().'.'.$image->getClientOriginalExtension();
$destinationPath = public_path('/image');
$img = Image::make($image->getRealPath());
$img->resize(300, 300, function ($constraint) {
$constraint->aspectRatio();
})->save($destinationPath.'/'.$input['image']);
if($plat_bus = DB::table('bus')->where('plat_bus' , $input['plat_bus'])->first()){
return redirect()->back()->with('info','We are so sorry :( .Plat Bus is exists. Please choose another Plat Bus');
}else{
Bus::create($input);
return redirect(url('/k_supir/bus'))->with('info','Data Bus berhasil ditambah');
}
}
public function bus(){
$key = Input::get('search');
$this->data['title'] = 'Bus IT Del';
if(isset($key)){
$this->data['bus'] = Bus::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['bus'] = Bus::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('bus')->get();
return view('k_supir.bus.index',$this->data);
}
public function detail($id){
$this->data['title'] = 'Detail Bus';
$this->data['bus'] = Bus::find($id);
return view('k_supir.bus.detail',$this->data);
}
public function pilih(){
$key = Input::get('search');
$this->data['title'] = 'Bus IT Del';
if(isset($key)){
$this->data['bus'] = Bus::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['bus'] = Bus::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('bus')->get();
return view('k_supir.pemesanan.pilih',$this->data);
}
public function pilih_bus($id){
$key = Input::get('search');
$this->data['bus'] = Bus::find($id);
$this->data['title'] = 'Pilih Bus IT Del';
return view('k_supir.pemesanan.pilih_bus',$this->data);
}
public function history(){
$key = Input::get('search');
$this->data['title'] = 'Pemesanan Bus IT Del';
if(isset($key)){
$this->data['konfirmasi'] = Konfirmasi::where('client_username','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['konfirmasi'] = Konfirmasi::orderBy('id','desc')->paginate(10);
}
$this->data['konfirmasi'] = DB::table('konfirmasi')->where('status','=','disetujui')->get();
return view('k_supir.history.index',$this->data);
}
public function history_detail($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['konfirmasi'] = Konfirmasi::find($id);
return view('k_supir.history.detail',$this->data);
}
public function supir(){
$key = Input::get('search');
$this->data['title'] = 'Supir Bus IT Del';
if(isset($key)){
$this->data['supir'] = Supir::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['supir'] = Supir::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('supir')->get();
return view('k_supir.supir.index',$this->data);
}
public function detailsupir($id){
$this->data['title'] = 'Detail Supir';
$this->data['supir'] = Supir::find($id);
return view('k_supir.supir.detail',$this->data);
}
public function jadwal(){
$key = Input::get('search');
$this->data['title'] = 'Jadwal Supir IT Del';
if(isset($key)){
$this->data['jadwal'] = Jadwal::where('hari','like','%'.$key.'%')->orderBy('id','asc')->paginate(10);
$this->data['supir'] = Supir::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['jadwal'] = Jadwal::orderBy('id','asc')->paginate(10);
$this->data['supir'] = Supir::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('jadwal')->get();
$this->data['total'] = DB::table('supir')->get();
return view('k_supir.supir.jadwal',$this->data);
}
public function update_jadwal(){
$key = Input::get('search');
$this->data['title'] = 'Jadwal Supir IT Del';
if(isset($key)){
$this->data['jadwal'] = Jadwal::where('hari','like','%'.$key.'%')->orderBy('id','asc')->paginate(10);
$this->data['supir'] = Supir::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['jadwal'] = Jadwal::orderBy('id','asc')->paginate(10);
$this->data['supir'] = Supir::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('jadwal')->get();
$this->data['total'] = DB::table('supir')->get();
return view('k_supir.supir.update_jadwal',$this->data);
}
public function invoice_print(){
$key = Input::get('search');
$this->data['title'] = 'Jadwal Supir IT Del';
if(isset($key)){
$this->data['jadwal'] = Jadwal::where('hari','like','%'.$key.'%')->orderBy('id','asc')->paginate(10);
$this->data['supir'] = Supir::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['jadwal'] = Jadwal::orderBy('id','asc')->paginate(10);
$this->data['supir'] = Supir::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('jadwal')->get();
$this->data['total'] = DB::table('supir')->get();
return view('k_supir.supir.invoice-print',$this->data);
}
}
<?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use File;
use App\Models\Pemesanan;
use App\Models\Konfirmasi;
use App\Models\Bus;
use App\Models\Batal;
use App\Models\Users;
use App\Http\Requests;
use App\Bus;
use App\Users;
use App\Supir;
use App\Pemesanan;
use App\Batal;
use App\Konfirmasi;
use App\Jadwal;
use Validator;
use App\Http\Controllers\Controller;
use App\User;
use Image;
Use App\Models\OrderTemp;
Use App\Models\Order;
class KlienController extends Controller
{
public function pesan(){
$key = Input::get('search');
$this->data['title'] = 'Pesan Bus IT Del';
return view('klien.pesan.index',$this->data);
public function bus()
{
$bus = Bus::all();
return view('adminlte::klien.bus.index', compact('bus'));
}
public function pemesanan(Request $request){
$input = $request->all();
if($berangkat = DB::table('pemesanan')->where('berangkat' , $input['berangkat'])->first()){
return redirect()->back()->with('info','Tanggal Salah');
}else{
Pemesanan::create($input);
return redirect(url('/klien/status/'))->with('info','Pemesanan Berhasil di Lakukan');
}
public function detailbus($id)
{
$bus = Bus::find($id);
return view('adminlte::klien.bus.detail', compact('bus'));
}
public function bus(){
$key = Input::get('search');
$this->data['title'] = 'Bus IT Del';
if(isset($key)){
$this->data['bus'] = Bus::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['bus'] = Bus::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('bus')->get();
return view('klien.bus.index',$this->data);
public function pesan()
{
$pemesanan = Pemesanan::all();
return view('adminlte::klien.pesan.index', compact('pemesanan'));
}
public function pilih(){
$key = Input::get('search');
$this->data['title'] = 'Bus IT Del';
if(isset($key)){
$this->data['bus'] = Bus::where('nama_bus','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['bus'] = Bus::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('bus')->get();
return view('klien.pesan.pilih',$this->data);
public function status()
{
$status = Pemesanan::all();
return view('adminlte::klien.pesan.status', compact('status'));
}
public function detail($id){
$this->data['title'] = 'Detail Bus';
$this->data['bus'] = Bus::find($id);
return view('klien.bus.detail',$this->data);
public function statusdetail($id)
{
$status = Pemesanan::find($id);
return view('adminlte::klien.pesan.statusdetail', compact('status'));
}
public function history(){
$username = Auth::user()->username;
$users = DB::table('users')->where('username' , $username)->first();
$id = $users->id;
$this->data['title'] = 'History Pemesanan';
$this->data['users'] = Users::find($id);
$this->data['history'] = DB::table('batal')->where('client_username' , $username)->orderBy('id','desc')->paginate(10);
$this->data['total'] = DB::table('batal')->where('client_username' , $username)->get();
$this->data['status'] = DB::table('konfirmasi')->where('client_username' , $username)->orderBy('id','desc')->paginate(10);
$this->data['total'] = DB::table('konfirmasi')->where('client_username' , $username)->get();
return view('klien.history.index',$this->data);
public function pemesanan(Request $request)
{
$this->validate($request, [
'tujuan' => 'required',
'jumlah' => 'required',
'alasan' => 'required',
'berangkat' => 'required',
'kembali' => 'required',
'plat_bus' => 'required',
'name' => 'required',
'status' => 'required',
]);
$pemesanan = new Pemesanan();
$pemesanan->tujuan = $request['tujuan'];
$pemesanan->jumlah = $request['jumlah'];
$pemesanan->alasan = $request['alasan'];
$pemesanan->berangkat = $request['berangkat'];
$pemesanan->kembali = $request['kembali'];
$pemesanan->plat_bus = $request['plat_bus'];
$pemesanan->name = $request['name'];
$pemesanan->status = $request['status'];
$pemesanan->save();
return redirect('status')->with('message','Berhasil Melakukan Pemesanan, Silahkan Menunggu Konfirmasi');
}
public function status(){
$username = Auth::user()->username;
$users = DB::table('users')->where('username' , $username)->first();
$id = $users->id;
$this->data['title'] = 'Status Pemesanan';
$this->data['users'] = Users::find($id);
$this->data['status'] = DB::table('pemesanan')->where('client_username' , $username)->orderBy('id','desc')->paginate(10);
$this->data['total'] = DB::table('pemesanan')->where('client_username' , $username)->where('status','!=','disetujui')->get();
return view('klien.status.index',$this->data);
public function batalkan($id)
{
$pemesanan = Pemesanan::find($id);
return view('adminlte::klien.batalkan.index', compact('pemesanan'));
}
public function pilih_bus($id){
$key = Input::get('search');
$this->data['bus'] = Bus::find($id);
$this->data['title'] = 'Pilih Bus IT Del';
return view('klien.pesan.pilih_bus',$this->data);
public function kirim_pembatalan(Request $request, $id)
{
$this->validate($request, [
'tujuan' => 'required',
'jumlah' => 'required',
'alasan' => 'required',
'berangkat' => 'required',
'kembali' => 'required',
'plat_bus' => 'required',
'name' => 'required',
'status' => 'required',
'alasan_batal' => 'required',
]);
$batal = new Batal();
$batal->tujuan = $request['tujuan'];
$batal->jumlah = $request['jumlah'];
$batal->alasan = $request['alasan'];
$batal->berangkat = $request['berangkat'];
$batal->kembali = $request['kembali'];
$batal->plat_bus = $request['plat_bus'];
$batal->name = $request['name'];
$batal->status = $request['status'];
$batal->alasan_batal = $request['alasan_batal'];
$batal->save();
$pemesanan = Pemesanan::find($id);
$pemesanan->delete();
return redirect('status')->with('message','Pembatalan Berhasil Dilakukan');
}
public function batal($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['pemesanan'] = Pemesanan::find($id);
return view('klien.status.batal',$this->data);
public function pilihbus()
{
$bus = Bus::all();
return view('adminlte::klien.pesan.pilih', compact('bus'));
}
public function kirim_pembatalan(Request $request,$id){
$this->data['pemesanan'] = Pemesanan::find($id);
pemesanan::find($id)->delete();
$input = $request->all();
Batal::create($input);
return redirect(url('/klien'))->with('info','Pembatalan Berhasil dilakukan');
public function pakaibus($id)
{
$bus = Bus::find($id);
return view('adminlte::klien.pesan.pakaibus', compact('bus'));
}
public function history_detail($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['batal'] = Batal::find($id);
return view('klien.history.detail',$this->data);
}
public function history_detail2($id){
$this->data['title'] = 'Detail Pemesanan';
$this->data['konfirmasi'] = Konfirmasi::find($id);
return view('klien.history.detail2',$this->data);
}
public function riwayat(){
public function profil(){
$this->data['title'] = 'Profil';
return view('klien.profil.index',$this->data);
}
$name = Auth::user()->name;
$users = DB::table('users')->where('name' , $name)->first();
$id = $users->id;
$this->data['title'] = 'History Pemesanan';
$this->data['users'] = Users::find($id);
public function ubah_profil(){
$this->data['title'] = 'Profil';
return view('klien.profil.ubah',$this->data);
$this->data['riwayat'] = DB::table('batal')->where('name' , $name)->orderBy('id','desc')->paginate(10);
$this->data['total'] = DB::table('batal')->where('name' , $name)->get();
$this->data['riwayat2'] = DB::table('konfirmasi')->where('name' , $name)->orderBy('id','desc')->paginate(10);
$this->data['total'] = DB::table('konfirmasi')->where('name' , $name)->get();
return view('adminlte::klien.riwayat.index',$this->data);
}
}
public function detailriwayats($id)
{
$riwayat = Konfirmasi::find($id);
return view('adminlte::klien.riwayat.detail', compact('riwayat'));
}
public function detailriwayats2($id)
{
$riwayat2 = Batal::find($id);
return view('adminlte::klien.riwayat.detail2', compact('riwayat2'));
}
}
\ No newline at end of file
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
use File;
use App\Http\Requests;
use App\Bus;
use App\Users;
use App\Supir;
use App\Jam_Kerja;
use App\Pemesanan;
use App\Batal;
use App\Konfirmasi;
use App\Jadwal;
use Validator;
use App\Http\Controllers\Controller;
use App\User;
use Image;
class KsupirController extends Controller
{
public function dashboard()
{
if(isset($key)){
$this->data['pemesanan'] = Pemesanan::where('name','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['pemesanan'] = Pemesanan::orderBy('id','desc')->paginate(10);
}
$this->data['total'] = DB::table('pemesanan')->get();
$this->data['pemesanan'] = DB::table('pemesanan')->where('status','=','diproses')->get();
return view('adminlte::k_supir.index',$this->data);
}
public function supirs()
{
$supir = Supir::all();
return view('adminlte::k_supir.supir.index', compact('supir'));
}
public function jam_kerja()
{
$jamkerja = Jam_Kerja::all();
return view('adminlte::k_supir.supir.jam_kerja', compact('jamkerja'));
}
public function jamkerjadetail($id)
{
$jamkerja = Jam_Kerja::find($id);
return view('adminlte::k_supir.supir.jamkerjadetail', compact('jamkerja'));
}
public function jamkerjasupir(Request $request)
{
$this->validate($request, [
'nama_supir' => 'required',
'plat_bus' => 'required',
'tujuan' => 'required',
'berangkat' => 'required',
'kembali' => 'required',
'speed' => 'required',
'biaya' => 'required',
]);
$jam = new Jam_Kerja();
$jam->nama_supir = $request['nama_supir'];
$jam->plat_bus = $request['plat_bus'];
$jam->tujuan = $request['tujuan'];
$jam->berangkat = $request['berangkat'];
$jam->kembali = $request['kembali'];
$jam->speed = $request['speed'];
$jam->biaya = $request['biaya'];
$jam->bukti = $request['bukti'];
$jam->save();
return redirect('k_supir/supir/jam_kerja')->with('message','Berhasil Menambah Data Jam Kerja');
}
public function tambahjamkerja()
{
$jamkerja = Jam_Kerja::all();
return view('adminlte::k_supir.supir.tambahjamkerja', compact('jamkerja'));
}
public function detailsupirs($id)
{
$supir = Supir::find($id);
return view('adminlte::k_supir.supir.detail', compact('supir'));
}
public function buss()
{
$bus = Bus::all();
return view('adminlte::k_supir.bus.index', compact('bus'));
}
public function detailbuss($id)
{
$bus = Bus::find($id);
return view('adminlte::k_supir.bus.detail', compact('bus'));
}
public function pemesanans()
{
$key = Input::get('search');
$this->data['title'] = 'Pemesanan Bus IT Del';
if(isset($key)){
$this->data['pemesanan'] = Pemesanan::where('name','like','%'.$key.'%')->orderBy('id','desc')->paginate(10);
}else{
$this->data['pemesanan'] = Pemesanan::orderBy('id','desc')->paginate(10);
}
$this->data['pemesanan'] = DB::table('pemesanan')->where('status','=','diproses')->get();
$this->data['total'] = DB::table('pemesanan')->get();
return view('adminlte::k_supir.pemesanan.index',$this->data);
}
public function detailpemesanans($id)
{
$pemesanan = Pemesanan::find($id);
return view('adminlte::k_supir.pemesanan.detail', compact('pemesanan'));
}
public function konfirmasi (Request $request, $id)
{
$this->validate($request, [
'tujuan' => 'required',
'jumlah' => 'required',
'alasan' => 'required',
'berangkat' => 'required',
'kembali' => 'required',
'plat_bus' => 'required',
'name' => 'required',
'status' => 'required',
'nama_supir' => 'required',
]);
$pemesanan = Pemesanan::find($id);
$pemesanan->delete();
$konfirmasi = new Konfirmasi();
$konfirmasi->tujuan = $request['tujuan'];
$konfirmasi->jumlah = $request['jumlah'];
$konfirmasi->alasan = $request['alasan'];
$konfirmasi->berangkat = $request['berangkat'];
$konfirmasi->kembali = $request['kembali'];
$konfirmasi->plat_bus = $request['plat_bus'];
$konfirmasi->name = $request['name'];
$konfirmasi->status = $request['status'];
$konfirmasi->nama_supir = $request['nama_supir'];
$konfirmasi->save();
return redirect('k_supir/history')->with('message','Berhasil Melakukan Konfirmasi');
}
public function historys()
{
$riwayat = Konfirmasi::all();
return view('adminlte::k_supir.history.index', compact('riwayat'));
}
public function detailriwayats($id)
{
$riwayat = Konfirmasi::find($id);
return view('adminlte::k_supir.history.detail', compact('riwayat'));
}
public function jadwal()
{
$jadwal = Jadwal::all();
return view('adminlte::k_supir.supir.jadwal', compact('jadwal'));
}
public function updatejadwal()
{
$jadwal = Jadwal::all();
return view('adminlte::k_supir.supir.updatejadwal', compact('jadwal'));
}
public function invoice_print()
{
$jadwal = Jadwal::all();
return view('adminlte::k_supir.supir.invoice-print', compact('jadwal'));
}
public function print_jamkerja($id)
{
$jamkerja = Jam_Kerja::find($id);
return view('adminlte::k_supir.supir.print_jamkerja', compact('jamkerja'));
}
}
\ No newline at end of file
......@@ -52,8 +52,9 @@ class Kernel extends HttpKernel
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'admin' => \App\Http\Middleware\AdminMid::class,
'k_supir' => \App\Http\Middleware\K_SupirMid::class,
'klien' => \App\Http\Middleware\KlienMid::class,
'k_klien' => \App\Http\Middleware\IsK_Klien::class,
'klien' => \App\Http\Middleware\IsKlien::class,
'k_supir' => \App\Http\Middleware\IsK_Supir::class,
];
}
......@@ -3,9 +3,8 @@
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class AdminMid
class IsK_Klien
{
/**
* Handle an incoming request.
......@@ -16,13 +15,9 @@ class AdminMid
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'admin'){
return redirect('/');
}
} else {
return redirect('/');
if (auth()->check() && $request->user()->status=='k_klien'){
return $next($request);
}
return $next($request);
return redirect()->guest('/');
}
}
......@@ -3,9 +3,8 @@
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class K_SupirMid
class IsK_Supir
{
/**
* Handle an incoming request.
......@@ -16,13 +15,9 @@ class K_SupirMid
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'k_supir'){
return redirect('/');
}
} else {
return redirect('/');
if (auth()->check() && $request->user()->status=='k_supir'){
return $next($request);
}
return $next($request);
return redirect()->guest('/');
}
}
......@@ -3,9 +3,8 @@
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class KlienMid
class IsKlien
{
/**
* Handle an incoming request.
......@@ -16,13 +15,9 @@ class KlienMid
*/
public function handle($request, Closure $next)
{
if(Auth::check()){
if(Auth::user()->role != 'klien'){
return redirect('/');
}
} else {
return redirect('/');
if (auth()->check() && $request->user()->status=='klien'){
return $next($request);
}
return $next($request);
return redirect()->guest('/');
}
}
......@@ -18,17 +18,9 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
if(Auth::user()->role == 'admin')
return redirect('admin');
}
if (Auth::guard($guard)->check()) {
if(Auth::user()->role == 'k_supir')
return redirect('k_supir');
}
if (Auth::guard($guard)->check()) {
if(Auth::user()->role == 'klien')
return redirect('klien');
return redirect('/home');
}
return $next($request);
}
}
<?php
namespace App\Models;
namespace App;
use Illuminate\Database\Eloquent\Model;
class Jadwal extends Model
{
protected $table = 'jadwal';
protected $fillable = ['hari'];
protected $fillable = ['hari','nama_supir','nama_supir2','pukul','sampai_pukul','pukul2','sampai_pukul2'];
//
}
\ No newline at end of file
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Jam_Kerja extends Model
{
protected $table = 'jam_kerja';
protected $fillable = ['hari','nama_supir','nama_supir2','pukul','sampai_pukul','pukul2','sampai_pukul2'];
//
}
\ No newline at end of file
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
abstract class Job
{
/*
|--------------------------------------------------------------------------
| Queueable Jobs
|--------------------------------------------------------------------------
|
| This job base class provides a central location to place any logic that
| is shared across all of your jobs. The trait included with the class
| provides access to the "onQueue" and "delay" queue helper methods.
|
*/
use Queueable;
}
<?php
namespace App\Models;
namespace App;
use Illuminate\Database\Eloquent\Model;
......
<?php
namespace App\Models;
namespace App;
use Illuminate\Database\Eloquent\Model;
class Konfirmasi extends Model
{
protected $table = 'konfirmasi';
protected $fillable = ['id','tujuan','jumlah','alasan','berangkat','kembali','client_username','plat_bus','status'];
protected $fillable = ['id','tujuan','jumlah','alasan','berangkat','kembali','name','plat_bus','status','nama_supir'];
//
}
\ No newline at end of file
<?php
namespace App\Models;
namespace App;
use Illuminate\Database\Eloquent\Model;
class Pemesanan extends Model
{
protected $table = 'pemesanan';
protected $fillable = ['id','tujuan','jumlah','alasan','berangkat','kembali','client_username','plat_bus','status'];
protected $fillable = ['id','tujuan','jumlah','alasan','berangkat','kembali','name','plat_bus','status'];
//
}
\ No newline at end of file
......@@ -35,10 +35,10 @@ class RouteServiceProvider extends ServiceProvider
*/
public function map()
{
$this->mapWebRoutes();
$this->mapApiRoutes();
$this->mapWebRoutes();
//
}
......
<?php
namespace App\Models;
namespace App;
use Illuminate\Database\Eloquent\Model;
......
......@@ -15,7 +15,7 @@ class User extends Authenticatable
* @var array
*/
protected $fillable = [
'username', 'password','role'
'name','email','username', 'status', 'password',
];
/**
......@@ -26,6 +26,4 @@ class User extends Authenticatable
protected $hidden = [
'password', 'remember_token',
];
}
<?php
namespace App\Models;
namespace App;
use Illuminate\Database\Eloquent\Model;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
{
"name": "admin-lte",
"homepage": "http://almsaeedstudio.com",
"authors": [
"Abdullah Almsaeed <abdullah@almsaeedstudio.com>"
],
"description": "Admin dashboard and control panel template",
"main": [
"index2.html",
"dist/css/AdminLTE.css",
"dist/js/app.js",
"build/less/AdminLTE.less"
],
"keywords": [
"css",
"js",
"html",
"template",
"admin",
"bootstrap",
"theme",
"backend",
"responsive"
],
"license": "MIT",
"ignore": [
"/.*",
"node_modules",
"bower_components",
"composer.json",
"documentation"
]
}
// Mixins
// --------------------------------------------------
// Utilities
@import "mixins/hide-text.less";
@import "mixins/opacity.less";
@import "mixins/image.less";
@import "mixins/labels.less";
@import "mixins/reset-filter.less";
@import "mixins/resize.less";
@import "mixins/responsive-visibility.less";
@import "mixins/size.less";
@import "mixins/tab-focus.less";
@import "mixins/reset-text.less";
@import "mixins/text-emphasis.less";
@import "mixins/text-overflow.less";
@import "mixins/vendor-prefixes.less";
// Components
@import "mixins/alerts.less";
@import "mixins/buttons.less";
@import "mixins/panels.less";
@import "mixins/pagination.less";
@import "mixins/list-group.less";
@import "mixins/nav-divider.less";
@import "mixins/forms.less";
@import "mixins/progress-bar.less";
@import "mixins/table-row.less";
// Skins
@import "mixins/background-variant.less";
@import "mixins/border-radius.less";
@import "mixins/gradients.less";
// Layout
@import "mixins/clearfix.less";
@import "mixins/center-block.less";
@import "mixins/nav-vertical-align.less";
@import "mixins/grid-framework.less";
@import "mixins/grid.less";
// Alerts
.alert-variant(@background; @border; @text-color) {
background-color: @background;
border-color: @border;
color: @text-color;
hr {
border-top-color: darken(@border, 5%);
}
.alert-link {
color: darken(@text-color, 10%);
}
}
// Contextual backgrounds
.bg-variant(@color) {
background-color: @color;
a&:hover,
a&:focus {
background-color: darken(@color, 10%);
}
}
// Single side border-radius
.border-top-radius(@radius) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
}
.border-right-radius(@radius) {
border-bottom-right-radius: @radius;
border-top-right-radius: @radius;
}
.border-bottom-radius(@radius) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
.border-left-radius(@radius) {
border-bottom-left-radius: @radius;
border-top-left-radius: @radius;
}
// Button variants
//
// Easily pump out default styles, as well as :hover, :focus, :active,
// and disabled options for all buttons
.button-variant(@color; @background; @border) {
color: @color;
background-color: @background;
border-color: @border;
&:focus,
&.focus {
color: @color;
background-color: darken(@background, 10%);
border-color: darken(@border, 25%);
}
&:hover {
color: @color;
background-color: darken(@background, 10%);
border-color: darken(@border, 12%);
}
&:active,
&.active,
.open > .dropdown-toggle& {
color: @color;
background-color: darken(@background, 10%);
border-color: darken(@border, 12%);
&:hover,
&:focus,
&.focus {
color: @color;
background-color: darken(@background, 17%);
border-color: darken(@border, 25%);
}
}
&:active,
&.active,
.open > .dropdown-toggle& {
background-image: none;
}
&.disabled,
&[disabled],
fieldset[disabled] & {
&,
&:hover,
&:focus,
&.focus,
&:active,
&.active {
background-color: @background;
border-color: @border;
}
}
.badge {
color: @background;
background-color: @color;
}
}
// Button sizes
.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
}
// Center-align a block level element
.center-block() {
display: block;
margin-left: auto;
margin-right: auto;
}
// Clearfix
//
// For modern browsers
// 1. The space content is one way to avoid an Opera bug when the
// contenteditable attribute is included anywhere else in the document.
// Otherwise it causes space to appear at the top and bottom of elements
// that are clearfixed.
// 2. The use of `table` rather than `block` is only necessary if using
// `:before` to contain the top-margins of child elements.
//
// Source: http://nicolasgallagher.com/micro-clearfix-hack/
.clearfix() {
&:before,
&:after {
content: " "; // 1
display: table; // 2
}
&:after {
clear: both;
}
}
// Form validation states
//
// Used in forms.less to generate the form validation CSS for warnings, errors,
// and successes.
.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {
// Color the label and help text
.help-block,
.control-label,
.radio,
.checkbox,
.radio-inline,
.checkbox-inline,
&.radio label,
&.checkbox label,
&.radio-inline label,
&.checkbox-inline label {
color: @text-color;
}
// Set the border and box shadow on specific inputs to match
.form-control {
border-color: @border-color;
.box-shadow(inset 0 1px 1px rgba(0, 0, 0, .075)); // Redeclare so transitions work
&:focus {
border-color: darken(@border-color, 10%);
@shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px lighten(@border-color, 20%);
.box-shadow(@shadow);
}
}
// Set validation states also for addons
.input-group-addon {
color: @text-color;
border-color: @border-color;
background-color: @background-color;
}
// Optional feedback icon
.form-control-feedback {
color: @text-color;
}
}
// Form control focus state
//
// Generate a customized focus state and for any input with the specified color,
// which defaults to the `@input-border-focus` variable.
//
// We highly encourage you to not customize the default value, but instead use
// this to tweak colors on an as-needed basis. This aesthetic change is based on
// WebKit's default styles, but applicable to a wider range of browsers. Its
// usability and accessibility should be taken into account with any change.
//
// Example usage: change the default blue border and shadow to white for better
// contrast against a dark gray background.
.form-control-focus(@color: @input-border-focus) {
@color-rgba: rgba(red(@color), green(@color), blue(@color), .6);
&:focus {
border-color: @color;
outline: 0;
.box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}");
}
}
// Form control sizing
//
// Relative text size, padding, and border-radii changes for form controls. For
// horizontal sizing, wrap controls in the predefined grid classes. `<select>`
// element gets special love because it's special, and that's a fact!
.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
height: @input-height;
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
border-radius: @border-radius;
select& {
height: @input-height;
line-height: @input-height;
}
textarea&,
select[multiple] & {
height: auto;
}
}
// Gradients
#gradient {
// Horizontal gradient, from left to right
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
.horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)", argb(@start-color), argb(@end-color))); // IE9 and down
}
// Vertical gradient, from top to bottom
//
// Creates two color stops, start and end, by specifying a color and position for each color stop.
// Color stops are not available in IE9 and below.
.vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {
background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12
background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
background-repeat: repeat-x;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", argb(@start-color), argb(@end-color))); // IE9 and down
}
.directional(@start-color: #555; @end-color: #333; @deg: 45deg) {
background-repeat: repeat-x;
background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+
background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12
background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
}
.horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)", argb(@start-color), argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
.vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {
background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);
background-repeat: no-repeat;
filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)", argb(@start-color), argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
.radial(@inner-color: #555; @outer-color: #333) {
background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);
background-image: radial-gradient(circle, @inner-color, @outer-color);
background-repeat: no-repeat;
}
.striped(@color: rgba(255,255,255,.15); @angle: 45deg) {
background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);
}
}
// Framework grid generation
//
// Used only by Bootstrap to generate the correct number of grid classes given
// any value of `@grid-columns`.
.make-grid-columns() {
// Common styles for all sizes of grid columns, widths 1-12
.col(@index) {
// initial
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) {
// general; "=<" isn't a typo
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
.col((@index + 1), ~"@{list}, @{item}");
}
.col(@index, @list) when (@index > @grid-columns) {
// terminal
@{list} {
position: relative;
// Prevent columns from collapsing when empty
min-height: 1px;
// Inner gutter via padding
padding-left: (@grid-gutter-width / 2);
padding-right: (@grid-gutter-width / 2);
}
}
.col(1); // kickstart it
}
.float-grid-columns(@class) {
.col(@index) {
// initial
@item: ~".col-@{class}-@{index}";
.col((@index + 1), @item);
}
.col(@index, @list) when (@index =< @grid-columns) {
// general
@item: ~".col-@{class}-@{index}";
.col((@index + 1), ~"@{list}, @{item}");
}
.col(@index, @list) when (@index > @grid-columns) {
// terminal
@{list} {
float: left;
}
}
.col(1); // kickstart it
}
.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
.col-@{class}-@{index} {
width: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
.col-@{class}-push-@{index} {
left: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
.col-@{class}-push-0 {
left: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
.col-@{class}-pull-@{index} {
right: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
.col-@{class}-pull-0 {
right: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = offset) {
.col-@{class}-offset-@{index} {
margin-left: percentage((@index / @grid-columns));
}
}
// Basic looping in LESS
.loop-grid-columns(@index, @class, @type) when (@index >= 0) {
.calc-grid-column(@index, @class, @type);
// next iteration
.loop-grid-columns((@index - 1), @class, @type);
}
// Create grid for specific class
.make-grid(@class) {
.float-grid-columns(@class);
.loop-grid-columns(@grid-columns, @class, width);
.loop-grid-columns(@grid-columns, @class, pull);
.loop-grid-columns(@grid-columns, @class, push);
.loop-grid-columns(@grid-columns, @class, offset);
}
// Grid system
//
// Generate semantic grid columns with these mixins.
// Centered container element
.container-fixed(@gutter: @grid-gutter-width) {
margin-right: auto;
margin-left: auto;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
&:extend(.clearfix all);
}
// Creates a wrapper for a series of columns
.make-row(@gutter: @grid-gutter-width) {
margin-left: ceil((@gutter / -2));
margin-right: floor((@gutter / -2));
&:extend(.clearfix all);
}
// Generate the extra small columns
.make-xs-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
float: left;
width: percentage((@columns / @grid-columns));
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
}
.make-xs-column-offset(@columns) {
margin-left: percentage((@columns / @grid-columns));
}
.make-xs-column-push(@columns) {
left: percentage((@columns / @grid-columns));
}
.make-xs-column-pull(@columns) {
right: percentage((@columns / @grid-columns));
}
// Generate the small columns
.make-sm-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
@media (min-width: @screen-sm-min) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
.make-sm-column-offset(@columns) {
@media (min-width: @screen-sm-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-sm-column-push(@columns) {
@media (min-width: @screen-sm-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-sm-column-pull(@columns) {
@media (min-width: @screen-sm-min) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the medium columns
.make-md-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
@media (min-width: @screen-md-min) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
.make-md-column-offset(@columns) {
@media (min-width: @screen-md-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-md-column-push(@columns) {
@media (min-width: @screen-md-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-md-column-pull(@columns) {
@media (min-width: @screen-md-min) {
right: percentage((@columns / @grid-columns));
}
}
// Generate the large columns
.make-lg-column(@columns; @gutter: @grid-gutter-width) {
position: relative;
min-height: 1px;
padding-left: (@gutter / 2);
padding-right: (@gutter / 2);
@media (min-width: @screen-lg-min) {
float: left;
width: percentage((@columns / @grid-columns));
}
}
.make-lg-column-offset(@columns) {
@media (min-width: @screen-lg-min) {
margin-left: percentage((@columns / @grid-columns));
}
}
.make-lg-column-push(@columns) {
@media (min-width: @screen-lg-min) {
left: percentage((@columns / @grid-columns));
}
}
.make-lg-column-pull(@columns) {
@media (min-width: @screen-lg-min) {
right: percentage((@columns / @grid-columns));
}
}
// CSS image replacement
//
// Heads up! v3 launched with only `.hide-text()`, but per our pattern for
// mixins being reused as classes with the same name, this doesn't hold up. As
// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.
//
// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757
// Deprecated as of v3.0.1 (will be removed in v4)
.hide-text() {
font: ~"0/0" a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
// New mixin to use as of v3.0.1
.text-hide() {
.hide-text();
}
// Image Mixins
// - Responsive image
// - Retina image
// Responsive image
//
// Keep images from scaling beyond the width of their parents.
.img-responsive(@display: block) {
display: @display;
max-width: 100%; // Part 1: Set a maximum relative to the parent
height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
}
// Retina image
//
// Short retina mixin for setting background-image and -size. Note that the
// spelling of `min--moz-device-pixel-ratio` is intentional.
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
background-image: url("@{file-1x}");
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and ( min--moz-device-pixel-ratio: 2), only screen and ( -o-min-device-pixel-ratio: 2/1), only screen and ( min-device-pixel-ratio: 2), only screen and ( min-resolution: 192dpi), only screen and ( min-resolution: 2dppx) {
background-image: url("@{file-2x}");
background-size: @width-1x @height-1x;
}
}
// Labels
.label-variant(@color) {
background-color: @color;
&[href] {
&:hover,
&:focus {
background-color: darken(@color, 10%);
}
}
}
// List Groups
.list-group-item-variant(@state; @background; @color) {
.list-group-item-@{state} {
color: @color;
background-color: @background;
a&,
button& {
color: @color;
.list-group-item-heading {
color: inherit;
}
&:hover,
&:focus {
color: @color;
background-color: darken(@background, 5%);
}
&.active,
&.active:hover,
&.active:focus {
color: #fff;
background-color: @color;
border-color: @color;
}
}
}
}
// Horizontal dividers
//
// Dividers (basically an hr) within dropdowns and nav lists
.nav-divider(@color: #e5e5e5) {
height: 1px;
margin: ((@line-height-computed / 2) - 1) 0;
overflow: hidden;
background-color: @color;
}
// Navbar vertical align
//
// Vertically center elements in the navbar.
// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.
.navbar-vertical-align(@element-height) {
margin-top: ((@navbar-height - @element-height) / 2);
margin-bottom: ((@navbar-height - @element-height) / 2);
}
// Opacity
.opacity(@opacity) {
opacity: @opacity;
// IE8 filter
@opacity-ie: (@opacity * 100);
filter: ~"alpha(opacity=@{opacity-ie})";
}
// Pagination
.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {
> li {
> a,
> span {
padding: @padding-vertical @padding-horizontal;
font-size: @font-size;
line-height: @line-height;
}
&:first-child {
> a,
> span {
.border-left-radius(@border-radius);
}
}
&:last-child {
> a,
> span {
.border-right-radius(@border-radius);
}
}
}
}
// Panels
.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {
border-color: @border;
& > .panel-heading {
color: @heading-text-color;
background-color: @heading-bg-color;
border-color: @heading-border;
+ .panel-collapse > .panel-body {
border-top-color: @border;
}
.badge {
color: @heading-bg-color;
background-color: @heading-text-color;
}
}
& > .panel-footer {
+ .panel-collapse > .panel-body {
border-bottom-color: @border;
}
}
}
// Progress bars
.progress-bar-variant(@color) {
background-color: @color;
// Deprecated parent class requirement as of v3.2.0
.progress-striped & {
#gradient > .striped();
}
}
// Reset filters for IE
//
// When you need to remove a gradient background, do not forget to use this to reset
// the IE filter for IE9 and below.
.reset-filter() {
filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)"));
}
.reset-text() {
font-family: @font-family-base;
// We deliberately do NOT reset font-size.
font-style: normal;
font-weight: normal;
letter-spacing: normal;
line-break: auto;
line-height: @line-height-base;
text-align: left; // Fallback for where `start` is not supported
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
white-space: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
}
// Resize anything
.resizable(@direction) {
resize: @direction; // Options: horizontal, vertical, both
overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
}
// Responsive utilities
//
// More easily include all the states for responsive-utilities.less.
.responsive-visibility() {
display: block !important;
table& {
display: table !important;
}
tr& {
display: table-row !important;
}
th&,
td& {
display: table-cell !important;
}
}
.responsive-invisibility() {
display: none !important;
}
// Sizing shortcuts
.size(@width; @height) {
width: @width;
height: @height;
}
.square(@size) {
.size(@size; @size);
}
// WebKit-style focus
.tab-focus() {
// Default
outline: thin dotted;
// WebKit
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
// Tables
.table-row-variant(@state; @background) {
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.
.table > thead > tr,
.table > tbody > tr,
.table > tfoot > tr {
> td.@{state},
> th.@{state},
&.@{state} > td,
&.@{state} > th {
background-color: @background;
}
}
// Hover states for `.table-hover`
// Note: this is not available for cells or rows within `thead` or `tfoot`.
.table-hover > tbody > tr {
> td.@{state}:hover,
> th.@{state}:hover,
&.@{state}:hover > td,
&:hover > .@{state},
&.@{state}:hover > th {
background-color: darken(@background, 5%);
}
}
}
// Typography
.text-emphasis-variant(@color) {
color: @color;
a&:hover,
a&:focus {
color: darken(@color, 10%);
}
}
// Text overflow
// Requires inline-block or block for proper styling
.text-overflow() {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// Vendor Prefixes
//
// All vendor mixins are deprecated as of v3.2.0 due to the introduction of
// Autoprefixer in our Gruntfile. They will be removed in v4.
// - Animations
// - Backface visibility
// - Box shadow
// - Box sizing
// - Content columns
// - Hyphens
// - Placeholder text
// - Transformations
// - Transitions
// - User Select
// Animations
.animation(@animation) {
-webkit-animation: @animation;
-o-animation: @animation;
animation: @animation;
}
.animation-name(@name) {
-webkit-animation-name: @name;
animation-name: @name;
}
.animation-duration(@duration) {
-webkit-animation-duration: @duration;
animation-duration: @duration;
}
.animation-timing-function(@timing-function) {
-webkit-animation-timing-function: @timing-function;
animation-timing-function: @timing-function;
}
.animation-delay(@delay) {
-webkit-animation-delay: @delay;
animation-delay: @delay;
}
.animation-iteration-count(@iteration-count) {
-webkit-animation-iteration-count: @iteration-count;
animation-iteration-count: @iteration-count;
}
.animation-direction(@direction) {
-webkit-animation-direction: @direction;
animation-direction: @direction;
}
.animation-fill-mode(@fill-mode) {
-webkit-animation-fill-mode: @fill-mode;
animation-fill-mode: @fill-mode;
}
// Backface visibility
// Prevent browsers from flickering when using CSS 3D transforms.
// Default value is `visible`, but can be changed to `hidden`
.backface-visibility(@visibility) {
-webkit-backface-visibility: @visibility;
-moz-backface-visibility: @visibility;
backface-visibility: @visibility;
}
// Drop shadows
//
// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's
// supported browsers that have box shadow capabilities now support it.
.box-shadow(@shadow) {
-webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1
box-shadow: @shadow;
}
// Box sizing
.box-sizing(@boxmodel) {
-webkit-box-sizing: @boxmodel;
-moz-box-sizing: @boxmodel;
box-sizing: @boxmodel;
}
// CSS3 Content Columns
.content-columns(@column-count; @column-gap: @grid-gutter-width) {
-webkit-column-count: @column-count;
-moz-column-count: @column-count;
column-count: @column-count;
-webkit-column-gap: @column-gap;
-moz-column-gap: @column-gap;
column-gap: @column-gap;
}
// Optional hyphenation
.hyphens(@mode: auto) {
word-wrap: break-word;
-webkit-hyphens: @mode;
-moz-hyphens: @mode;
-ms-hyphens: @mode; // IE10+
-o-hyphens: @mode;
hyphens: @mode;
}
// Placeholder text
.placeholder(@color: @input-color-placeholder) {
// Firefox
&::-moz-placeholder {
color: @color;
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
}
&:-ms-input-placeholder {
color: @color;
}
// Internet Explorer 10+
&::-webkit-input-placeholder {
color: @color;
}
// Safari and Chrome
}
// Transformations
.scale(@ratio) {
-webkit-transform: scale(@ratio);
-ms-transform: scale(@ratio); // IE9 only
-o-transform: scale(@ratio);
transform: scale(@ratio);
}
.scale(@ratioX; @ratioY) {
-webkit-transform: scale(@ratioX, @ratioY);
-ms-transform: scale(@ratioX, @ratioY); // IE9 only
-o-transform: scale(@ratioX, @ratioY);
transform: scale(@ratioX, @ratioY);
}
.scaleX(@ratio) {
-webkit-transform: scaleX(@ratio);
-ms-transform: scaleX(@ratio); // IE9 only
-o-transform: scaleX(@ratio);
transform: scaleX(@ratio);
}
.scaleY(@ratio) {
-webkit-transform: scaleY(@ratio);
-ms-transform: scaleY(@ratio); // IE9 only
-o-transform: scaleY(@ratio);
transform: scaleY(@ratio);
}
.skew(@x; @y) {
-webkit-transform: skewX(@x) skewY(@y);
-ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+
-o-transform: skewX(@x) skewY(@y);
transform: skewX(@x) skewY(@y);
}
.translate(@x; @y) {
-webkit-transform: translate(@x, @y);
-ms-transform: translate(@x, @y); // IE9 only
-o-transform: translate(@x, @y);
transform: translate(@x, @y);
}
.translate3d(@x; @y; @z) {
-webkit-transform: translate3d(@x, @y, @z);
transform: translate3d(@x, @y, @z);
}
.rotate(@degrees) {
-webkit-transform: rotate(@degrees);
-ms-transform: rotate(@degrees); // IE9 only
-o-transform: rotate(@degrees);
transform: rotate(@degrees);
}
.rotateX(@degrees) {
-webkit-transform: rotateX(@degrees);
-ms-transform: rotateX(@degrees); // IE9 only
-o-transform: rotateX(@degrees);
transform: rotateX(@degrees);
}
.rotateY(@degrees) {
-webkit-transform: rotateY(@degrees);
-ms-transform: rotateY(@degrees); // IE9 only
-o-transform: rotateY(@degrees);
transform: rotateY(@degrees);
}
.perspective(@perspective) {
-webkit-perspective: @perspective;
-moz-perspective: @perspective;
perspective: @perspective;
}
.perspective-origin(@perspective) {
-webkit-perspective-origin: @perspective;
-moz-perspective-origin: @perspective;
perspective-origin: @perspective;
}
.transform-origin(@origin) {
-webkit-transform-origin: @origin;
-moz-transform-origin: @origin;
-ms-transform-origin: @origin; // IE9 only
transform-origin: @origin;
}
// Transitions
.transition(@transition) {
-webkit-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
.transition-property(@transition-property) {
-webkit-transition-property: @transition-property;
transition-property: @transition-property;
}
.transition-delay(@transition-delay) {
-webkit-transition-delay: @transition-delay;
transition-delay: @transition-delay;
}
.transition-duration(@transition-duration) {
-webkit-transition-duration: @transition-duration;
transition-duration: @transition-duration;
}
.transition-timing-function(@timing-function) {
-webkit-transition-timing-function: @timing-function;
transition-timing-function: @timing-function;
}
.transition-transform(@transition) {
-webkit-transition: -webkit-transform @transition;
-moz-transition: -moz-transform @transition;
-o-transition: -o-transform @transition;
transition: transform @transition;
}
// User select
// For selecting text on the page
.user-select(@select) {
-webkit-user-select: @select;
-moz-user-select: @select;
-ms-user-select: @select; // IE10+
user-select: @select;
}
{
"adjoining-classes": false,
"box-sizing": false,
"box-model": false,
"compatible-vendor-prefixes": false,
"floats": false,
"font-sizes": false,
"gradients": false,
"important": false,
"known-properties": false,
"outline-none": false,
"qualified-headings": false,
"regex-selectors": false,
"shorthand": false,
"text-indent": false,
"unique-headings": false,
"universal-selector": false,
"unqualified-attributes": false,
"ids": false,
"fallback-colors": false,
"vendor-prefix": false,
"import": false
}
/*
* Page: 400 and 500 error pages
* ------------------------------
*/
.error-page {
width: 600px;
margin: 20px auto 0 auto;
@media (max-width: @screen-sm-max) {
width: 100%;
}
//For the error number e.g: 404
> .headline {
float: left;
font-size: 100px;
font-weight: 300;
@media (max-width: @screen-sm-max) {
float: none;
text-align: center;
}
}
//For the message
> .error-content {
margin-left: 190px;
@media (max-width: @screen-sm-max) {
margin-left: 0;
}
> h3 {
font-weight: 300;
font-size: 25px;
@media (max-width: @screen-sm-max) {
text-align: center;
}
}
display: block;
}
}
/*!
* AdminLTE v2.3.5 Without Third-Party Plugins
* Author: Almsaeed Studio
* Website: Almsaeed Studio <http://almsaeedstudio.com>
* License: Open source - MIT
* Please visit http://opensource.org/licenses/MIT for more information
!*/
//google fonts
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);
//Bootstrap Variables & Mixins
//The core bootstrap code have not been modified. These files
//are included only for reference.
@import (reference) "../bootstrap-less/mixins.less";
@import (reference) "../bootstrap-less/variables.less";
//MISC
//----
@import "core.less";
@import "variables.less";
@import "mixins.less";
//COMPONENTS
//-----------
@import "header.less";
@import "sidebar.less";
@import "sidebar-mini.less";
@import "control-sidebar.less";
@import "dropdown.less";
@import "forms.less";
@import "progress-bars.less";
@import "small-box.less";
@import "boxes.less";
@import "info-box.less";
@import "timeline.less";
@import "buttons.less";
@import "callout.less";
@import "alerts.less";
@import "navs.less";
@import "products.less";
@import "table.less";
@import "labels.less";
@import "direct-chat.less";
@import "users-list.less";
@import "carousel.less";
@import "modal.less";
@import "social-widgets.less";
//PAGES
//------
@import "mailbox.less";
@import "lockscreen.less";
@import "login_and_register.less";
@import "404_500_errors.less";
@import "invoice.less";
@import "profile";
//Miscellaneous
//-------------
@import "miscellaneous.less";
@import "print.less";
/*!
* AdminLTE v2.3.12
* Author: Almsaeed Studio
* Website: Almsaeed Studio <http://almsaeedstudio.com>
* License: Open source - MIT
* Please visit http://opensource.org/licenses/MIT for more information
!*/
//google fonts
@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);
//Bootstrap Variables & Mixins
//The core bootstrap code have not been modified. These files
//are included only for reference.
@import (reference) "../bootstrap-less/mixins.less";
@import (reference) "../bootstrap-less/variables.less";
//MISC
//----
@import "core.less";
@import "variables.less";
@import "mixins.less";
//COMPONENTS
//-----------
@import "header.less";
@import "sidebar.less";
@import "sidebar-mini.less";
@import "control-sidebar.less";
@import "dropdown.less";
@import "forms.less";
@import "progress-bars.less";
@import "small-box.less";
@import "boxes.less";
@import "info-box.less";
@import "timeline.less";
@import "buttons.less";
@import "callout.less";
@import "alerts.less";
@import "navs.less";
@import "products.less";
@import "table.less";
@import "labels.less";
@import "direct-chat.less";
@import "users-list.less";
@import "carousel.less";
@import "modal.less";
@import "social-widgets.less";
//PAGES
//------
@import "mailbox.less";
@import "lockscreen.less";
@import "login_and_register.less";
@import "404_500_errors.less";
@import "invoice.less";
@import "profile";
//Plugins
//--------
@import "plugins.less";
//Miscellaneous
//-------------
@import "miscellaneous.less";
@import "print.less";
/*
* Component: alert
* ----------------
*/
.alert {
.border-radius(3px);
h4 {
font-weight: 600;
}
.icon {
margin-right: 10px;
}
.close {
color: #000;
.opacity(.2);
&:hover {
.opacity(.5);
}
}
a {
color: #fff;
text-decoration: underline;
}
}
//Alert Variants
.alert-success {
&:extend(.bg-green);
border-color: darken(@green, 5%);
}
.alert-danger,
.alert-error {
&:extend(.bg-red);
border-color: darken(@red, 5%);
}
.alert-warning {
&:extend(.bg-yellow);
border-color: darken(@yellow, 5%);
}
.alert-info {
&:extend(.bg-aqua);
border-color: darken(@aqua, 5%);
}
/*
* Social Buttons for Bootstrap
*
* Copyright 2013-2015 Panayiotis Lipiridis
* Licensed under the MIT License
*
* https://github.com/lipis/bootstrap-social
*/
// Import variables and mixins as a reference for separate plugins version
@import (reference) "../bootstrap-less/mixins";
@import (reference) "../bootstrap-less/variables";
@import (reference) "variables";
@import (reference) "mixins";
@bs-height-base: (@line-height-computed + @padding-base-vertical * 2);
@bs-height-lg: (floor(@font-size-large * @line-height-base) + @padding-large-vertical * 2);
@bs-height-sm: (floor(@font-size-small * 1.5) + @padding-small-vertical * 2);
@bs-height-xs: (floor(@font-size-small * 1.2) + @padding-small-vertical + 1);
.btn-social {
position: relative;
padding-left: (@bs-height-base + @padding-base-horizontal);
text-align: left;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
> :first-child {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: @bs-height-base;
line-height: (@bs-height-base + 2);
font-size: 1.6em;
text-align: center;
border-right: 1px solid rgba(0, 0, 0, 0.2);
}
&.btn-lg {
padding-left: (@bs-height-lg + @padding-large-horizontal);
> :first-child {
line-height: @bs-height-lg;
width: @bs-height-lg;
font-size: 1.8em;
}
}
&.btn-sm {
padding-left: (@bs-height-sm + @padding-small-horizontal);
> :first-child {
line-height: @bs-height-sm;
width: @bs-height-sm;
font-size: 1.4em;
}
}
&.btn-xs {
padding-left: (@bs-height-xs + @padding-small-horizontal);
> :first-child {
line-height: @bs-height-xs;
width: @bs-height-xs;
font-size: 1.2em;
}
}
}
.btn-social-icon {
.btn-social;
height: (@bs-height-base + 2);
width: (@bs-height-base + 2);
padding: 0;
> :first-child {
border: none;
text-align: center;
width: 100%;
}
&.btn-lg {
height: @bs-height-lg;
width: @bs-height-lg;
padding-left: 0;
padding-right: 0;
}
&.btn-sm {
height: (@bs-height-sm + 2);
width: (@bs-height-sm + 2);
padding-left: 0;
padding-right: 0;
}
&.btn-xs {
height: (@bs-height-xs + 2);
width: (@bs-height-xs + 2);
padding-left: 0;
padding-right: 0;
}
}
.btn-social(@color-bg, @color: #fff) {
background-color: @color-bg;
.button-variant(@color, @color-bg, rgba(0, 0, 0, .2));
}
.btn-adn {
.btn-social(#d87a68);
}
.btn-bitbucket {
.btn-social(#205081);
}
.btn-dropbox {
.btn-social(#1087dd);
}
.btn-facebook {
.btn-social(#3b5998);
}
.btn-flickr {
.btn-social(#ff0084);
}
.btn-foursquare {
.btn-social(#f94877);
}
.btn-github {
.btn-social(#444444);
}
.btn-google {
.btn-social(#dd4b39);
}
.btn-instagram {
.btn-social(#3f729b);
}
.btn-linkedin {
.btn-social(#007bb6);
}
.btn-microsoft {
.btn-social(#2672ec);
}
.btn-openid {
.btn-social(#f7931e);
}
.btn-pinterest {
.btn-social(#cb2027);
}
.btn-reddit {
.btn-social(#eff7ff, #000);
}
.btn-soundcloud {
.btn-social(#ff5500);
}
.btn-tumblr {
.btn-social(#2c4762);
}
.btn-twitter {
.btn-social(#55acee);
}
.btn-vimeo {
.btn-social(#1ab7ea);
}
.btn-vk {
.btn-social(#587ea3);
}
.btn-yahoo {
.btn-social(#720e9e);
}
/*
* Component: Box
* --------------
*/
.box {
position: relative;
.border-radius(@box-border-radius);
background: #ffffff;
border-top: 3px solid @box-default-border-top-color;
margin-bottom: 20px;
width: 100%;
box-shadow: @box-boxshadow;
// Box color variations
&.box-primary {
border-top-color: @light-blue;
}
&.box-info {
border-top-color: @aqua;
}
&.box-danger {
border-top-color: @red;
}
&.box-warning {
border-top-color: @yellow;
}
&.box-success {
border-top-color: @green;
}
&.box-default {
border-top-color: @gray-lte;
}
// collapsed mode
&.collapsed-box {
.box-body,
.box-footer {
display: none;
}
}
.nav-stacked {
> li {
border-bottom: 1px solid @box-border-color;
margin: 0;
&:last-of-type {
border-bottom: none;
}
}
}
// fixed height to 300px
&.height-control {
.box-body {
max-height: 300px;
overflow: auto;
}
}
.border-right {
border-right: 1px solid @box-border-color;
}
.border-left {
border-left: 1px solid @box-border-color;
}
//SOLID BOX
//---------
//use this class to get a colored header and borders
&.box-solid {
border-top: 0;
> .box-header {
.btn.btn-default {
background: transparent;
}
.btn,
a {
&:hover {
background: rgba(0, 0, 0, 0.1);
}
}
}
// Box color variations
&.box-default {
.box-solid-variant(@gray-lte, #444);
}
&.box-primary {
.box-solid-variant(@light-blue);
}
&.box-info {
.box-solid-variant(@aqua);
}
&.box-danger {
.box-solid-variant(@red);
}
&.box-warning {
.box-solid-variant(@yellow);
}
&.box-success {
.box-solid-variant(@green);
}
> .box-header > .box-tools .btn {
border: 0;
box-shadow: none;
}
// Fix font color for tiles
&[class*='bg'] {
> .box-header {
color: #fff;
}
}
}
//BOX GROUP
.box-group {
> .box {
margin-bottom: 5px;
}
}
// jQuery Knob in a box
.knob-label {
text-align: center;
color: #333;
font-weight: 100;
font-size: 12px;
margin-bottom: 0.3em;
}
}
.box,
.overlay-wrapper {
// Box overlay for LOADING STATE effect
> .overlay,
> .loading-img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.overlay {
z-index: 50;
background: rgba(255, 255, 255, 0.7);
.border-radius(@box-border-radius);
> .fa {
position: absolute;
top: 50%;
left: 50%;
margin-left: -15px;
margin-top: -15px;
color: #000;
font-size: 30px;
}
}
.overlay.dark {
background: rgba(0, 0, 0, 0.5);
}
}
//Add clearfix to header, body and footer
.box-header,
.box-body,
.box-footer {
.clearfix();
}
//Box header
.box-header {
color: #444;
display: block;
padding: @box-padding;
position: relative;
//Add bottom border
&.with-border {
border-bottom: 1px solid @box-border-color;
.collapsed-box & {
border-bottom: none;
}
}
//Icons and box title
> .fa,
> .glyphicon,
> .ion,
.box-title {
display: inline-block;
font-size: 18px;
margin: 0;
line-height: 1;
}
> .fa,
> .glyphicon,
> .ion {
margin-right: 5px;
}
> .box-tools {
position: absolute;
right: 10px;
top: 5px;
[data-toggle="tooltip"] {
position: relative;
}
&.pull-right {
.dropdown-menu {
right: 0;
left: auto;
}
}
.dropdown-menu > li > a {
color: #444!important;
}
}
}
//Box Tools Buttons
.btn-box-tool {
padding: 5px;
font-size: 12px;
background: transparent;
color: darken(@box-default-border-top-color, 20%);
.open &,
&:hover {
color: darken(@box-default-border-top-color, 40%);
}
&.btn:active {
box-shadow: none;
}
}
//Box Body
.box-body {
.border-radius(0; 0; @box-border-radius; @box-border-radius);
padding: @box-padding;
.no-header & {
.border-top-radius(@box-border-radius);
}
// Tables within the box body
> .table {
margin-bottom: 0;
}
// Calendar within the box body
.fc {
margin-top: 5px;
}
.full-width-chart {
margin: -19px;
}
&.no-padding .full-width-chart {
margin: -9px;
}
.box-pane {
.border-radius(0; 0; @box-border-radius; 0);
}
.box-pane-right {
.border-radius(0; 0; 0; @box-border-radius);
}
}
//Box footer
.box-footer {
.border-radius(0; 0; @box-border-radius; @box-border-radius);
border-top: 1px solid @box-border-color;
padding: @box-padding;
background-color: @box-footer-bg;
}
.chart-legend {
&:extend(.list-unstyled);
margin: 10px 0;
> li {
@media (max-width: @screen-sm-max) {
float: left;
margin-right: 10px;
}
}
}
//Comment Box
.box-comments {
background: #f7f7f7;
.box-comment {
.clearfix();
padding: 8px 0;
border-bottom: 1px solid #eee;
&:last-of-type {
border-bottom: 0;
}
&:first-of-type {
padding-top: 0;
}
img {
&:extend(.img-sm);
float: left;
}
}
.comment-text {
margin-left: 40px;
color: #555;
}
.username {
color: #444;
display: block;
font-weight: 600;
}
.text-muted {
font-weight: 400;
font-size: 12px;
}
}
//Widgets
//-----------
/* Widget: TODO LIST */
.todo-list {
margin: 0;
padding: 0;
list-style: none;
overflow: auto;
// Todo list element
> li {
.border-radius(2px);
padding: 10px;
background: #f4f4f4;
margin-bottom: 2px;
border-left: 2px solid #e6e7e8;
color: #444;
&:last-of-type {
margin-bottom: 0;
}
> input[type='checkbox'] {
margin: 0 10px 0 5px;
}
.text {
display: inline-block;
margin-left: 5px;
font-weight: 600;
}
// Time labels
.label {
margin-left: 10px;
font-size: 9px;
}
// Tools and options box
.tools {
display: none;
float: right;
color: @red;
// icons
> .fa, > .glyphicon, > .ion {
margin-right: 5px;
cursor: pointer;
}
}
&:hover .tools {
display: inline-block;
}
&.done {
color: #999;
.text {
text-decoration: line-through;
font-weight: 500;
}
.label {
background: @gray-lte !important;
}
}
}
// Color varaity
.danger {
border-left-color: @red;
}
.warning {
border-left-color: @yellow;
}
.info {
border-left-color: @aqua;
}
.success {
border-left-color: @green;
}
.primary {
border-left-color: @light-blue;
}
.handle {
display: inline-block;
cursor: move;
margin: 0 5px;
}
}
// END TODO WIDGET
/* Chat widget (DEPRECATED - this will be removed in the next major release. Use Direct Chat instead)*/
.chat {
padding: 5px 20px 5px 10px;
.item {
.clearfix();
margin-bottom: 10px;
// The image
> img {
width: 40px;
height: 40px;
border: 2px solid transparent;
.border-radius(50%);
}
> .online {
border: 2px solid @green;
}
> .offline {
border: 2px solid @red;
}
// The message body
> .message {
margin-left: 55px;
margin-top: -40px;
> .name {
display: block;
font-weight: 600;
}
}
// The attachment
> .attachment {
.border-radius(@attachment-border-radius);
background: #f4f4f4;
margin-left: 65px;
margin-right: 15px;
padding: 10px;
> h4 {
margin: 0 0 5px 0;
font-weight: 600;
font-size: 14px;
}
> p, > .filename {
font-weight: 600;
font-size: 13px;
font-style: italic;
margin: 0;
}
.clearfix();
}
}
}
//END CHAT WIDGET
//Input in box
.box-input {
max-width: 200px;
}
//A fix for panels body text color when placed within
// a modal
.modal {
.panel-body {
color: #444;
}
}
/*
* Component: Button
* -----------------
*/
.btn {
.border-radius(@btn-border-radius);
.box-shadow(@btn-boxshadow);
border: 1px solid transparent;
&.uppercase {
text-transform: uppercase
}
// Flat buttons
&.btn-flat {
.border-radius(0);
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
border-width: 1px;
}
// Active state
&:active {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
&:focus {
outline: none;
}
// input file btn
&.btn-file {
position: relative;
overflow: hidden;
> input[type='file'] {
position: absolute;
top: 0;
right: 0;
min-width: 100%;
min-height: 100%;
font-size: 100px;
text-align: right;
.opacity(0);
outline: none;
background: white;
cursor: inherit;
display: block;
}
}
}
//Button color variations
.btn-default {
background-color: #f4f4f4;
color: #444;
border-color: #ddd;
&:hover,
&:active,
&.hover {
background-color: darken(#f4f4f4, 5%);
}
}
.btn-primary {
background-color: @light-blue;
border-color: darken(@light-blue, 5%);
&:hover, &:active, &.hover {
background-color: darken(@light-blue, 5%);
}
}
.btn-success {
background-color: @green;
border-color: darken(@green, 5%);
&:hover, &:active, &.hover {
background-color: darken(@green, 5%);
}
}
.btn-info {
background-color: @aqua;
border-color: darken(@aqua, 5%);
&:hover, &:active, &.hover {
background-color: darken(@aqua, 5%);
}
}
.btn-danger {
background-color: @red;
border-color: darken(@red, 5%);
&:hover, &:active, &.hover {
background-color: darken(@red, 5%);
}
}
.btn-warning {
background-color: @yellow;
border-color: darken(@yellow, 5%);
&:hover, &:active, &.hover {
background-color: darken(@yellow, 5%);
}
}
.btn-outline {
border: 1px solid #fff;
background: transparent;
color: #fff;
&:hover,
&:focus,
&:active {
color: rgba(255, 255, 255, .7);
border-color: rgba(255, 255, 255, .7);
}
}
.btn-link {
.box-shadow(none);
}
//General .btn with bg class
.btn[class*='bg-']:hover {
.box-shadow(inset 0 0 100px rgba(0, 0, 0, 0.2));
}
// Application buttons
.btn-app {
.border-radius(3px);
position: relative;
padding: 15px 5px;
margin: 0 0 10px 10px;
min-width: 80px;
height: 60px;
text-align: center;
color: #666;
border: 1px solid #ddd;
background-color: #f4f4f4;
font-size: 12px;
//Icons within the btn
> .fa, > .glyphicon, > .ion {
font-size: 20px;
display: block;
}
&:hover {
background: #f4f4f4;
color: #444;
border-color: #aaa;
}
&:active, &:focus {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
}
//The badge
> .badge {
position: absolute;
top: -3px;
right: -10px;
font-size: 10px;
font-weight: 400;
}
}
/*
* Component: Callout
* ------------------
*/
// Base styles (regardless of theme)
.callout {
.border-radius(3px);
margin: 0 0 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;
a {
color: #fff;
text-decoration: underline;
&:hover {
color: #eee;
}
}
h4 {
margin-top: 0;
font-weight: 600;
}
p:last-child {
margin-bottom: 0;
}
code,
.highlight {
background-color: #fff;
}
// Themes for different contexts
&.callout-danger {
&:extend(.bg-red);
border-color: darken(@red, 10%);
}
&.callout-warning {
&:extend(.bg-yellow);
border-color: darken(@yellow, 10%);
}
&.callout-info {
&:extend(.bg-aqua);
border-color: darken(@aqua, 10%);
}
&.callout-success {
&:extend(.bg-green);
border-color: darken(@green, 10%);
}
}
/*
* Component: Carousel
* -------------------
*/
.carousel-control {
&.left,
&.right {
background-image: none;
}
> .fa {
font-size: 40px;
position: absolute;
top: 50%;
z-index: 5;
display: inline-block;
margin-top: -20px;
}
}
/*
* Component: Control sidebar. By default, this is the right sidebar.
*/
//The sidebar's background control class
//This is a hack to make the background visible while scrolling
.control-sidebar-bg {
position: fixed;
z-index: 1000;
bottom: 0;
}
//Transitions
.control-sidebar-bg,
.control-sidebar {
top: 0;
right: -@control-sidebar-width;
width: @control-sidebar-width;
.transition(right @transition-speed ease-in-out);
}
//The sidebar
.control-sidebar {
position: absolute;
padding-top: @navbar-height;
z-index: 1010;
//Fix position after header collapse
@media (max-width: @screen-sm) {
padding-top: @navbar-height + 50;
}
//Tab panes
> .tab-content {
padding: 10px 15px;
}
//Open state with slide over content effect
&.control-sidebar-open {
&,
+ .control-sidebar-bg {
right: 0;
}
}
}
//Open without slide over content
.control-sidebar-open {
.control-sidebar-bg,
.control-sidebar {
right: 0;
}
@media (min-width: @screen-sm) {
.content-wrapper,
.right-side,
.main-footer {
margin-right: @control-sidebar-width;
}
}
}
//Control sidebar tabs
.nav-tabs.control-sidebar-tabs {
> li {
&:first-of-type > a {
&,
&:hover,
&:focus {
border-left-width: 0;
}
}
> a {
.border-radius(0);
//Hover and active states
&,
&:hover {
border-top: none;
border-right: none;
border-left: 1px solid transparent;
border-bottom: 1px solid transparent;
}
.icon {
font-size: 16px;
}
}
//Active state
&.active {
> a {
&,
&:hover,
&:focus,
&:active {
border-top: none;
border-right: none;
border-bottom: none;
}
}
}
}
//Remove responsiveness on small screens
@media (max-width: @screen-sm) {
display: table;
> li {
display: table-cell;
}
}
}
//Headings in the sidebar content
.control-sidebar-heading {
font-weight: 400;
font-size: 16px;
padding: 10px 0;
margin-bottom: 10px;
}
//Subheadings
.control-sidebar-subheading {
display: block;
font-weight: 400;
font-size: 14px;
}
//Control Sidebar Menu
.control-sidebar-menu {
list-style: none;
padding: 0;
margin: 0 -15px;
> li > a {
.clearfix();
display: block;
padding: 10px 15px;
> .control-sidebar-subheading {
margin-top: 0;
}
}
.menu-icon {
float: left;
width: 35px;
height: 35px;
border-radius: 50%;
text-align: center;
line-height: 35px;
}
.menu-info {
margin-left: 45px;
margin-top: 3px;
> .control-sidebar-subheading {
margin: 0;
}
> p {
margin: 0;
font-size: 11px;
}
}
.progress {
margin: 0;
}
}
//Dark skin
.control-sidebar-dark {
color: @sidebar-dark-color;
// Background
&,
+ .control-sidebar-bg {
background: @sidebar-dark-bg;
}
// Sidebar tabs
.nav-tabs.control-sidebar-tabs {
border-bottom: darken(@sidebar-dark-bg, 3%);
> li {
> a {
background: darken(@sidebar-dark-bg, 5%);
color: @sidebar-dark-color;
//Hover and active states
&,
&:hover,
&:focus {
border-left-color: darken(@sidebar-dark-bg, 7%);
border-bottom-color: darken(@sidebar-dark-bg, 7%);
}
&:hover,
&:focus,
&:active {
background: darken(@sidebar-dark-bg, 3%);
}
&:hover {
color: #fff;
}
}
//Active state
&.active {
> a {
&,
&:hover,
&:focus,
&:active {
background: @sidebar-dark-bg;
color: #fff;
}
}
}
}
}
//Heading & subheading
.control-sidebar-heading,
.control-sidebar-subheading {
color: #fff;
}
//Sidebar list
.control-sidebar-menu {
> li {
> a {
&:hover {
background: @sidebar-dark-hover-bg;
}
.menu-info {
> p {
color: @sidebar-dark-color;
}
}
}
}
}
}
//Light skin
.control-sidebar-light {
color: lighten(@sidebar-light-color, 10%);
// Background
&,
+ .control-sidebar-bg {
background: @sidebar-light-bg;
border-left: 1px solid @gray-lte;
}
// Sidebar tabs
.nav-tabs.control-sidebar-tabs {
border-bottom: @gray-lte;
> li {
> a {
background: darken(@sidebar-light-bg, 5%);
color: @sidebar-light-color;
//Hover and active states
&,
&:hover,
&:focus {
border-left-color: @gray-lte;
border-bottom-color: @gray-lte;
}
&:hover,
&:focus,
&:active {
background: darken(@sidebar-light-bg, 3%);
}
}
//Active state
&.active {
> a {
&,
&:hover,
&:focus,
&:active {
background: @sidebar-light-bg;
color: #111;
}
}
}
}
}
//Heading & subheading
.control-sidebar-heading,
.control-sidebar-subheading {
color: #111;
}
//Sidebar list
.control-sidebar-menu {
margin-left: -14px;
> li {
> a {
&:hover {
background: @sidebar-light-hover-bg;
}
.menu-info {
> p {
color: lighten(@sidebar-light-color, 10%);
}
}
}
}
}
}
/*
* Core: General Layout Style
* -------------------------
*/
html,
body {
height: 100%;
.layout-boxed & {
height: 100%;
}
}
body {
font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 400;
overflow-x: hidden;
overflow-y: auto;
}
/* Layout */
.wrapper {
.clearfix();
height: 100%;
position: relative;
overflow-x: hidden;
overflow-y: auto;
.layout-boxed & {
max-width: 1250px;
margin: 0 auto;
min-height: 100%;
box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
position: relative;
}
}
.layout-boxed {
background: url('@{boxed-layout-bg-image-path}') repeat fixed;
}
/*
* Content Wrapper - contains the main content
* ```.right-side has been deprecated as of v2.0.0 in favor of .content-wrapper ```
*/
.content-wrapper,
.right-side,
.main-footer {
//Using disposable variable to join statements with a comma
@transition-rule: @transition-speed @transition-fn,
margin @transition-speed @transition-fn;
.transition-transform(@transition-rule);
margin-left: @sidebar-width;
z-index: 820;
//Top nav layout
.layout-top-nav & {
margin-left: 0;
}
@media (max-width: @screen-xs-max) {
margin-left: 0;
}
//When opening the sidebar on large screens
.sidebar-collapse & {
@media (min-width: @screen-sm) {
margin-left: 0;
}
}
//When opening the sidebar on small screens
.sidebar-open & {
@media (max-width: @screen-xs-max) {
.translate(@sidebar-width, 0);
}
}
}
.content-wrapper,
.right-side {
min-height: 100%;
background-color: @body-bg;
z-index: 800;
}
.main-footer {
background: #fff;
padding: 15px;
color: #444;
border-top: 1px solid @gray-lte;
}
/* Fixed layout */
.fixed {
.main-header,
.main-sidebar,
.left-side {
position: fixed;
}
.main-header {
top: 0;
right: 0;
left: 0;
}
.content-wrapper,
.right-side {
padding-top: 50px;
@media (max-width: @screen-header-collapse) {
padding-top: 100px;
}
}
&.layout-boxed {
.wrapper {
max-width: 100%;
}
}
}
body.hold-transition {
.content-wrapper,
.right-side,
.main-footer,
.main-sidebar,
.left-side,
.main-header .navbar,
.main-header .logo {
/* Fix for IE */
.transition(none);
}
}
/* Content */
.content {
min-height: 250px;
padding: 15px;
.container-fixed(@grid-gutter-width);
}
/* H1 - H6 font */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-family: 'Source Sans Pro', sans-serif;
}
/* General Links */
a {
color: @link-color;
}
a:hover,
a:active,
a:focus {
outline: none;
text-decoration: none;
color: @link-hover-color;
}
/* Page Header */
.page-header {
margin: 10px 0 20px 0;
font-size: 22px;
> small {
color: #666;
display: block;
margin-top: 5px;
}
}
/*
* Component: Direct Chat
* ----------------------
*/
.direct-chat {
.box-body {
.border-bottom-radius(0);
position: relative;
overflow-x: hidden;
padding: 0;
}
&.chat-pane-open {
.direct-chat-contacts {
.translate(0, 0);
}
}
}
.direct-chat-messages {
.translate(0, 0);
padding: 10px;
height: 250px;
overflow: auto;
}
.direct-chat-msg,
.direct-chat-text {
display: block;
}
.direct-chat-msg {
.clearfix();
margin-bottom: 10px;
}
.direct-chat-messages,
.direct-chat-contacts {
.transition-transform(.5s ease-in-out);
}
.direct-chat-text {
.border-radius(5px);
position: relative;
padding: 5px 10px;
background: @direct-chat-default-msg-bg;
border: 1px solid @direct-chat-default-msg-border-color;
margin: 5px 0 0 50px;
color: @direct-chat-default-font-color;
//Create the arrow
&:after,
&:before {
position: absolute;
right: 100%;
top: 15px;
border: solid transparent;
border-right-color: @direct-chat-default-msg-border-color;
content: ' ';
height: 0;
width: 0;
pointer-events: none;
}
&:after {
border-width: 5px;
margin-top: -5px;
}
&:before {
border-width: 6px;
margin-top: -6px;
}
.right & {
margin-right: 50px;
margin-left: 0;
&:after,
&:before {
right: auto;
left: 100%;
border-right-color: transparent;
border-left-color: @direct-chat-default-msg-border-color;
}
}
}
.direct-chat-img {
.border-radius(50%);
float: left;
width: 40px;
height: 40px;
.right & {
float: right;
}
}
.direct-chat-info {
display: block;
margin-bottom: 2px;
font-size: 12px;
}
.direct-chat-name {
font-weight: 600;
}
.direct-chat-timestamp {
color: #999;
}
//Direct chat contacts pane
.direct-chat-contacts-open {
.direct-chat-contacts {
.translate(0, 0);
}
}
.direct-chat-contacts {
.translate(101%, 0);
position: absolute;
top: 0;
bottom: 0;
height: 250px;
width: 100%;
background: #222d32;
color: #fff;
overflow: auto;
}
//Contacts list -- for displaying contacts in direct chat contacts pane
.contacts-list {
&:extend(.list-unstyled);
> li {
.clearfix();
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
padding: 10px;
margin: 0;
&:last-of-type {
border-bottom: none;
}
}
}
.contacts-list-img {
.border-radius(50%);
width: 40px;
float: left;
}
.contacts-list-info {
margin-left: 45px;
color: #fff;
}
.contacts-list-name,
.contacts-list-status {
display: block;
}
.contacts-list-name {
font-weight: 600;
}
.contacts-list-status {
font-size: 12px;
}
.contacts-list-date {
color: #aaa;
font-weight: normal;
}
.contacts-list-msg {
color: #999;
}
//Direct Chat Variants
.direct-chat-danger {
.direct-chat-variant(@red);
}
.direct-chat-primary {
.direct-chat-variant(@light-blue);
}
.direct-chat-warning {
.direct-chat-variant(@yellow);
}
.direct-chat-info {
.direct-chat-variant(@aqua);
}
.direct-chat-success {
.direct-chat-variant(@green);
}
/*
* Component: Dropdown menus
* -------------------------
*/
/*Dropdowns in general*/
.dropdown-menu {
box-shadow: none;
border-color: #eee;
> li > a {
color: #777;
}
> li > a > .glyphicon,
> li > a > .fa,
> li > a > .ion {
margin-right: 10px;
}
> li > a:hover {
background-color: lighten(@gray-lte, 5%);
color: #333;
}
> .divider {
background-color: #eee;
}
}
//Navbar custom dropdown menu
.navbar-nav > .notifications-menu,
.navbar-nav > .messages-menu,
.navbar-nav > .tasks-menu {
//fix width and padding
> .dropdown-menu {
> li {
position: relative;
}
width: 280px;
//Remove padding and margins
padding: 0 0 0 0;
margin: 0;
top: 100%;
}
//Define header class
> .dropdown-menu > li.header {
.border-radius(4px; 4px; 0; 0);
background-color: #ffffff;
padding: 7px 10px;
border-bottom: 1px solid #f4f4f4;
color: #444444;
font-size: 14px;
}
//Define footer class
> .dropdown-menu > li.footer > a {
.border-radius(0; 0; 4px; 4px);
font-size: 12px;
background-color: #fff;
padding: 7px 10px;
border-bottom: 1px solid #eeeeee;
color: #444 !important;
@media (max-width: @screen-sm-max) {
background: #fff !important;
color: #444 !important;
}
text-align: center;
//Hover state
&:hover {
text-decoration: none;
font-weight: normal;
}
}
//Clear inner menu padding and margins
> .dropdown-menu > li .menu {
max-height: 200px;
margin: 0;
padding: 0;
list-style: none;
overflow-x: hidden;
> li > a {
display: block;
white-space: nowrap; /* Prevent text from breaking */
border-bottom: 1px solid #f4f4f4;
// Hove state
&:hover {
background: #f4f4f4;
text-decoration: none;
}
}
}
}
//Notifications menu
.navbar-nav > .notifications-menu {
> .dropdown-menu > li .menu {
// Links inside the menu
> li > a {
color: #444444;
overflow: hidden;
text-overflow: ellipsis;
padding: 10px;
// Icons inside the menu
> .glyphicon,
> .fa,
> .ion {
width: 20px;
}
}
}
}
//Messages menu
.navbar-nav > .messages-menu {
//Inner menu
> .dropdown-menu > li .menu {
// Messages menu item
> li > a {
margin: 0;
//line-height: 20px;
padding: 10px 10px;
// User image
> div > img {
margin: auto 10px auto auto;
width: 40px;
height: 40px;
}
// Message heading
> h4 {
padding: 0;
margin: 0 0 0 45px;
color: #444444;
font-size: 15px;
position: relative;
// Small for message time display
> small {
color: #999999;
font-size: 10px;
position: absolute;
top: 0;
right: 0;
}
}
> p {
margin: 0 0 0 45px;
font-size: 12px;
color: #888888;
}
.clearfix();
}
}
}
//Tasks menu
.navbar-nav > .tasks-menu {
> .dropdown-menu > li .menu {
> li > a {
padding: 10px;
> h3 {
font-size: 14px;
padding: 0;
margin: 0 0 10px 0;
color: #666666;
}
> .progress {
padding: 0;
margin: 0;
}
}
}
}
//User menu
.navbar-nav > .user-menu {
> .dropdown-menu {
.border-top-radius(0);
padding: 1px 0 0 0;
border-top-width: 0;
width: 280px;
&,
> .user-body {
.border-bottom-radius(4px);
}
// Header menu
> li.user-header {
height: 175px;
padding: 10px;
text-align: center;
// User image
> img {
z-index: 5;
height: 90px;
width: 90px;
border: 3px solid;
border-color: transparent;
border-color: rgba(255, 255, 255, 0.2);
}
> p {
z-index: 5;
color: #fff;
color: rgba(255, 255, 255, 0.8);
font-size: 17px;
//text-shadow: 2px 2px 3px #333333;
margin-top: 10px;
> small {
display: block;
font-size: 12px;
}
}
}
// Menu Body
> .user-body {
padding: 15px;
border-bottom: 1px solid #f4f4f4;
border-top: 1px solid #dddddd;
.clearfix();
a {
color: #444 !important;
@media (max-width: @screen-sm-max) {
background: #fff !important;
color: #444 !important;
}
}
}
// Menu Footer
> .user-footer {
background-color: #f9f9f9;
padding: 10px;
.clearfix();
.btn-default {
color: #666666;
&:hover {
@media (max-width: @screen-sm-max) {
background-color: #f9f9f9;
}
}
}
}
}
.user-image {
float: left;
width: 25px;
height: 25px;
border-radius: 50%;
margin-right: 10px;
margin-top: -2px;
@media (max-width: @screen-xs-max) {
float: none;
margin-right: 0;
margin-top: -8px;
line-height: 10px;
}
}
}
/* Add fade animation to dropdown menus by appending
the class .animated-dropdown-menu to the .dropdown-menu ul (or ol)*/
.open:not(.dropup) > .animated-dropdown-menu {
backface-visibility: visible !important;
.animation(flipInX .7s both);
}
@keyframes flipInX {
0% {
transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
transition-timing-function: ease-in;
opacity: 0;
}
40% {
transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
transition-timing-function: ease-in;
}
60% {
transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
100% {
transform: perspective(400px);
}
}
@-webkit-keyframes flipInX {
0% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
-webkit-transition-timing-function: ease-in;
opacity: 0;
}
40% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
-webkit-transition-timing-function: ease-in;
}
60% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
}
100% {
-webkit-transform: perspective(400px);
}
}
/* Fix dropdown menu in navbars */
.navbar-custom-menu > .navbar-nav {
> li {
position: relative;
> .dropdown-menu {
position: absolute;
right: 0;
left: auto;
}
}
}
@media (max-width: @screen-sm-max) {
.navbar-custom-menu > .navbar-nav {
float: right;
> li {
position: static;
> .dropdown-menu {
position: absolute;
right: 5%;
left: auto;
border: 1px solid #ddd;
background: #fff;
}
}
}
}
/*
* Component: Form
* ---------------
*/
.form-control {
.border-radius(@input-radius);
box-shadow: none;
border-color: @gray-lte;
&:focus {
border-color: @light-blue;
box-shadow: none;
}
&::-moz-placeholder,
&:-ms-input-placeholder,
&::-webkit-input-placeholder {
color: #bbb;
opacity: 1;
}
&:not(select) {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
}
.form-group {
&.has-success {
label {
color: @green;
}
.form-control,
.input-group-addon {
border-color: @green;
box-shadow: none;
}
.help-block {
color: @green;
}
}
&.has-warning {
label {
color: @yellow;
}
.form-control,
.input-group-addon {
border-color: @yellow;
box-shadow: none;
}
.help-block {
color: @yellow;
}
}
&.has-error {
label {
color: @red;
}
.form-control,
.input-group-addon {
border-color: @red;
box-shadow: none;
}
.help-block {
color: @red;
}
}
}
/* Input group */
.input-group {
.input-group-addon {
.border-radius(@input-radius);
border-color: @gray-lte;
background-color: #fff;
}
}
/* button groups */
.btn-group-vertical {
.btn {
&.btn-flat:first-of-type, &.btn-flat:last-of-type {
.border-radius(0);
}
}
}
.icheck > label {
padding-left: 0;
}
/* support Font Awesome icons in form-control */
.form-control-feedback.fa {
line-height: @input-height-base;
}
.input-lg + .form-control-feedback.fa,
.input-group-lg + .form-control-feedback.fa,
.form-group-lg .form-control + .form-control-feedback.fa {
line-height: @input-height-large;
}
.input-sm + .form-control-feedback.fa,
.input-group-sm + .form-control-feedback.fa,
.form-group-sm .form-control + .form-control-feedback.fa {
line-height: @input-height-small;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment