2
0

_chatbox.scss 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  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. &:active, &:focus{
  255. outline-color: var(--chat-head-color);
  256. }
  257. &.spoiler {
  258. height: 42px;
  259. }
  260. &.correcting {
  261. background-color: var(--chat-correcting-color);
  262. }
  263. }
  264. .send-button {
  265. position: static;
  266. left: var(--send-button-margin);
  267. width: 100%;
  268. background-color: var(--chat-head-color);
  269. color: var(--inverse-link-color);
  270. font-size: 80%;
  271. height: var(--send-button-height);
  272. bottom: calc(-var(--send-button-height) - var(--send-button-margin));
  273. }
  274. .chat-toolbar {
  275. box-sizing: border-box;
  276. margin: 0;
  277. padding: 0.25em;
  278. display: block;
  279. border-top: 4px solid var(--chat-head-color);
  280. background-color: white;
  281. color: var(--chat-head-color);
  282. .fa, .fa:hover,
  283. .far, .far:hover,
  284. .fas, .fas:hover {
  285. color: var(--chat-head-color);
  286. font-size: var(--font-size-large);
  287. }
  288. .disabled {
  289. color: var(--text-color-lighten-15-percent) !important;
  290. }
  291. .unencrypted a,
  292. .unencrypted {
  293. color: var(--text-color);
  294. .toolbar-menu {
  295. a {
  296. color: var(--link-color);
  297. }
  298. }
  299. }
  300. .unverified a,
  301. .unverified {
  302. color: #cf5300;
  303. }
  304. .private a,
  305. .private {
  306. color: #4b7003;
  307. }
  308. .toggle-occupants {
  309. float: right;
  310. }
  311. li {
  312. cursor: pointer;
  313. display: inline-block;
  314. list-style: none;
  315. padding: 0 0.5em;
  316. &:hover {
  317. cursor: pointer;
  318. }
  319. .toolbar-menu {
  320. background-color: #fff;
  321. bottom: 2rem;
  322. box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
  323. height: auto;
  324. margin-bottom: 0;
  325. min-width: 21rem;
  326. position: absolute;
  327. right: 0;
  328. top: auto;
  329. z-index: $zindex-dropdown;
  330. &.otr-menu {
  331. left: -6em;
  332. min-width: 15rem;
  333. &.show {
  334. display: flex;
  335. flex-direction: column;
  336. }
  337. }
  338. a {
  339. color: var(--link-color);
  340. }
  341. .emoji-picker-container {
  342. background: white;
  343. }
  344. ul {
  345. &.emoji-picker {
  346. overflow-y: scroll;
  347. overflow-x: hidden;
  348. padding: 0.5em;
  349. }
  350. li {
  351. margin-left: 0;
  352. cursor: pointer;
  353. list-style: none;
  354. position: relative;
  355. &.insert-emoji {
  356. padding: 0.2em;
  357. &.picked {
  358. background-color: var(--highlight-color);
  359. }
  360. &:hover {
  361. background-color: var(--highlight-color);
  362. }
  363. a {
  364. font-size: var(--font-size-huge);
  365. &:hover {
  366. color: #8f2831;
  367. }
  368. }
  369. }
  370. }
  371. }
  372. }
  373. &.toggle-smiley {
  374. a.toggle-smiley {
  375. padding: 0;
  376. }
  377. .emoji-toolbar {
  378. box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.4);
  379. .emoji-category-picker {
  380. padding-top: 0.5em;
  381. ul {
  382. display: flex;
  383. flex-direction: row;
  384. justify-content: space-between;
  385. }
  386. }
  387. .emoji-category-picker,
  388. .emoji-skintone-picker {
  389. li {
  390. padding: 0.25em;
  391. font-size: var(--font-size-huge);
  392. &:hover {
  393. background-color: var(--highlight-color);
  394. }
  395. }
  396. }
  397. }
  398. }
  399. &.toggle-otr {
  400. ul {
  401. z-index: 99;
  402. li {
  403. &:hover {
  404. background-color: var(--highlight-color);
  405. }
  406. display: block;
  407. padding: 7px;
  408. a {
  409. display: block;
  410. }
  411. }
  412. }
  413. }
  414. }
  415. }
  416. }
  417. .dragresize {
  418. background: transparent;
  419. border: 0;
  420. margin: 0;
  421. position: absolute;
  422. top: 0;
  423. z-index: 20;
  424. &-top {
  425. cursor: n-resize;
  426. height: 5px;
  427. width: 100%;
  428. }
  429. &-left {
  430. cursor: w-resize;
  431. width: 5px;
  432. height: 100%;
  433. left: 0;
  434. }
  435. &-topleft {
  436. cursor: nw-resize;
  437. width: 15px;
  438. height: 15px;
  439. top: 0;
  440. left: 0;
  441. }
  442. }
  443. }
  444. }
  445. /* ******************* Overlay and embedded styles *************************** */
  446. #conversejs.converse-embedded {
  447. .chat-textarea {
  448. max-height: var(--fullpage-max-chat-textarea-height);
  449. }
  450. }
  451. #conversejs.converse-embedded,
  452. #conversejs.converse-overlayed {
  453. .chat-head {
  454. border-top-left-radius: var(--chatbox-border-radius);
  455. border-top-right-radius: var(--chatbox-border-radius);
  456. @media screen and (max-height: $mobile-landscape-height) {
  457. border-top-left-radius: 0;
  458. border-top-right-radius: 0;
  459. }
  460. @media screen and (max-width: $mobile-portrait-length) {
  461. border-top-left-radius: 0;
  462. border-top-right-radius: 0;
  463. }
  464. .chatbox-title {
  465. @include make-col(8);
  466. }
  467. .chatbox-buttons {
  468. @include make-col(4);
  469. }
  470. }
  471. .emoji-picker {
  472. height: var(--embedded-emoji-picker-height);
  473. }
  474. .chatbox {
  475. min-width: var(--overlayed-chat-width) !important;
  476. width: var(--overlayed-chat-width);
  477. .box-flyout {
  478. min-width: var(--overlayed-chat-width) !important;
  479. width: var(--overlayed-chat-width);
  480. .chat-body {
  481. height: calc(100% - var(--overlayed-chat-head-height));
  482. }
  483. }
  484. }
  485. }
  486. #conversejs.converse-overlayed {
  487. .flyout {
  488. bottom: var(--overlayed-chatbox-hover-height);
  489. }
  490. .box-flyout {
  491. height: var(--overlayed-chat-height);
  492. min-height: calc(var(--overlayed-chat-height) / 2);
  493. }
  494. .chat-head {
  495. height: var(--overlayed-chat-head-height);
  496. }
  497. .chat-textarea {
  498. max-height: var(--overlayed-max-chat-textarea-height);
  499. }
  500. .emoji-picker {
  501. height: var(--overlayed-emoji-picker-height);
  502. }
  503. .chatbox {
  504. .sendXMPPMessage {
  505. .chat-toolbar {
  506. li {
  507. .toolbar-menu {
  508. min-width: 235px;
  509. ul {
  510. &.emoji-toolbar {
  511. width: 100%;
  512. .emoji-category {
  513. float: left;
  514. }
  515. }
  516. }
  517. }
  518. &.toggle-smiley {
  519. .emoji-toolbar {
  520. .emoji-category-picker {
  521. ul {
  522. flex-wrap: wrap;
  523. justify-content: flex-start;
  524. }
  525. }
  526. }
  527. }
  528. }
  529. }
  530. }
  531. }
  532. }
  533. @include media-breakpoint-down(sm) {
  534. #conversejs.converse-overlayed {
  535. > .row {
  536. flex-direction: column;
  537. &.no-gutters {
  538. margin: -1em;
  539. }
  540. }
  541. }
  542. }
  543. /* ******************* Fullpage styles *************************** */
  544. #conversejs.converse-fullscreen {
  545. .flyout {
  546. border-radius: 0;
  547. border-top: 0.8em solid var(--chat-head-color);
  548. border: var(--flyout-padding) solid var(--chat-head-color);
  549. bottom: 0;
  550. }
  551. .chatbox-btn {
  552. font-size: var(--fullpage-chatbox-button-size);
  553. margin: 0 0.3em;
  554. }
  555. .chat-head {
  556. height: var(--fullpage-chat-head-height);
  557. font-size: var(--font-size-huge);
  558. padding: 0;
  559. .user-custom-message {
  560. font-size: 70%;
  561. height: auto;
  562. line-height: var(--line-height);
  563. }
  564. .chatbox-title {
  565. @include make-col(10);
  566. }
  567. .chatbox-buttons {
  568. @include make-col(2);
  569. }
  570. }
  571. .chat-textarea {
  572. max-height: var(--fullpage-max-chat-textarea-height);
  573. }
  574. .emoji-picker {
  575. height: var(--fullpage-emoji-picker-height);
  576. }
  577. .chatbox {
  578. width: 100%;
  579. height: 100%;
  580. margin: 0;
  581. @include make-col-ready();
  582. @include media-breakpoint-up(md) {
  583. @include make-col(8);
  584. }
  585. @include media-breakpoint-up(lg) {
  586. @include make-col(9);
  587. }
  588. @include media-breakpoint-up(xl) {
  589. @include make-col(10);
  590. }
  591. .box-flyout {
  592. background-color: var(--chat-head-color);
  593. box-shadow: none;
  594. height: var(--fullpage-chat-height);
  595. min-height: calc(var(--fullpage-chat-height) / 2);
  596. width: var(--fullpage-chat-width);
  597. overflow: hidden;
  598. }
  599. .chat-body {
  600. height: calc(100% - var(--fullpage-chat-head-height));
  601. background-color: var(--chat-head-color);
  602. border-top-left-radius: var(--chatbox-border-radius);
  603. border-top-right-radius: var(--chatbox-border-radius);
  604. }
  605. .chat-content {
  606. border-top-left-radius: var(--chatbox-border-radius);
  607. border-top-right-radius: var(--chatbox-border-radius);
  608. }
  609. .chat-title {
  610. font-size: var(--font-size-huge);
  611. line-height: var(--line-height-huge);
  612. }
  613. .sendXMPPMessage {
  614. ul {
  615. width: 100%;
  616. }
  617. .toggle-smiley {
  618. ul {
  619. &.emoji-toolbar {
  620. .emoji-category-picker {
  621. margin-right: 5em;
  622. }
  623. .emoji-category {
  624. padding-left: 10px;
  625. padding-right: 10px;
  626. }
  627. }
  628. }
  629. }
  630. }
  631. }
  632. }
  633. @include media-breakpoint-down(sm) {
  634. #conversejs:not(.converse-embedded) {
  635. > .row {
  636. flex-direction: row-reverse;
  637. }
  638. #converse-login-panel {
  639. .converse-form {
  640. padding: 3em 2em 3em;
  641. }
  642. }
  643. .chatbox {
  644. width: calc(100% - 50px);
  645. .row {
  646. .box-flyout {
  647. left: 50px;
  648. bottom: 0;
  649. height: 100vh;
  650. box-shadow: none;
  651. }
  652. }
  653. }
  654. }
  655. #conversejs.converse-mobile,
  656. #conversejs.converse-overlayed,
  657. #conversejs.converse-embedded,
  658. #conversejs.converse-fullscreen {
  659. .chatbox {
  660. .box-flyout {
  661. .chatbox-navback {
  662. display: flex;
  663. @include make-col(2);
  664. .fa-arrow-left {
  665. &:before {
  666. color: white;
  667. }
  668. }
  669. }
  670. .chatbox-title {
  671. @include make-col(7);
  672. }
  673. .chatbox-buttons {
  674. @include make-col(3);
  675. }
  676. }
  677. }
  678. }
  679. }