view sat_templates/templates/bulma/static/chat.css @ 386:e63fb06052ae

bulma: message edition + extra menu + improvments: - add an extra menu template with `Edit` and `Quote` - add a template for previous editions popup - fix `own_msg` class application - add CSS for edit mode - cosmetic changes
author Goffi <goffi@goffi.org>
date Tue, 28 Nov 2023 17:48:00 +0100
parents 941e4006ab6e
children 8b990c78d4b5
line wrap: on
line source

#chat-panel {
    height: calc(100vh - 3.25rem);
}

#messages {
    overflow-y: auto;
}

#attachments {
    overflow-x: auto;
    white-space: nowrap;
}

#message_input {
    resize: None;
    max-height: 20rem;
    min-height: 48px;
}

/* Input "edit" mode */
#message_input.mode_edit {
    background-color: #d1ecf1;
}

.is-chat-message {
    transition: all 0.3s ease;
    padding-left: 1.5em;
}

.is-chat-message:hover, .is-chat-message.has-popup-focus {
    background-color: #f5f5f5;
    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}

.message-attachment {
    max-width: 20rem;
}

.status-icons {
    padding-bottom: 0.4rem;
}

.actions {
    position: absolute;
    right: 5px;
    bottom: 5px;
    opacity: 0;
}

.is-chat-message:hover .actions, .chat-message-highlight .actions {
    opacity: 1;
}

.action-button {
    box-sizing: border-box;
    margin: 0 0.2rem;
    user-select: none;
    z-index: 10;
}

.action-button:hover {
    box-shadow: 0 0 0 10px rgba(0,0,0,0.1);
    border-radius: 50%;
    transition: box-shadow 0.3s ease;
}

.has-padding-left {
    padding-left: 0.5em;
}

#attach_button, #send_button {
    height: 100%;
}

/* URL previews */

.url-preview-iframe-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  background: #000;
}

.url-preview-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Attachments */

#attachments {
    opacity: 1;
    max-height: 1000px;
    transition: opacity 0.5s ease-in-out, max-height 0.5s ease-in-out, padding 0.5s ease-in-out, margin 0.5s ease-in-out;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.25rem 0;
    margin: 0;
}

#attachments.is-contracted {
    opacity: 0;
    max-height: 0;
    padding: 0;
}

.attachment-preview {
    position: relative;
    border: 1px solid #dbdbdb;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    background-color: #f5f5f5;
    width: 9rem;
    height: 6rem;
}

.thumbnail-container {
    width: 150px;
    height: 80px;
    overflow: hidden;
    position: relative;
}
.icon {
    width: 60px;
    height: 60px;
}

.thumbnail-image {
    position: absolute;
    left: 50%;
    top: 50%;
    height: 100%;
    width: auto;
    transform: translate(-50%, -50%);
}

.attachment-name {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 100%;
    font-size: 0.8em;
    letter-spacing: 0.02em;
    text-align: center;
    margin-top: auto;
}

.thumbnail-image:empty {
    left: 50%;
    top: 50%;
    width: 8rem;
    height: auto;
    transform: translate(-50%, -50%);
}

.attachment-delete-button {
    position: absolute;
    top: -10px;
    right: -10px;
}