introduced a border around the heatmap and gridded it in a way that its always a rectangle and theres no rogue heatmap cells
This commit is contained in:
parent
a94a8debc2
commit
94de64150d
2 changed files with 7 additions and 2 deletions
|
|
@ -140,9 +140,8 @@ export default function ContributionHeatmap() {
|
|||
{week.map((day, dIdx) => (
|
||||
<div
|
||||
key={dIdx}
|
||||
className="heatmap-cell"
|
||||
className={day.level === -1 ? "heatmap-cell heatmap-cell-empty" : "heatmap-cell"}
|
||||
data-level={day.level >= 0 ? day.level : undefined}
|
||||
style={{ visibility: day.level === -1 ? "hidden" : "visible" }}
|
||||
title={day.level >= 0 ? `${day.contribs} contributions on ${day.date}` : undefined}
|
||||
onMouseEnter={() => day.level >= 0 && setHoveredCell({ date: day.date, contribs: day.contribs })}
|
||||
onMouseLeave={() => setHoveredCell(null)}
|
||||
|
|
|
|||
|
|
@ -1116,6 +1116,8 @@ body {
|
|||
width: 100%;
|
||||
overflow-x: auto;
|
||||
gap: 2px;
|
||||
padding: 4px;
|
||||
border: 1px solid var(--green);
|
||||
scrollbar-width: none;
|
||||
scrollbar-color: var(--green) transparent;
|
||||
}
|
||||
|
|
@ -1164,6 +1166,10 @@ body {
|
|||
box-shadow: 0 0 6px var(--color-white);
|
||||
}
|
||||
|
||||
.heatmap-cell-empty {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.heatmap-cell[data-level="1"] { background-color: rgba(130,180,19, 0.4); }
|
||||
.heatmap-cell[data-level="2"] { background-color: rgba(130,180,19, 0.6); }
|
||||
.heatmap-cell[data-level="3"] { background-color: rgba(130,180,19, 0.8); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue