Advertisement
xthyan

top-bar.sass

Feb 26th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.64 KB | None | 0 0
  1. // Top bar
  2. //
  3. // Top bar used on the site
  4. //
  5. // Markup:
  6. // <div class="top-bar">
  7. // <div class="main-menu">
  8. // <div class="menu-container">
  9. // <div class="main-logo">
  10. // <a href="/" class="logo">
  11. // <img src="../images//logo-color-lima2019.png" class="img-responsive">
  12. // </a>
  13. // </div>
  14. // <div class="clearfix">
  15. // <div class="pull-left">
  16. // <a href="#" class="menu-toggle pull-left">
  17. // <span class="menu-toggle-line"></span>
  18. // <span class="menu-toggle-line"></span>
  19. // <span class="menu-toggle-line"></span>
  20. // </a>
  21. // <ul class="nav navbar-nav navbar-social">
  22. // <li class="first"><a href="/"><i class="fa fa-share-alt" aria-hidden="true"></i></a>
  23. // <li><a href="/"><i class="fa fa-bell-o"></i></a></li>
  24. // <li class="select-item">
  25. // <select id="languages">
  26. // <option value="es" data-imagesrc="../images//esp.png"></option>
  27. // <option value="en" data-imagesrc="../images//en.png"></option>
  28. // </select>
  29. // </li>
  30. // <li class="select-item">
  31. // <select id="dis">
  32. // <option data-imagesrc="../images//disc.png"></option>
  33. // </select>
  34. // </li>
  35. // </ul>
  36. // </div>
  37. // <div class="pull-right">
  38. // <ul class="nav navbar-nav navbar-right">
  39. // <li class="first"><a href="/">Voluntariado</a></li>
  40. // <li><a href="/">Deportes</a></li>
  41. // <li><a href="/">Sala de Prensa</a></li>
  42. // <li class="last"><a href="/"><img src="../images//portal_transparencia.png"></i></a></li>
  43. // </ul>
  44. // </div>
  45. // </div>
  46. // </div>
  47. // </div>
  48. // </div>
  49. //
  50. // Styleguide Components.top_bar
  51. //
  52.  
  53.  
  54. .top-bar{
  55. background: #fff;
  56. padding: 2px 0px;
  57. position: relative;
  58. width: 100%;
  59. top: 0px;
  60. z-index: 200;
  61. box-shadow: 0 0 4px rgba(0,0,0,.14), 0 4px 8px rgba(0,0,0,.28);
  62.  
  63. ul{
  64. li{
  65. padding: 0px 8px;
  66. border-left: 1px solid #959494;
  67. float: left;
  68. &.first,
  69. &.last{
  70. border-left:0px;
  71. }
  72.  
  73. a{
  74. color: #706a6d;
  75. padding-top: 4px;
  76. padding-bottom: 4px;
  77. &:hover{
  78. background: transparent!important;
  79. }
  80. img{
  81. max-width: 65px;
  82. @media (min-width: $screen-md-min) {
  83. max-width: 65px;
  84. }
  85. }
  86. }
  87.  
  88.  
  89.  
  90. &.select-item {
  91. a{
  92. }
  93. select{
  94. border: 0px;
  95. background: #fff;
  96. border-radius: 0px;
  97. width: 100%;
  98. padding-right: 16px;
  99. -webkit-appearance: none;
  100. }
  101. }
  102. }
  103.  
  104. &.navbar-social{
  105. li{
  106. margin-top: 4px;
  107. }
  108. }
  109.  
  110. &.navbar-right{
  111. li {
  112. margin-top: 8px;
  113. &.last{
  114. margin-top: 0px;
  115. }
  116. }
  117. }
  118. }
  119.  
  120. .menu-container{
  121. max-width: 1170px;
  122. margin: 0 auto;
  123. @media (min-width: $screen-md-min) {
  124. padding: 0px 15px;
  125. }
  126. }
  127.  
  128. .acc-links{
  129.  
  130. .trigger{
  131. cursor: pointer;
  132. }
  133.  
  134. img{
  135. max-width: 18px;
  136. margin: 0px 4px;
  137. }
  138.  
  139. span{
  140. display: inline-block;
  141. vertical-align: middle;
  142. }
  143.  
  144. a{
  145. display: inline-block;
  146. vertical-align: middle;
  147. }
  148.  
  149. .fa{
  150. font-size: 18px;
  151. display: inline-block;
  152. vertical-align:middle;
  153. }
  154.  
  155. .accs-cont{
  156. max-width: 0px;
  157. overflow: hidden;
  158. height: 26px;
  159. transition: all 1s;
  160. }
  161.  
  162. .fa-caret-left{
  163. display:none;
  164. }
  165.  
  166. &.open{
  167. .accs-cont{
  168. max-width: 200px;
  169. }
  170. .fa-caret-left{
  171. display: inline-block;
  172. }
  173.  
  174. .fa-caret-right{
  175. display: none;
  176. }
  177. }
  178. }
  179.  
  180. }
  181.  
  182.  
  183. .main-menu{
  184. position: relative;
  185. z-index: 2;
  186. padding: 12px 0px;
  187.  
  188. .menu-toggle{
  189. z-index: 10;
  190. position: relative;
  191.  
  192. .menu-toggle-line{
  193. width: 25px;
  194. background: #7b7678;
  195. display: block;
  196. height: 2px;
  197. margin-top: 5.5px;
  198.  
  199. &:last-child{
  200. width: 15px;
  201. }
  202. }
  203.  
  204. &:hover{
  205. .menu-toggle-line{
  206. &:last-child{
  207. width: 25px;
  208. transition: width 500ms linear;
  209. }
  210. }
  211. }
  212.  
  213. @media (max-width: $screen-sm-max) {
  214. right: -55px;
  215. position: fixed !important;
  216. bottom: -56px;
  217. background: #d2007f;
  218. padding: 26px 40px 0px 23px;
  219. border-radius: 50%;
  220. box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
  221. width: 120px;
  222. height: 120px;
  223.  
  224. .menu-toggle-line{
  225. width: 35px;
  226. background: #ffff;
  227. height: 3px;
  228. }
  229. }
  230. }
  231.  
  232. .pull-right,
  233. .pull-left{
  234. position: relative;
  235. z-index: 3;
  236. }
  237.  
  238. .main-logo {
  239. position: absolute;
  240. width: 100%;
  241. z-index: 2;
  242. text-align: center;
  243. left: 0px;
  244. top: 0px;
  245. a {
  246. display: block;
  247. width: 160px;
  248. margin: 0 auto;
  249. text-align: center;
  250. img{
  251. max-width: 160px;
  252. }
  253. }
  254. }
  255.  
  256. .nav{
  257. display:block;
  258. margin: 7.5px 0px;
  259. @media (min-width: $screen-sm-min) {
  260. margin: 0px 0px;
  261. }
  262. li {
  263. a{
  264. padding: 0px 2px;
  265. text-transform: uppercase;
  266. font-size: 12px;
  267. i{
  268. font-size: 20px;
  269. }
  270. }
  271.  
  272. }
  273.  
  274. &.navbar-social{
  275. li{
  276. margin-left: 6px;
  277. margin-right: 6px;
  278. display: none;
  279. @media (min-width: $screen-sm-min) {
  280. display:block;
  281. }
  282. &.first{
  283. display: block;
  284. }
  285. }
  286.  
  287. .social-links{
  288. position: absolute;
  289. width: 200px;
  290. left: 0px;
  291. margin-top: 10px;
  292.  
  293. a{
  294. display: inline-block;
  295. margin: 0px 3px;
  296. background: rgba(0, 0, 0, 0.6)!important;
  297. height: 32px;
  298. width: 32px;
  299. text-align: center;
  300. line-height: 37px;
  301. border-radius: 50%;
  302. color: #fff;
  303. display:none;
  304.  
  305. &:focus{
  306. background-color: transparent;
  307. }
  308.  
  309. &.animate{
  310. animation: bump .25s ease-in-out;
  311. cursor: pointer;
  312. }
  313.  
  314. &.facebook{
  315. &:hover{
  316. background: #3B5998!important;
  317. }
  318.  
  319. }
  320.  
  321. &.twitter{
  322. &:hover{
  323. background: #55acee!important;
  324. }
  325.  
  326. }
  327.  
  328. &.youtube{
  329. &:hover{
  330. background: #BD081C!important;
  331. }
  332.  
  333. }
  334.  
  335.  
  336. &.instagram{
  337. &:hover{
  338. background: #DD2A7B!important;
  339. }
  340. }
  341.  
  342. }
  343.  
  344. }
  345. }
  346.  
  347. &.navbar-right{
  348. @media (max-width: $screen-sm-max) {
  349. margin: 0px;
  350. }
  351. li{
  352. display: none;
  353. &.last{
  354. display:block;
  355. }
  356. @media (min-width: $screen-sm-min) {
  357. display:block;
  358. }
  359. }
  360.  
  361. li a {
  362. opacity: 0.7;
  363. &:hover{
  364. opacity: 1;
  365. }
  366. }
  367. }
  368. }
  369. }
  370.  
  371. @keyframes bump {
  372. 0% { transform: translateY(0); }
  373. 30% { transform: translateY(-4px); }
  374. 50% { transform: translateY(0); }
  375. 100% { transform: translateY(0); }
  376. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement