Skip to content

Commit

Permalink
style: html formatting, variable simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
DenverCoder1 committed May 5, 2024
1 parent ed80365 commit f808e55
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 230 deletions.
18 changes: 8 additions & 10 deletions src/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,6 @@ function generateCard(array $stats, array $params = null): string
for ($i = 0; $i < $numColumns; $i++) {
$columnOffsets[] = $columnWidth / 2 + $columnWidth * $i;
}
// offets for the text in each row
$rowOffsets = $offsetHeight;

// reverse the column offsets if the locale is right-to-left
if ($direction === "rtl") {
Expand All @@ -409,17 +407,17 @@ function generateCard(array $stats, array $params = null): string

//offset height
$longestStreakOffsetHeight = $totalContributionsOffsetHeight = [
48 + $rowOffsets,
84 + $rowOffsets,
114 + $rowOffsets,
48 + $offsetHeight,
84 + $offsetHeight,
114 + $offsetHeight,
];

$currentStreakOffsetHeight = [
48 + $rowOffsets,
108 + $rowOffsets,
145 + $rowOffsets,
71 + $rowOffsets,
19.5 + $rowOffsets,
48 + $offsetHeight,
108 + $offsetHeight,
145 + $offsetHeight,
71 + $offsetHeight,
19.5 + $offsetHeight,
];

// total contributions
Expand Down
Loading

0 comments on commit f808e55

Please sign in to comment.