feat: Show character avatar in chat - split view on desktop, background on mobile
This commit is contained in:
@@ -237,10 +237,12 @@
|
||||
.game-content {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.scroll-to-bottom-btn {
|
||||
@@ -272,6 +274,7 @@
|
||||
.messages-container {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
overscroll-behavior: contain;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
touch-action: pan-y;
|
||||
@@ -282,11 +285,15 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.75rem;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.message {
|
||||
max-width: 88%;
|
||||
animation: fadeIn 0.25s ease;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
@@ -714,6 +721,121 @@
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
/* Game Layout with Character Panel */
|
||||
.game-layout {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.character-panel {
|
||||
width: 350px;
|
||||
min-width: 350px;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
background: #0a0a0a;
|
||||
border-right: 1px solid rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
|
||||
.character-panel img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: top center;
|
||||
}
|
||||
|
||||
.character-panel-info {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 1rem;
|
||||
background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
.character-panel-name {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
color: #fff;
|
||||
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.character-panel-role {
|
||||
font-size: 0.85rem;
|
||||
color: #aaa;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
/* Desktop layout */
|
||||
@media (min-width: 769px) {
|
||||
.game-layout.has-character .game-content {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Mobile: character as background */
|
||||
@media (max-width: 768px) {
|
||||
.character-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.game-layout {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.game-layout .game-content {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.game-layout.has-character {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.game-layout.has-character::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-image: var(--character-bg);
|
||||
background-size: cover;
|
||||
background-position: top center;
|
||||
opacity: 0.15;
|
||||
pointer-events: none;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.game-layout.has-character .game-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.game-layout.has-character .messages-container {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.game-layout.has-character .message {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.game-layout.has-character .input-container {
|
||||
background: rgba(10, 10, 10, 0.9);
|
||||
backdrop-filter: blur(8px);
|
||||
-webkit-backdrop-filter: blur(8px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0%,
|
||||
50% {
|
||||
|
||||
Reference in New Issue
Block a user