_mobile.scss 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. .mobile-container {
  2. position: absolute;
  3. //width: 100%;
  4. //height: 100%;
  5. top: 40%;
  6. left: 0;
  7. margin: 0 auto;
  8. z-index: 2;
  9. }
  10. .mobile-logo {
  11. svg {
  12. max-width: 150px;
  13. margin-top: 1rem;
  14. margin-left: 1.4rem;
  15. path {
  16. fill: $light-color;
  17. }
  18. }
  19. }
  20. // Hamburger Menu
  21. .mobile-menu {
  22. display: none;
  23. top: 0;
  24. right: 0;
  25. z-index: 3;
  26. .header-fixed & {
  27. position: fixed;
  28. }
  29. @include breakpoint(md) {
  30. display: block;
  31. }
  32. .button_container {
  33. position: absolute;
  34. top: 1rem;
  35. right: $horiz-padding;
  36. height: $mobile-button-height;
  37. width: $mobile-button-width;
  38. cursor: pointer;
  39. z-index: 100;
  40. transition: opacity .25s ease, top 0.5s ease;
  41. &:hover {
  42. opacity: .7;
  43. }
  44. &.active {
  45. position: fixed;
  46. .top {
  47. transform: translateY(11px) translateX(0) rotate(45deg);
  48. background: $mobile-color-active;
  49. }
  50. .middle {
  51. opacity: 0;
  52. background: $mobile-color-active;
  53. }
  54. .bottom {
  55. transform: translateY(-11px) translateX(0) rotate(-45deg);
  56. background: $mobile-color-active;
  57. }
  58. }
  59. span {
  60. background: $mobile-color-main;
  61. border: none;
  62. height: 5px;
  63. width: 100%;
  64. position: absolute;
  65. top: 0;
  66. left: 0;
  67. transition: all .35s ease;
  68. cursor: pointer;
  69. &:nth-of-type(2) {
  70. top: 11px;
  71. }
  72. &:nth-of-type(3) {
  73. top: 22px;
  74. }
  75. }
  76. }
  77. }
  78. .overlay {
  79. position: fixed;
  80. background: #000;
  81. top: 0;
  82. left: 0;
  83. width: 100%;
  84. height: 0%;
  85. opacity: 0;
  86. visibility: hidden;
  87. transition: opacity .35s, visibility .35s, height .35s;
  88. &.open {
  89. opacity: .95;
  90. visibility: visible;
  91. height: 100%;
  92. }
  93. nav {
  94. position: relative;
  95. margin: 0 auto;
  96. text-align: center;
  97. }
  98. }
  99. .overlay-menu {
  100. height: calc(100% - 90px);
  101. overflow-y: scroll;
  102. & > .tree {
  103. text-align: left;
  104. }
  105. }
  106. .treemenu {
  107. &.treemenu-root {
  108. margin: 1rem;
  109. }
  110. li {
  111. list-style: none;
  112. margin: 0 0 1px;
  113. padding: 5px 0;
  114. line-height: 1.2rem;
  115. background: rgba($gray-color-dark,0.1);
  116. a {
  117. display: block;
  118. margin-left: 1.2rem;
  119. font-size: 1rem;
  120. &:hover, &:focus, &.active {
  121. color: $primary-color-light !important;
  122. text-decoration: none;
  123. }
  124. }
  125. }
  126. ul {
  127. margin: 0 0 0 1rem;
  128. }
  129. .toggler {
  130. cursor: pointer;
  131. vertical-align: top;
  132. font-size: 1.1rem;
  133. line-height: 1rem;
  134. padding-left: 5px;
  135. float: left;
  136. &:before {
  137. display: inline-block; margin-right: 2pt;
  138. }
  139. }
  140. li.tree-empty > .toggler {
  141. opacity: 0.3; cursor: default;
  142. &:before {
  143. content: "\2022";
  144. }
  145. }
  146. li.tree-closed > .toggler:before {
  147. content: "+";
  148. }
  149. li.tree-opened > .toggler:before {
  150. content: "\2212";
  151. }
  152. }
  153. .mobile-nav-open {
  154. overflow-y: hidden;
  155. }