home.module.scss 5.7 KB

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