"Dashboard Guages"
Bootstrap 3.1.0 Snippet by debjit

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html> <head> <link href="http://netdna.bootstrapcdn.com/bootswatch/3.0.3/bootstrap/bootstrap.min.css" rel="stylesheet" title="theme"> <style> @import url("//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"); </style> </head> <body> <div class="container" style="width:990px;"> <nav class="navbar navbar-basic navbar-outline" role="navigation"> <div class="navbar-btn navbar-right"> <div class="dropdown"> <button class="btn btn-default btn-outline dropdown-toggle" data-toggle="dropdown"> <span class="glyphicon glyphicon-cog"></span> <span class="label-icon">Preferences</span> </button> <ul class="dropdown-menu" style="width:300px; padding:0px;"> <li> <form class="form-horizontal" id="preferences" action="" method="post" accept-charset="utf-8"> <div class="panel panel-default" id="preferences" style="margin:0px;"> <div class="panel-heading"> <span class="glyphicon glyphicon-wrench"></span> <span class="panel-label">User Preferences</span> </div> <div class="panel-body"> <div class="form-group"> <label for="theme_name"class="col-lg-6 control-label" style="font-color:#000000"> Theme </label> <div class="col-lg-6"> <select class="form-control" id="theme_name" name="theme_name"> <option value="amelia"> Amelia </option> <option value="bootstrap"> Default </option> <option value="cerulean"> Cerulean </option> <option value="cosmo"> Cosmo </option> <option value="cyborg"> Cyborg </option> <option selected value="flatly"> Flatly </option> <option value="journal"> Journal </option> <option value="readable"> Readable </option> <option value="simplex"> Simplex </option> <option value="slate"> Slate </option> <option value="spacelab"> Spacelab </option> <option value="united"> United </option> <option value="yeti"> Yeti </option> <option value="whiteplum"> WhitePlum </option> </select> </div> </div> <div class="panel-footer"> <div class="form-group"> <div class="col-lg-9 col-lg-offset-3"> <button type="submit" class="btn btn-primary" style="width:80px;">Update</button> <button type="submit" class="btn btn-default" style="width:80px;">Reset</button> </div> </div> </div> </div> </form> </li> </ul> </div> </div> </nav> <!-- /.navbar-collapse --> </div> <div class="container" style="width:990px;"> <div class="panel panel-primary"> <div class="panel-heading"> <h3 class="panel-title">Organization Information</h3> </div> <div class="panel-body"> <div class="col-lg-2 dash-widget"> <div class="label-primary" style="padding: 5px; border-radius: 6px;"> <button class="btn btn-primary btn-lg btn-block disabled" role="button" style="padding: 2px;"> <div class="fa fa-clock-o fa-3x"></div> <div class="icon-label">Time Zone</div> </button> <button class="btn btn-inverse btn-block" style="height: 40px;"> Eastern </button> </div> </div> <div class="col-lg-2 dash-widget"> <div class="label-primary" style="padding: 5px; border-radius: 6px;"> <button class="btn btn-primary btn-lg btn-block disabled" role="button" style="padding: 2px;"> <div class="fa fa-desktop fa-3x"></div> <div class="icon-label"> Platform </div></button> <button class="btn btn-inverse btn-block" style="height: 40px;">TIX2</button> </div> </div> <div class="col-lg-2 dash-widget"> <div class="label-primary" style="padding: 5px; border-radius: 6px;"> <button class="btn btn-primary btn-lg btn-block disabled" role="button" style="padding: 2px;"> <div class="fa fa-shopping-cart fa-3x"></div> <div class="icon-label"> Gateway </div></button> <button class="btn btn-inverse btn-block" style="height: 40px;">Eastern</button> </div> </div> <div class="col-lg-2 dash-widget"> <div class="label-primary" style="padding: 5px; border-radius: 6px;"> <button class="btn btn-primary btn-lg btn-block disabled" role="button" style="padding: 2px;"> <div class="fa fa-print fa-3x"></div> <div class="icon-label"> Fullfilment </div></button> <button class="btn btn-inverse btn-block" style="height: 40px;">Yes</button> </div> </div> <div class="col-lg-2 dash-widget"> <div class="label-primary" style="padding: 5px; border-radius: 6px;"> <button class="btn btn-primary btn-lg btn-block disabled" role="button" style="padding: 2px;"> <div class="fa fa-suitcase fa-3x"></div> <div class="icon-label"> Sales Rep </div></button> <button class="btn btn-inverse btn-block" style="height: 40px;">Name Name</button> </div> </div> <div class="col-lg-2 dash-widget"> <div class="label-primary" style="padding: 5px; border-radius: 6px;"> <button class="btn btn-primary btn-lg btn-block disabled" role="button" style="padding: 2px;"> <div class="fa fa-user fa-3x"></div> <div class="icon-label"> Contact </div></button> <button class="btn btn-inverse btn-block" style="height: 40px;">Name Name</button> </div> </div> </div> </div> </body> </html>
* { -webkit-transition: all 1s ease-in-out; -moz-transition: all 1s ease-in-out; -ms-transition: all 1s ease-in-out; transition: all 1s ease-in-out; } .navbar-basic.navbar-outline { background-color: transparent; border-color: rgba(94, 94, 94,.5); border-width:1px; border-radius: 6px; } .btn-outline { background-color: transparent; border-color: rgba(94, 94, 94,.5); color: rgba(94, 94, 94,.8); border-width:1px; } .navbar-btn .btn-outline:hover { background-color: transparent; border-color: rgb(94, 94, 94); color: rgb(94, 94, 94); border-width:1px; transition: all .5s; } .navbar-btn .form-control, input[type="text"] { background-color: #ffffff; border-color: rgba(94, 94, 94,.5); color: rgba(94, 94, 94,.8); border-width: 1px; } .form-control:hover, .form-control:focus, .form-control:active, .form-control.active, .form-control.focus, input[type="text"]:hover, input[type="text"]:focus, input[type="text"]:active, input[type="text"].active input[type="text"]:focus, input[type="text"].focus { background-color: #ffffff; border-color: rgb(94, 94, 94); color: rgba(94, 94, 94); border-width: 1px; transition: all .5s; } .navbar-left .btn-outline { margin-left:10px; } .navbar-right .btn-outline { margin-right:10px; } .widthOrg input[type="text"] { width: 220px; } .widthUser input[type="text"] { width: 271px; } .widthSearch input[type="text"] { width: 324px; } .navbar-default.navbar-outline { background-color: transparent; color: inherit; transition: all .5s; } .btn-primary.btn-outline { color: #428bca; } .btn-success.btn-outline { color: #5cb85c; } .btn-info.btn-outline { color: #5bc0de; } .btn-warning.btn-outline { color: #f0ad4e; } .btn-danger.btn-outline { color: #d9534f; } .btn-primary.btn-outline:hover, .btn-success.btn-outline:hover, .btn-info.btn-outline:hover, .btn-warning.btn-outline:hover, .btn-danger.btn-outline:hover { color: #fff; } .btn-outline { background-color: transparent; color: inherit; transition: all .5s; } .slate .navbar-btn .btn-outline { background-color: rgba(0, 0, 0, 0); border-color: rgba(94, 94, 94, 0.5); border-width: 1px; color: white; } .slate dash-widget .btn disabled { background-color: rgba(0, 0, 0, 0); border-color: rgba(94, 94, 94, 0.5); border-width: 1px; color: white; }
$(function(){ $(".input-group-btn .dropdown-menu li a").click(function(){ var selText = $(this).html(); //working version - for single button // //$('.btn:first-child').html(selText+'<span class="caret"></span>'); //working version - for multiple buttons // $(this).parents('.input-group-btn').find('.dropdown-toggle').html(selText+'<span class="caret"></span>'); }); }); function save_settings() { localStorage.setItem("background_color" , $( "#background_color" ).val()); localStorage.setItem("text_color", $( "#text_color" ).val()); localStorage.setItem("text_size", $( "#text_size" ).val()); localStorage.setItem("theme_name", $( "#theme_name" ).val()); localStorage.setItem("icon_label",$('input[name="icon_label"]:checked').val()); apply_preferences_to_page(); } function load_settings() { var background_color = localStorage.getItem( "background_color" ); var text_color = localStorage.getItem( "text_color" ); var text_size = localStorage.getItem( "text_size" ); var theme_name = localStorage.getItem( "theme_name" ); var icon_label = localStorage.getItem( "icon_label" ); $("#background_color").val(background_color); $("#text_color").val(text_color); $("#text_size").val(text_size); $("#theme_name").val(theme_name); $("#icon_label").val(icon_label); apply_preferences_to_page(); } function apply_preferences_to_page() { var background_color = localStorage.getItem( "background_color"); var text_color = localStorage.getItem("text_color"); var text_size = localStorage.getItem("text_size"); var theme_name = localStorage.getItem("theme_name"); var stored_icon_label = localStorage.getItem("icon_label"); $("body").css("backgroundColor",background_color); $("body").css("color",$("#text_color").val()); $("body").css("fontSize",$("#text_size").val() + "px"); $("body").attr("class",theme_name); $('link[title="theme"]').attr('href','http://netdna.bootstrapcdn.com/bootswatch/3.0.3/'+theme_name+'/bootstrap.min.css'); $(".current-theme").html(theme_name); $(".label-filter").html(theme_name); if(stored_icon_label=="Yes") { $(".icon_label").show(); } if(stored_icon_label=="No") { $(".icon_label").hide(); } display_preferences(); } function display_preferences() { //the variable that will hold the results var dataLog = ""; var i = 0; //how many items are in the database starting with zero var logLength = localStorage.length-1; dataLog = "<thead><tr class='active'><th>Item Name</th><th>Item Data</th></tr></thead><tbody>" //now we are going to loop through each item in the database for (i = 0; i <= logLength; i++) { //lets setup some variables for the key and values var itemKey = localStorage.key(i); var itemData = localStorage.getItem(itemKey); //now that we have the item, lets add it to the table dataLog += '<tr><td>'+itemKey+'</td><td>'+itemData+'</td></tr>'; } //if there were no items in the database if (dataLog == "") dataLog = '<li class="empty">Log Currently Empty</li>'; //update the ul with the list items $("#theLog").html(dataLog); } $(function() { load_settings(); $('form#preferences').submit(function(event){ event.preventDefault(); save_settings(); }); }); </script>

Related: See More


Questions / Comments: