_chatbox.scss 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  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: 100vh;
  135. }
  136. @media screen and (max-width: $mobile-portrait-length) {
  137. height: var(--mobile-chat-height);
  138. width: var(--mobile-chat-width);
  139. height: 100vh;
  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-y: auto;
  203. padding: 1em 0 0 0;
  204. display: flex;
  205. flex-direction: column;
  206. justify-content: space-between;
  207. .chat-content__notifications {
  208. height: 1.7em;
  209. white-space: pre;
  210. background-color: var(--chat-content-background-color);
  211. color: var(--subdued-color);
  212. font-size: 90%;
  213. font-style: italic;
  214. line-height: var(--line-height-small);
  215. padding: 0 1em 0.3em;
  216. &:before {
  217. content: " ";
  218. }
  219. }
  220. video {
  221. width: 100%
  222. }
  223. progress {
  224. margin: 0.5em 0;
  225. width: 100%
  226. }
  227. }
  228. .chat-content-sendbutton {
  229. height: calc(100% - (var(--chat-textarea-height) + var(--send-button-height) + 2 * var(--send-button-margin)));
  230. }
  231. .dropdown { /* status dropdown styles */
  232. background-color: var(--light-background-color);
  233. dd {
  234. margin: 0;
  235. padding: 0;
  236. position: relative;
  237. }
  238. }
  239. .sendXMPPMessage {
  240. -moz-background-clip: padding;
  241. -webkit-background-clip: padding-box;
  242. border-bottom-radius: var(--chatbox-border-radius);
  243. background-clip: padding-box;
  244. background-color: white;
  245. border: 0;
  246. margin: 0;
  247. padding: 0;
  248. @media screen and (max-height: $mobile-landscape-height) {
  249. width: 100%;
  250. }
  251. @media screen and (max-width: $mobile-portrait-length) {
  252. width: 100%;
  253. }
  254. .suggestion-box__results {
  255. &:after {
  256. display: none;
  257. }
  258. }
  259. .spoiler-hint {
  260. width: 100%;
  261. }
  262. .chat-textarea {
  263. color: var(--chat-textarea-color);
  264. background-color: var(--chat-textarea-background-color);
  265. border-top-left-radius: 0;
  266. border-top-right-radius: 0;
  267. border-bottom-radius: var(--chatbox-border-radius);
  268. padding-left: 0.5em;
  269. padding-right: 4.5em;
  270. padding-top: 0.5em;
  271. padding-bottom:0.5em;
  272. width: 100%;
  273. border: none;
  274. min-height: var(--chat-textarea-height);
  275. margin-bottom: -4px; // Not clear why this is necessar :(
  276. resize: none;
  277. &:active, &:focus{
  278. outline-color: var(--chat-head-color);
  279. }
  280. &.spoiler {
  281. height: 42px;
  282. }
  283. &.correcting {
  284. background-color: var(--chat-correcting-color);
  285. }
  286. }
  287. .send-button {
  288. border-radius: 0;
  289. bottom: var(--send-button-bottom);
  290. background-color: var(--chat-head-color);
  291. color: var(--inverse-link-color);
  292. }
  293. .chat-toolbar--container {
  294. display: flex;
  295. flex-wrap: nowrap;
  296. }
  297. .chat-toolbar {
  298. box-sizing: border-box;
  299. margin: 0;
  300. width: 100%;
  301. padding: 0.25em;
  302. display: block;
  303. border-top: 4px solid var(--chat-head-color);
  304. background-color: white;
  305. color: var(--chat-head-color);
  306. .fa, .fa:hover,
  307. .far, .far:hover,
  308. .fas, .fas:hover {
  309. color: var(--chat-head-color);
  310. font-size: var(--font-size-large);
  311. }
  312. .disabled {
  313. color: var(--text-color-lighten-15-percent) !important;
  314. }
  315. .unencrypted a,
  316. .unencrypted {
  317. color: var(--text-color);
  318. .toolbar-menu {
  319. a {
  320. color: var(--link-color);
  321. }
  322. }
  323. }
  324. .unverified a,
  325. .unverified {
  326. color: #cf5300;
  327. }
  328. .private a,
  329. .private {
  330. color: #4b7003;
  331. }
  332. li {
  333. cursor: pointer;
  334. display: inline-block;
  335. list-style: none;
  336. padding: 0 0.5em;
  337. &:hover {
  338. cursor: pointer;
  339. }
  340. .toolbar-menu {
  341. background-color: #fff;
  342. bottom: 1.7rem;
  343. box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
  344. height: auto;
  345. margin-bottom: 0;
  346. min-width: 21rem;
  347. position: absolute;
  348. right: 0;
  349. top: auto;
  350. z-index: $zindex-dropdown;
  351. &.otr-menu {
  352. left: -6em;
  353. min-width: 15rem;
  354. &.show {
  355. display: flex;
  356. flex-direction: column;
  357. }
  358. }
  359. a {
  360. color: var(--link-color);
  361. }
  362. }
  363. &.toggle-otr {
  364. ul {
  365. z-index: 99;
  366. li {
  367. &:hover {
  368. background-color: var(--highlight-color);
  369. }
  370. display: block;
  371. padding: 7px;
  372. a {
  373. display: block;
  374. }
  375. }
  376. }
  377. }
  378. }
  379. }
  380. }
  381. .dragresize {
  382. background: transparent;
  383. border: 0;
  384. margin: 0;
  385. position: absolute;
  386. top: 0;
  387. z-index: 20;
  388. &-top {
  389. cursor: n-resize;
  390. height: 5px;
  391. width: 100%;
  392. }
  393. &-left,
  394. &-occupants-left {
  395. cursor: w-resize;
  396. width: 5px;
  397. height: 100%;
  398. left: 0;
  399. }
  400. &-topleft {
  401. cursor: nw-resize;
  402. width: 15px;
  403. height: 15px;
  404. top: 0;
  405. left: 0;
  406. }
  407. }
  408. }
  409. }
  410. /* ******************* Overlay and embedded styles *************************** */
  411. #conversejs.converse-embedded,
  412. #conversejs.converse-overlayed {
  413. .controlbox-head {
  414. padding: 0.5em;
  415. }
  416. .chat-head {
  417. border-top-left-radius: var(--chatbox-border-radius);
  418. border-top-right-radius: var(--chatbox-border-radius);
  419. @media screen and (max-height: $mobile-landscape-height) {
  420. border-top-left-radius: 0;
  421. border-top-right-radius: 0;
  422. }
  423. @media screen and (max-width: $mobile-portrait-length) {
  424. border-top-left-radius: 0;
  425. border-top-right-radius: 0;
  426. }
  427. }
  428. .chatbox {
  429. min-width: var(--overlayed-chat-width) !important;
  430. width: var(--overlayed-chat-width);
  431. .box-flyout {
  432. min-width: var(--overlayed-chat-width) !important;
  433. width: var(--overlayed-chat-width);
  434. }
  435. }
  436. }
  437. #conversejs.converse-overlayed {
  438. .flyout {
  439. bottom: var(--overlayed-chatbox-hover-height);
  440. }
  441. .box-flyout {
  442. height: var(--overlayed-chat-height);
  443. min-height: calc(var(--overlayed-chat-height) / 2);
  444. }
  445. .chat-head {
  446. min-height: var(--overlayed-chat-head-height);
  447. }
  448. .chat-textarea {
  449. max-height: var(--overlayed-max-chat-textarea-height);
  450. }
  451. .chatbox {
  452. .sendXMPPMessage {
  453. .chat-toolbar {
  454. li {
  455. .toolbar-menu {
  456. min-width: 235px;
  457. }
  458. }
  459. }
  460. }
  461. .chat-body {
  462. height: calc(100% - var(--overlayed-chat-head-height));
  463. }
  464. .chatbox-title {
  465. padding: 0.5rem 0.75rem 0 0.75rem;
  466. }
  467. .chatbox-title--no-desc {
  468. padding: 0.5rem 0.75rem;
  469. }
  470. converse-dropdown {
  471. .btn--standalone {
  472. padding: 0 0 0 0.5em;
  473. }
  474. }
  475. }
  476. }
  477. @include media-breakpoint-down(sm) {
  478. #conversejs.converse-overlayed {
  479. > .row {
  480. flex-direction: column;
  481. &.no-gutters {
  482. margin: -1em;
  483. }
  484. }
  485. }
  486. }
  487. #conversejs.converse-embedded,
  488. #conversejs.converse-fullscreen {
  489. .flyout {
  490. border-radius: 0;
  491. border:none;
  492. bottom: 0;
  493. }
  494. .chatbox {
  495. margin: 0;
  496. .box-flyout {
  497. box-shadow: none;
  498. overflow: hidden;
  499. }
  500. @include make-col-ready();
  501. @include media-breakpoint-up(md) {
  502. @include make-col(8);
  503. }
  504. @include media-breakpoint-up(lg) {
  505. @include make-col(9);
  506. }
  507. @include media-breakpoint-up(xl) {
  508. @include make-col(10);
  509. }
  510. }
  511. &.converse-singleton {
  512. .flyout {
  513. border: none !important;
  514. }
  515. .chat-head {
  516. padding: 0.5em;
  517. }
  518. .chatbox {
  519. margin: 0;
  520. @include make-col-ready();
  521. @include media-breakpoint-up(md) {
  522. @include make-col(12);
  523. }
  524. @include media-breakpoint-up(lg) {
  525. @include make-col(12);
  526. }
  527. @include media-breakpoint-up(xl) {
  528. @include make-col(12);
  529. }
  530. }
  531. }
  532. }
  533. #conversejs.converse-embedded {
  534. .converse-chatboxes {
  535. z-index: 1031; // One more than bootstrap navbar
  536. position: inherit;
  537. flex-wrap: nowrap;
  538. bottom: auto;
  539. height: 100%;
  540. width: 100%;
  541. margin-left: -15px;
  542. }
  543. .chatbox {
  544. .box-flyout {
  545. bottom: 0;
  546. height: 100%;
  547. min-width: auto;
  548. width: 100%;
  549. }
  550. .chat-title--text {
  551. padding: 0.3em;
  552. font-size: 120%;
  553. }
  554. }
  555. .chat-textarea {
  556. max-height: var(--fullpage-max-chat-textarea-height);
  557. }
  558. }
  559. /* ******************* Fullpage styles *************************** */
  560. #conversejs.converse-fullscreen {
  561. .chatbox-btn {
  562. font-size: var(--fullpage-chatbox-button-size);
  563. margin: 0 0.3em;
  564. }
  565. .chat-head {
  566. font-size: var(--font-size-huge);
  567. }
  568. .chat-textarea {
  569. max-height: var(--fullpage-max-chat-textarea-height);
  570. }
  571. .chatbox {
  572. .box-flyout {
  573. box-shadow: none;
  574. height: var(--fullpage-chat-height);
  575. min-height: calc(var(--fullpage-chat-height) / 2);
  576. width: var(--fullpage-chat-width);
  577. overflow: hidden;
  578. }
  579. .chat-body {
  580. height: inherit;
  581. overflow: hidden;
  582. background-color: var(--chat-head-color);
  583. }
  584. .chat-title {
  585. font-size: var(--font-size-huge);
  586. line-height: var(--line-height-huge);
  587. }
  588. .sendXMPPMessage {
  589. ul {
  590. width: 100%;
  591. }
  592. }
  593. }
  594. }
  595. @include media-breakpoint-down(sm) {
  596. #conversejs:not(.converse-embedded) {
  597. > .row {
  598. flex-direction: row-reverse;
  599. }
  600. #converse-login-panel {
  601. .converse-form {
  602. padding: 3em 2em 3em;
  603. }
  604. }
  605. .chatbox {
  606. width: calc(100% - 50px);
  607. .row {
  608. .box-flyout {
  609. left: 50px;
  610. bottom: 0;
  611. height: 100vh;
  612. box-shadow: none;
  613. }
  614. }
  615. }
  616. }
  617. #conversejs.converse-mobile,
  618. #conversejs.converse-overlayed,
  619. #conversejs.converse-fullscreen {
  620. .chatbox {
  621. .box-flyout {
  622. .chatbox-navback {
  623. display: flex;
  624. padding-right: 1em;
  625. .fa-arrow-left {
  626. &:before {
  627. color: white;
  628. }
  629. }
  630. }
  631. }
  632. }
  633. }
  634. }