home.module.scss 5.9 KB

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