_chatbox.scss 19 KB

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