App.styled.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. import styled, { css } from 'styled-components';
  2. export const Layout = styled.div`
  3. min-width: 1200px;
  4. @media screen and (max-width: 1023px) {
  5. min-width: initial;
  6. }
  7. `;
  8. export const Container = styled.main(
  9. ({ theme }) => css`
  10. margin-top: ${theme.layout.navBarHeight};
  11. margin-left: ${theme.layout.navBarWidth};
  12. position: relative;
  13. z-index: 20;
  14. @media screen and (max-width: 1023px) {
  15. margin-left: initial;
  16. }
  17. `
  18. );
  19. export const Sidebar = styled.div<{ $visible: boolean }>(
  20. ({ theme, $visible }) => css`
  21. width: ${theme.layout.navBarWidth};
  22. display: flex;
  23. flex-direction: column;
  24. border-right: 1px solid ${theme.layout.stuffBorderColor};
  25. position: fixed;
  26. top: ${theme.layout.navBarHeight};
  27. left: 0;
  28. bottom: 0;
  29. padding: 8px 16px;
  30. overflow-y: scroll;
  31. transition: width 0.25s, opacity 0.25s, transform 0.25s,
  32. -webkit-transform 0.25s;
  33. background: ${theme.menu.backgroundColor.normal};
  34. @media screen and (max-width: 1023px) {
  35. ${$visible &&
  36. `transform: translate3d(${theme.layout.navBarWidth}, 0, 0)`};
  37. left: -${theme.layout.navBarWidth};
  38. z-index: 100;
  39. }
  40. &::-webkit-scrollbar {
  41. width: 8px;
  42. }
  43. &::-webkit-scrollbar-track {
  44. background-color: ${theme.scrollbar.trackColor.normal};
  45. }
  46. &::-webkit-scrollbar-thumb {
  47. width: 8px;
  48. background-color: ${theme.scrollbar.thumbColor.normal};
  49. border-radius: 4px;
  50. }
  51. &:hover::-webkit-scrollbar-thumb {
  52. background: ${theme.scrollbar.thumbColor.active};
  53. }
  54. &:hover::-webkit-scrollbar-track {
  55. background-color: ${theme.scrollbar.trackColor.active};
  56. }
  57. `
  58. );
  59. export const Overlay = styled.div<{ $visible: boolean }>(
  60. ({ theme, $visible }) => css`
  61. height: calc(100vh - ${theme.layout.navBarHeight});
  62. z-index: 99;
  63. visibility: 'hidden';
  64. opacity: 0;
  65. -webkit-transition: all 0.5s ease;
  66. transition: all 0.5s ease;
  67. left: 0;
  68. position: absolute;
  69. top: 0;
  70. ${$visible &&
  71. css`
  72. @media screen and (max-width: 1023px) {
  73. bottom: 0;
  74. right: 0;
  75. visibility: 'visible';
  76. opacity: 1;
  77. background-color: ${theme.layout.overlay.backgroundColor};
  78. }
  79. `}
  80. `
  81. );
  82. export const Navbar = styled.nav(
  83. ({ theme }) => css`
  84. border-bottom: 1px solid ${theme.layout.stuffBorderColor};
  85. position: fixed;
  86. top: 0;
  87. left: 0;
  88. right: 0;
  89. z-index: 30;
  90. background-color: ${theme.menu.backgroundColor.normal};
  91. min-height: 3.25rem;
  92. `
  93. );
  94. export const NavbarBrand = styled.div`
  95. display: flex;
  96. flex-shrink: 0;
  97. align-items: stretch;
  98. min-height: 3.25rem;
  99. `;
  100. export const NavbarItem = styled.div`
  101. display: flex;
  102. position: relative;
  103. flex-grow: 0;
  104. flex-shrink: 0;
  105. align-items: center;
  106. line-height: 1.5;
  107. padding: 0.5rem 0.75rem;
  108. `;
  109. export const NavbarBurger = styled.div(
  110. ({ theme }) => css`
  111. display: block;
  112. position: relative;
  113. cursor: pointer;
  114. height: 3.25rem;
  115. width: 3.25rem;
  116. margin: 0;
  117. padding: 0;
  118. &:hover {
  119. background-color: ${theme.menu.backgroundColor.hover};
  120. }
  121. @media screen and (min-width: 1024px) {
  122. display: none;
  123. }
  124. `
  125. );
  126. export const Span = styled.span(
  127. ({ theme }) => css`
  128. display: block;
  129. position: absolute;
  130. background: ${theme.menu.color.active};
  131. height: 1px;
  132. left: calc(50% - 8px);
  133. transform-origin: center;
  134. transition-duration: 86ms;
  135. transition-property: background-color, opacity, transform, -webkit-transform;
  136. transition-timing-function: ease-out;
  137. width: 16px;
  138. &:first-child {
  139. top: calc(50% - 6px);
  140. }
  141. &:nth-child(2) {
  142. top: calc(50% - 1px);
  143. }
  144. &:nth-child(3) {
  145. top: calc(50% + 4px);
  146. }
  147. `
  148. );
  149. export const Hyperlink = styled.a(
  150. ({ theme }) => css`
  151. position: relative;
  152. display: flex;
  153. flex-grow: 0;
  154. flex-shrink: 0;
  155. align-items: center;
  156. gap: 8px;
  157. margin: 0;
  158. padding: 0.5rem 0.75rem;
  159. font-family: Inter, sans-serif;
  160. font-style: normal;
  161. font-weight: bold;
  162. font-size: 12px;
  163. line-height: 16px;
  164. color: ${theme.menu.color.active};
  165. text-decoration: none;
  166. word-break: break-word;
  167. cursor: pointer;
  168. `
  169. );
  170. export const AlertsContainer = styled.div`
  171. max-width: 40%;
  172. width: 500px;
  173. position: fixed;
  174. bottom: 15px;
  175. right: 15px;
  176. z-index: 1000;
  177. @media screen and (max-width: 1023px) {
  178. max-width: initial;
  179. }
  180. `;