refactor(ui): rundown title UI polish

This commit is contained in:
Carlos Valente
2026-08-02 12:27:25 +02:00
committed by Carlos Valente
parent 608247157b
commit ba18b8dba7
2 changed files with 44 additions and 12 deletions
@@ -1,14 +1,43 @@
.title {
font-size: 1.75rem;
font-weight: 600;
color: $ui-white;
line-height: 1;
.titleOverview {
flex: 0 1 18rem;
min-width: 0;
width: 18rem;
max-width: 100%;
display: flex;
flex-direction: column;
gap: 0.125rem;
}
.project,
.rundown {
@include ellipsis-overflow;
}
.description {
font-size: 1rem;
.project {
color: $secondary-text-gray;
font-size: 0.75rem;
font-weight: 400;
@include ellipsis-overflow;
letter-spacing: 0.04em;
line-height: 1.1;
text-transform: uppercase;
}
.rundown {
color: $ui-white;
font-size: 1.5rem;
font-weight: 600;
line-height: 1.1;
}
// A lone title should still read as the primary piece of context.
.project:only-child,
.rundown:only-child {
color: $ui-white;
font-size: 1.5rem;
}
.project:only-child {
font-weight: 600;
letter-spacing: normal;
text-transform: none;
}
@@ -8,14 +8,17 @@ export default function TitleOverview() {
const { data: projectData } = useProjectData();
const { data: rundownData } = useRundownAuxData();
if (!projectData.title && !rundownData.title) {
const projectTitle = projectData.title.trim();
const rundownTitle = rundownData.title.trim();
if (!projectTitle && !rundownTitle) {
return null;
}
return (
<div>
<div className={style.title}>{projectData.title}</div>
<div className={style.description}>{rundownData.title}</div>
<div className={style.titleOverview}>
{projectTitle && <div className={style.project}>{projectTitle}</div>}
{rundownTitle && <div className={style.rundown}>{rundownTitle}</div>}
</div>
);
}