2
0

_chatbox.scss 17 KB

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