header.styl 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #header
  2. @extend $block
  3. background: white
  4. position: relative
  5. a, a:visited
  6. white-space: nowrap
  7. transition: 0.2s ease
  8. color: color-default
  9. a:hover
  10. color: color-link
  11. $header-block
  12. height: logo-height
  13. line-height: logo-height
  14. padding: ((header-height - logo-height)/2) 15px
  15. $header-block-left
  16. float: left
  17. $header-block-right
  18. float: right
  19. .header-inner
  20. height: 100%
  21. position: relative
  22. #logo
  23. @extend $header-block
  24. @extend $header-block-left
  25. display: inline-block
  26. .logo
  27. margin-right: 5px
  28. display: inline-block
  29. .site-title
  30. font-size: 16px
  31. display: inline-block
  32. vertical-align: top
  33. font-weight: 600
  34. #header-title
  35. text-align: center
  36. height: logo-height
  37. position: absolute
  38. top: 50%
  39. left: 0
  40. margin-top: logo-height * -0.5
  41. .header-sub
  42. border-top: 1px solid color-border
  43. ul
  44. clearfix()
  45. margin: 0 15px
  46. li
  47. float: left
  48. margin: 0 10px
  49. a
  50. display: inline-block
  51. line-height: header-sub-height
  52. .main-nav-link
  53. display: inline-block
  54. line-height: header-sub-height
  55. #header-sub
  56. @media mq-mobile
  57. display: none
  58. @media mq-mini
  59. display: none
  60. #main-nav
  61. @extend $header-block
  62. @extend $header-block-left
  63. @media mq-mobile
  64. display: none
  65. @media mq-mini
  66. display: none
  67. #main-nav-mobile
  68. @media mq-tablet
  69. display: none
  70. @media mq-normal
  71. display: none
  72. $nav-link
  73. float: left
  74. display: block
  75. padding: 0 15px
  76. .nav-icon
  77. @extend $nav-link
  78. text-align: center
  79. font-size: font-size
  80. width: font-size
  81. height: font-size
  82. position: relative
  83. cursor: pointer
  84. height: logo-height !important
  85. line-height: logo-height !important
  86. .main-nav-link
  87. @extend $nav-link
  88. font-weight: 300
  89. #sub-nav
  90. @media mq-normal
  91. display: none
  92. @extend $header-block
  93. @extend $header-block-right
  94. #profile-nav
  95. #profile-anchor
  96. clearfix()
  97. display: block
  98. height: logo-height
  99. line-height: logo-height
  100. .avatar, .fa
  101. float: left
  102. .avatar
  103. width: logo-height
  104. height: logo-height
  105. margin-right: 8px
  106. .fa
  107. line-height: logo-height
  108. #search-form-wrap
  109. @media mq-mini
  110. display: none
  111. @extend $header-block
  112. @extend $header-block-right
  113. .search-form
  114. position: relative
  115. .search-form-input
  116. width: 100%
  117. height: logo-height
  118. padding: 0 30px 0 15px
  119. line-height: logo-height
  120. border-radius: ((logo-height + 2)/2)
  121. &::-webkit-search-results-decoration
  122. &::-webkit-search-cancel-button
  123. -webkit-appearance: none
  124. .search-form-submit
  125. top: 50%
  126. right: 15px
  127. border: none
  128. cursor: pointer
  129. margin-top: -7px
  130. background: none
  131. position: absolute
  132. font: 13px font-icon
  133. font-family: 'FontAwesome'
  134. &:before
  135. content: '\f002'
  136. &:hover, &:focus
  137. color: #777
  138. .search-form-input,
  139. .search-form-input.ins-search-input,
  140. .search-form-input.st-ui-search-input,
  141. .search-form-input.st-default-search-input
  142. -webkit-appearance: textarea
  143. appearance: textarea
  144. padding: 0
  145. width: 200px
  146. box-shadow: none
  147. color: color-default
  148. transition: 0.2s ease
  149. box-sizing: border-box
  150. height: auto !important
  151. line-height: line-height
  152. outline: none !important
  153. background: none !important
  154. font: font-size font-sans
  155. border: 1px solid color-border !important
  156. &:focus
  157. border-color: color-link !important
  158. &::-webkit-search-results-decoration
  159. &::-webkit-search-cancel-button
  160. -webkit-appearance: none
  161. #main-nav-mobile
  162. overflow-y: hidden
  163. overflow-x: auto
  164. .menu
  165. clearfix()
  166. margin: 0
  167. height: header-sub-height
  168. .search-form-input
  169. display: none
  170. @media mq-mini
  171. display: block
  172. padding: 0 10px
  173. margin-right: 15px
  174. height: header-sub-height - 16
  175. line-height: header-sub-height - 16
  176. border-radius: ((header-sub-height - 16)/2)
  177. &::-webkit-search-results-decoration
  178. &::-webkit-search-cancel-button
  179. -webkit-appearance: none