navbar.less 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478
  1. // Navbar
  2. // -------------------------
  3. .navbar-header {
  4. .navbar-inner {
  5. background: none;
  6. background-color: @navbarBackground;
  7. border-bottom: 1px solid @navbarBorder;
  8. .box-shadow(none);
  9. .container {
  10. background: url(@navbarLogoImage);
  11. background-position: left center;
  12. background-repeat: no-repeat;
  13. }
  14. .brand {
  15. margin-left: @navbarLogoWidth - @baseFontSize;
  16. text-shadow: none;
  17. &:link, &:active, &:visited, &:hover {
  18. color: @navbarBrandColor;
  19. font-size: 200%;
  20. span {
  21. color: @navbarMottoColor;
  22. }
  23. }
  24. }
  25. .navbar-search-form {
  26. height: 30px;
  27. width: @navbarSearchWidth + @baseFontSize;
  28. margin-top: ((@navbarHeight - @baseLineHeight) / 2) - 6px;
  29. overflow: visible;
  30. position: relative;
  31. .navbar-search-border {
  32. background-color: @white;
  33. border: 1px solid darken(@navbarBorder, 10%);
  34. .border-radius(@baseBorderRadius);
  35. position: absolute;
  36. z-index: @zindexFixedNavbar;
  37. .navbar-search-text {
  38. border: 1px solid darken(@navbarBorder, 10%);
  39. border-radius: @baseBorderRadius;
  40. margin: -1px;
  41. padding: 1px 0px;
  42. color: @textColor;
  43. &>input {
  44. border: none;
  45. .box-shadow(none);
  46. background: none;
  47. margin: 0px;
  48. width: @navbarSearchWidth;
  49. }
  50. .icon-search {
  51. float: right;
  52. .opacity(50);
  53. margin-bottom: (@baseLineHeight * -1);
  54. margin-right: 8px;
  55. position: relative;
  56. bottom: (@baseLineHeight * -1) + @baseFontSize;
  57. }
  58. }
  59. &:hover, &.open {
  60. .box-shadow(0px 0px 3px fadeout(@gray, 30%));
  61. .navbar-search-text {
  62. border-color: lighten(@blue, 20%);
  63. margin-bottom: 0px;
  64. }
  65. .extra {
  66. display: block;
  67. }
  68. }
  69. &>.extra {
  70. background: @white;
  71. border-radius: @baseBorderRadius;
  72. display: none;
  73. .extra-form {
  74. padding: 0px @navbarSearchPadding;
  75. .control {
  76. margin: (@navbarSearchPadding * 1.5) 0px;
  77. label {
  78. color: @gray;
  79. font-weight: bold;
  80. }
  81. select {
  82. margin: 0px;
  83. width: 100%;
  84. }
  85. input[type="text"] {
  86. margin: 0px;
  87. width: (@navbarSearchWidth - (@navbarSearchPadding * 2) - 2px);
  88. }
  89. .checkbox {
  90. margin-bottom: -3px;
  91. }
  92. }
  93. }
  94. .form-actions {
  95. border-radius: 0px 0px (@baseBorderRadius - 1);
  96. margin: 0px;
  97. margin-top: (@baseFontSize / 2);
  98. margin-bottom: 0px;
  99. padding: @navbarSearchPadding;
  100. .btn {
  101. margin: 0px;
  102. color: @white;
  103. }
  104. a:link, a:visited {
  105. margin-left: (@baseFontSize / 2);
  106. position: relative;
  107. top: 1px;
  108. color: @grayLight;
  109. font-weight: bold;
  110. }
  111. a:active, a:hover {
  112. color: @textColor;
  113. }
  114. }
  115. }
  116. }
  117. }
  118. .navbar-blocks {
  119. margin-left: 6px;
  120. &>li {
  121. form {
  122. margin: 0px;
  123. padding: 0px;
  124. }
  125. &>a:link, &>a:visited, &>.btn-link {
  126. min-width: 20px;
  127. font-size: @fontSizeLarge;
  128. text-align: center;
  129. .label {
  130. background-color: @red;
  131. margin-left: @baseFontSize / 2;
  132. padding-left: 6px;
  133. padding-right: 5px;
  134. padding-bottom: 3px;
  135. position: relative;
  136. bottom: 1px;
  137. color: @white;
  138. font-size: @baseFontSize;
  139. text-shadow: 0px -1px 1px darken(@red, 20%);
  140. }
  141. }
  142. a:hover, a:active, .btn-link:hover, .btn-link:active {
  143. text-shadow: 0px 0px 3px @white;
  144. }
  145. &.user-profile {
  146. &>a {
  147. &:link, &:visited, &:hover, &:active {
  148. color: @gray !important;
  149. font-size: @fontSizeLarge;
  150. }
  151. }
  152. a:link, a:visited, a:hover, a:active {
  153. background: none;
  154. border: none;
  155. margin-right: 8px;
  156. margin-top: 5px;
  157. color: @grayDarker;
  158. font-weight: bold;
  159. text-shadow: none;
  160. img {
  161. border-radius: @baseBorderRadius;
  162. margin-right: 6px;
  163. width: 32px;
  164. height: 32px;
  165. position: relative;
  166. bottom: 1px;
  167. }
  168. }
  169. }
  170. }
  171. }
  172. .navbar-compact {
  173. display: none;
  174. li {
  175. &.user-profile {
  176. &>a {
  177. &:link, &:visited {
  178. .border-radius(0);
  179. margin-top: 0px;
  180. padding: @baseFontSize;
  181. padding-top: 10px;
  182. padding-bottom: 8px;
  183. img {
  184. margin-right: 0px;
  185. margin-left: 6px;
  186. }
  187. .caret-border {
  188. background-color: @bodyBackground;
  189. border: 1px solid @navbarBorder;
  190. .border-radius(@baseBorderRadius);
  191. margin-left: 8px;
  192. padding: 0px 4px;
  193. font-size: @baseFontSize;
  194. .caret {
  195. margin: 0px;
  196. padding: 0px;
  197. position: relative;
  198. top: 13px;
  199. }
  200. }
  201. }
  202. &:hover, &:active {
  203. background-color: @bodyBackground;
  204. .caret-border {
  205. border-color: @grayLight;
  206. }
  207. }
  208. }
  209. &.open .dropdown-toggle {
  210. &:link, &:visited, &:hover, &:focus {
  211. background-color: @bodyBackground;
  212. .caret-border {
  213. background: @red;
  214. border-color: @red;
  215. color: @white;
  216. text-shadow: 0px 1px 1px darken(@red, 10%);
  217. }
  218. }
  219. }
  220. .dropdown-menu {
  221. border: none;
  222. border: 1px solid darken(@navbarBorder, 10%);
  223. .border-radius(@baseBorderRadius);
  224. .box-shadow(0px 4px 3px fadeout(@gray, 30%));
  225. margin: 0px;
  226. margin-top: -6px;
  227. margin-right: 0px;
  228. padding: 4px 0px;
  229. width: 270px;
  230. &:before {
  231. margin-right: 11px;
  232. }
  233. &:after {
  234. border-bottom: 6px solid @white;
  235. margin-top: 0px;
  236. margin-right: 11px;
  237. }
  238. &>li {
  239. margin: 0px;
  240. padding: 0px;
  241. .label {
  242. float: right;
  243. margin: 0px;
  244. margin-top: 2px;
  245. }
  246. a, .btn-link {
  247. .border-radius(0);
  248. clear: none;
  249. display: block;
  250. float: none;
  251. margin: 0px;
  252. padding: 6px 12px;
  253. color: @textColor;
  254. font-weight: normal;
  255. text-align: left;
  256. i {
  257. display: inline-block;
  258. margin-right: 8px;
  259. width: 16px;
  260. text-align: center;
  261. }
  262. &:link, &:active, &:visited, &:hover {
  263. .label {
  264. background-color: @red;
  265. float: right;
  266. color: @white;
  267. text-shadow: 0px 1px 0px darken(@red, 20%);
  268. }
  269. }
  270. }
  271. a:hover {
  272. background-color: @gray;
  273. .opacity(100);
  274. color: @white;
  275. }
  276. .btn-link {
  277. background: none;
  278. border: none;
  279. .opacity(100);
  280. width: 100%;
  281. &:hover, &:active {
  282. background: @red;
  283. color: @white;
  284. text-shadow: 0px 1px 0px darken(@red, 20%);
  285. }
  286. i {
  287. position: relative;
  288. top: 0px;
  289. }
  290. }
  291. }
  292. }
  293. }
  294. }
  295. }
  296. .navbar-user-nav {
  297. li {
  298. .btn {
  299. padding: 2px 8px;
  300. margin-left: 8px;
  301. margin-top: (@baseLineHeight / 2) + 3;
  302. &:link, &:active, &:hover, &:visited {
  303. color: @white;
  304. }
  305. &.btn-danger {
  306. text-shadow: 0px 1px 0px darken(@red, 15%);
  307. &:hover, &:active, &:focus {
  308. background-color: saturate(@red, 20%);
  309. border-color: darken(saturate(@red, 20%), 5%);
  310. }
  311. }
  312. &.btn-inverse {
  313. text-shadow: 0px 1px 0px darken(@textColor, 15%);
  314. &:hover, &:active, &:focus {
  315. background-color: darken(@textColor, 5%);
  316. border-color: darken(@textColor, 10%);
  317. }
  318. }
  319. }
  320. }
  321. }
  322. }
  323. }
  324. // Inversed navbar, used for moderation tools
  325. .navbar-modbar {
  326. .navbar-inner {
  327. background: none;
  328. background-color: @grayDarker;
  329. background-image: -webkit-gradient(linear, 0 0, 100% 100%,
  330. color-stop(.25, rgba(0, 0, 0, 0.1)), color-stop(.25, transparent),
  331. color-stop(.5, transparent), color-stop(.5, rgba(0, 0, 0, 0.1)),
  332. color-stop(.75, rgba(0, 0, 0, 0.1)), color-stop(.75, transparent),
  333. to(transparent));
  334. background-image: -webkit-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%,
  335. transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%,
  336. transparent 75%, transparent);
  337. background-image: -moz-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%,
  338. transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%,
  339. transparent 75%, transparent);
  340. background-image: -ms-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%,
  341. transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%,
  342. transparent 75%, transparent);
  343. background-image: -o-linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%,
  344. transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%,
  345. transparent 75%, transparent);
  346. background-image: linear-gradient(-45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%,
  347. transparent 50%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 75%,
  348. transparent 75%, transparent);
  349. -webkit-background-size: 15px 15px;
  350. -moz-background-size: 15px 15px;
  351. background-size: 15px 15px;
  352. border-bottom: 2px dashed @red;
  353. min-height: 1px;
  354. .nav {
  355. a:link, a:visited {
  356. padding: @fontSizeMini (@fontSizeMini * 1.4);
  357. color: darken(@white, 30%);
  358. text-shadow: 0px 1px 0px @black;
  359. }
  360. a:hover, a:active {
  361. color: @white;
  362. }
  363. li.active {
  364. a:link, a:visited {
  365. color: @white;
  366. }
  367. }
  368. }
  369. .navbar-search-form {
  370. background-color: darken(@grayDark, 15%);
  371. border-radius: @baseBorderRadius;
  372. margin-top: ((@navbarHeight - @baseLineHeight) / 2) - 9px;
  373. padding: 1px 0px;
  374. input {
  375. background-color: darken(@grayDark, 15%);
  376. border: none;
  377. .box-shadow(none);
  378. margin: 0px;
  379. color: @grayLighter;
  380. text-shadow: 0px 1px 0px @black;
  381. }
  382. button {
  383. margin: 0px;
  384. .opacity(60);
  385. i {
  386. background-image: url("@{iconWhiteSpritePath}");
  387. .opacity(100);
  388. }
  389. &:hover, &:active {
  390. .opacity(100);
  391. }
  392. }
  393. }
  394. }
  395. }