home.module.scss 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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. }
  98. .sidebar {
  99. position: absolute;
  100. left: -100%;
  101. z-index: 1000;
  102. height: var(--full-height);
  103. transition: all ease 0.3s;
  104. box-shadow: none;
  105. }
  106. .sidebar-show {
  107. left: 0;
  108. }
  109. .sidebar-mask {
  110. position: fixed;
  111. top: 0;
  112. left: 0;
  113. right: 0;
  114. bottom: 0;
  115. background: rgba(0, 0, 0, 0.5);
  116. z-index: 999;
  117. animation: fadeIn 0.2s ease-out;
  118. }
  119. @keyframes fadeIn {
  120. from {
  121. opacity: 0;
  122. }
  123. to {
  124. opacity: 1;
  125. }
  126. }
  127. .mobile-menu-button {
  128. position: absolute;
  129. top: 12px;
  130. left: 12px;
  131. z-index: 100;
  132. }
  133. .menu-trigger-button {
  134. width: 40px;
  135. height: 40px;
  136. display: flex;
  137. align-items: center;
  138. justify-content: center;
  139. transition: background-color 0.15s ease;
  140. .anticon {
  141. font-size: 20px;
  142. color: #333;
  143. transition: color 0.15s ease;
  144. }
  145. &:hover {
  146. background-color: rgba(0, 0, 0, 0.04);
  147. .anticon {
  148. color: #666;
  149. }
  150. }
  151. &:active {
  152. background-color: rgba(0, 0, 0, 0.04);
  153. transition: none;
  154. }
  155. }
  156. .mobile {
  157. display: block;
  158. }
  159. }
  160. .sidebar-header {
  161. position: relative;
  162. // padding-top: 20px;
  163. padding-bottom: 20px;
  164. display: flex;
  165. justify-content: space-between;
  166. align-items: center;
  167. }
  168. .sidebar-logo {
  169. display: inline-flex;
  170. }
  171. .sidebar-title-container {
  172. display: inline-flex;
  173. flex-direction: column;
  174. }
  175. .sidebar-title {
  176. font-size: 20px;
  177. font-weight: bold;
  178. animation: slide-in ease 0.3s;
  179. }
  180. .sidebar-sub-title {
  181. font-size: 12px;
  182. font-weight: 400;
  183. animation: slide-in ease 0.3s;
  184. }
  185. .sidebar-body {
  186. flex: 1;
  187. overflow: auto;
  188. overflow-x: hidden;
  189. }
  190. .chat-item {
  191. padding: 10px 14px;
  192. background-color: var(--white);
  193. border-radius: 10px;
  194. margin-bottom: 10px;
  195. box-shadow: var(--card-shadow);
  196. transition: background-color 0.3s ease;
  197. cursor: pointer;
  198. user-select: none;
  199. border: 2px solid transparent;
  200. position: relative;
  201. content-visibility: auto;
  202. }
  203. .chat-item:hover {
  204. background-color: var(--hover-color);
  205. }
  206. .chat-item-selected {
  207. border-color: var(--primary);
  208. }
  209. .chat-item-title {
  210. font-size: 14px;
  211. font-weight: bolder;
  212. display: block;
  213. width: calc(100% - 15px);
  214. overflow: hidden;
  215. text-overflow: ellipsis;
  216. white-space: nowrap;
  217. animation: slide-in ease 0.3s;
  218. }
  219. .chat-item-delete {
  220. position: absolute;
  221. top: 0;
  222. right: 0;
  223. transition: all ease 0.3s;
  224. opacity: 0;
  225. cursor: pointer;
  226. }
  227. .chat-item:hover>.chat-item-delete {
  228. opacity: 0.5;
  229. transform: translateX(-4px);
  230. }
  231. .chat-item:hover>.chat-item-delete:hover {
  232. opacity: 1;
  233. }
  234. .chat-item-info {
  235. display: flex;
  236. justify-content: space-between;
  237. color: rgb(166, 166, 166);
  238. font-size: 12px;
  239. margin-top: 8px;
  240. animation: slide-in ease 0.3s;
  241. }
  242. .chat-item-count,
  243. .chat-item-date {
  244. overflow: hidden;
  245. text-overflow: ellipsis;
  246. white-space: nowrap;
  247. }
  248. .narrow-sidebar {
  249. .sidebar-title,
  250. .sidebar-sub-title {
  251. display: none;
  252. }
  253. .sidebar-logo {
  254. position: relative;
  255. display: flex;
  256. justify-content: center;
  257. }
  258. .sidebar-header-bar {
  259. flex-direction: column;
  260. .sidebar-bar-button {
  261. &:not(:last-child) {
  262. margin-right: 0;
  263. margin-bottom: 10px;
  264. }
  265. }
  266. }
  267. .chat-item {
  268. padding: 0;
  269. min-height: 50px;
  270. display: flex;
  271. justify-content: center;
  272. align-items: center;
  273. transition: all ease 0.3s;
  274. overflow: hidden;
  275. &:hover {
  276. .chat-item-narrow {
  277. transform: scale(0.7) translateX(-50%);
  278. }
  279. }
  280. }
  281. .chat-item-narrow {
  282. line-height: 0;
  283. font-weight: lighter;
  284. color: var(--black);
  285. transform: translateX(0);
  286. transition: all ease 0.3s;
  287. padding: 4px;
  288. display: flex;
  289. flex-direction: column;
  290. justify-content: center;
  291. .chat-item-avatar {
  292. display: flex;
  293. justify-content: center;
  294. opacity: 0.2;
  295. position: absolute;
  296. transform: scale(4);
  297. }
  298. .chat-item-narrow-count {
  299. font-size: 24px;
  300. font-weight: bolder;
  301. text-align: center;
  302. color: var(--primary);
  303. opacity: 0.6;
  304. }
  305. }
  306. .sidebar-tail {
  307. flex-direction: column-reverse;
  308. align-items: center;
  309. .sidebar-actions {
  310. flex-direction: column-reverse;
  311. align-items: center;
  312. .sidebar-action {
  313. margin-right: 0;
  314. margin-top: 15px;
  315. }
  316. }
  317. }
  318. }
  319. .sidebar-tail {
  320. display: flex;
  321. justify-content: space-between;
  322. padding-top: 20px;
  323. }
  324. .sidebar-actions {
  325. display: inline-flex;
  326. }
  327. .sidebar-action:not(:last-child) {
  328. margin-right: 15px;
  329. }
  330. .loading-content {
  331. display: flex;
  332. flex-direction: column;
  333. justify-content: center;
  334. align-items: center;
  335. height: 100%;
  336. width: 100%;
  337. }
  338. .rtl-screen {
  339. direction: rtl;
  340. }