back to bs2

This commit is contained in:
mdipierro
2014-03-02 17:17:21 -06:00
parent 379db55111
commit 29042f08a1
23 changed files with 637 additions and 951 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,291 +0,0 @@
/*!
* part of the package to convert web2py elements to bootstrap3 theme
* Developed by Paolo Caruccio ( paolo.caruccio66@gmail.com )
* Released under MIT license
* version 1 rev.201402261600
*
* Supported version of bootstrap framework: 3.0.2+
* The full package includes:
* - bootstrap3.py python module
* - this css file
* - web2py-bootstrap3.js
* - example of layout.html
*/
/*!
* rules overriding web2py.css
* remove if web2py.css is not used
*/
div.flash.alert{
background-image: none;
border-radius: 4px;
-o-border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-width: 1px;
color: rgb(51, 51, 51);
font-weight: normal;
margin: 0 0 20px 0;
min-width: 28px;
opacity: 1;
padding: 15px 35px 15px 15px;
vertical-align: baseline;
right: auto; }
div.flash.alert:hover {
opacity: 1; }
.ie-lte8 div.flash {
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); }
.ie-lte8 div.flash:hover {
filter:alpha(opacity=100); }
ul.navbar-nav li {
margin-bottom: 0; }
ul.list-group, .bs3-form ul , ul.nav-tabs, ul.nav-pills {
margin-left: 0; }
p.lead {
text-align: inherit; }
.bs3-form label {
white-space: normal; }
.bs3-form.form-inline [type="text"], [type="password"], select {
margin-right: 0; }
.bs3-form div.error {
display: none;
width: auto;
background: transparent;
border: none;
color: #a94442;
padding: 0;
background-image: none; }
/*!
* bootstrap3 adapters
* essential rules
*/
/* flash messages */
div.flash.alert {
display: none;
position: fixed;
top: 70px;
right: 75px;
cursor: pointer;
z-index: 1000000;
background-color: #f9edbe;
border-color: #f0c36d; }
div.flash.alert.centered {
right: auto; }
div.flash.alert.leftside {
right: auto;
left: 75px; }
div.flash.alert #closeflash {
display: inline-block;
position: relative;
top: -2px;
right: -21px;
color: inherit;
cursor: pointer;
opacity: 0.5;
float: right;
font-size: 21px;
font-weight: bold;
line-height: 1;
text-shadow: 0 1px 0 #ffffff;
margin: 0;
padding: 0; }
/* buttons */
.bs3-form-btn {
margin-top: 3px;
margin-bottom: 3px; }
/*image preview in update forms*/
.w2p-uploaded-file .btn-group {
vertical-align: top;
margin-top: 0; }
#file-reset-btn {
vertical-align: top; }
.w2p-uploaded-file input[type="file"] {
display:inline-block;
padding-top: 7px; }
.w2p-file-preview img {
max-width: 150px; }
.w2p-file-preview:hover img {
background-color: #ebebeb;
border-color: #adadad; }
.w2p-file-preview span {
min-width: 150px;
max-width: 150px;
display: inline-block;
line-height: 40px;
min-height: 40px; }
#no-file {
display: inline-block;
background-color: #eee;
vertical-align: middle;
text-align: center;
border-radius: 4px;
min-width: 150px;
max-width: 150px;
line-height: 43px;
min-height: 43px; }
/* form-inline */
.form-inline .form-group {
margin-right: 4px; }
/* list widget */
.w2p_list li {
margin-bottom: 6px; }
.w2p_list li input {
display: inline-block;
width: 59%;
margin-right: 4px; }
/* autocomplete widget */
div[id^=_autocomplete_] {
margin-top: -10px;
z-index: 1; }
select.autocomplete {
display: block;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-color: #428bca;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
-webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; }
/* nav-tabs */
.nav-tabs {
margin-bottom: 15px; }
/* dropdown multilevels in menu*/
/* fix issue when screen height is shorter than bs3 default */
.navbar-collapse.short-screen {
max-height: 200px !important; }
.dropdown-submenu>a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
margin-top: 5px;
margin-right: -10px;
border-style: solid;
/* right-arrow */
border-color: transparent #cccccc;
border-width: 4px 0 4px 4px; }
@media (min-width: 768px) {
/* animation */
.navbar-nav .dropdown-menu {
top: -9999px;
display: block;
opacity: 0;
-webkit-transition: opacity .4s ease-in-out; }
.dropdown-submenu {
position: relative; }
.dropdown-submenu>.dropdown-menu {
position: absolute;
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
border-radius: 0 4px 4px 4px;
/* animation */
left: -9999px;
opacity: 0;
display: block;
-webkit-transition: opacity .4s ease-in-out; }
.navbar ul.nav li[data-w2pmenulevel="l0"]:hover >ul.dropdown-menu {
display: block;
/* animation */
top: 100%;
opacity: 1; }
.dropdown-submenu:hover>.dropdown-menu {
display: block;
/* animation */
left: 100%;
opacity: 1; }
.dropdown-submenu:hover>a,
.dropdown-submenu:focus>a {
color: #fff;
text-decoration: none;
background-color: #357ebd; }
.navbar-inverse .navbar-nav>li>a:hover,
.navbar-inverse .navbar-nav>li>a:focus,
.navbar-inverse .navbar-nav>li:hover>a {
color: #fff;
background-color: black; }
.dropdown-submenu>a:hover:after,
.dropdown-submenu:hover>a:after {
/* left-arrow */
border-color: transparent #fff;
border-width: 4px 4px 4px 0; }
}
@media (max-width: 767px){
.dropdown-menu {
width: 100%;
display: none; }
.dropdown-submenu>.dropdown-menu {
position: static;
float: none;
display: none;
border: none;
margin: 0;
padding: 0;
box-shadow: none;
text-indent: 8px; }
.dropdown-submenu>.dropdown-menu.open {
display: block;
height: 100%; }
.dropdown-submenu>a:after {
/* down-arrow */
border-color: #cccccc transparent;
border-width: 4px 4px 0px 4px; }
.dropdown-submenu>a:hover:after {
border-color: #ffffff transparent; }
.dropdown-submenu>a.active {
font-weight: 700; }
.dropdown-submenu>a.active:after {
/* up-arrow */
border-color: #ffffff transparent;
border-width: 0px 4px 4px 4px; }
}
/*!
* application customization
* add custom rules
*/
body {
padding-top: 70px; }
/* web2py logo */
#web2py-logo {
color: #c6cecc; }
#web2py-logo b {
display: inline-block;
margin-top: -1px; }
#web2py-logo b>span {
font-size: 22px;
color: white; }
#web2py-logo:hover {
color: white; }
/*footer*/
#footer>div.row {
padding-top: 9px;
margin: 20px 0 40px 0;
border-top: 1px solid #eee; }
#footer p {
margin-left: -15px;
margin-right: -15px; }
.dropdown .highlighted {
color: #428bca;
}
@@ -0,0 +1,264 @@
/*=============================================================
CUSTOM RULES
==============================================================*/
body{height:auto;} /* to avoid vertical scroll bar */
a{}
a:visited{}
a:hover{}
a:focus{}
a:active{}
h1{}
h2{}
h3{}
h4{}
h5{}
h6{}
div.flash.flash-center{left:25%;right:25%;}
div.flash.flash-top,div.flash.flash-top:hover{
position:relative;
display:block;
margin:0;
padding:1em;
top:0;
left:0;
width:100%;
text-align:center;
text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);
color:#865100;
background:#feea9a;
border:1px solid;
border-top:0px;
border-left:0px;
border-right:0px;
border-radius:0;
opacity:1;
}
#header{margin-top:60px;}
.mastheader h1 {
margin-bottom:9px;
font-size:81px;
font-weight:bold;
letter-spacing:-1px;
line-height:1;
font-size:54px;
}
.mastheader small {
font-size:20px;
font-weight:300;
}
/* auth navbar - primitive style */
.auth_navbar,.auth_navbar a{color:inherit;}
.navbar-inner {-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}
.ie-lte7 .auth_navbar,.auth_navbar a{color:expression(this.parentNode.currentStyle['color']); /* ie7 doesn't support inherit */}
.auth_navbar a{white-space:nowrap;} /* to avoid the nav split on more lines */
.auth_navbar a:hover{color:white;text-decoration:none;}
ul#navbar>.auth_navbar{
display:inline-block;
padding:5px;
}
/* form errors message box customization */
div.error_wrapper{margin-bottom:9px;}
div.error_wrapper .error{
border-radius: 4px;
-o-border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
/* below rules are only for formstyle = bootstrap
trying to make errors look like bootstrap ones */
div.controls .error_wrapper{
display:inline-block;
margin-bottom:0;
vertical-align:middle;
}
div.controls .error{
min-width:5px;
background:inherit;
color:#B94A48;
border:none;
padding:0;
margin:0;
/*display:inline;*/ /* uncommenting this, the animation effect is lost */
}
div.controls .help-inline{color:#3A87AD;}
div.controls .error_wrapper +.help-inline {margin-left:-99999px;}
div.controls select +.error_wrapper {margin-left:5px;}
.ie-lte7 div.error{color:#fff;}
/* beautify brand */
.navbar {margin-bottom:0}
.navbar-inverse .brand{color:#c6cecc;}
.navbar-inverse .brand b{display:inline-block;margin-top:-1px;}
.navbar-inverse .brand b>span{font-size:22px;color:white}
.navbar-inverse .brand:hover b>span{color:white}
/* beautify web2py link in navbar */
span.highlighted{color:#d8d800;}
.open span.highlighted{color:#ffff00;}
/*=============================================================
OVERRIDING WEB2PY.CSS RULES
==============================================================*/
/* reset to default */
a{white-space:normal;}
li{margin-bottom:0;}
textarea,button{display:block;}
/*reset ul padding */
ul#navbar{padding:0;}
/* label aligned to related input */
td.w2p_fl,td.w2p_fc {padding:0;}
#web2py_user_form td{vertical-align:middle;}
/*=============================================================
OVERRIDING BOOTSTRAP.CSS RULES
==============================================================*/
/* because web2py handles this via js */
textarea { width:90%}
.hidden{visibility:visible;}
/* right folder for bootstrap black images/icons */
[class^="icon-"],[class*=" icon-"]{
background-image:url("../images/glyphicons-halflings.png")
}
/* right folder for bootstrap white images/icons */
.icon-white,
.nav-tabs > .active > a > [class^="icon-"],
.nav-tabs > .active > a > [class*=" icon-"],
.nav-pills > .active > a > [class^="icon-"],
.nav-pills > .active > a > [class*=" icon-"],
.nav-list > .active > a > [class^="icon-"],
.nav-list > .active > a > [class*=" icon-"],
.navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"] {
background-image:url("../images/glyphicons-halflings-white.png");
}
/* bootstrap has a label as input's wrapper while web2py has a div */
div>input[type="radio"],div>input[type="checkbox"]{margin:0;}
/* bootstrap has button instead of input */
input[type="button"], input[type="submit"]{margin-right:8px;}
/* web2py radio widget adjustment */
.generic-widget input[type='radio'] {margin:-1px 0 0 0; vertical-align: middle;}
.generic-widget input[type='radio'] + label {display:inline-block; margin:0 0 0 6px; vertical-align: middle;}
/*=============================================================
RULES FOR SOLVING CONFLICTS BETWEEN WEB2PY.CSS AND BOOTSTRAP.CSS
==============================================================*/
/*when formstyle=table3cols*/
tr#auth_user_remember__row>td.w2p_fw>div{padding-bottom:8px;}
td.w2p_fw div>label{vertical-align:middle;}
td.w2p_fc {padding-bottom:5px;}
/*when formstyle=divs*/
div#auth_user_remember__row{margin-top:4px;}
div#auth_user_remember__row>.w2p_fl{display:none;}
div#auth_user_remember__row>.w2p_fw{min-height:39px;}
div.w2p_fw,div.w2p_fc{
display:inline-block;
vertical-align:middle;
margin-bottom:0;
}
div.w2p_fc{
padding-left:5px;
margin-top:-8px;
}
/*when formstyle=ul*/
form>ul{
list-style:none;
margin:0;
}
li#auth_user_remember__row{margin-top:4px;}
li#auth_user_remember__row>.w2p_fl{display:none;}
li#auth_user_remember__row>.w2p_fw{min-height:39px;}
/*when formstyle=bootstrap*/
#auth_user_remember__row label.checkbox{display:block;}
span.inline-help{display:inline-block;}
input[type="text"].input-xlarge,input[type="password"].input-xlarge{width:270px;}
/*when recaptcha is used*/
#recaptcha{min-height:30px;display:inline-block;margin-bottom:0;line-height:30px;vertical-align:middle;}
td>#recaptcha{margin-bottom:6px;}
div>#recaptcha{margin-bottom:9px;}
div.control-group.error{
width:auto;
background:transparent;
border:0;
color:inherit;
padding:0;
background-repeat:repeat;
}
/*=============================================================
OTHER RULES
==============================================================*/
/* Massimo Di Pierro fixed alignment in forms with list:string */
form table tr{margin-bottom:9px;}
td.w2p_fw ul{margin-left:0px;}
/* web2py_console in grid and smartgrid */
.hidden{visibility:visible;}
.web2py_console input{
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
.web2py_console input[type="submit"],
.web2py_console input[type="button"],
.web2py_console button{
padding-top:4px;
padding-bottom:4px;
margin:3px 0 0 2px;
}
.web2py_console a,
.web2py_console select,
.web2py_console input
{
margin:3px 0 0 2px;
}
.web2py_grid form table{width:auto;}
/* auth_user_remember checkbox extrapadding in IE fix */
.ie-lte9 input#auth_user_remember.checkbox {padding-left:0;}
div.controls .error {
width: auto;
}
/*=============================================================
MEDIA QUERIES
==============================================================*/
@media only screen and (max-width:979px){
body{padding-top:0px;}
#navbar{/*top:5px;*/}
div.flash{right:5px;}
.dropdown-menu ul{visibility:visible;}
}
@media only screen and (max-width:479px){
body{
padding-left:10px;
padding-right:10px;
}
.navbar-fixed-top,.navbar-fixed-bottom {
margin-left:-10px;
margin-right:-10px;
}
input[type="text"],input[type="password"],select{
width:95%;
}
}
@media (max-width: 767px) {
.navbar {
margin-right: -20px;
margin-left: -20px;
}
}
@@ -0,0 +1,122 @@
/*=============================================================
BOOTSTRAP DROPDOWN MENU
==============================================================*/
.dropdown-menu ul{
left:100%;
position:absolute;
top:0;
visibility:hidden;
margin-top:-1px;
}
.dropdown-menu li:hover ul{visibility:visible;}
.navbar .dropdown-menu ul:before{
border-bottom:7px solid transparent;
border-left:none;
border-right:7px solid rgba(0, 0, 0, 0.2);
border-top:7px solid transparent;
left:-7px;
top:5px;
}
.nav > li.dropdown > a:after {
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid #000000;
content: "";
display: inline-block;
height: 0;
opacity: 0.7;
vertical-align: top;
width: 0;
margin-left: 2px;
margin-top: 8px;
border-bottom-color: #FFFFFF;
border-top-color: #FFFFFF;
}
.dropdown-menu span{display:inline-block;}
ul.dropdown-menu li.dropdown > a:after {
border-left: 4px solid #000;
border-right: 4px solid transparent;
border-bottom: 4px solid transparent;
border-top: 4px solid transparent;
content: "";
display: inline-block;
height: 0;
opacity: 0.7;
vertical-align: top;
width: 0;
margin-left: 8px;
margin-top: 6px;
}
ul.nav li.dropdown:hover ul.dropdown-menu {
display: block;
}
.open >.dropdown-menu ul{display:block;} /* fix menu issue when BS2.0.4 is applied */
/*=============================================================
BOOTSTRAP SUBMIT BUTTON
==============================================================*/
input[type='submit']:not(.btn) {
display: inline-block;
padding: 4px 14px;
margin-bottom: 0;
font-size: 14px;
line-height: 20px;
color: #333;
text-align: center;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
vertical-align: middle;
cursor: pointer;
background-color: whiteSmoke;
background-image: -webkit-gradient(linear,0 0,0 100%,from(white),to(#E6E6E6));
background-image: -webkit-linear-gradient(top,white,#E6E6E6);
background-image: -o-linear-gradient(top,white,#E6E6E6);
background-image: linear-gradient(to bottom,white,#E6E6E6);
background-image: -moz-linear-gradient(top,white,#E6E6E6);
background-repeat: repeat-x;
border: 1px solid #BBB;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
border-bottom-color: #A2A2A2;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);
}
input[type='submit']:not(.btn):hover {
color: #333;
text-decoration: none;
background-color: #E6E6E6;
background-position: 0 -15px;
-webkit-transition: background-position .1s linear;
-moz-transition: background-position .1s linear;
-o-transition: background-position .1s linear;
transition: background-position .1s linear;
}
input[type='submit']:not(.btn).active, input[type='submit']:not(.btn):active {
background-color: #E6E6E6;
background-color: #D9D9D9 9;
background-image: none;
outline: 0;
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
}
/*=============================================================
OTHER
==============================================================*/
.ie-lte8 .navbar-fixed-top {position:static;}