Skip to content

Commit

Permalink
update halloween_countdn app to change display on Halloween (#2814)
Browse files Browse the repository at this point in the history
  • Loading branch information
arock95 authored Oct 21, 2024
1 parent 50415c5 commit 0be165f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions apps/halloweencountdn/halloween_countdn.star
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ def main(config):
halloween = time.time(year = halloween_year, month = 10, day = 31, hour = 0, minute = 0, location = timezone)
days_til_halloween = math.ceil(time.parse_duration(halloween - now).seconds / 86400)

display_content = ""
font_size = "6x13"
if days_til_halloween == 0:
display_content = "HALL\n-O-\nWEEN!"
font_size = "5x8"
else:
display_content = "%s\ndays" % days_til_halloween

return render.Root(
delay = 500,
child = render.Row(
Expand All @@ -37,8 +45,8 @@ def main(config):
height = 35,
),
render.WrappedText(
content = "%s\ndays" % days_til_halloween,
font = "6x13",
content = display_content,
font = font_size,
color = "#ff751a",
align = "center",
),
Expand Down

0 comments on commit 0be165f

Please sign in to comment.