|
208 | 208 | .modal-buttons .cancel-btn:hover { |
209 | 209 | background-color: #dc2626 !important; |
210 | 210 | } |
| 211 | + .player-details { |
| 212 | + display: flex; |
| 213 | + flex-direction: column; /* ÄNDERUNG: Stellt die Elemente untereinander dar */ |
| 214 | + align-items: flex-start; /* ÄNDERUNG: Richtet sie linksbündig aus */ |
| 215 | + gap: 0.25rem; /* Fügt einen kleinen Abstand zwischen Name und Klasse hinzu */ |
| 216 | + min-width: 0; |
| 217 | + } |
| 218 | + .editable-name, .editable-class-select { |
| 219 | + width: 160px; /* Gibt beiden Elementen eine feste Breite */ |
| 220 | + } |
| 221 | + |
| 222 | + /* Responsive Anpassung für den Roster auf kleinen Bildschirmen */ |
| 223 | + @media (max-width: 767px) { |
| 224 | + .player-row-container { |
| 225 | + flex-direction: column; /* Stellt die Elemente untereinander dar */ |
| 226 | + align-items: flex-start; /* Richtet alles linksbündig aus */ |
| 227 | + gap: 0.5rem; /* Fügt einen kleinen Abstand hinzu */ |
| 228 | + padding-bottom: 0.75rem; |
| 229 | + border-bottom: 1px solid var(--color-gold-border-light); |
| 230 | + } |
| 231 | + .player-row-container:last-child { |
| 232 | + border-bottom: none; /* Entfernt den Rand beim letzten Element */ |
| 233 | + } |
| 234 | + .player-row-container .player-details { |
| 235 | + width: 100%; /* Sektion mit Name/Klasse soll volle Breite nutzen */ |
| 236 | + } |
| 237 | + } |
211 | 238 | </style> |
212 | 239 | </head> |
213 | 240 | <body> |
@@ -779,16 +806,16 @@ <h3>Nachricht</h3> |
779 | 806 |
|
780 | 807 | function createPlayerElement(player) { |
781 | 808 | const playerDiv = document.createElement('div'); |
782 | | - playerDiv.className = 'flex justify-between items-center'; |
| 809 | + // Die Klasse für die responsive Anpassung bleibt erhalten |
| 810 | + playerDiv.className = 'flex justify-between items-center player-row-container'; |
783 | 811 | playerDiv.dataset.playerId = player.id; |
784 | | - |
785 | | - // NEU: Ordnet den Rollen die gewünschten Symbole zu |
| 812 | + |
786 | 813 | const roleIcons = { |
787 | 814 | TANK: '🛡️', |
788 | 815 | HEALER: '❤️', |
789 | 816 | DPS: '⚔️' |
790 | 817 | }; |
791 | | - |
| 818 | + |
792 | 819 | playerDiv.innerHTML = ` |
793 | 820 | <div class="player-details"> |
794 | 821 | <input type="text" value="${player.name}" class="editable-name" style="color: ${window.classColors[player.class.toUpperCase()] || '#FFFFFF'};" ${!window.isManager ? 'disabled' : ''}> |
|
0 commit comments