Files
smartguide/webapp/src/app/modules/dashboard/dashboard.component.scss
T
spsaefan 6af1747477
LocationBasedServices/smartguide/pipeline/head This commit looks good
Add time filter UI
2026-07-27 11:57:36 +02:00

335 lines
5.7 KiB
SCSS

// src/app/modules/university-ranking/dashboard.component.scss
.dashboard-wrapper {
padding: 2rem;
font-family: 'Inter', sans-serif;
color: #333;
.dashboard-period-filter {
display: flex;
align-items: center;
gap: 1rem;
margin-bottom: 1.5rem;
flex-wrap: wrap;
}
.dashboard-period-presets {
display: inline-flex;
overflow: hidden;
flex: 0 0 auto;
border: 1px solid #cbd5e1;
border-radius: 6px;
background: #fff;
button {
padding: 0.55rem 0.8rem;
border: 0;
border-right: 1px solid #cbd5e1;
background: transparent;
color: #334155;
cursor: pointer;
font: inherit;
&.active {
background: #1d4ed8;
color: #fff;
}
}
button:last-child {
border-right: 0;
}
}
.dashboard-period-slider {
width: min(100%, 34rem);
}
.statistics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1rem;
margin-bottom: 2rem;
}
.statistics-card {
display: flex;
align-items: center;
gap: 1rem;
min-height: 120px;
padding: 1.25rem;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #fff;
box-shadow: 0 4px 14px rgb(15 23 42 / 6%);
color: inherit;
text-decoration: none;
transition:
border-color 160ms ease,
box-shadow 160ms ease,
transform 160ms ease;
&:hover {
border-color: #93c5fd;
box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
transform: translateY(-2px);
}
&:focus-visible {
outline: 3px solid #93c5fd;
outline-offset: 3px;
}
&.disabled {
pointer-events: none;
}
span,
small {
display: block;
color: #64748b;
}
strong {
display: block;
margin: 0.2rem 0;
color: #0f172a;
font-size: clamp(1.7rem, 3vw, 2.3rem);
line-height: 1.1;
}
}
.statistics-icon {
display: grid;
flex: 0 0 52px;
width: 52px;
height: 52px;
place-items: center;
border-radius: 12px;
background: #dbeafe;
color: #1d4ed8;
&--persons {
background: #dcfce7;
color: #15803d;
}
&--patents {
background: #fee2e2;
color: #b91c1c;
}
&--eu-projects {
background: #e0f2fe;
color: #0369a1;
}
&--bund-projects {
background: #fef3c7;
color: #b45309;
}
&--dfg-projects {
background: #f3e8ff;
color: #7e22ce;
}
}
.statistics-error {
margin: -1rem 0 2rem;
color: #b91c1c;
}
.top-authors-section {
margin-bottom: 2.5rem;
}
.topic-heatmap-section {
margin-bottom: 2.5rem;
padding: 1.25rem;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #fff;
}
.topic-heatmap-header {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 1rem;
margin-bottom: 1rem;
h2,
p {
margin: 0;
}
p {
margin-top: 0.35rem;
color: #64748b;
}
@media (max-width: 820px) {
align-items: flex-start;
flex-direction: column;
}
}
.topic-heatmap-loading {
min-height: 25rem;
display: grid;
place-items: center;
}
.project-status-loading {
min-height: 15rem;
display: grid;
place-items: center;
}
.project-status-summary {
display: flex;
flex: 0 0 auto;
gap: 0.5rem;
span {
padding: 0.35rem 0.65rem;
border-radius: 999px;
background: #f1f5f9;
color: #475569;
font-size: 0.9rem;
font-weight: 600;
}
}
.dfg-topic-summary {
flex: 0 0 auto;
color: #475569;
font-weight: 600;
}
.top-authors-header {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 1rem;
margin-bottom: 1rem;
h2,
p {
margin: 0;
}
p {
margin-top: 0.35rem;
color: #64748b;
}
@media (max-width: 720px) {
align-items: flex-start;
flex-direction: column;
}
}
.top-authors-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem;
&.loading {
opacity: 0.65;
}
@media (max-width: 900px) {
grid-template-columns: 1fr;
}
}
.top-authors-chart {
padding: 1.25rem;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #fff;
h3 {
display: flex;
align-items: center;
gap: 0.5rem;
margin: 0 0 1rem;
color: #0f172a;
}
}
.author-bar-row {
display: flex;
align-items: center;
gap: 0.65rem;
margin-top: 0.7rem;
}
.author-rank {
flex: 0 0 1.4rem;
color: #64748b;
font-size: 0.8rem;
text-align: center;
}
.author-bar-content {
min-width: 0;
flex: 1;
}
.author-bar-label {
display: flex;
justify-content: space-between;
gap: 0.75rem;
margin-bottom: 0.25rem;
font-size: 0.85rem;
.author-name {
overflow: hidden;
color: #1d4ed8;
font-weight: 600;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.author-link {
overflow: hidden;
text-decoration: none;
text-overflow: ellipsis;
white-space: nowrap;
&:hover {
text-decoration: underline;
}
&:focus-visible {
border-radius: 2px;
outline: 2px solid #93c5fd;
outline-offset: 2px;
}
}
.author-bar-track {
overflow: hidden;
height: 7px;
border-radius: 999px;
background: #e2e8f0;
}
.author-bar-fill {
display: block;
height: 100%;
border-radius: inherit;
background: linear-gradient(90deg, #2563eb, #60a5fa);
transition: width 220ms ease;
}
.empty-chart {
margin: 2rem 0;
color: #64748b;
text-align: center;
}
}