-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c37f709
commit b22987a
Showing
12 changed files
with
321 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum CountStyle { | ||
Text = "text", | ||
Dots = "dots", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { html } from "lit"; | ||
import { generateGradient } from "./generateGradient.ts"; | ||
import { Gradient } from "./Gradient.ts"; | ||
|
||
interface Props { | ||
backgroundGradient: Gradient; | ||
leagueLogoSrc?: string; | ||
leagueLogoShadow: string; | ||
} | ||
|
||
export const LeagueLogo = ({ | ||
backgroundGradient, | ||
leagueLogoSrc, | ||
leagueLogoShadow, | ||
}: Props) => { | ||
if (!leagueLogoSrc) { | ||
return; | ||
} | ||
|
||
let leagueLogo; | ||
|
||
if (leagueLogoSrc) { | ||
leagueLogo = html` | ||
<img | ||
src="${leagueLogoSrc}" | ||
alt="" | ||
height="100%" | ||
style="filter: drop-shadow(2px 2px 10px ${leagueLogoShadow}66) drop-shadow(0px 0px 13px ${leagueLogoShadow}22)" | ||
/> | ||
`; | ||
} | ||
|
||
return html` | ||
<div class="league-logo-container"> | ||
<div | ||
style="display: flex; background: ${generateGradient( | ||
backgroundGradient, | ||
)}" | ||
> | ||
<div class="league-logo logo">${leagueLogo}</div> | ||
</div> | ||
</div> | ||
`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { html } from "lit"; | ||
import { generateGradient } from "./generateGradient.ts"; | ||
import { Gradient } from "./Gradient.ts"; | ||
|
||
interface Props { | ||
layoutGradient: Gradient; | ||
fontColorDark: string; | ||
awayScore: number; | ||
homeScore: number; | ||
} | ||
|
||
export const Score = ({ | ||
awayScore, | ||
homeScore, | ||
fontColorDark, | ||
layoutGradient, | ||
}: Props) => { | ||
return html` | ||
<div class="score-values-container"> | ||
<div | ||
class="score-value" | ||
style="color: ${fontColorDark}; background: ${generateGradient( | ||
layoutGradient, | ||
)}" | ||
> | ||
${awayScore} | ||
</div> | ||
<div | ||
class="score-value" | ||
style="color: ${fontColorDark}; background: ${generateGradient( | ||
layoutGradient, | ||
)}" | ||
> | ||
${homeScore} | ||
</div> | ||
</div> | ||
`; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { html } from "lit"; | ||
import { generateGradient } from "./generateGradient.ts"; | ||
import { Gradient } from "./Gradient.ts"; | ||
|
||
interface Props { | ||
awayGradient: Gradient; | ||
homeGradient: Gradient; | ||
layoutGradient: Gradient; | ||
awayLogoSrc?: string; | ||
homeLogoSrc?: string; | ||
awayLogoShadow: string; | ||
homeLogoShadow: string; | ||
} | ||
|
||
export const TeamLogos = ({ | ||
awayLogoShadow, | ||
homeLogoShadow, | ||
awayLogoSrc, | ||
homeLogoSrc, | ||
awayGradient, | ||
homeGradient, | ||
}: Props) => { | ||
let awayLogo; | ||
|
||
if (awayLogoSrc) { | ||
awayLogo = html` | ||
<img | ||
src=${awayLogoSrc} | ||
alt="" | ||
height="100%" | ||
style="filter: drop-shadow(2px 2px 0px ${awayLogoShadow}88) drop-shadow(0px 0px 3px ${awayLogoShadow})" | ||
/> | ||
`; | ||
} | ||
|
||
let homeLogo; | ||
|
||
if (homeLogoSrc) { | ||
homeLogo = html` | ||
<img | ||
src=${homeLogoSrc} | ||
alt="" | ||
height="100%" | ||
style="filter: drop-shadow(2px 2px 0px ${homeLogoShadow}88) drop-shadow(0px 0px 3px ${homeLogoShadow})" | ||
/> | ||
`; | ||
} | ||
|
||
return html` | ||
<div class="team-logos-container"> | ||
<div | ||
style="background: ${generateGradient(awayGradient)}" | ||
class="team-logo-row" | ||
> | ||
<div class="team-logo logo">${awayLogo}</div> | ||
</div> | ||
<div | ||
style="background: ${generateGradient(homeGradient)}" | ||
class="team-logo-row" | ||
> | ||
<div class="team-logo logo">${homeLogo}</div> | ||
</div> | ||
</div> | ||
`; | ||
}; |
Oops, something went wrong.