-
Getting started
- Laravel setup
- File structure
- Tutorial
- License Laravel example pages
- Login
- Register
- Recover password
- Profile edit Components
- Buttons
- Checkbox/Radio
- Dropdown
- Inputs
- Textarea
- Navigation
- Tables
- Notification
- Sidebar
- Charts
- How to setup Google API Keys
- Add sharing buttons
- Changing Colors (SASS)
Laravel setup
Note
We recommend installing this preset on a project that you are starting from scratch, otherwise your project's design might break.
Prerequisites
If you don't already have an Apache local environment with PHP and MySQL, use one of the following links:
- Windows: https://updivision.com/blog/post/beginner-s-guide-to-setting-up-your-local-development-environment-on-windows
- Linux: https://howtoubuntu.org/how-to-install-lamp-on-ubuntu
- Mac: https://wpshout.com/quick-guides/how-to-install-mamp-on-your-mac
Also, you will need to install Composer: https://getcomposer.org/doc/00-intro.md
And Laravel: https://laravel.com/docs/8.x/installation
Installation
After initializing a fresh instance of Laravel (and making all the necessary configurations), install the preset using one of the provided methods:
Via composer
Cd
to your Laravel app- Type in your terminal:
composer require laravel/ui
andphp artisan ui vue --auth
- Install this preset via
composer require laravel-frontend-presets/light-bootstrap-dashboard
. No need to register the service provider. Laravel 5.5 & up can auto detect the package. - Run
php artisan ui light-bootstrap
command to install the Light Bootstrap Dashboard preset. This will install all the necessary light-bootstrap and also the custom auth views, it will also add the auth route inroutes/web.php
(NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php) - In your terminal run
composer dump-autoload
- Run
php artisan migrate --seed
to create basic users table
By using the archive
- In your application's root create a presets folder
- Download an archive of the repo and unzip it
- Copy and paste light-bootstrap-dashboard-master folder in presets (created in step 2) and rename it to light-bootstrap
- Open
composer.json
file - Add
"LaravelFrontendPresets\\LightBootstrapPreset\\": "presets/light-bootstrap/src"
toautoload/psr-4
and toautoload-dev/psr-4
- Add
LaravelFrontendPresets\LightBootstrapPreset\LightBootstrapPresetServiceProvider::class
toconfig/app.php
file - Type in your terminal:
composer require laravel/ui
andphp artisan ui vue --auth
- In your terminal run
composer dump-autoload
- Run
php artisan ui light-bootstrap
command to install the Light Bootstrap preset. This will install all the necessary light-bootstrap and also the custom auth views, it will also add the auth route inroutes/web.php
(NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php) - Run
php artisan migrate --seed
to create basic users table
Usage
To start testing the preset, register as a user or log in using the default user:
- admin type - [email protected] with the password
Make sure to run the migrations and seeders for the above credentials to be available.
Besides the dashboard and the auth pages this preset also has an edit profile page. All the necessary files (controllers, requests, views) are installed out of the box and all the needed routes are added to routes/web.php
.
Keep in mind that all of the features can be viewed once you login using the credentials provided above or by registering your own user.
Dashboard
You can access the dashboard either by using the "Dashboards/Dashboard" link in the left sidebar or by adding /home in the URL.
File Structure
Once you have downloaded the archive and opened it, you will find the following structure:
Let's take it one by one:
| composer.json | composer.lock | package.json | phpunit.xml | README.md | server.php | yarn.lock | +--- app │ ├── Console │ │ └── Kernel.php │ ├── Exceptions │ │ └── Handler.php │ ├── Http │ │ ├── Controllers │ │ │ ├── Auth │ │ │ │ ├── ForgotPasswordController.php │ │ │ │ ├── LoginController.php │ │ │ │ ├── RegisterController.php │ │ │ │ ├── ResetPasswordController.php │ │ │ │ └── VerificationController.php │ │ │ ├── Controller.php │ │ │ ├── HomeController.php │ │ │ ├── PageController.php │ │ │ ├── ProfileController.php │ │ │ └── UserController.php │ │ ├── Kernel.php │ │ ├── Middleware │ │ │ ├── Authenticate.php │ │ │ ├── CheckForMaintenanceMode.php │ │ │ ├── EncryptCookies.php │ │ │ ├── RedirectIfAuthenticated.php │ │ │ ├── TrimStrings.php │ │ │ ├── TrustProxies.php │ │ │ └── VerifyCsrfToken.php │ │ └── Requests │ │ ├── PasswordRequest.php │ │ ├── ProfileRequest.php │ │ └── UserRequest.php │ ├── Providers │ │ ├── AppServiceProvider.php │ │ ├── AuthServiceProvider.php │ │ ├── BroadcastServiceProvider.php │ │ ├── EventServiceProvider.php │ │ └── RouteServiceProvider.php │ ├── Rules │ │ └── CurrentPasswordCheckRule.php │ └── User.php ├── artisan ├── bootstrap │ ├── app.php │ └── cache │ ├── packages.php │ └── services.php ├── composer.json ├── composer.lock ├── config │ ├── app.php │ ├── auth.php │ ├── broadcasting.php │ ├── cache.php │ ├── database.php │ ├── filesystems.php │ ├── hashing.php │ ├── logging.php │ ├── mail.php │ ├── queue.php │ ├── services.php │ ├── session.php │ └── view.php ├── database │ ├── factories │ │ └── UserFactory.php │ ├── migrations │ │ ├── 2014_10_12_000000_create_users_table.php │ │ └── 2014_10_12_100000_create_password_resets_table.php │ └── seeds │ ├── DatabaseSeeder.php │ └── UsersTableSeeder.php ├── package.json ├── phpunit.xml ├── public │ ├── favicon.ico │ ├── index.php │ ├── light-bootstrap │ │ ├── css │ │ │ ├── bootstrap.min.css │ │ │ ├── demo.css │ │ │ └── light-bootstrap-dashboard.css │ │ ├── fonts │ │ │ ├── nucleo-icons.eot │ │ │ ├── nucleo-icons.svg │ │ │ ├── nucleo-icons.ttf │ │ │ ├── nucleo-icons.woff │ │ │ └── nucleo-icons.woff2 │ │ ├── img │ │ │ ├── apple-icon.png │ │ │ ├── bg5.jpg │ │ │ ├── default-avatar.png │ │ │ ├── faces │ │ │ │ ├── face-0.jpg │ │ │ │ ├── face-1.jpg │ │ │ │ ├── face-2.jpg │ │ │ │ ├── face-3.jpg │ │ │ │ ├── face-4.jpg │ │ │ │ ├── face-5.jpg │ │ │ │ ├── face-6.jpg │ │ │ │ ├── face-7.jpg │ │ │ │ └── tim_vector.jpe │ │ │ ├── favicon.ico │ │ │ ├── full-screen-image-2.jpg │ │ │ ├── full-screen-image-3.jpg │ │ │ ├── laravel.svg │ │ │ ├── loading-bubbles.svg │ │ │ ├── mask.png │ │ │ ├── new_logo.png │ │ │ ├── sidebar-1.jpg │ │ │ ├── sidebar-2.jpg │ │ │ ├── sidebar-3.jpg │ │ │ ├── sidebar-4.jpg │ │ │ ├── sidebar-5.jpg │ │ │ └── tim_80x80.png │ │ ├── js │ │ │ ├── core │ │ │ │ ├── bootstrap.min.js │ │ │ │ ├── jquery.3.2.1.min.js │ │ │ │ └── popper.min.js │ │ │ ├── demo.js │ │ │ ├── light-bootstrap-dashboard.js │ │ │ └── plugins │ │ │ ├── bootstrap-datepicker.js │ │ │ ├── bootstrap-notify.js │ │ │ ├── bootstrap-switch.js │ │ │ ├── chartist.min.js │ │ │ └── nouislider.min.js │ │ └── sass │ │ ├── lbd │ │ │ ├── _alerts.scss │ │ │ ├── _bootstrap-switch.scss │ │ │ ├── _buttons.scss │ │ │ ├── _cards.scss │ │ │ ├── _chartist.scss │ │ │ ├── _checkbox-radio-switch.scss │ │ │ ├── _dropdown.scss │ │ │ ├── _footers.scss │ │ │ ├── _inputs.scss │ │ │ ├── _misc.scss │ │ │ ├── mixins │ │ │ │ ├── _buttons.scss │ │ │ │ ├── _cards.scss │ │ │ │ ├── _chartist.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _inputs.scss │ │ │ │ ├── _labels.scss │ │ │ │ ├── _morphing-buttons.scss │ │ │ │ ├── _navbars.scss │ │ │ │ ├── _social-buttons.scss │ │ │ │ ├── _tabs.scss │ │ │ │ ├── _transparency.scss │ │ │ │ └── _vendor-prefixes.scss │ │ │ ├── _mixins.scss │ │ │ ├── _navbars.scss │ │ │ ├── _partial-nucleo-icons.scss │ │ │ ├── plugins │ │ │ │ ├── _animate.scss │ │ │ │ └── _datetime-picker.scss │ │ │ ├── _responsive.scss │ │ │ ├── _sidebar-and-main-panel.scss │ │ │ ├── _tables.scss │ │ │ ├── _typography.scss │ │ │ └── _variables.scss │ │ └── light-bootstrap-dashboard.scss │ └── robots.txt ├── resources │ ├── js │ │ ├── app.js │ │ ├── bootstrap.js │ │ └── components │ │ └── ExampleComponent.vue │ ├── lang │ │ └── en │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php │ ├── sass │ │ ├── app.scss │ │ └── _variables.scss │ └── views │ ├── alerts │ │ ├── errors.blade.php │ │ ├── error_self_update.blade.php │ │ ├── feedback.blade.php │ │ ├── migrations_check.blade.php │ │ └── success.blade.php │ ├── auth │ │ ├── login.blade.php │ │ ├── passwords │ │ │ ├── email.blade.php │ │ │ └── reset.blade.php │ │ ├── register.blade.php │ │ └── verify.blade.php │ ├── dashboard.blade.php │ ├── layouts │ │ ├── app.blade.php │ │ ├── footer │ │ │ └── nav.blade.php │ │ └── navbars │ │ ├── navbar.blade.php │ │ ├── navs │ │ │ ├── auth.blade.php │ │ │ └── guest.blade.php │ │ └── sidebar.blade.php │ ├── pages │ │ ├── icons.blade.php │ │ ├── maps.blade.php │ │ ├── notifications.blade.php │ │ ├── table.blade.php │ │ ├── typography.blade.php │ │ └── upgrade.blade.php │ ├── profile │ │ └── edit.blade.php │ ├── users │ │ └── index.blade.php │ └── welcome.blade.php ├── routes │ ├── api.php │ ├── channels.php │ ├── console.php │ └── web.php ├── server.php ├── storage │ ├── app │ │ └── public │ ├── framework │ │ ├── cache │ │ │ └── data │ │ │ ├── 1a │ │ │ │ └── 43 │ │ │ │ └── 1a43d4d8a10fba3a5857264007fd4f8494990eb9 │ │ │ └── f0 │ │ │ └── a7 │ │ │ └── f0a70bbe9f0a2fbd95a4dee84fb8f092e00acc29 │ │ ├── sessions │ │ │ └── bDASqge6ugwwnupCJQxc6UpeCzU5mWnlBf3OtHbV │ │ ├── testing │ │ └── views │ └── logs │ ├── laravel-2019-08-07.log │ ├── laravel-2019-08-08.log │ └── laravel-2019-08-09.log ├── tests │ ├── CreatesApplication.php │ ├── Feature │ │ └── ExampleTest.php │ ├── TestCase.php │ └── Unit │ └── ExampleTest.php
Short Description and Usage
Light Bootstrap Dashboard is an admin dashboard template designed to be beautiful and simple. It is built on top of Bootstrap 4 and it is fully responsive. It comes with a big collections of elements that will offer you multiple possibilities to create the app that best fits your needs. It can be used to create admin panels, project management systems, web applications backend, CMS or CRM.
The product represents a big suite of front-end developer tools that can help you jump start your project. We have created it thinking about things you actually need in a dashboard. Light Bootstrap Dashboard contains multiple handpicked and optimised plugins. Everything is designed to fit with one another. As you will be able to see, the dashboard you can access on Creative Tim is a customisation of this product.
It comes with 6 filter colors for the sidebar (black
,
azure
,
green
,
orange
,
red
,
purple
) and an option to have a background image.
Getting Started
The Light Bootstrap Dashboard is built on top of Bootstrap 4, so you can safely use it on your existing or new Bootstrap project. No line of code from Bootstrap 4 was changed, so you don't have to worry about undesired effects in your work.
We provide all the necessary CSS resources. So, to immediately change or get started with our design, include the "css/light-bootstrap-dashboard.css" in your HTML template. Your project will get the new look.
To jump start your project, you can use our start-up template where all the files are already included and ready to use. If you do however, want to start from scratch, you can see the file structure below. The core JavaScript is contained in "js/light-bootstrap-dashboard.js". Some functions are called from "js/demo.js" because they are presented only for demo purpose, you can check there how they are working and duplicate their effect on your projct. For the other files, you should add them if you use the specific element inside your page.
Restyled Components
Here is the list of Bootstrap 3 components that we restyled for the Light Bootstrap Dashboard:
- Buttons
- Dropdown
- Images
- Inputs
- Menu
- Navigation Menu
- Notifications
- Tables
- Textarea
- Typography
New Components
Besides giving the existing Bootstrap elements a new look, we added new ones, so that the interface and consistent and homogenous. We also imported more plugins to use depending on your needs.
Going through them, we added:
- Charts
- Checkboxes
- Footers
- Google Maps
- Maps
- Radio Buttons
- Sidebar
MIT License
Copyright (c) 2017 Creative Tim ( https://creative-tim.com/) 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.
Login
The user must autenthicate before using the management dashboard. The default credentials can be used:
- [email protected], with the password secret
For logging in, the user can press the Login button in the top navbar.
The App\Http\Controllers\LoginController
handles the user's authentication.
If you input the wrong data when trying to authenticate, there are validation rules to check if the email and password
are right and if the user has an account (see resources/views/auth/login.blade.php
).
Register
A new account can be created by a user with the help of the Create account button from the login page or the Register button from the top navabar. The user must provide the name, email and a password.
The App\Http\Controllers\RegisterController
handles the user's registration.
The data introduced by the user is validated because the account needs a valid email address and the password and password confirmation to match.
protected function validator(array $data) { return Validator::make($data, [ 'name' => ['required', 'string', 'max:255'], 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'], 'password' => ['required', 'string', 'min:8', 'confirmed'], ]); }Recover password
In the case of an user forgetting the credentials there is the possibility of resetting them. For resetting the password the user should use the Forgot password? button from the login page. The user must provide the email for the account and after that a link will be sent for resetting the password to the provided mail address.
TheApp\Http\Controllers\Auth\ForgotPasswordController
and the
App\Http\Controllers\Auth\ResetPasswordController
handles the recovery of the password.
Also, the resources/views/auth/email
and resources/views/auth/reset
take care of resetting the password.
Profile edit
You have the option to edit the current logged in user's profile information (name, email, profile picture) and password. To access this page, just click the "Examples/Profile" link in the left sidebar or add /profile in the URL.
The App\Http\Controllers\ProfileController
handles the update of the user information and password.
If you input the wrong data when editing the profile, don`t worry. Validation rules have been added to prevent this (see App\Http\Requests\ProfileRequest
). If you try to change
the password, you will see that additional validation rules have been added in App\Http\Requests\PasswordRequest
. You also have a custom validation rule that can be found in
App\Rules\CurrentPasswordCheckRule
.
Buttons
Colors
We worked over the original Bootstrap classes, choosing a different, slightly intenser color pallete:
<button class="btn btn-default">Default</button> <button class="btn btn-primary">Primary</button> <button class="btn btn-info">Info</button> <button class="btn btn-success">Success</button> <button class="btn btn-warning">Warning</button> <button class="btn btn-danger">Danger</button>
Sizes
Buttons come in all needed sizes:
<button class="btn btn-primary btn-lg">Large</button> <button class="btn btn-primary">Normal</button> <button class="btn btn-primary btn-sm">Small</button> <button class="btn btn-primary btn-xs">Extra Small</button>
Styles
We added extra classes that can help you better customise the look. You can use regular buttons, filled buttons, rounded corners buttons or plain link buttons. Let's see some examples:
<button class="btn btn-primary">Default</button> <button class="btn btn-primary btn-fill">Filled</button> <button class="btn btn-primary btn-round">Round</button> <button class="btn btn-primary btn-simple">Simple</button>
Button groups, toolbars, and disabled state all work like they are supposed to.
Checkboxes
To use the custom checkboxes, just take the code below and use it.
<div class="form-check"> <label class="form-check-label"> <input class="form-check-input" type="checkbox" value=""> <span class="form-check-sign"></span> Unchecked </label> </div> <div class="form-check"> <label class="form-check-label"> <input class="form-check-input" type="checkbox" value="" checked> <span class="form-check-sign"></span> Checked </label> </div> <div class="form-check disabled"> <label class="form-check-label"> <input class="form-check-input" type="checkbox" disabled> <span class="form-check-sign"></span> Disabled Unchecked </label> </div> <div class="form-check disabled"> <label class="form-check-label"> <input class="form-check-input" type="checkbox" disabled checked> <span class="form-check-sign"></span> Disabled Checked </label> </div>
Radio Buttons
To use the custom radio buttons, just take the code below and use it.
<div class="form-check form-check-radio"> <label class="form-check-label"> <input class="form-check-input" type="radio" name="exampleRadio" id="exampleRadios1" value="option1"> <span class="form-check-sign"></span> Radio is off </label> </div> <div class="form-check form-check-radio"> <label class="form-check-label"> <input class="form-check-input" type="radio" name="exampleRadio" id="exampleRadios2" value="option2" checked> <span class="form-check-sign"></span> Radio is on </label> </div> <div class="form-check form-check-radio disabled"> <label class="form-check-label"> <input class="form-check-input" type="radio" name="exampleRadio1" id="exampleRadios1" value="option1" disabled> <span class="form-check-sign"></span> Radio disabled is off </label> </div> <div class="form-check form-check-radio disabled"> <label class="form-check-label"> <input class="form-check-input" type="radio" name="exampleRadio1" id="exampleRadios2" value="option2" checked disabled> <span class="form-check-sign"></span> Radio disabled is on </label> </div>
Dropdown
We are very proud to present the dropdown, we added a subtle animation for this classic widget.
Here are an examples and the code:
<div class="col-md-3 dropdown"> <a href="#" class="btn dropdown-toggle" data-toggle="dropdown"> Regular <b class="caret"></b> </a> <ul class="dropdown-menu"> <button class="dropdown-item" type="button">Action</button> <button class="dropdown-item" type="button">Another action</button> <button class="dropdown-item" type="button">Something else here</button> <li class="divider"></li> <button class="dropdown-item" type="button">Separated link</button> <li class="divider"></li> <button class="dropdown-item" type="button">The last one</button> </ul> </div> </div>
Inputs
We restyled the Bootstrap input to give it a more flat, minimal look. You can use the classic look, different colors and states or input groups.
<div class="form-group"> <label>Company (disabled)</label> <input type="text" class="form-control" disabled placeholder="Company" value="Creative Code Inc."> </div> <div class="form-group"> <label>Username</label> <input type="text" class="form-control" placeholder="Username" value="michael23"> </div> <div class="form-group"> <label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" placeholder="Email"> </div>
Textarea
We added custom style for the textarea, so it looks similar to all other inputs.
<textarea class="form-control" placeholder="Here can be your nice text" rows="3"></textarea>
<nav class="navbar navbar-expand-lg"> <div class="container"> <a class="navbar-brand" href="#pablo"> Dashboard </a> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-bar burger-lines"></span> <span class="navbar-toggler-bar burger-lines"></span> <span class="navbar-toggler-bar burger-lines"></span> </button> <div class="collapse navbar-collapse justify-content-end"> <ul class="nav navbar-nav mr-auto"> <li class="nav-item"> <a href="#" class="nav-link" data-toggle="dropdown"> <i class="nc-icon nc-palette"></i> <span class="d-lg-none">Dashboard</span> </a> </li> <li class="dropdown nav-item"> <a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown"> <i class="nc-icon nc-planet"></i> <span class="notification">5</span> <span class="d-lg-none">Notification</span> </a> <ul class="dropdown-menu"> <a class="dropdown-item" href="#">Notification 1</a> <a class="dropdown-item" href="#">Notification 2</a> <a class="dropdown-item" href="#">Notification 3</a> <a class="dropdown-item" href="#">Notification 4</a> <a class="dropdown-item" href="#">Another notification</a> </ul> </li> <li class="nav-item"> <a href="#" class="nav-link"> <i class="nc-icon nc-zoom-split"></i> <span class="d-lg-block"> Search</span> </a> </li> </ul> <ul class="navbar-nav ml-auto"> <li class="nav-item"> <a class="nav-link" href="#pablo"> <span class="no-icon">Account</span> </a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="https://example.com" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span class="no-icon">Dropdown</span> </a> <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink"> <a class="dropdown-item" href="#">Action</a> <a class="dropdown-item" href="#">Another action</a> <a class="dropdown-item" href="#">Something</a> <a class="dropdown-item" href="#">Something else here</a> <div class="divider"></div> <a class="dropdown-item" href="#">Separated link</a> </div> </li> </ul> </div> </div> </nav>
Fixed Navbar: If you want to have a "Fixed Navbar" on Desktop and Mobile please add the class "navbar-fixed" on the tag "nav" and move the entire "nav" structure outside of the div with class "main-panel". Check the example implementation for more details:
Tables
All Boostrap classes for tables are supported and improved. Besides the simple and striped tables, we added tables that have actions and table with switches. We have also created the Big Boy table, that can be used for content management systems or in
the checkout process of an ecommerce. It offers extended functionality, like adding pictures, descriptions and actions.
You can see coded examples below:
Striped Table with Hover
ID | Name | Salary | Country | City |
---|---|---|---|---|
1 | Dakota Rice | $36,738 | Niger | Oud-Turnhout |
2 | Minerva Hooper | $23,789 | Curaçao | Sinaai-Waas |
3 | Sage Rodriguez | $56,142 | Netherlands | Baileux |
4 | Philip Chaney | $38,735 | Korea, South | Overland Park |
5 | Doris Greene | $63,542 | Malawi | Feldkirchen in Kärnten |
6 | Mason Porter | $78,615 | Chile | Gloucester |
<div class="table-responsive table-full-width"> <table class="table table-hover table-striped"> <thead> <th>ID</th> <th>Name</th> <th>Salary</th> <th>Country</th> <th>City</th> </thead> <tbody> <tr> <td>1</td> <td>Dakota Rice</td> <td>$36,738</td> <td>Niger</td> <td>Oud-Turnhout</td> </tr> <tr> <td>2</td> <td>Minerva Hooper</td> <td>$23,789</td> <td>Curaçao</td> <td>Sinaai-Waas</td> </tr> <tr> <td>3</td> <td>Sage Rodriguez</td> <td>$56,142</td> <td>Netherlands</td> <td>Baileux</td> </tr> <tr> <td>4</td> <td>Philip Chaney</td> <td>$38,735</td> <td>Korea, South</td> <td>Overland Park</td> </tr> <tr> <td>5</td> <td>Doris Greene</td> <td>$63,542</td> <td>Malawi</td> <td>Feldkirchen in Kärnten</td> </tr> <tr> <td>6</td> <td>Mason Porter</td> <td>$78,615</td> <td>Chile</td> <td>Gloucester</td> </tr> </tbody> </table> </div>
Table on Plain Background
ID | Name | Salary | Country | City |
---|---|---|---|---|
1 | Dakota Rice | $36,738 | Niger | Oud-Turnhout |
2 | Minerva Hooper | $23,789 | Curaçao | Sinaai-Waas |
3 | Sage Rodriguez | $56,142 | Netherlands | Baileux |
4 | Philip Chaney | $38,735 | Korea, South | Overland Park |
5 | Doris Greene | $63,542 | Malawi | Feldkirchen in Kärnten |
6 | Mason Porter | $78,615 | Chile | Gloucester |
<div class="table-responsive table-full-width"> <table class="table table-hover"> <thead> <th>ID</th> <th>Name</th> <th>Salary</th> <th>Country</th> <th>City</th> </thead> <tbody> <tr> <td>1</td> <td>Dakota Rice</td> <td>$36,738</td> <td>Niger</td> <td>Oud-Turnhout</td> </tr> <tr> <td>2</td> <td>Minerva Hooper</td> <td>$23,789</td> <td>Curaçao</td> <td>Sinaai-Waas</td> </tr> <tr> <td>3</td> <td>Sage Rodriguez</td> <td>$56,142</td> <td>Netherlands</td> <td>Baileux</td> </tr> <tr> <td>4</td> <td>Philip Chaney</td> <td>$38,735</td> <td>Korea, South</td> <td>Overland Park</td> </tr> <tr> <td>5</td> <td>Doris Greene</td> <td>$63,542</td> <td>Malawi</td> <td>Feldkirchen in Kärnten</td> </tr> <tr> <td>6</td> <td>Mason Porter</td> <td>$78,615</td> <td>Chile</td> <td>Gloucester</td> </tr> </tbody> </table> </div>
Notifications
The new Light Bootstrap Dashboard notification are looking fresh and clean. They go great with the navbar. They come with 4 classes, each for a different color:
.alert-info
,
.alert-success
,
.alert-warning
,
.alert-danger
.
If you want to use add special animations for them, we integrated a third party plugin called Bootstrap Notify. To see the original repository for it, check it out
here. Out friend Robert McIntosh did a wonderful job. If you want to see a coded example, you can see it below.
<!-- button to trigger the action --> <button class="btn btn-default" onclick="showNotification('top','right')">Top Right Notification</button> <!-- javascript --> function showNotification(from, align){ color = Math.floor((Math.random() * 4) + 1); $.notify({ icon: "pe-7s-gift", message: "Welcome to <b>Light Bootstrap Dashboard</b> - a beautiful freebie for every web developer." },{ type: type[color], timer: 4000, placement: { from: from, align: align } }); }
Sidebar
We have created the class ".sidebar" for navigation. It contains the company title, a photo of the logged in user with options inside a dropdown, and a list of all the pages. Every element in the list of pages can have a sublist of pages.
If you want the sidebar to have the background as a solid color, you can use the
data-color
attribute and add the color you like:
data-color="blue | azure | green | orange | red | purple"
.
If you want the background to have a picture, you ca activate it like this: data-image="../../light-bootstrap/img/sidebar-5.jpg".
You can see the fully-coded example for the sidebar inside the dashboard below, which has a background image and the color purple.
<div class="sidebar" data-color="purple" data-image="{{ asset('light-bootstrap/img/sidebar-5.jpg') }"> <div class="sidebar-wrapper"> <div class="logo"> <a href="https://www.creative-tim.com" class="simple-text"> Creative Tim </a> </div> <ul class="nav"> <li class="active"> <a href="dashboard.html"> <i class="pe-7s-graph"></i> <p>Dashboard</p> </a> </li> <li> <a href="user.html"> <i class="pe-7s-user"></i> <p>User Profile</p> </a> </li> <li> <a href="table.html"> <i class="pe-7s-note2"></i> <p>Table List</p> </a> </li> <li> <a href="typography.html"> <i class="pe-7s-news-paper"></i> <p>Typography</p> </a> </li> <li> <a href="icons.html"> <i class="pe-7s-science"></i> <p>Icons</p> </a> </li> <li> <a href="maps.html"> <i class="pe-7s-map-marker"></i> <p>Maps</p> </a> </li> <li> <a href="notifications.html"> <i class="pe-7s-bell"></i> <p>Notifications</p> </a> </li> <li class="active-pro"> <a href="upgrade.html"> <i class="pe-7s-rocket"></i> <p>Upgrade to PRO</p> </a> </li> </ul> </div> </div>
Charts
For the implementation of graphic charts, we used the Chartist plugin and added our custom styles. The plugin is free to download and use here. Gion Kunz is the guy behind the project; he did an awesome job and we recommend using it his stuff. Besides all the great customisation that you have using it, it is also fully responsive. We changed the colors, background and typography.
Line Chart
We recommend using this chart when you have easy to understand information, that can be conveyed in a single line throughout a continuous period.
24 Hours Performance
<!-- graphic area in html --> <h4> <br><small>24 Hours Performance</small></h4> <div id="chartHours" class="ct-chart "></div> <!-- javascript --> var dataSales = { labels: ['9:00AM', '12:00AM', '3:00PM', '6:00PM', '9:00PM', '12:00PM', '3:00AM', '6:00AM'], series: [ [287, 385, 490, 492, 554, 586, 698, 695, 752, 788, 846, 944], [67, 152, 143, 240, 287, 335, 435, 437, 539, 542, 544, 647], [23, 113, 67, 108, 190, 239, 307, 308, 439, 410, 410, 509] ] }; var optionsSales = { lineSmooth: false, low: 0, high: 800, showArea: true, height: "245px", axisX: { showGrid: false, }, lineSmooth: Chartist.Interpolation.simple({ divisor: 3 }), showLine: false, showPoint: false, }; var responsiveSales = [ ['screen and (max-width: 640px)', { axisX: { labelInterpolationFnc: function (value) { return value[0]; } } }] ]; Chartist.Line('#chartHours', dataSales, optionsSales, responsiveSales);
Pie Chart
A pie chart is the easiest way to represent an information. Use it whenever you want to show something understandable at once.
Public Preferences
Legend
Apple Samsung BlackBerry Windows Phone<!-- graphic area in html --> <h4><small>Public Preferences</small></h4> <div class="row margin-top"> <div class="col-md-10 col-md-offset-1"> <div id="chartPreferences" class="ct-chart "></div> </div> </div> <div class="row"> <div class="col-md-10 col-md-offset-1"> <h6>Legend</h6> <i class="fa fa-circle text-info"></i> Apple <i class="fa fa-circle text-success"></i> Samsung <i class="fa fa-circle text-warning"></i> BlackBerry <i class="fa fa-circle text-danger"></i> Windows Phone </div> </div> <!-- javascript --> var dataPreferences = { series: [ [25, 30, 20, 25] ] }; var optionsPreferences = { donut: true, donutWidth: 40, startAngle: 0, total: 100, showLabel: false, axisX: { showGrid: false } }; Chartist.Pie('#chartPreferences', dataPreferences, optionsPreferences); Chartist.Pie('#chartPreferences', { labels: ['62%','32%','6%'], series: [62, 32, 6] });
Multiple Bars Chart
Go for multiple bars charts if you want to show two indicators side by side.
Activity
Multiple Bars Chart
Legend
Views Reads<!-- graphic area in html --> <h4>Activity <br><small>Multiple Bars Chart</small></h4> <div id="chartActivity" class="ct-chart "></div> <h6>Legend</h6> <span class="label label-info">Views</span> <span class="label label-success">Reads</span> <!-- javascript --> var data = { labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], series: [ [542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895], [412, 243, 280, 580, 453, 353, 300, 364, 368, 410, 636, 695] ] }; var options = { seriesBarDistance: 10, axisX: { showGrid: false }, height: "245px" }; var responsiveOptions = [ ['screen and (max-width: 640px)', { seriesBarDistance: 5, axisX: { labelInterpolationFnc: function (value) { return value[0]; } } }] ]; Chartist.Bar('#chartActivity', data, options, responsiveOptions);
How to setup Google API Keys
-
Go to https://developers.google.com/maps/documentation/javascript/get-api-key
-
Scroll to the “Get an API key” Title and press the “Get a Key” Button
-
Choose a name for your project then press on Create and Enable API
-
Get the Key and place it in your project where is this script:
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
How to add Sharing Buttons by ShareThis
Our partners from ShareThis provide you some awesome and free sharing buttons for your website.
-
Go to ShareThis.
-
Choose
Inline Buttons
orSticky Buttons
-
Customize the
alignment
,labels
,colors
. -
Register and get the code for your website.
-
Let your audience share your website and get extra exposure!
Changing Colors (SASS)
You can change the default colors via variables from SASS:
- You can find the colors in
light-bootstrap/sass/lbd/_variables.scss
starting with line 30 where is the primary color set:$primary-color: #3472F7 !default;
. - Add the SASS folder from
light-bootstrap/sass/
to a new project inside Koala Compiler and find the file light-bootstrap-kit.scss, it will be the one in Green. - Right click on that file and set the output path, it must be in
light-bootstrap/css/
so anything that you compile will overwrite the original light-bootstrap-dashboard.css - Press on compile and everything will be done automatically.