Update institution tab style

This commit is contained in:
spsaefan
2026-08-17 14:30:09 +02:00
parent 2f22240d94
commit 9c593a0d09
2 changed files with 85 additions and 15 deletions
@@ -197,19 +197,43 @@
class="dashboard-institution-tabs"
aria-label="Institutionen für Analysebereiche">
<h2>Institution auswählen</h2>
<div class="dashboard-institution-tab-list sg-tab-nav" role="tablist">
@for (institution of dashboardInstitutions; track institution.id) {
<button
type="button"
role="tab"
[attr.aria-selected]="
selectedAnalyticalInstitutionId === institution.id
"
[class.active]="selectedAnalyticalInstitutionId === institution.id"
(click)="onAnalyticalInstitutionChange(institution.id)">
{{ institution.display_name }}
</button>
}
<div class="dashboard-institution-tab-bar">
<button
type="button"
class="dashboard-institution-tab-arrow"
[class.is-hidden]="!canScrollAnalyticalInstitutionTabsLeft"
[disabled]="!canScrollAnalyticalInstitutionTabsLeft"
aria-label="Vorherige Institutionen anzeigen"
(click)="scrollAnalyticalInstitutionTabs(-1)">
<mat-icon>chevron_left</mat-icon>
</button>
<div
#analyticalInstitutionTabList
class="dashboard-institution-tab-list sg-tab-nav"
role="tablist"
(scroll)="updateAnalyticalInstitutionTabScrollState()">
@for (institution of dashboardInstitutions; track institution.id) {
<button
type="button"
role="tab"
[attr.aria-selected]="
selectedAnalyticalInstitutionId === institution.id
"
[class.active]="selectedAnalyticalInstitutionId === institution.id"
(click)="onAnalyticalInstitutionChange(institution.id)">
{{ institution.display_name }}
</button>
}
</div>
<button
type="button"
class="dashboard-institution-tab-arrow"
[class.is-hidden]="!canScrollAnalyticalInstitutionTabsRight"
[disabled]="!canScrollAnalyticalInstitutionTabsRight"
aria-label="Weitere Institutionen anzeigen"
(click)="scrollAnalyticalInstitutionTabs(1)">
<mat-icon>chevron_right</mat-icon>
</button>
</div>
@if (dashboardInstitutionsError) {
<p class="statistics-error">
@@ -162,13 +162,58 @@
}
}
.dashboard-institution-tab-bar {
display: grid;
grid-template-columns: 40px minmax(0, 1fr) 40px;
align-items: stretch;
border-bottom: 1px solid var(--sg-border);
}
.dashboard-institution-tab-arrow {
display: grid;
width: 40px;
height: 48px;
padding: 0;
place-items: center;
border: 0;
background: transparent;
color: var(--sg-text-muted);
cursor: pointer;
transition:
color 0.15s ease,
background-color 0.15s ease,
opacity 0.15s ease;
&:hover:not(:disabled) {
background: var(--sg-option-hover);
color: var(--sg-text);
}
&:focus-visible {
outline-offset: -3px;
}
&:disabled {
cursor: default;
}
&.is-hidden {
visibility: hidden;
opacity: 0;
}
}
.dashboard-institution-tab-list {
display: flex;
overflow-x: auto;
overflow-y: hidden;
border-bottom: 1px solid var(--sg-border);
border-bottom: 0;
background: transparent;
scrollbar-width: thin;
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
button {
position: relative;
@@ -185,6 +230,7 @@
font-size: 14px;
font-weight: 600;
line-height: 48px;
text-align: center;
white-space: nowrap;
transition:
color 0.15s ease,