try suppressing subsequent list items

This commit is contained in:
Ed Chalstrey 2022-08-09 15:27:33 +01:00
parent 85322ef16d
commit fa88bad32f
2 changed files with 19 additions and 4 deletions

View File

@ -30,10 +30,12 @@ const EditHistoryLatest: React.FunctionComponent<EditHistoryLatestProps> = (prop
return (
<>
<ul className="edit-history-list"
<li key={`${history[0].revision_id}`} className="edit-history-list-element">
<BuildingEditLatest historyEntry={history[0]} />
</li>
<ul className="edit-history-first" id="first-only">
{history && history.map(entry => (
<li key={`${entry.revision_id}`} className="edit-history-list-element">
<BuildingEditLatest historyEntry={entry} />
</li>
))}
</ul>
</>
);

View File

@ -6,3 +6,16 @@
list-style: none;
padding-left: 1rem;
}
ul[id="first-only"] li{
color: black;
display: none;
position: absolute;
font-size: 30px;
}
ul[id="first-only"] li:first-of-type {
color: black;
display: block;
position: absolute;
font-size: 30px;
}