| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376 |
- /* App Chat
- ******************************************************************************* */
-
- @import "../_bootstrap-extended/include";
- @import "../_components/include";
-
- // Variables
- $chat-app-height: calc(100vh - 11.3rem);
- $chat-app-height-with-no-navbar: calc(100vh - 6.5rem);
- $chat-app-horizontal-height-diff: 3rem;
-
- $chat-contact-width: 21rem;
-
- $chat-contact-list-padding-x: .75rem;
- $chat-contact-list-padding-y: .528rem;
-
- $chat-contact-list-margin-x: $chat-contact-list-padding-x;
- $chat-contact-list-margin-y: .25rem;
-
- $chat-history-padding-x: 1.5rem;
- $chat-history-padding-y: 1.5rem;
- $chat-history-height: calc(100vh - 22rem);
- $chat-history-height-with-no-nabvar: calc(100vh - 17.6rem);
- $chat-history-header-padding-x: $chat-history-padding-x;
- $chat-history-header-padding-y: 1.05rem;
- $chat-history-footer-padding: .5rem;
- $chat-history-footer-margin: $chat-history-padding-x;
-
- $chat-message-text-padding-x: 1rem;
- $chat-message-text-padding-y: .543rem;
- $chat-message-text-border-radius: $border-radius;
- $chat-list-margin: 3rem;
-
- /* App Chat Global */
- .app-chat {
- --#{$prefix}chat-bg: #f7f8f8;
- position: relative;
- block-size: $chat-app-height;
- .layout-navbar-hidden & {
- block-size: $chat-app-height-with-no-navbar;
- }
- @include media-breakpoint-up($menu-collapsed-layout-breakpoint) {
- .layout-horizontal & {
- block-size: calc($chat-app-height - $chat-app-horizontal-height-diff);
- }
- }
-
- /* Common Styles Of two sidebars */
- .app-sidebar {
- @media (width <= 992px) {
- z-index: 4;
- }
- .sidebar-header {
- position: relative;
- .close-sidebar {
- position: absolute;
- inset-block-start: 1.25rem;
- inset-inline-end: 1.25rem;
- }
- .chat-sidebar-avatar {
- block-size: 84px;
- inline-size: 84px;
- &::after {
- block-size: 16.8px;
- box-shadow: 0 0 0 .25rem var(--#{$prefix}paper-bg);
- inline-size: 16.8px;
- inset-block-end: 6px;
- }
- }
- }
- }
-
- .app-chat-contacts,
- .app-chat-sidebar-left {
- background-color: var(--#{$prefix}paper-bg);
-
- .chat-actions {
- .chat-search-input {
- background-color: var(--#{$prefix}body-bg);
- }
- }
-
- .sidebar-body {
- .chat-contact-list {
- li {
- &.active {
- background-color: var(--#{$prefix}primary);
- box-shadow: 0 .125rem .25rem 0 rgba(var(--#{$prefix}primary-rgb), .4);
- color: var(--#{$prefix}white);
- h6,
- .chat-contact-list-item-time {
- color: var(--#{$prefix}white);
- }
- }
- .chat-contact-list-item-time {
- color: var(--#{$prefix}secondary-color);
- }
- }
- }
- .chat-sidebar-avatar {
- block-size: 84px;
- inline-size: 84px;
- &::after {
- block-size: 16.8px;
- inline-size: 16.8px;
- inset-block-end: 6px;
- }
- }
- }
- }
-
- .app-chat-contacts {
- position: absolute;
- flex-basis: $chat-contact-width;
- block-size: $chat-app-height;
- inline-size: $chat-contact-width;
- inset-inline-start: calc(-#{$chat-contact-width} - 1rem);
- transition: all .25s ease;
- .sidebar-header {
- block-size: 4.75rem;
- }
- .layout-navbar-hidden & {
- block-size: $chat-app-height-with-no-navbar;
- }
- @include media-breakpoint-up($menu-collapsed-layout-breakpoint) {
- .layout-horizontal & {
- block-size: calc($chat-app-height - $chat-app-horizontal-height-diff);
- }
- }
-
- @media (width >= 992px) {
- position: static;
- }
-
- &.show {
- inset-inline-start: 0;
- }
-
- .sidebar-body {
- block-size: calc(#{$chat-app-height} - 4.7rem);
- .layout-navbar-hidden & {
- block-size: calc(#{$chat-app-height-with-no-navbar} - 4.7rem);
- }
- @include media-breakpoint-up($menu-collapsed-layout-breakpoint) {
- .layout-horizontal & {
- block-size: calc(#{$chat-app-height} - 4.7rem - #{$chat-app-horizontal-height-diff});
- }
- }
-
- .chat-contact-list {
- li.chat-contact-list-item {
- display: flex;
- justify-content: space-between;
- @include border-radius($chat-message-text-border-radius);
- cursor: pointer;
- margin-block: $chat-contact-list-margin-y;
- margin-inline: $chat-contact-list-margin-x;
- padding-block: $chat-contact-list-padding-y;
- padding-inline: $chat-contact-list-padding-x;
- a {
- inline-size: 100%;
- }
- .chat-contact-info {
- min-inline-size: 0;
- .chat-contact-name {
- line-height: 1.5;
- }
- }
- small {
- white-space: nowrap;
- }
- }
- li.chat-contact-list-item-title {
- padding-block: $chat-contact-list-padding-y ($chat-contact-list-padding-y * .5);
- padding-inline: ($chat-contact-list-padding-y * 1.9);
- }
- }
- }
- }
-
- .app-chat-sidebar-left,
- .app-chat-sidebar-right {
- position: absolute;
- z-index: 5;
- block-size: $chat-app-height;
- inline-size: $chat-contact-width;
- inset-block-start: 0;
- opacity: 0;
- transition: all .25s ease;
- .layout-navbar-hidden & {
- block-size: $chat-app-height-with-no-navbar;
- }
- @include media-breakpoint-up($menu-collapsed-layout-breakpoint) {
- .layout-horizontal & {
- block-size: calc($chat-app-height - $chat-app-horizontal-height-diff);
- }
- }
-
- &.show {
- opacity: 1;
- }
- }
-
- .app-chat-sidebar-left {
- inset-inline-start: calc(-#{$chat-contact-width} - 1rem);
- &.show {
- inset-inline-start: 0;
- }
- .sidebar-body {
- block-size: calc(#{$chat-app-height} - 12.5rem);
- .layout-navbar-hidden & {
- block-size: calc(#{$chat-app-height-with-no-navbar} - 12.5rem);
- }
- @include media-breakpoint-up($menu-collapsed-layout-breakpoint) {
- .layout-horizontal & {
- block-size: calc(#{$chat-app-height} - 12.3rem - #{$chat-app-horizontal-height-diff});
- }
- }
- }
- }
-
- .app-chat-conversation {
- background-color: var(--#{$prefix}chat-bg);
- block-size: $chat-app-height;
- .layout-navbar-hidden & {
- block-size: $chat-app-height-with-no-navbar;
- }
- @include media-breakpoint-up($menu-collapsed-layout-breakpoint) {
- .layout-horizontal & {
- block-size: calc($chat-app-height - $chat-app-horizontal-height-diff);
- }
- }
- .app-chat-conversation-btn {
- display: none;
- @media (width <= 992px) {
- display: block;
- }
- }
- }
-
- .app-chat-history {
- position: relative;
- background-color: var(--#{$prefix}chat-bg);
- block-size: $chat-app-height;
- transition: all .25s ease;
- .layout-navbar-hidden & {
- block-size: $chat-app-height-with-no-navbar;
- }
- @include media-breakpoint-up($menu-collapsed-layout-breakpoint) {
- .layout-horizontal & {
- block-size: calc($chat-app-height - $chat-app-horizontal-height-diff);
- }
- }
-
- .chat-history-wrapper {
- background-color: var(--#{$prefix}chat-bg);
- }
-
- .chat-history-header,
- .chat-history-footer {
- background-color: var(--#{$prefix}paper-bg);
- }
-
- .chat-history-header {
- margin-block-start: -1px;
- padding-block: $chat-history-header-padding-y;
- padding-inline: $chat-history-header-padding-x;
- }
-
- .chat-history-body {
- overflow: hidden;
- block-size: $chat-history-height;
- padding-block: $chat-history-padding-y;
- padding-inline: $chat-history-padding-x;
- .layout-navbar-hidden & {
- block-size: $chat-history-height-with-no-nabvar;
- }
- @include media-breakpoint-up($menu-collapsed-layout-breakpoint) {
- .layout-horizontal & {
- block-size: calc($chat-history-height - $chat-app-horizontal-height-diff);
- }
- }
-
- .chat-history {
- .chat-message {
- display: flex;
- justify-content: flex-start;
-
- .chat-message-text {
- @include border-radius($chat-message-text-border-radius);
- background-color: var(--#{$prefix}paper-bg);
- box-shadow: var(--#{$prefix}box-shadow-xs);
- padding-block: $chat-message-text-padding-y;
- padding-inline: $chat-message-text-padding-x;
- }
-
- &.chat-message-right {
- justify-content: flex-end;
-
- .chat-message-text {
- background-color: var(--#{$prefix}primary);
- border-start-end-radius: 0;
- color: var(--#{$prefix}white);
- }
- }
- &:not(.chat-message-right) .chat-message-text {
- border-start-start-radius: 0;
- }
-
- .thumbnail {
- cursor: zoom-in;
- }
-
- &:not(:last-child) {
- margin-block-end: $chat-list-margin;
- }
- }
- }
- }
-
- .chat-history-footer {
- padding: $chat-history-footer-padding;
- @include border-radius($chat-message-text-border-radius);
- margin: $chat-history-footer-margin;
- box-shadow: var(--#{$prefix}box-shadow-xs);
- padding-inline-start: 2px;
- .form-control.message-input {
- padding-block: calc($input-padding-y - $input-border-width);
- padding-inline: calc($input-padding-x - $input-border-width);
- }
- }
- }
-
- .app-chat-sidebar-right {
- background-color: var(--#{$prefix}paper-bg);
- box-shadow: 16px 1px 45px 3px rgba($black, .5);
- inset-inline-end: calc(-#{$chat-contact-width} - 1rem);
- &.show {
- inset-inline-end: 0;
- }
- .sidebar-body {
- block-size: calc(#{$chat-app-height} - 12.3rem);
- .layout-navbar-hidden & {
- block-size: calc(#{$chat-app-height-with-no-navbar} - 12.3rem);
- }
- @include media-breakpoint-up($menu-collapsed-layout-breakpoint) {
- .layout-horizontal & {
- block-size: calc(#{$chat-app-height} - 12.1rem - #{$chat-app-horizontal-height-diff});
- }
- }
- }
- }
- }
-
- /* Small screen media */
- @media (width <= 576px) {
- .app-chat {
- .app-chat-sidebar-right,
- .app-chat-sidebar-left,
- .app-chat-contacts {
- &.show {
- inline-size: 100%;
- }
- }
- }
- }
-
- /* Dark Theme */
-
- @if $enable-dark-mode {
- @include color-mode(dark) {
- .app-chat {
- --#{$prefix}chat-bg: #20202e;
- }
- }
- }
|