Matrix-Chat: feste Scrollfläche gegen Layout-Verschiebung
This commit is contained in:
@@ -252,12 +252,10 @@ button:hover { background: linear-gradient(180deg, #7cbc19, #5e8a12); }
|
|||||||
|
|
||||||
.matrix-list {
|
.matrix-list {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: .5rem 0 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: .5rem;
|
gap: .5rem;
|
||||||
max-height: 280px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.matrix-list li {
|
.matrix-list li {
|
||||||
@@ -267,6 +265,29 @@ button:hover { background: linear-gradient(180deg, #7cbc19, #5e8a12); }
|
|||||||
padding: .5rem .6rem;
|
padding: .5rem .6rem;
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: .2rem;
|
gap: .2rem;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-body {
|
||||||
|
max-height: 7.5rem;
|
||||||
|
overflow: auto;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
word-break: break-word;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-card {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-scroll {
|
||||||
|
margin-top: .5rem;
|
||||||
|
max-height: 320px;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
padding-right: .25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-wrap {
|
.table-wrap {
|
||||||
|
|||||||
@@ -83,21 +83,23 @@
|
|||||||
{{end}}
|
{{end}}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="card">
|
<section class="card matrix-card">
|
||||||
<h2>Matrix-Chat</h2>
|
<h2>Matrix-Chat</h2>
|
||||||
{{if .MatrixEnabled}}
|
{{if .MatrixEnabled}}
|
||||||
{{if .MatrixError}}
|
{{if .MatrixError}}
|
||||||
<p class="muted">Chat konnte nicht geladen werden: {{.MatrixError}}</p>
|
<p class="muted">Chat konnte nicht geladen werden: {{.MatrixError}}</p>
|
||||||
{{else if .MatrixMessages}}
|
{{else if .MatrixMessages}}
|
||||||
|
<div class="matrix-scroll">
|
||||||
<ul class="matrix-list">
|
<ul class="matrix-list">
|
||||||
{{range .MatrixMessages}}
|
{{range .MatrixMessages}}
|
||||||
<li>
|
<li>
|
||||||
<div><strong>{{.Sender}}</strong></div>
|
<div><strong>{{.Sender}}</strong></div>
|
||||||
<div>{{.Body}}</div>
|
<div class="matrix-body">{{.Body}}</div>
|
||||||
<div class="muted">{{.Timestamp}}</div>
|
<div class="muted">{{.Timestamp}}</div>
|
||||||
</li>
|
</li>
|
||||||
{{end}}
|
{{end}}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class="muted">Keine Nachrichten gefunden.</p>
|
<p class="muted">Keine Nachrichten gefunden.</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
Reference in New Issue
Block a user