home.module.scss 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  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: 480px;
  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. }
  54. .sidebar-drag {
  55. $width: 10px;
  56. position: absolute;
  57. top: 0;
  58. right: 0;
  59. height: 100%;
  60. width: $width;
  61. background-color: var(--black);
  62. cursor: ew-resize;
  63. opacity: 0;
  64. transition: all ease 0.3s;
  65. &:hover,
  66. &:active {
  67. opacity: 0.2;
  68. }
  69. }
  70. .window-content {
  71. width: var(--window-content-width);
  72. height: 100%;
  73. display: flex;
  74. flex-direction: column;
  75. }
  76. .mobile {
  77. display: none;
  78. }
  79. @media only screen and (max-width: 600px) {
  80. .container {
  81. min-height: unset;
  82. min-width: unset;
  83. max-height: unset;
  84. min-width: unset;
  85. border: 0;
  86. border-radius: 0;
  87. }
  88. .sidebar {
  89. position: absolute;
  90. left: -100%;
  91. z-index: 1000;
  92. height: var(--full-height);
  93. transition: all ease 0.3s;
  94. box-shadow: none;
  95. }
  96. .sidebar-show {
  97. left: 0;
  98. }
  99. .mobile {
  100. display: block;
  101. }
  102. }
  103. .sidebar-header {
  104. position: relative;
  105. padding-top: 20px;
  106. padding-bottom: 20px;
  107. }
  108. .sidebar-logo {
  109. position: absolute;
  110. right: 0;
  111. bottom: 18px;
  112. }
  113. .sidebar-title {
  114. font-size: 20px;
  115. font-weight: bold;
  116. animation: slide-in ease 0.3s;
  117. }
  118. .sidebar-sub-title {
  119. font-size: 12px;
  120. font-weight: 400;
  121. animation: slide-in ease 0.3s;
  122. }
  123. .sidebar-body {
  124. flex: 1;
  125. overflow: auto;
  126. overflow-x: hidden;
  127. }
  128. .chat-item {
  129. padding: 10px 14px;
  130. background-color: var(--white);
  131. border-radius: 10px;
  132. margin-bottom: 10px;
  133. box-shadow: var(--card-shadow);
  134. transition: background-color 0.3s ease;
  135. cursor: pointer;
  136. user-select: none;
  137. border: 2px solid transparent;
  138. position: relative;
  139. }
  140. .chat-item:hover {
  141. background-color: var(--hover-color);
  142. }
  143. .chat-item-selected {
  144. border-color: var(--primary);
  145. }
  146. .chat-item-title {
  147. font-size: 14px;
  148. font-weight: bolder;
  149. display: block;
  150. width: calc(100% - 15px);
  151. overflow: hidden;
  152. text-overflow: ellipsis;
  153. white-space: nowrap;
  154. animation: slide-in ease 0.3s;
  155. }
  156. .chat-item-delete {
  157. position: absolute;
  158. top: 0;
  159. right: 0;
  160. transition: all ease 0.3s;
  161. opacity: 0;
  162. cursor: pointer;
  163. }
  164. .chat-item:hover > .chat-item-delete {
  165. opacity: 0.5;
  166. transform: translateX(-4px);
  167. }
  168. .chat-item:hover > .chat-item-delete:hover {
  169. opacity: 1;
  170. }
  171. .chat-item-info {
  172. display: flex;
  173. justify-content: space-between;
  174. color: rgb(166, 166, 166);
  175. font-size: 12px;
  176. margin-top: 8px;
  177. animation: slide-in ease 0.3s;
  178. }
  179. .chat-item-count,
  180. .chat-item-date {
  181. overflow: hidden;
  182. text-overflow: ellipsis;
  183. white-space: nowrap;
  184. }
  185. .narrow-sidebar {
  186. .sidebar-title,
  187. .sidebar-sub-title {
  188. display: none;
  189. }
  190. .sidebar-logo {
  191. position: relative;
  192. display: flex;
  193. justify-content: center;
  194. }
  195. .sidebar-header-bar {
  196. flex-direction: column;
  197. .sidebar-bar-button {
  198. &:not(:last-child) {
  199. margin-right: 0;
  200. margin-bottom: 10px;
  201. }
  202. }
  203. }
  204. .chat-item {
  205. padding: 0;
  206. min-height: 50px;
  207. display: flex;
  208. justify-content: center;
  209. align-items: center;
  210. transition: all ease 0.3s;
  211. overflow: hidden;
  212. &:hover {
  213. .chat-item-narrow {
  214. transform: scale(0.7) translateX(-50%);
  215. }
  216. }
  217. }
  218. .chat-item-narrow {
  219. line-height: 0;
  220. font-weight: lighter;
  221. color: var(--black);
  222. transform: translateX(0);
  223. transition: all ease 0.3s;
  224. padding: 4px;
  225. display: flex;
  226. flex-direction: column;
  227. justify-content: center;
  228. .chat-item-avatar {
  229. display: flex;
  230. justify-content: center;
  231. opacity: 0.2;
  232. position: absolute;
  233. transform: scale(4);
  234. }
  235. .chat-item-narrow-count {
  236. font-size: 24px;
  237. font-weight: bolder;
  238. text-align: center;
  239. color: var(--primary);
  240. opacity: 0.6;
  241. }
  242. }
  243. .sidebar-tail {
  244. flex-direction: column-reverse;
  245. align-items: center;
  246. .sidebar-actions {
  247. flex-direction: column-reverse;
  248. align-items: center;
  249. .sidebar-action {
  250. margin-right: 0;
  251. margin-top: 15px;
  252. }
  253. }
  254. }
  255. }
  256. .sidebar-tail {
  257. display: flex;
  258. justify-content: space-between;
  259. padding-top: 20px;
  260. }
  261. .sidebar-actions {
  262. display: inline-flex;
  263. }
  264. .sidebar-action:not(:last-child) {
  265. margin-right: 15px;
  266. }
  267. .loading-content {
  268. display: flex;
  269. flex-direction: column;
  270. justify-content: center;
  271. align-items: center;
  272. height: 100%;
  273. width: 100%;
  274. }
  275. .rtl-screen {
  276. direction: rtl;
  277. }