home.module.scss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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(var(--window-width) - 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. }
  97. .chat-item {
  98. padding: 10px 14px;
  99. background-color: var(--white);
  100. border-radius: 10px;
  101. margin-bottom: 10px;
  102. box-shadow: var(--card-shadow);
  103. transition: all 0.3s ease;
  104. cursor: pointer;
  105. user-select: none;
  106. border: 2px solid transparent;
  107. position: relative;
  108. overflow: hidden;
  109. }
  110. @keyframes slide-in {
  111. from {
  112. opacity: 0;
  113. transform: translateY(20px);
  114. }
  115. to {
  116. opacity: 1;
  117. transform: translateY(0px);
  118. }
  119. }
  120. .chat-item:hover {
  121. background-color: var(--hover-color);
  122. }
  123. .chat-item-selected {
  124. border-color: var(--primary);
  125. }
  126. .chat-item-title {
  127. font-size: 14px;
  128. font-weight: bolder;
  129. display: block;
  130. width: 200px;
  131. overflow: hidden;
  132. text-overflow: ellipsis;
  133. white-space: nowrap;
  134. }
  135. .chat-item-delete {
  136. position: absolute;
  137. top: 10px;
  138. right: -20px;
  139. transition: all ease 0.3s;
  140. opacity: 0;
  141. }
  142. .chat-item:hover > .chat-item-delete {
  143. opacity: 0.5;
  144. right: 10px;
  145. }
  146. .chat-item:hover > .chat-item-delete:hover {
  147. opacity: 1;
  148. }
  149. .chat-item-info {
  150. display: flex;
  151. justify-content: space-between;
  152. color: rgb(166, 166, 166);
  153. font-size: 12px;
  154. margin-top: 8px;
  155. }
  156. .chat-item-count {
  157. }
  158. .chat-item-date {
  159. }
  160. .sidebar-tail {
  161. display: flex;
  162. justify-content: space-between;
  163. padding-top: 20px;
  164. }
  165. .sidebar-actions {
  166. display: inline-flex;
  167. }
  168. .sidebar-action:not(:last-child) {
  169. margin-right: 15px;
  170. }
  171. .chat {
  172. display: flex;
  173. flex-direction: column;
  174. position: relative;
  175. height: 100%;
  176. }
  177. .chat-body {
  178. flex: 1;
  179. overflow: auto;
  180. padding: 20px;
  181. margin-bottom: 100px;
  182. }
  183. .chat-message {
  184. display: flex;
  185. flex-direction: row;
  186. }
  187. .chat-message-user {
  188. display: flex;
  189. flex-direction: row-reverse;
  190. }
  191. .chat-message-container {
  192. max-width: var(--message-max-width);
  193. display: flex;
  194. flex-direction: column;
  195. align-items: flex-start;
  196. animation: slide-in ease 0.3s;
  197. }
  198. .chat-message-user > .chat-message-container {
  199. align-items: flex-end;
  200. }
  201. .chat-message-avatar {
  202. margin-top: 20px;
  203. }
  204. .chat-message-status {
  205. font-size: 12px;
  206. color: #aaa;
  207. line-height: 1.5;
  208. margin-top: 5px;
  209. }
  210. .user-avtar {
  211. height: 30px;
  212. width: 30px;
  213. display: flex;
  214. align-items: center;
  215. justify-content: center;
  216. border: var(--border-in-light);
  217. box-shadow: var(--card-shadow);
  218. border-radius: 10px;
  219. }
  220. .chat-message-item {
  221. box-sizing: border-box;
  222. max-width: 100%;
  223. margin-top: 10px;
  224. border-radius: 10px;
  225. background-color: rgba(0, 0, 0, 0.05);
  226. padding: 10px;
  227. font-size: 14px;
  228. user-select: text;
  229. word-break: break-word;
  230. border: var(--border-in-light);
  231. }
  232. .chat-message-user > .chat-message-container > .chat-message-item {
  233. background-color: var(--second);
  234. }
  235. .chat-message-actions {
  236. display: flex;
  237. flex-direction: row-reverse;
  238. width: 100%;
  239. padding-top: 5px;
  240. box-sizing: border-box;
  241. }
  242. .chat-message-action-date {
  243. font-size: 12px;
  244. color: #aaa;
  245. }
  246. .chat-input-panel {
  247. position: absolute;
  248. bottom: 20px;
  249. display: flex;
  250. width: 100%;
  251. padding: 20px;
  252. box-sizing: border-box;
  253. }
  254. .chat-input-panel-inner {
  255. display: flex;
  256. flex: 1;
  257. }
  258. .chat-input {
  259. height: 100%;
  260. width: 100%;
  261. border-radius: 10px;
  262. border: var(--border-in-light);
  263. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
  264. background-color: var(--white);
  265. color: var(--black);
  266. font-family: inherit;
  267. padding: 10px 14px;
  268. resize: none;
  269. outline: none;
  270. }
  271. .chat-input:focus {
  272. border: 1px solid var(--primary);
  273. }
  274. .chat-input-send {
  275. background-color: var(--primary);
  276. color: white;
  277. position: absolute;
  278. right: 30px;
  279. bottom: 10px;
  280. }