2
0

_chatbox.scss 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. #conversejs {
  2. .chatbox-navback {
  3. display: none;
  4. }
  5. .flyout {
  6. position: absolute;
  7. @media screen and (max-height: $mobile-landscape-height) {
  8. border-radius: 0;
  9. }
  10. @media screen and (max-width: $mobile-portrait-length) {
  11. border-radius: 0;
  12. }
  13. @media screen and (max-height: $mobile-landscape-height) {
  14. bottom: 0;
  15. }
  16. @media screen and (max-width: $mobile-portrait-length) {
  17. bottom: 0;
  18. }
  19. }
  20. .chatbox-btn {
  21. border-radius: 25%;
  22. border: none;
  23. cursor: pointer;
  24. font-size: var(--chatbox-button-size);
  25. margin: 0 0.2em;
  26. padding: 0 0 0 0.5em;
  27. text-decoration: none;
  28. &:active {
  29. position: relative;
  30. top: 1px;
  31. }
  32. }
  33. .chat-head {
  34. display: flex;
  35. flex-direction: row;
  36. color: #ffffff;
  37. font-size: 100%;
  38. margin: 0;
  39. padding: 0;
  40. position: relative;
  41. &.chat-head-chatbox {
  42. background-color: var(--chat-head-color);
  43. }
  44. .avatar {
  45. margin-right: 0.5em;
  46. }
  47. .show-msg-author-modal {
  48. color: #ffffff !important;
  49. }
  50. .chat-head__desc {
  51. color: var(--chat-head-color-lighten-50-percent);
  52. font-size: var(--font-size-small);
  53. margin: 0;
  54. overflow: hidden;
  55. padding: 0.5rem 1rem 0.5rem 1rem;
  56. text-overflow: ellipsis;
  57. width: 100%;
  58. max-height: 5em;
  59. }
  60. .chatbox-title {
  61. padding: 0.75rem 1rem 0 1rem;
  62. display: flex;
  63. flex-direction: row;
  64. justify-content: space-between;
  65. width: 100%;
  66. }
  67. .chatbox-title--no-desc {
  68. padding: 0.75rem 1rem;
  69. }
  70. .chatbox-title--row {
  71. display: flex;
  72. flex-direction: row;
  73. overflow: hidden;
  74. }
  75. .chatbox-title__text {
  76. overflow: hidden;
  77. text-overflow: ellipsis;
  78. }
  79. .chatbox-title__buttons {
  80. display: flex;
  81. flex-direction: row-reverse;
  82. flex-wrap: nowrap;
  83. padding: 0;
  84. }
  85. a, a:visited, a:hover, a:not([href]):not([tabindex]) {
  86. &.chatbox-btn {
  87. &.fa,
  88. &.fas,
  89. &.far {
  90. color: white;
  91. &.button-on:before {
  92. padding: 0.2em;
  93. background-color: var(--chat-head-text-color);
  94. color: var(--chat-head-color);
  95. }
  96. }
  97. }
  98. }
  99. .chatbox-btn {
  100. color: white;
  101. &.fa, &.far, &.fas {
  102. color: white;
  103. }
  104. &:active {
  105. position: relative;
  106. top: 1px;
  107. }
  108. &.button-on:before {
  109. border-radius: 5%;
  110. background-color: var(--chat-head-text-color);
  111. color: var(--chat-head-color);
  112. }
  113. }
  114. }
  115. .chatbox {
  116. text-align: left;
  117. margin: 0 var(--chat-gutter);
  118. @media screen and (max-height: $mobile-landscape-height) {
  119. margin: 0;
  120. width: var(--mobile-chat-width);
  121. }
  122. @media screen and (max-width: $mobile-portrait-length) {
  123. margin: 0;
  124. width: var(--mobile-chat-width);
  125. }
  126. .box-flyout {
  127. display: flex;
  128. flex-direction: column;
  129. justify-content: space-between;
  130. box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
  131. z-index: 2;
  132. overflow: hidden;
  133. width: 100%;
  134. @media screen and (max-height: $mobile-landscape-height) {
  135. height: var(--mobile-chat-height);
  136. width: var(--mobile-chat-width);
  137. height: var(--fullpage-chat-height);
  138. }
  139. @media screen and (max-width: $mobile-portrait-length) {
  140. height: var(--mobile-chat-height);
  141. width: var(--mobile-chat-width);
  142. height: var(--fullpage-chat-height);
  143. }
  144. }
  145. .chat-title {
  146. display: var(--heading-display);
  147. font-family: var(--heading-font);
  148. color: var(--heading-color);
  149. display: block;
  150. line-height: var(--line-height-large);
  151. overflow: hidden;
  152. text-overflow: ellipsis;
  153. white-space: nowrap;
  154. &.groupchat {
  155. padding-right: var(--chatroom-head-title-padding-right);
  156. }
  157. a {
  158. color: var(--chat-head-text-color);
  159. width: 100%;
  160. }
  161. }
  162. .chat-body {
  163. display: flex;
  164. flex-direction: column;
  165. justify-content: space-between;
  166. background-color: var(--chat-textarea-background-color);
  167. border-bottom-left-radius: var(--chatbox-border-radius);
  168. border-bottom-right-radius: var(--chatbox-border-radius);
  169. @media screen and (max-height: $mobile-landscape-height) {
  170. border-bottom-left-radius: 0;
  171. border-bottom-right-radius: 0;
  172. }
  173. @media screen and (max-width: $mobile-portrait-length) {
  174. border-bottom-left-radius: 0;
  175. border-bottom-right-radius: 0;
  176. }
  177. border-top: 0;
  178. p {
  179. color: var(--text-color);
  180. font-size: var(--message-font-size);
  181. margin: 0;
  182. padding: 5px;
  183. }
  184. }
  185. .new-msgs-indicator {
  186. position: relative;
  187. width: 100%;
  188. cursor: pointer;
  189. background-color: var(--chat-head-color);
  190. color: var(--light-background-color);
  191. padding: 0.5em;
  192. font-size: 0.9em;
  193. text-align: center;
  194. z-index: 20;
  195. white-space: nowrap;
  196. margin-bottom: 0.25em;
  197. }
  198. .chat-content {
  199. background-color: var(--chat-content-background-color);
  200. border: 0;
  201. color: var(--text-color);
  202. font-size: var(--message-font-size);
  203. height: 100%;
  204. line-height: 1.3em;
  205. overflow: hidden;
  206. padding: 0;
  207. display: flex;
  208. flex-direction: column;
  209. justify-content: space-between;
  210. converse-chat-content {
  211. display: flex;
  212. flex-direction: column;
  213. height: 100%;
  214. justify-content: space-between;
  215. }
  216. converse-chat-message {
  217. .spinner {
  218. width: 100%;
  219. overflow-y: hidden;
  220. }
  221. }
  222. .chat-content__help {
  223. max-height: 100%;
  224. converse-chat-help {
  225. border-top: 1px solid var(--chat-head-color);
  226. display: block;
  227. height: 100%;
  228. overflow-y: auto;
  229. padding: 0.5em 0;
  230. }
  231. .close-chat-help {
  232. float: right;
  233. padding-right: 1em;
  234. cursor: pointer;
  235. color: var(--chat-content-background-color);
  236. svg {
  237. fill: var(--chat-head-color);
  238. }
  239. }
  240. }
  241. .chat-content__messages {
  242. overflow-x: hidden;
  243. overflow-y: auto;
  244. height: 100%;
  245. }
  246. .chat-content__notifications {
  247. height: 1.7em;
  248. white-space: pre;
  249. background-color: var(--chat-content-background-color);
  250. color: var(--subdued-color);
  251. font-size: 90%;
  252. font-style: italic;
  253. line-height: var(--line-height-small);
  254. padding: 0 1em 0.3em;
  255. &:before {
  256. content: " ";
  257. }
  258. }
  259. video {
  260. width: 100%
  261. }
  262. progress {
  263. margin: 0.5em 0;
  264. width: 100%
  265. }
  266. }
  267. .chat-content-sendbutton {
  268. height: calc(100% - (var(--chat-textarea-height) + var(--send-button-height) + 2 * var(--send-button-margin)));
  269. }
  270. .dropdown { /* status dropdown styles */
  271. background-color: var(--light-background-color);
  272. dd {
  273. margin: 0;
  274. padding: 0;
  275. position: relative;
  276. }
  277. }
  278. .sendXMPPMessage {
  279. -moz-background-clip: padding;
  280. -webkit-background-clip: padding-box;
  281. border-bottom-radius: var(--chatbox-border-radius);
  282. background-clip: padding-box;
  283. background-color: white;
  284. border: 0;
  285. margin: 0;
  286. padding: 0;
  287. @media screen and (max-height: $mobile-landscape-height) {
  288. width: 100%;
  289. }
  290. @media screen and (max-width: $mobile-portrait-length) {
  291. width: 100%;
  292. }
  293. .suggestion-box__results {
  294. &:after {
  295. display: none;
  296. }
  297. }
  298. .spoiler-hint {
  299. width: 100%;
  300. }
  301. .chat-textarea, input {
  302. &:active, &:focus{
  303. outline-color: var(--chat-head-color);
  304. }
  305. &.correcting {
  306. background-color: var(--chat-correcting-color);
  307. }
  308. }
  309. .chat-textarea {
  310. color: var(--chat-textarea-color);
  311. background-color: var(--chat-textarea-background-color);
  312. border-top-left-radius: 0;
  313. border-top-right-radius: 0;
  314. border-bottom-radius: var(--chatbox-border-radius);
  315. padding-left: 0.5em;
  316. padding-right: 4.5em;
  317. padding-top: 0.5em;
  318. padding-bottom:0.5em;
  319. width: 100%;
  320. border: none;
  321. min-height: var(--chat-textarea-height);
  322. margin-bottom: -4px; // Not clear why this is necessar :(
  323. resize: none;
  324. &.spoiler {
  325. height: 42px;
  326. }
  327. }
  328. }
  329. .dragresize {
  330. background: transparent;
  331. border: 0;
  332. margin: 0;
  333. position: absolute;
  334. top: 0;
  335. z-index: 20;
  336. &-top {
  337. cursor: n-resize;
  338. height: 5px;
  339. width: 100%;
  340. }
  341. &-left,
  342. &-occupants-left {
  343. cursor: w-resize;
  344. width: 5px;
  345. height: 100%;
  346. left: 0;
  347. }
  348. &-topleft {
  349. cursor: nw-resize;
  350. width: 15px;
  351. height: 15px;
  352. top: 0;
  353. left: 0;
  354. }
  355. }
  356. }
  357. }
  358. /* ******************* Overlay and embedded styles *************************** */
  359. #conversejs {
  360. converse-chats.converse-embedded,
  361. converse-chats.converse-overlayed {
  362. .controlbox-head {
  363. padding: 0.5em;
  364. }
  365. .chat-head {
  366. border-top-left-radius: 0;
  367. border-top-right-radius: 0;
  368. }
  369. .chatbox {
  370. min-width: var(--overlayed-chat-width) !important;
  371. width: var(--overlayed-chat-width);
  372. .box-flyout {
  373. min-width: var(--overlayed-chat-width) !important;
  374. width: var(--overlayed-chat-width);
  375. }
  376. }
  377. }
  378. converse-chats.converse-overlayed {
  379. .chat-head, .box-flyout {
  380. border-top-left-radius: var(--chatbox-border-radius);
  381. border-top-right-radius: var(--chatbox-border-radius);
  382. @media screen and (max-height: $mobile-landscape-height) {
  383. border-top-left-radius: 0;
  384. border-top-right-radius: 0;
  385. }
  386. @media screen and (max-width: $mobile-portrait-length) {
  387. border-top-left-radius: 0;
  388. border-top-right-radius: 0;
  389. }
  390. }
  391. .flyout {
  392. bottom: var(--overlayed-chatbox-hover-height);
  393. }
  394. .box-flyout {
  395. height: var(--overlayed-chat-height);
  396. min-height: calc(var(--overlayed-chat-height) / 2);
  397. }
  398. .chat-head {
  399. min-height: var(--overlayed-chat-head-height);
  400. }
  401. .minimized-chats-flyout .chat-head {
  402. cursor: default;
  403. }
  404. .chat-textarea {
  405. max-height: var(--overlayed-max-chat-textarea-height);
  406. }
  407. .chatbox {
  408. .chat-body {
  409. height: calc(100% - var(--overlayed-chat-head-height));
  410. }
  411. .chatbox-title {
  412. padding: 0.5rem 0.75rem 0 0.75rem;
  413. }
  414. .chatbox-title--no-desc {
  415. padding: 0.5rem 0.75rem;
  416. }
  417. converse-dropdown {
  418. .btn--standalone {
  419. padding: 0 0.2em;
  420. margin: 0 0 0 0.5em;
  421. }
  422. }
  423. }
  424. }
  425. }
  426. @include media-breakpoint-down(sm) {
  427. #conversejs.converse-overlayed {
  428. > .row {
  429. flex-direction: column;
  430. &.no-gutters {
  431. margin: -1em;
  432. }
  433. }
  434. }
  435. }
  436. #conversejs {
  437. converse-chats.converse-embedded,
  438. converse-chats.converse-fullscreen {
  439. .flyout {
  440. border-radius: 0;
  441. border:none;
  442. bottom: 0;
  443. }
  444. .chatbox {
  445. margin: 0;
  446. margin-left: 15px;
  447. .box-flyout {
  448. box-shadow: none;
  449. overflow: hidden;
  450. }
  451. &:not(#controlbox) {
  452. .box-flyout {
  453. @include media-breakpoint-up(md) {
  454. max-width: 66.666667%;
  455. }
  456. @include media-breakpoint-up(lg) {
  457. max-width: 75%;
  458. }
  459. @include media-breakpoint-up(xl) {
  460. max-width: 83.333333%;
  461. }
  462. }
  463. }
  464. @include media-breakpoint-up(md) {
  465. @include make-col(8);
  466. }
  467. @include media-breakpoint-up(lg) {
  468. @include make-col(9);
  469. }
  470. @include media-breakpoint-up(xl) {
  471. @include make-col(10);
  472. }
  473. }
  474. &.converse-singleton {
  475. .flyout {
  476. border: none !important;
  477. }
  478. .chat-head {
  479. padding: 0.5em;
  480. }
  481. .chatbox {
  482. margin: 0;
  483. @include make-col-ready();
  484. @include media-breakpoint-up(md) {
  485. @include make-col(12);
  486. }
  487. @include media-breakpoint-up(lg) {
  488. @include make-col(12);
  489. }
  490. @include media-breakpoint-up(xl) {
  491. @include make-col(12);
  492. }
  493. }
  494. }
  495. }
  496. converse-chats.converse-embedded {
  497. .chat-head {
  498. font-size: var(--font-size-huge);
  499. }
  500. &.converse-chatboxes {
  501. z-index: 1031; // One more than bootstrap navbar
  502. position: inherit;
  503. flex-wrap: nowrap;
  504. bottom: auto;
  505. height: 100%;
  506. width: 100%;
  507. margin-left: -15px;
  508. }
  509. .chatbox {
  510. .box-flyout {
  511. bottom: 0;
  512. height: 100%;
  513. min-width: auto;
  514. width: 100%;
  515. }
  516. }
  517. .chat-textarea {
  518. max-height: var(--fullpage-max-chat-textarea-height);
  519. }
  520. }
  521. }
  522. /* ******************* Fullpage styles *************************** */
  523. #conversejs {
  524. converse-chats.converse-fullscreen {
  525. .chatbox-btn {
  526. font-size: var(--fullpage-chatbox-button-size);
  527. margin: 0 0.3em;
  528. }
  529. .chat-head {
  530. font-size: var(--font-size-huge);
  531. }
  532. .chat-textarea {
  533. max-height: var(--fullpage-max-chat-textarea-height);
  534. }
  535. .chatbox {
  536. .box-flyout {
  537. box-shadow: none;
  538. height: var(--fullpage-chat-height);
  539. min-height: calc(var(--fullpage-chat-height) / 2);
  540. width: var(--fullpage-chat-width);
  541. overflow: hidden;
  542. }
  543. .chat-body {
  544. height: inherit;
  545. overflow: hidden;
  546. background-color: var(--chat-background-color);
  547. }
  548. .chat-title {
  549. font-size: var(--font-size-huge);
  550. line-height: var(--line-height-huge);
  551. }
  552. .sendXMPPMessage {
  553. ul {
  554. width: 100%;
  555. }
  556. }
  557. }
  558. }
  559. }
  560. @include media-breakpoint-down(sm) {
  561. #conversejs {
  562. converse-chats:not(.converse-embedded) {
  563. > .row {
  564. flex-direction: row-reverse;
  565. }
  566. #converse-login-panel {
  567. .converse-form {
  568. padding: 3em 2em 3em;
  569. }
  570. }
  571. .chatbox {
  572. width: calc(100% - 50px);
  573. .row {
  574. .box-flyout {
  575. left: 50px;
  576. bottom: 0;
  577. height: var(--fullpage-chat-height);
  578. box-shadow: none;
  579. }
  580. }
  581. }
  582. }
  583. converse-chats.converse-mobile,
  584. converse-chats.converse-overlayed,
  585. converse-chats.converse-fullscreen {
  586. .chatbox {
  587. .box-flyout {
  588. .chatbox-navback {
  589. margin: auto 0;
  590. margin-right: 1em;
  591. display: flex;
  592. .fa-arrow-left {
  593. &:before {
  594. color: white;
  595. }
  596. }
  597. }
  598. }
  599. }
  600. }
  601. }
  602. }