184 lines
5.0 KiB
PHP
184 lines
5.0 KiB
PHP
<meta charset="UTF-8">
|
|
<title><?= $title ?></title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="icon" type="image/png" href="<?= base_url('assets/img/icon.png'); ?>">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet">
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
|
<style>
|
|
body { background-color: #f0f2f5; }
|
|
.chat-container { display: flex; height: 100vh; }
|
|
.sidebar { width: 400px; background: #fff; border-right: 1px solid #ddd; overflow-y: auto; }
|
|
.chat-window { flex: 1; background: #ece3daff; display: flex; flex-direction: column; }
|
|
.chat-header { background: #ededed; padding: 10px; padding-left: 20px; border-bottom: 1px solid #ccc; }
|
|
.chat-list { height: calc(100vh - 220px);}
|
|
.messages { flex: 1; padding-left: 10%; padding-right: 10%; padding-top: 20px; padding-bottom: 30px; overflow-y: auto; }
|
|
.message { margin-bottom: 10px; max-width: 55%; padding: 10px; border-radius: 10px; }
|
|
.message.sent { background: #dcf8c6; align-self: flex-end; }
|
|
.message.received { background: #fff; align-self: flex-start; }
|
|
.chat-input-bg {
|
|
height: 83px;
|
|
position: fixed;
|
|
bottom: 0;
|
|
min-width: 80%;
|
|
background: #ece3daff;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding-bottom: 10px;
|
|
transform-origin: bottom;
|
|
}
|
|
|
|
.chat-input {
|
|
padding: 10px;
|
|
border-top: 1px solid #ccc;
|
|
background: #f0f0f0ff;
|
|
margin: 10px;
|
|
border-radius: 25px;
|
|
width: 75%;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
}
|
|
.chat-input textarea {
|
|
flex: 1;
|
|
border: none;
|
|
outline: none;
|
|
padding: 8px 12px;
|
|
border-radius: 10px;
|
|
font-size: 15px;
|
|
resize: none;
|
|
overflow-y: auto;
|
|
max-height: calc(1.5em * 10 + 16px);
|
|
line-height: 1.5em;
|
|
}
|
|
.chat-btn {
|
|
border: none;
|
|
background: none;
|
|
color: #008069;
|
|
font-size: 20px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
width: 36px;
|
|
height: 36px;
|
|
border-radius: 50%;
|
|
transition: background 0.2s;
|
|
position: relative;
|
|
}
|
|
.chat-btn:hover { background: rgba(0,137,105,0.1); }
|
|
|
|
.dropdown2 { position: relative; }
|
|
|
|
.dropdown2-menu {
|
|
display: none; /* default hidden */
|
|
position: absolute;
|
|
bottom: 45px;
|
|
left: 0;
|
|
background: #fff;
|
|
border: 1px solid #ccc;
|
|
border-radius: 10px;
|
|
padding: 8px;
|
|
min-width: 345px;
|
|
max-height: 500px;
|
|
z-index: 100;
|
|
overflow-y: auto;
|
|
flex-wrap: wrap;
|
|
gap: 5px;
|
|
margin: 2px;
|
|
}
|
|
|
|
.dropdown2-files {
|
|
display: none; /* default hidden */
|
|
position: absolute;
|
|
bottom: 45px;
|
|
left: 0;
|
|
background: #fff;
|
|
border: 1px solid #ccc;
|
|
border-radius: 10px;
|
|
padding: 8px;
|
|
min-width: 150px;
|
|
max-height: 150px;
|
|
z-index: 100;
|
|
overflow-y: auto;
|
|
flex-wrap: wrap;
|
|
gap: 5px;
|
|
margin: 1px;
|
|
}
|
|
|
|
.dropdown2-files li { list-style: none; padding: 3px 12px; cursor: pointer; width: 100%;}
|
|
.dropdown2-files li:hover, .dropdown2-menu button:hover { background: #f1f1f1; }
|
|
.dropdown2-menu button {
|
|
border: none;
|
|
background: none;
|
|
cursor: pointer;
|
|
font-size: 20px;
|
|
border-radius: 6px;
|
|
padding: 0px;
|
|
}
|
|
|
|
/* Tampilkan saat .show ditambahkan */
|
|
.dropdown2.show .dropdown2-menu,
|
|
.dropdown2.show .dropdown2-files { display: flex; }
|
|
|
|
/* Badge biru untuk pesan belum dibaca */
|
|
.badge.unread {
|
|
width: 10px;
|
|
height: 10px;
|
|
background-color: #0d6efd;
|
|
border-radius: 50%;
|
|
display: inline-block;
|
|
padding: 0px;
|
|
}
|
|
|
|
/* Hover effect untuk list item */
|
|
.hover-item {
|
|
transition: background 0.2s;
|
|
cursor: pointer;
|
|
}
|
|
.hover-item:hover {
|
|
background-color: #f1f1f1; /* warna abu muda saat hover */
|
|
}
|
|
|
|
.filter-btn {
|
|
flex: 1;
|
|
margin: 0 2px;
|
|
border-radius: 20px;
|
|
font-weight: 500;
|
|
transition: all 0.2s ease-in-out;
|
|
}
|
|
.filter-btn.active {
|
|
background-color: #0b93f6;
|
|
color: #fff;
|
|
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
|
|
}
|
|
.filter-btn:not(.active):hover {
|
|
background-color: #e1f0ff;
|
|
color: #0b93f6;
|
|
}
|
|
|
|
.bubble-content {
|
|
text-align: left !important;
|
|
display: block;
|
|
}
|
|
|
|
.template-body {
|
|
text-align: left !important;
|
|
display: block;
|
|
}
|
|
|
|
.template-header {
|
|
text-align: left !important;
|
|
display: block;
|
|
}
|
|
|
|
.template-header img,
|
|
.template-header video {
|
|
max-width: 400px;
|
|
object-fit: cover;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
</style>
|