home.module.scss 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391
  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. display: flex;
  38. flex-direction: column;
  39. box-shadow: none;
  40. position: relative;
  41. transition: width ease 0.05s;
  42. .sidebar-header-bar {
  43. display: flex;
  44. margin-bottom: 20px;
  45. .sidebar-bar-button {
  46. flex-grow: 1;
  47. &:not(:last-child) {
  48. margin-right: 10px;
  49. }
  50. }
  51. }
  52. &:hover,
  53. &:active {
  54. .sidebar-drag {
  55. // background-color: rgba($color: #000000, $alpha: 0.01);
  56. background-color: transparent;
  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. .mobile {
  110. display: block;
  111. }
  112. }
  113. .sidebar-header {
  114. position: relative;
  115. // padding-top: 20px;
  116. padding-bottom: 20px;
  117. display: flex;
  118. justify-content: flex-start;
  119. align-items: center;
  120. }
  121. .sidebar-logo {
  122. display: inline-flex;
  123. }
  124. .sidebar-title-container {
  125. display: inline-flex;
  126. flex-direction: column;
  127. }
  128. .sidebar-title {
  129. font-size: 20px;
  130. font-weight: bold;
  131. animation: slide-in ease 0.3s;
  132. }
  133. .sidebar-sub-title {
  134. font-size: 12px;
  135. font-weight: 400;
  136. animation: slide-in ease 0.3s;
  137. }
  138. .sidebar-body {
  139. flex: 1;
  140. overflow: auto;
  141. overflow-x: hidden;
  142. }
  143. /* Narrow scrollbar for sidebar (max 2px) - WebKit and Firefox */
  144. .sidebar,
  145. .sidebar-body {
  146. scrollbar-width: thin;
  147. scrollbar-color: rgba(0,0,0,0.12) transparent;
  148. &::-webkit-scrollbar {
  149. width: 1px;
  150. height: 1px;
  151. }
  152. &::-webkit-scrollbar-track {
  153. background: transparent;
  154. }
  155. &::-webkit-scrollbar-thumb {
  156. background: rgba(0,0,0,0.12);
  157. border-radius: 2px;
  158. }
  159. &::-webkit-scrollbar-thumb:hover {
  160. background: rgba(0,0,0,0.18);
  161. }
  162. }
  163. .chat-item {
  164. padding: 10px 14px;
  165. background-color: var(--white);
  166. border-radius: 10px;
  167. margin-bottom: 10px;
  168. box-shadow: var(--card-shadow);
  169. transition: background-color 0.3s ease;
  170. cursor: pointer;
  171. user-select: none;
  172. border: 2px solid transparent;
  173. position: relative;
  174. content-visibility: auto;
  175. }
  176. .chat-item:hover {
  177. background-color: var(--hover-color);
  178. }
  179. .chat-item-selected {
  180. border-color: var(--primary);
  181. }
  182. .chat-item-title {
  183. font-size: 14px;
  184. font-weight: bolder;
  185. display: block;
  186. width: calc(100% - 15px);
  187. overflow: hidden;
  188. text-overflow: ellipsis;
  189. white-space: nowrap;
  190. animation: slide-in ease 0.3s;
  191. }
  192. .chat-item-delete {
  193. position: absolute;
  194. top: 0;
  195. right: 0;
  196. transition: all ease 0.3s;
  197. opacity: 0;
  198. cursor: pointer;
  199. }
  200. .chat-item:hover>.chat-item-delete {
  201. opacity: 0.5;
  202. transform: translateX(-4px);
  203. }
  204. .chat-item:hover>.chat-item-delete:hover {
  205. opacity: 1;
  206. }
  207. .chat-item-info {
  208. display: flex;
  209. justify-content: space-between;
  210. color: rgb(166, 166, 166);
  211. font-size: 12px;
  212. margin-top: 8px;
  213. animation: slide-in ease 0.3s;
  214. }
  215. .chat-item-count,
  216. .chat-item-date {
  217. overflow: hidden;
  218. text-overflow: ellipsis;
  219. white-space: nowrap;
  220. }
  221. .narrow-sidebar {
  222. .sidebar-title,
  223. .sidebar-sub-title {
  224. display: none;
  225. }
  226. .sidebar-logo {
  227. position: relative;
  228. display: flex;
  229. justify-content: center;
  230. }
  231. .sidebar-header-bar {
  232. flex-direction: column;
  233. .sidebar-bar-button {
  234. &:not(:last-child) {
  235. margin-right: 0;
  236. margin-bottom: 10px;
  237. }
  238. }
  239. }
  240. .chat-item {
  241. padding: 0;
  242. min-height: 50px;
  243. display: flex;
  244. justify-content: center;
  245. align-items: center;
  246. transition: all ease 0.3s;
  247. overflow: hidden;
  248. &:hover {
  249. .chat-item-narrow {
  250. transform: scale(0.7) translateX(-50%);
  251. }
  252. }
  253. }
  254. .chat-item-narrow {
  255. line-height: 0;
  256. font-weight: lighter;
  257. color: var(--black);
  258. transform: translateX(0);
  259. transition: all ease 0.3s;
  260. padding: 4px;
  261. display: flex;
  262. flex-direction: column;
  263. justify-content: center;
  264. .chat-item-avatar {
  265. display: flex;
  266. justify-content: center;
  267. opacity: 0.2;
  268. position: absolute;
  269. transform: scale(4);
  270. }
  271. .chat-item-narrow-count {
  272. font-size: 24px;
  273. font-weight: bolder;
  274. text-align: center;
  275. color: var(--primary);
  276. opacity: 0.6;
  277. }
  278. }
  279. .sidebar-tail {
  280. flex-direction: column-reverse;
  281. align-items: center;
  282. .sidebar-actions {
  283. flex-direction: column-reverse;
  284. align-items: center;
  285. .sidebar-action {
  286. margin-right: 0;
  287. margin-top: 15px;
  288. }
  289. }
  290. }
  291. }
  292. .sidebar-tail {
  293. display: flex;
  294. justify-content: space-between;
  295. padding-top: 20px;
  296. }
  297. .sidebar-actions {
  298. display: inline-flex;
  299. }
  300. .sidebar-action:not(:last-child) {
  301. margin-right: 15px;
  302. }
  303. .loading-content {
  304. display: flex;
  305. flex-direction: column;
  306. justify-content: center;
  307. align-items: center;
  308. height: 100%;
  309. width: 100%;
  310. .loading-dots {
  311. font-size: 40px;
  312. span {
  313. animation: dot-blink 1.4s infinite both;
  314. }
  315. span:nth-child(2) {
  316. animation-delay: 0.2s;
  317. }
  318. span:nth-child(3) {
  319. animation-delay: 0.4s;
  320. }
  321. }
  322. }
  323. @keyframes dot-blink {
  324. 0% { opacity: 0.2; }
  325. 20% { opacity: 1; }
  326. 100% { opacity: 0.2; }
  327. }
  328. .rtl-screen {
  329. direction: rtl;
  330. }