home.module.scss 5.2 KB

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