Skip to content

Commit

Permalink
feat: Added sunset-gradient, ocean-gradient, ambient-gradient themes (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
DenverCoder1 authored Apr 23, 2023
1 parent 1ee1eaf commit a29f4c6
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
3 changes: 3 additions & 0 deletions docs/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ Note: Theme names provided are case-insensitive and any use of underscores will
| `one-dark-pro` | ![image](https://user-images.githubusercontent.com/20955511/221585805-1d10928a-286c-4945-95ed-a7317e56692f.png) |
| `rose` | ![image](https://user-images.githubusercontent.com/20955511/221585827-e566b73a-e0c0-4711-b48c-667e6500d44e.png) |
| `neon` | ![image](https://user-images.githubusercontent.com/20955511/225303106-8c901c48-732e-49ae-a2e6-8733254536eb.png) |
| `sunset-gradient` | ![image](https://user-images.githubusercontent.com/20955511/233865257-3ed2bd35-458b-46bc-a189-57b0c8a2a473.png) |
| `ocean-gradient` | ![image](https://user-images.githubusercontent.com/20955511/233865264-3bb6c04d-05d2-47b1-857c-3f9a1277651f.png) |
| `ambient-gradient` | ![image](https://user-images.githubusercontent.com/20955511/233865269-81583e73-c9b6-4e4b-9475-bc130de1bfdd.png) |

### Can't find the theme you like?

Expand Down
36 changes: 36 additions & 0 deletions src/themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1370,4 +1370,40 @@
"sideLabels" => "#00EAD3",
"dates" => "#FFF5B7",
],
"sunset-gradient" => [
"background" => "45,8A2386,E94056,F27120",
"border" => "#850000",
"stroke" => "#FFFFFF",
"ring" => "#FB8C00",
"fire" => "#FB8C00",
"currStreakNum" => "#FFFFFF",
"sideNums" => "#FFFFFF",
"currStreakLabel" => "#FFFFFF",
"sideLabels" => "#FFFFFF",
"dates" => "#FFFFFF",
],
"ocean-gradient" => [
"background" => "90,0093EA,80D0C8,80D0C8",
"border" => "#000155",
"stroke" => "#FFFFFF",
"ring" => "#FFFFFF",
"fire" => "#FFFFFF",
"currStreakNum" => "#FFFFFF",
"sideNums" => "#FFFFFF",
"currStreakLabel" => "#FFFFFF",
"sideLabels" => "#FFFFFF",
"dates" => "#FFFFFF",
],
"ambient-gradient" => [
"background" => "35,4158D0,C850C0,FFCC70",
"border" => "#AE58A1",
"stroke" => "#FFFFFF",
"ring" => "#FFFFFF",
"fire" => "#FFFFFF",
"currStreakNum" => "#FFFFFF",
"sideNums" => "#FFFFFF",
"currStreakLabel" => "#FFFFFF",
"sideLabels" => "#FFFFFF",
"dates" => "#FFFFFF",
],
];
7 changes: 4 additions & 3 deletions tests/OptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ public function testThemes(): void
foreach ($themes as $theme => $colors) {
$actualColors = getRequestedTheme(["theme" => $theme]);
$expectedColors = $colors;
$expectedColors["backgroundGradient"] = "";
if (strpos($colors["background"], ",") !== false) {
$expectedColors["backgroundGradient"] =
"<linearGradient id='gradient' gradientTransform='rotate(45)' gradientUnits='userSpaceOnUse'><stop offset='0%' stop-color='#28EBA2' /><stop offset='100%' stop-color='#0935EB' /></linearGradient>";
$expectedColors["background"] = "url(#gradient)";
// check that the background gradient is correct
$this->assertStringContainsString("<linearGradient", $actualColors["backgroundGradient"]);
}
unset($expectedColors["backgroundGradient"]);
unset($actualColors["backgroundGradient"]);
$this->assertEquals($expectedColors, $actualColors);
}
}
Expand Down

0 comments on commit a29f4c6

Please sign in to comment.