home.module.scss 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. @import "./window.scss";
  2. @mixin container {
  3. background-color: var(--white);
  4. border: var(--border-in-light);
  5. border-radius: 20px;
  6. box-shadow: var(--shadow);
  7. color: var(--black);
  8. background-color: var(--white);
  9. min-width: 600px;
  10. min-height: 480px;
  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. .tight-container {
  21. --window-width: 100vw;
  22. --window-height: 100vh;
  23. --window-content-width: calc(var(--window-width) - var(--sidebar-width));
  24. @include container();
  25. border-radius: 0;
  26. }
  27. .sidebar {
  28. width: var(--sidebar-width);
  29. box-sizing: border-box;
  30. padding: 20px;
  31. background-color: var(--second);
  32. display: flex;
  33. flex-direction: column;
  34. box-shadow: inset -2px 0px 2px 0px rgb(0, 0, 0, 0.05);
  35. }
  36. .window-content {
  37. width: var(--window-content-width);
  38. height: 100%;
  39. }
  40. .mobile {
  41. display: none;
  42. }
  43. @media only screen and (max-width: 600px) {
  44. .container {
  45. min-width: unset;
  46. min-height: unset;
  47. border: 0;
  48. border-radius: 0;
  49. }
  50. .sidebar {
  51. position: absolute;
  52. top: -100%;
  53. z-index: 999;
  54. border-bottom-left-radius: 20px;
  55. border-bottom-right-radius: 20px;
  56. height: 80vh;
  57. box-shadow: var(--shadow);
  58. transition: all ease 0.3s;
  59. }
  60. .sidebar-show {
  61. top: 0;
  62. }
  63. .mobile {
  64. display: block;
  65. }
  66. }
  67. .sidebar-header {
  68. position: relative;
  69. padding-top: 20px;
  70. padding-bottom: 20px;
  71. }
  72. .sidebar-logo {
  73. position: absolute;
  74. right: 0;
  75. bottom: 18px;
  76. }
  77. .sidebar-title {
  78. font-size: 20px;
  79. font-weight: bold;
  80. }
  81. .sidebar-sub-title {
  82. font-size: 12px;
  83. font-weight: 400px;
  84. }
  85. .sidebar-body {
  86. flex: 1;
  87. overflow: auto;
  88. }
  89. .chat-list {
  90. }
  91. .chat-item {
  92. padding: 10px 14px;
  93. background-color: var(--white);
  94. border-radius: 10px;
  95. margin-bottom: 10px;
  96. box-shadow: var(--card-shadow);
  97. transition: all 0.3s ease;
  98. cursor: pointer;
  99. user-select: none;
  100. border: 2px solid transparent;
  101. position: relative;
  102. overflow: hidden;
  103. }
  104. @keyframes slide-in {
  105. from {
  106. opacity: 0;
  107. transform: translateY(20px);
  108. }
  109. to {
  110. opacity: 1;
  111. transform: translateY(0px);
  112. }
  113. }
  114. .chat-item:hover {
  115. background-color: var(--hover-color);
  116. }
  117. .chat-item-selected {
  118. border-color: var(--primary);
  119. }
  120. .chat-item-title {
  121. font-size: 14px;
  122. font-weight: bolder;
  123. display: block;
  124. width: 200px;
  125. overflow: hidden;
  126. text-overflow: ellipsis;
  127. white-space: nowrap;
  128. }
  129. .chat-item-delete {
  130. position: absolute;
  131. top: 10px;
  132. right: -20px;
  133. transition: all ease 0.3s;
  134. opacity: 0;
  135. }
  136. .chat-item:hover > .chat-item-delete {
  137. opacity: 0.5;
  138. right: 10px;
  139. }
  140. .chat-item:hover > .chat-item-delete:hover {
  141. opacity: 1;
  142. }
  143. .chat-item-info {
  144. display: flex;
  145. justify-content: space-between;
  146. color: rgb(166, 166, 166);
  147. font-size: 12px;
  148. margin-top: 8px;
  149. }
  150. .chat-item-count {
  151. }
  152. .chat-item-date {
  153. }
  154. .sidebar-tail {
  155. display: flex;
  156. justify-content: space-between;
  157. padding-top: 20px;
  158. }
  159. .sidebar-actions {
  160. display: inline-flex;
  161. }
  162. .sidebar-action:not(:last-child) {
  163. margin-right: 15px;
  164. }
  165. .chat {
  166. display: flex;
  167. flex-direction: column;
  168. position: relative;
  169. height: 100%;
  170. }
  171. .chat-body {
  172. flex: 1;
  173. overflow: auto;
  174. padding: 20px;
  175. margin-bottom: 100px;
  176. }
  177. .chat-message {
  178. display: flex;
  179. flex-direction: row;
  180. }
  181. .chat-message-user {
  182. display: flex;
  183. flex-direction: row-reverse;
  184. }
  185. .chat-message-container {
  186. max-width: var(--message-max-width);
  187. display: flex;
  188. flex-direction: column;
  189. align-items: flex-start;
  190. animation: slide-in ease 0.3s;
  191. }
  192. .chat-message-user > .chat-message-container {
  193. align-items: flex-end;
  194. }
  195. .chat-message-avatar {
  196. margin-top: 20px;
  197. }
  198. .chat-message-status {
  199. font-size: 12px;
  200. color: #aaa;
  201. line-height: 1.5;
  202. margin-top: 5px;
  203. }
  204. .user-avtar {
  205. height: 30px;
  206. width: 30px;
  207. display: flex;
  208. align-items: center;
  209. justify-content: center;
  210. border: var(--border-in-light);
  211. box-shadow: var(--card-shadow);
  212. border-radius: 10px;
  213. }
  214. .chat-message-item {
  215. box-sizing: border-box;
  216. max-width: 100%;
  217. margin-top: 10px;
  218. border-radius: 10px;
  219. background-color: rgba(0, 0, 0, 0.05);
  220. padding: 10px;
  221. font-size: 14px;
  222. user-select: text;
  223. word-break: break-word;
  224. border: var(--border-in-light);
  225. }
  226. .chat-message-user > .chat-message-container > .chat-message-item {
  227. background-color: var(--second);
  228. }
  229. .chat-message-actions {
  230. display: flex;
  231. flex-direction: row-reverse;
  232. width: 100%;
  233. padding-top: 5px;
  234. box-sizing: border-box;
  235. }
  236. .chat-message-action-date {
  237. font-size: 12px;
  238. color: #aaa;
  239. }
  240. .chat-input-panel {
  241. position: absolute;
  242. bottom: 20px;
  243. display: flex;
  244. width: 100%;
  245. padding: 20px;
  246. box-sizing: border-box;
  247. }
  248. .chat-input-panel-inner {
  249. display: flex;
  250. flex: 1;
  251. }
  252. .chat-input {
  253. height: 100%;
  254. width: 100%;
  255. border-radius: 10px;
  256. border: var(--border-in-light);
  257. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
  258. background-color: var(--white);
  259. color: var(--black);
  260. font-family: inherit;
  261. padding: 10px 14px;
  262. resize: none;
  263. outline: none;
  264. }
  265. .chat-input:focus {
  266. border: 1px solid var(--primary);
  267. }
  268. .chat-input-send {
  269. background-color: var(--primary);
  270. color: white;
  271. position: absolute;
  272. right: 30px;
  273. bottom: 10px;
  274. }