2
0

_chatbox.scss 22 KB

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