header.less 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. /*
  2. * Component: Main Header
  3. * ----------------------
  4. */
  5. .main-header {
  6. position: relative;
  7. max-height: 100px;
  8. z-index: 1030;
  9. //Navbar
  10. .navbar {
  11. .transition(margin-left @transition-speed @transition-fn);
  12. margin-bottom: 0;
  13. margin-left: @sidebar-width;
  14. border: none;
  15. min-height: @navbar-height;
  16. border-radius: 0;
  17. .layout-top-nav & {
  18. margin-left: 0;
  19. }
  20. }
  21. //Navbar search text input
  22. #navbar-search-input.form-control {
  23. background: rgba(255, 255, 255, .2);
  24. border-color: transparent;
  25. &:focus,
  26. &:active {
  27. border-color: rgba(0, 0, 0, .1);
  28. background: rgba(255, 255, 255, .9);
  29. }
  30. &::-moz-placeholder {
  31. color: #ccc;
  32. opacity: 1;
  33. }
  34. &:-ms-input-placeholder {
  35. color: #ccc;
  36. }
  37. &::-webkit-input-placeholder {
  38. color: #ccc;
  39. }
  40. }
  41. //Navbar Right Menu
  42. .navbar-custom-menu,
  43. .navbar-right {
  44. float: right;
  45. @media (max-width: @screen-sm-max) {
  46. a {
  47. color: inherit;
  48. background: transparent;
  49. }
  50. }
  51. }
  52. .navbar-right {
  53. @media (max-width: @screen-header-collapse) {
  54. float: none;
  55. .navbar-collapse & {
  56. margin: 7.5px -15px;
  57. }
  58. > li {
  59. color: inherit;
  60. border: 0;
  61. }
  62. }
  63. }
  64. //Navbar toggle button
  65. .sidebar-toggle {
  66. float: left;
  67. background-color: transparent;
  68. background-image: none;
  69. padding: @navbar-padding-vertical @navbar-padding-horizontal;
  70. //Add the fontawesome bars icon
  71. font-family: fontAwesome;
  72. &:before {
  73. content: "\f0c9";
  74. }
  75. &:hover {
  76. color: #fff;
  77. }
  78. &:focus,
  79. &:active {
  80. background: transparent;
  81. }
  82. }
  83. .sidebar-toggle .icon-bar {
  84. display: none;
  85. }
  86. //Navbar User Menu
  87. .navbar .nav > li.user > a {
  88. > .fa,
  89. > .glyphicon,
  90. > .ion {
  91. margin-right: 5px;
  92. }
  93. }
  94. //Labels in navbar
  95. .navbar .nav > li > a > .label {
  96. position: absolute;
  97. top: 9px;
  98. right: 7px;
  99. text-align: center;
  100. font-size: 9px;
  101. padding: 2px 3px;
  102. line-height: 0.9;
  103. }
  104. //Logo bar
  105. .logo {
  106. .transition(width @transition-speed @transition-fn);
  107. display: block;
  108. float: left;
  109. height: @navbar-height;
  110. font-size: 20px;
  111. line-height: 50px;
  112. text-align: center;
  113. width: @sidebar-width;
  114. font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  115. padding: 0 15px;
  116. font-weight: 300;
  117. overflow: hidden;
  118. //Add support to sidebar mini by allowing the user to create
  119. //2 logo designs. mini and lg
  120. .logo-lg {
  121. //should be visibile when sidebar isn't collapsed
  122. display: block;
  123. }
  124. .logo-mini {
  125. display: none;
  126. }
  127. }
  128. //Navbar Brand. Alternative logo with layout-top-nav
  129. .navbar-brand {
  130. color: #fff;
  131. }
  132. }
  133. // Content Header
  134. .content-header {
  135. position: relative;
  136. padding: 15px 15px 0 15px;
  137. // Header Text
  138. > h1 {
  139. margin: 0;
  140. font-size: 24px;
  141. > small {
  142. font-size: 15px;
  143. display: inline-block;
  144. padding-left: 4px;
  145. font-weight: 300;
  146. }
  147. }
  148. > .breadcrumb {
  149. float: right;
  150. background: transparent;
  151. margin-top: 0;
  152. margin-bottom: 0;
  153. font-size: 12px;
  154. padding: 7px 5px;
  155. position: absolute;
  156. top: 15px;
  157. right: 10px;
  158. .border-radius(2px);
  159. > li > a {
  160. color: #444;
  161. text-decoration: none;
  162. display: inline-block;
  163. > .fa, > .glyphicon, > .ion {
  164. margin-right: 5px;
  165. }
  166. }
  167. > li + li:before {
  168. content: '>\00a0';
  169. }
  170. }
  171. @media (max-width: @screen-sm-max) {
  172. > .breadcrumb {
  173. position: relative;
  174. margin-top: 5px;
  175. top: 0;
  176. right: 0;
  177. float: none;
  178. background: @gray;
  179. padding-left: 10px;
  180. li:before {
  181. color: darken(@gray, 20%);
  182. }
  183. }
  184. }
  185. }
  186. .navbar-toggle {
  187. color: #fff;
  188. border: 0;
  189. margin: 0;
  190. padding: @navbar-padding-vertical @navbar-padding-horizontal;
  191. }
  192. //Control navbar scaffolding on x-small screens
  193. @media (max-width: @screen-sm-max) {
  194. .navbar-custom-menu .navbar-nav > li {
  195. float: left;
  196. }
  197. //Dont't let links get full width
  198. .navbar-custom-menu .navbar-nav {
  199. margin: 0;
  200. float: left;
  201. }
  202. .navbar-custom-menu .navbar-nav > li > a {
  203. padding-top: 15px;
  204. padding-bottom: 15px;
  205. line-height: 20px;
  206. }
  207. }
  208. // Collapse header
  209. @media (max-width: @screen-header-collapse) {
  210. .main-header {
  211. position: relative;
  212. .logo,
  213. .navbar {
  214. width: 100%;
  215. float: none;
  216. }
  217. .navbar {
  218. margin: 0;
  219. }
  220. .navbar-custom-menu {
  221. float: right;
  222. }
  223. }
  224. }
  225. .navbar-collapse.pull-left {
  226. @media (max-width: @screen-sm-max) {
  227. float: none !important;
  228. + .navbar-custom-menu {
  229. display: block;
  230. position: absolute;
  231. top: 0;
  232. right: 40px;
  233. }
  234. }
  235. }