home.module.scss 5.6 KB

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