App.styled.ts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. import styled, { css } from 'styled-components';
  2. import { Link } from 'react-router-dom';
  3. import { Button } from './common/Button/Button';
  4. import GitIcon from './common/Icons/GitIcon';
  5. import DiscordIcon from './common/Icons/DiscordIcon';
  6. export const Layout = styled.div`
  7. min-width: 1200px;
  8. @media screen and (max-width: 1023px) {
  9. min-width: initial;
  10. }
  11. `;
  12. export const Container = styled.main(
  13. ({ theme }) => css`
  14. margin-top: ${theme.layout.navBarHeight};
  15. margin-left: ${theme.layout.navBarWidth};
  16. position: relative;
  17. padding-bottom: 30px;
  18. z-index: 20;
  19. @media screen and (max-width: 1023px) {
  20. margin-left: initial;
  21. }
  22. `
  23. );
  24. export const Sidebar = styled.div<{ $visible: boolean }>(
  25. ({ theme, $visible }) => css`
  26. width: ${theme.layout.navBarWidth};
  27. display: flex;
  28. flex-direction: column;
  29. border-right: 1px solid ${theme.layout.stuffBorderColor};
  30. position: fixed;
  31. top: ${theme.layout.navBarHeight};
  32. left: 0;
  33. bottom: 0;
  34. padding: 8px 16px;
  35. overflow-y: scroll;
  36. transition: width 0.25s, opacity 0.25s, transform 0.25s,
  37. -webkit-transform 0.25s;
  38. background: ${theme.menu.backgroundColor.normal};
  39. @media screen and (max-width: 1023px) {
  40. ${$visible &&
  41. `transform: translate3d(${theme.layout.navBarWidth}, 0, 0)`};
  42. left: -${theme.layout.navBarWidth};
  43. z-index: 100;
  44. }
  45. &::-webkit-scrollbar {
  46. width: 8px;
  47. }
  48. &::-webkit-scrollbar-track {
  49. background-color: ${theme.scrollbar.trackColor.normal};
  50. }
  51. &::-webkit-scrollbar-thumb {
  52. width: 8px;
  53. background-color: ${theme.scrollbar.thumbColor.normal};
  54. border-radius: 4px;
  55. }
  56. &:hover::-webkit-scrollbar-thumb {
  57. background: ${theme.scrollbar.thumbColor.active};
  58. }
  59. &:hover::-webkit-scrollbar-track {
  60. background-color: ${theme.scrollbar.trackColor.active};
  61. }
  62. `
  63. );
  64. export const Overlay = styled.div<{ $visible: boolean }>(
  65. ({ theme, $visible }) => css`
  66. height: calc(100vh - ${theme.layout.navBarHeight});
  67. z-index: 99;
  68. visibility: hidden;
  69. opacity: 0;
  70. -webkit-transition: all 0.5s ease;
  71. transition: all 0.5s ease;
  72. left: 0;
  73. position: absolute;
  74. top: 0;
  75. ${$visible &&
  76. css`
  77. @media screen and (max-width: 1023px) {
  78. bottom: 0;
  79. right: 0;
  80. visibility: visible;
  81. opacity: 0.7;
  82. background-color: ${theme.layout.overlay.backgroundColor};
  83. }
  84. `}
  85. `
  86. );
  87. export const Navbar = styled.nav(
  88. ({ theme }) => css`
  89. display: flex;
  90. align-items: center;
  91. justify-content: space-between;
  92. border-bottom: 1px solid ${theme.layout.stuffBorderColor};
  93. position: fixed;
  94. top: 0;
  95. left: 0;
  96. right: 0;
  97. z-index: 30;
  98. background-color: ${theme.menu.backgroundColor.normal};
  99. min-height: 3.25rem;
  100. `
  101. );
  102. export const NavbarBrand = styled.div`
  103. display: flex;
  104. justify-content: flex-end;
  105. align-items: center !important;
  106. flex-shrink: 0;
  107. min-height: 3.25rem;
  108. `;
  109. export const SocialLink = styled.a(
  110. ({ theme: { layout, icons } }) => css`
  111. display: block;
  112. margin-top: 5px;
  113. cursor: pointer;
  114. fill: ${layout.socialLink.color};
  115. &:hover {
  116. ${DiscordIcon} {
  117. fill: ${icons.discord.hover};
  118. }
  119. ${GitIcon} {
  120. fill: ${icons.git.hover};
  121. }
  122. }
  123. &:active {
  124. ${DiscordIcon} {
  125. fill: ${icons.discord.active};
  126. }
  127. ${GitIcon} {
  128. fill: ${icons.git.active};
  129. }
  130. }
  131. `
  132. );
  133. export const NavbarSocial = styled.div`
  134. display: flex;
  135. align-items: center;
  136. gap: 10px;
  137. margin: 10px;
  138. `;
  139. export const NavbarItem = styled.div`
  140. display: flex;
  141. position: relative;
  142. flex-grow: 0;
  143. flex-shrink: 0;
  144. align-items: center;
  145. line-height: 1.5;
  146. padding: 0.5rem 0.75rem;
  147. `;
  148. export const NavbarBurger = styled.div(
  149. ({ theme }) => css`
  150. display: block;
  151. position: relative;
  152. cursor: pointer;
  153. height: 3.25rem;
  154. width: 3.25rem;
  155. margin: 0;
  156. padding: 0;
  157. &:hover {
  158. background-color: ${theme.menu.backgroundColor.hover};
  159. }
  160. @media screen and (min-width: 1024px) {
  161. display: none;
  162. }
  163. `
  164. );
  165. export const Span = styled.span(
  166. ({ theme }) => css`
  167. display: block;
  168. position: absolute;
  169. background: ${theme.menu.color.active};
  170. height: 1px;
  171. left: calc(50% - 8px);
  172. transform-origin: center;
  173. transition-duration: 86ms;
  174. transition-property: background-color, opacity, transform, -webkit-transform;
  175. transition-timing-function: ease-out;
  176. width: 16px;
  177. &:first-child {
  178. top: calc(50% - 6px);
  179. }
  180. &:nth-child(2) {
  181. top: calc(50% - 1px);
  182. }
  183. &:nth-child(3) {
  184. top: calc(50% + 4px);
  185. }
  186. `
  187. );
  188. export const Hyperlink = styled(Link)(
  189. ({ theme }) => css`
  190. position: relative;
  191. display: flex;
  192. flex-grow: 0;
  193. flex-shrink: 0;
  194. align-items: center;
  195. gap: 8px;
  196. margin: 0;
  197. padding: 0.5rem 0.75rem;
  198. font-family: Inter, sans-serif;
  199. font-style: normal;
  200. font-weight: bold;
  201. font-size: 12px;
  202. line-height: 16px;
  203. color: ${theme.menu.color.active};
  204. text-decoration: none;
  205. word-break: break-word;
  206. cursor: pointer;
  207. `
  208. );
  209. export const AlertsContainer = styled.div`
  210. max-width: 40%;
  211. width: 500px;
  212. position: fixed;
  213. bottom: 15px;
  214. right: 15px;
  215. z-index: 1000;
  216. @media screen and (max-width: 1023px) {
  217. max-width: initial;
  218. }
  219. `;
  220. export const LogoutButton = styled(Button)(
  221. ({ theme }) => css`
  222. color: ${theme.button.primary.invertedColors.normal};
  223. background: none !important;
  224. padding: 0 8px;
  225. `
  226. );
  227. export const LogoutLink = styled.a(
  228. () => css`
  229. margin-right: 2px;
  230. `
  231. );