recent_topics: Make table headers fixed.

This commit is contained in:
Aman Agrawal 2020-05-23 12:54:29 +05:30 committed by Tim Abbott
parent 4f1b7542ed
commit cea3bb437f
2 changed files with 32 additions and 21 deletions

View File

@ -55,7 +55,21 @@
.recent_topics_table {
margin: 0px;
padding: 15px;
overflow: auto;
overflow: hidden !important;
.tableFixHead {
padding: 10px;
padding-top: 0px !important;
overflow-y: auto;
max-height: 100%;
}
.tableFixHead thead th {
position: sticky;
top: 0;
z-index: 1000;
background-color: hsl(0, 0%, 27%);
color: hsl(0, 0%, 100%);
}
#recent_topics_filter_buttons {
margin: 0 10px 0 10px;
@ -78,11 +92,6 @@
background-color: hsl(0, 11%, 93%);
}
thead {
background-color: hsl(0, 0%, 27%);
color: hsl(0, 0%, 100%);
}
.recent_topic_unread_count {
text-align: center;
// width is kept less than width of

View File

@ -4,18 +4,20 @@
<button data-filter="participated" type="button" class="btn btn-default btn-recent-filters">{{t 'Participated' }}</button>
<input type="text" id="recent_topics_search" placeholder="{{t 'Search stream / topic' }}">
</div>
<table class="table table-responsive table-hover">
<thead>
<tr>
<th>{{t 'Unread' }}</th>
<th>{{t 'Stream' }}</th>
<th>{{t 'Topic' }}</th>
<th>{{t 'Actions' }}</th>
<th>{{t 'Participants' }}</th>
<th>{{t 'Last message' }}</th>
</tr>
</thead>
{{#each recent_topics}}
{{> recent_topic_row}}
{{/each}}
</table>
<div class="tableFixHead">
<table class="table table-responsive table-hover">
<thead>
<tr>
<th>{{t 'Unread' }}</th>
<th>{{t 'Stream' }}</th>
<th>{{t 'Topic' }}</th>
<th>{{t 'Actions' }}</th>
<th>{{t 'Participants' }}</th>
<th>{{t 'Last message' }}</th>
</tr>
</thead>
{{#each recent_topics}}
{{> recent_topic_row}}
{{/each}}
</table>
</div>