Skip to content

Commit

Permalink
Adds some initial badge list
Browse files Browse the repository at this point in the history
  • Loading branch information
captn3m0 committed May 30, 2024
1 parent d016cab commit 7108bee
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
27 changes: 27 additions & 0 deletions _data/badges.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
- id: sub-1h
name: Sub 1h
description: Finished a puzzle set in less than an hour
emoji: ⏲️
- id: has-alias
name: Secret Identity
description: Participated with a different team name
emoji: 🦸
- id: christmas
name: Christmas
description: Attended a Christmas themed puzzle
emoji: 🎄
- id: diwali
name: Diwali
description: Attended a puzzle on the Diwali week
emoji: 🪔
- id: streak-__VAR__
name: Streak of __VAR__
description: Attended __VAR__ puzzles in a row
- id: year-__VAR__
name: Year __VAR__
description: Attended 6 puzzles in the year __VAR__
# TODO: December Meta Puzzle Completion Badges
# TODO: Live Streak
- id: punctual
name: Punctial
description: First team to start the set
4 changes: 3 additions & 1 deletion _plugins/duration.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module Jekyll
module Duration
def duration_to_string(seconds)
if seconds < 3600
if seconds < 3600 # <1h
Time.at(seconds, in: '+00:00').strftime("%-Mm")
elsif seconds %3600 == 0 # exact hour
Time.at(seconds, in: '+00:00').strftime("%-Hh")
else
Time.at(seconds, in: '+00:00').strftime("%-Hh%-Mm")
end
Expand Down

0 comments on commit 7108bee

Please sign in to comment.