home.module.scss 6.6 KB

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