home.module.scss 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. @mixin container {
  2. background-color: var(--white);
  3. border: var(--border-in-light);
  4. border-radius: 20px;
  5. box-shadow: var(--shadow);
  6. color: var(--black);
  7. background-color: var(--white);
  8. min-width: 600px;
  9. min-height: 370px;
  10. max-width: 1200px;
  11. display: flex;
  12. overflow: hidden;
  13. box-sizing: border-box;
  14. width: var(--window-width);
  15. height: var(--window-height);
  16. }
  17. .container {
  18. @include container();
  19. }
  20. @media only screen and (min-width: 600px) {
  21. .tight-container {
  22. --window-width: 100vw;
  23. --window-height: var(--full-height);
  24. --window-content-width: calc(100% - var(--sidebar-width));
  25. @include container();
  26. max-width: 100vw;
  27. max-height: var(--full-height);
  28. border-radius: 0;
  29. border: 0;
  30. }
  31. }
  32. .sidebar {
  33. top: 0;
  34. width: var(--sidebar-width);
  35. box-sizing: border-box;
  36. padding: 20px;
  37. background-color: var(--second);
  38. display: flex;
  39. flex-direction: column;
  40. box-shadow: inset -2px 0px 2px 0px rgb(0, 0, 0, 0.05);
  41. position: relative;
  42. transition: width ease 0.05s;
  43. .sidebar-header-bar {
  44. display: flex;
  45. margin-bottom: 20px;
  46. .sidebar-bar-button {
  47. flex-grow: 1;
  48. &:not(:last-child) {
  49. margin-right: 10px;
  50. }
  51. }
  52. }
  53. &:hover,
  54. &:active {
  55. .sidebar-drag {
  56. background-color: rgba($color: #000000, $alpha: 0.01);
  57. svg {
  58. opacity: 0.2;
  59. }
  60. }
  61. }
  62. }
  63. .sidebar-drag {
  64. $width: 14px;
  65. position: absolute;
  66. top: 0;
  67. right: 0;
  68. height: 100%;
  69. width: $width;
  70. background-color: rgba($color: #000000, $alpha: 0);
  71. cursor: ew-resize;
  72. transition: all ease 0.3s;
  73. display: flex;
  74. align-items: center;
  75. svg {
  76. opacity: 0;
  77. margin-left: -2px;
  78. }
  79. }
  80. .window-content {
  81. width: 100%;
  82. height: 100%;
  83. display: flex;
  84. flex-direction: column;
  85. }
  86. .mobile {
  87. display: none;
  88. }
  89. @media only screen and (max-width: 600px) {
  90. .container {
  91. min-height: unset;
  92. min-width: unset;
  93. max-height: unset;
  94. min-width: unset;
  95. border: 0;
  96. border-radius: 0;
  97. position: relative;
  98. }
  99. .window-content {
  100. position: relative;
  101. z-index: 1;
  102. }
  103. .sidebar {
  104. position: absolute;
  105. left: -100%;
  106. z-index: 1000;
  107. height: var(--full-height);
  108. transition: all ease 0.3s;
  109. -webkit-transition: all ease 0.3s;
  110. box-shadow: none;
  111. }
  112. .sidebar-show {
  113. left: 0;
  114. }
  115. .sidebar-mask {
  116. position: fixed;
  117. top: 0;
  118. left: 0;
  119. right: 0;
  120. bottom: 0;
  121. background: rgba(0, 0, 0, 0.5);
  122. z-index: 999;
  123. animation: fadeIn 0.2s ease-out;
  124. -webkit-animation: fadeIn 0.2s ease-out;
  125. }
  126. @keyframes fadeIn {
  127. from {
  128. opacity: 0;
  129. }
  130. to {
  131. opacity: 1;
  132. }
  133. }
  134. @-webkit-keyframes fadeIn {
  135. from {
  136. opacity: 0;
  137. }
  138. to {
  139. opacity: 1;
  140. }
  141. }
  142. .mobile-menu-button {
  143. position: absolute;
  144. top: 12px;
  145. left: 12px;
  146. z-index: 1000;
  147. display: block;
  148. visibility: visible;
  149. opacity: 1;
  150. }
  151. .menu-trigger-button {
  152. width: 40px;
  153. height: 40px;
  154. display: flex !important;
  155. align-items: center;
  156. justify-content: center;
  157. transition: background-color 0.15s ease;
  158. -webkit-transition: background-color 0.15s ease;
  159. .anticon {
  160. font-size: 20px;
  161. color: #333;
  162. transition: color 0.15s ease;
  163. -webkit-transition: color 0.15s ease;
  164. display: block !important;
  165. visibility: visible !important;
  166. opacity: 1 !important;
  167. }
  168. &:hover {
  169. background-color: rgba(0, 0, 0, 0.04);
  170. .anticon {
  171. color: #666;
  172. }
  173. }
  174. &:active {
  175. background-color: rgba(0, 0, 0, 0.04);
  176. transition: none;
  177. -webkit-transition: none;
  178. }
  179. }
  180. .mobile {
  181. display: block;
  182. }
  183. }
  184. .sidebar-header {
  185. position: relative;
  186. // padding-top: 20px;
  187. padding-bottom: 20px;
  188. display: flex;
  189. justify-content: space-between;
  190. align-items: center;
  191. }
  192. .sidebar-logo {
  193. display: inline-flex;
  194. }
  195. .sidebar-title-container {
  196. display: inline-flex;
  197. flex-direction: column;
  198. }
  199. .sidebar-title {
  200. font-size: 20px;
  201. font-weight: bold;
  202. animation: slide-in ease 0.3s;
  203. }
  204. .sidebar-sub-title {
  205. font-size: 12px;
  206. font-weight: 400;
  207. animation: slide-in ease 0.3s;
  208. }
  209. .sidebar-body {
  210. flex: 1;
  211. overflow: auto;
  212. overflow-x: hidden;
  213. }
  214. .chat-item {
  215. padding: 10px 14px;
  216. background-color: var(--white);
  217. border-radius: 10px;
  218. margin-bottom: 10px;
  219. box-shadow: var(--card-shadow);
  220. transition: background-color 0.3s ease;
  221. cursor: pointer;
  222. user-select: none;
  223. border: 2px solid transparent;
  224. position: relative;
  225. content-visibility: auto;
  226. }
  227. .chat-item:hover {
  228. background-color: var(--hover-color);
  229. }
  230. .chat-item-selected {
  231. border-color: var(--primary);
  232. }
  233. .chat-item-title {
  234. font-size: 14px;
  235. font-weight: bolder;
  236. display: block;
  237. width: calc(100% - 15px);
  238. overflow: hidden;
  239. text-overflow: ellipsis;
  240. white-space: nowrap;
  241. animation: slide-in ease 0.3s;
  242. }
  243. .chat-item-delete {
  244. position: absolute;
  245. top: 0;
  246. right: 0;
  247. transition: all ease 0.3s;
  248. opacity: 0;
  249. cursor: pointer;
  250. }
  251. .chat-item:hover>.chat-item-delete {
  252. opacity: 0.5;
  253. transform: translateX(-4px);
  254. }
  255. .chat-item:hover>.chat-item-delete:hover {
  256. opacity: 1;
  257. }
  258. .chat-item-info {
  259. display: flex;
  260. justify-content: space-between;
  261. color: rgb(166, 166, 166);
  262. font-size: 12px;
  263. margin-top: 8px;
  264. animation: slide-in ease 0.3s;
  265. }
  266. .chat-item-count,
  267. .chat-item-date {
  268. overflow: hidden;
  269. text-overflow: ellipsis;
  270. white-space: nowrap;
  271. }
  272. .narrow-sidebar {
  273. .sidebar-title,
  274. .sidebar-sub-title {
  275. display: none;
  276. }
  277. .sidebar-logo {
  278. position: relative;
  279. display: flex;
  280. justify-content: center;
  281. }
  282. .sidebar-header-bar {
  283. flex-direction: column;
  284. .sidebar-bar-button {
  285. &:not(:last-child) {
  286. margin-right: 0;
  287. margin-bottom: 10px;
  288. }
  289. }
  290. }
  291. .chat-item {
  292. padding: 0;
  293. min-height: 50px;
  294. display: flex;
  295. justify-content: center;
  296. align-items: center;
  297. transition: all ease 0.3s;
  298. overflow: hidden;
  299. &:hover {
  300. .chat-item-narrow {
  301. transform: scale(0.7) translateX(-50%);
  302. }
  303. }
  304. }
  305. .chat-item-narrow {
  306. line-height: 0;
  307. font-weight: lighter;
  308. color: var(--black);
  309. transform: translateX(0);
  310. transition: all ease 0.3s;
  311. padding: 4px;
  312. display: flex;
  313. flex-direction: column;
  314. justify-content: center;
  315. .chat-item-avatar {
  316. display: flex;
  317. justify-content: center;
  318. opacity: 0.2;
  319. position: absolute;
  320. transform: scale(4);
  321. }
  322. .chat-item-narrow-count {
  323. font-size: 24px;
  324. font-weight: bolder;
  325. text-align: center;
  326. color: var(--primary);
  327. opacity: 0.6;
  328. }
  329. }
  330. .sidebar-tail {
  331. flex-direction: column-reverse;
  332. align-items: center;
  333. .sidebar-actions {
  334. flex-direction: column-reverse;
  335. align-items: center;
  336. .sidebar-action {
  337. margin-right: 0;
  338. margin-top: 15px;
  339. }
  340. }
  341. }
  342. }
  343. .sidebar-tail {
  344. display: flex;
  345. justify-content: space-between;
  346. padding-top: 20px;
  347. }
  348. .sidebar-actions {
  349. display: inline-flex;
  350. }
  351. .sidebar-action:not(:last-child) {
  352. margin-right: 15px;
  353. }
  354. .loading-content {
  355. display: flex;
  356. flex-direction: column;
  357. justify-content: center;
  358. align-items: center;
  359. height: 100%;
  360. width: 100%;
  361. }
  362. .rtl-screen {
  363. direction: rtl;
  364. }