_navbar.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. nav {
  2. &.nav-extended {
  3. height: auto;
  4. .nav-wrapper {
  5. min-height: $navbar-height-mobile;
  6. height: auto;
  7. }
  8. .nav-content {
  9. position: relative;
  10. line-height: normal;
  11. }
  12. }
  13. color: $navbar-font-color;
  14. @extend .z-depth-1;
  15. background-color: $primary-color;
  16. width: 100%;
  17. height: $navbar-height-mobile;
  18. line-height: $navbar-line-height-mobile;
  19. a { color: $navbar-font-color; }
  20. i,
  21. [class^="mdi-"], [class*="mdi-"],
  22. i.material-icons {
  23. display: block;
  24. font-size: 24px;
  25. height: $navbar-height-mobile;
  26. line-height: $navbar-line-height-mobile;
  27. }
  28. .nav-wrapper {
  29. position: relative;
  30. height: 100%;
  31. }
  32. @media #{$large-and-up} {
  33. a.sidenav-trigger { display: none; }
  34. }
  35. // Collapse button
  36. .sidenav-trigger {
  37. float: left;
  38. position: relative;
  39. z-index: 1;
  40. height: $navbar-height-mobile;
  41. margin: 0 18px;
  42. i {
  43. height: $navbar-height-mobile;
  44. line-height: $navbar-line-height-mobile;
  45. }
  46. }
  47. // Logo
  48. .brand-logo {
  49. position: absolute;
  50. color: $navbar-font-color;
  51. display: inline-block;
  52. font-size: $navbar-brand-font-size;
  53. padding: 0;
  54. &.center {
  55. left: 50%;
  56. transform: translateX(-50%);
  57. }
  58. @media #{$medium-and-down} {
  59. left: 50%;
  60. transform: translateX(-50%);
  61. &.left, &.right {
  62. padding: 0;
  63. transform: none;
  64. }
  65. &.left { left: 0.5rem; }
  66. &.right {
  67. right: 0.5rem;
  68. left: auto;
  69. }
  70. }
  71. &.right {
  72. right: 0.5rem;
  73. padding: 0;
  74. }
  75. i,
  76. [class^="mdi-"], [class*="mdi-"],
  77. i.material-icons {
  78. float: left;
  79. margin-right: 15px;
  80. }
  81. }
  82. // Title
  83. .nav-title {
  84. display: inline-block;
  85. font-size: 32px;
  86. padding: 28px 0;
  87. }
  88. // Navbar Links
  89. ul {
  90. margin: 0;
  91. li {
  92. transition: background-color .3s;
  93. float: left;
  94. padding: 0;
  95. &.active {
  96. background-color: rgba(0,0,0,.1);
  97. }
  98. }
  99. a {
  100. transition: background-color .3s;
  101. font-size: $navbar-font-size;
  102. color: $navbar-font-color;
  103. display: block;
  104. padding: 0 15px;
  105. cursor: pointer;
  106. &.btn, &.btn-large, &.btn-flat, &.btn-floating {
  107. margin-top: -2px;
  108. margin-left: 15px;
  109. margin-right: 15px;
  110. & > .material-icons {
  111. height: inherit;
  112. line-height: inherit;
  113. }
  114. }
  115. &:hover {
  116. background-color: rgba(0,0,0,.1);
  117. }
  118. }
  119. &.left {
  120. float: left;
  121. }
  122. }
  123. // Navbar Search Form
  124. form {
  125. height: 100%;
  126. }
  127. .input-field {
  128. margin: 0;
  129. height: 100%;
  130. input {
  131. height: 100%;
  132. font-size: 1.2rem;
  133. border: none;
  134. padding-left: 2rem;
  135. &:focus, &[type=text]:valid, &[type=password]:valid,
  136. &[type=email]:valid, &[type=url]:valid, &[type=date]:valid {
  137. border: none;
  138. box-shadow: none;
  139. }
  140. }
  141. label {
  142. top: 0;
  143. left: 0;
  144. i {
  145. color: rgba(255,255,255,.7);
  146. transition: color .3s;
  147. }
  148. &.active i { color: $navbar-font-color; }
  149. }
  150. }
  151. }
  152. // Fixed Navbar
  153. .navbar-fixed {
  154. position: relative;
  155. height: $navbar-height-mobile;
  156. z-index: 997;
  157. nav {
  158. position: fixed;
  159. }
  160. }
  161. @media #{$medium-and-up} {
  162. nav.nav-extended .nav-wrapper {
  163. min-height: $navbar-height;
  164. }
  165. nav, nav .nav-wrapper i, nav a.sidenav-trigger, nav a.sidenav-trigger i {
  166. height: $navbar-height;
  167. line-height: $navbar-line-height;
  168. }
  169. .navbar-fixed {
  170. height: $navbar-height;
  171. }
  172. }