_react_header_nav.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. .navigationFull {
  2. display: none;
  3. }
  4. .navigationSlider {
  5. position: absolute;
  6. right: 0px;
  7. .navSlideout {
  8. cursor: pointer;
  9. padding-top: 4px;
  10. position: absolute;
  11. right: 10px;
  12. top: 0;
  13. transition: top 0.3s;
  14. z-index: 101;
  15. }
  16. .slidingNav {
  17. background: $secondary-bg;
  18. box-sizing: border-box;
  19. height: 0px;
  20. overflow-x: hidden;
  21. padding: 0;
  22. position: absolute;
  23. right: 0px;
  24. top: 0;
  25. transition: height 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), width 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  26. width: 0;
  27. ul {
  28. flex-flow: column nowrap;
  29. list-style: none;
  30. padding: 10px;
  31. li {
  32. margin: 0;
  33. padding: 2px 0;
  34. a {
  35. color: $primary-bg;
  36. display: inline;
  37. margin: 3px 5px;
  38. padding: 2px 0px;
  39. transition: background-color 0.3s;
  40. &:focus,
  41. &:hover {
  42. border-bottom: 2px solid $primary-bg;
  43. }
  44. }
  45. }
  46. }
  47. }
  48. .navSlideoutActive {
  49. .slidingNav {
  50. height: auto;
  51. padding-top: $header-height + $header-pbot;
  52. width: 300px;
  53. }
  54. .navSlideout {
  55. top: -2px;
  56. .menuExpand {
  57. span:nth-child(1) {
  58. background-color: $text;
  59. top: 16px;
  60. transform: rotate(45deg);
  61. }
  62. span:nth-child(2) {
  63. opacity: 0;
  64. }
  65. span:nth-child(3) {
  66. background-color: $text;
  67. transform: rotate(-45deg);
  68. }
  69. }
  70. }
  71. }
  72. }
  73. .menuExpand {
  74. display: flex;
  75. flex-flow: column nowrap;
  76. height: 20px;
  77. justify-content: space-between;
  78. span {
  79. background: $primary-overlay;
  80. border-radius: 3px;
  81. display: block;
  82. flex: 0 0 4px;
  83. height: 4px;
  84. position: relative;
  85. top: 0;
  86. transition: background-color 0.3s, top 0.3s, opacity 0.3s, transform 0.3s;
  87. width: 20px;
  88. }
  89. }
  90. .navPusher {
  91. border-top: $header-height + $header-ptop + $header-pbot solid $primary-bg;
  92. position: relative;
  93. left: 0;
  94. z-index: 99;
  95. height: 100%;
  96. &::after {
  97. position: absolute;
  98. top: 0;
  99. right: 0;
  100. width: 0;
  101. height: 0;
  102. background: rgba(0,0,0,0.4);
  103. content: '';
  104. opacity: 0;
  105. -webkit-transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
  106. transition: opacity 0.5s, width 0.1s 0.5s, height 0.1s 0.5s;
  107. }
  108. .sliderActive &::after {
  109. width: 100%;
  110. height: 100%;
  111. opacity: 1;
  112. -webkit-transition: opacity 0.5s;
  113. transition: opacity 0.5s;
  114. z-index: 100;
  115. }
  116. }
  117. @media only screen and (min-width: 1024px) {
  118. .navigationFull {
  119. display: block;
  120. }
  121. .navigationSlider {
  122. display: none;
  123. }
  124. }