From 6bd24af2ffbea91db1b10a5d5258980ce2068c7f Mon Sep 17 00:00:00 2001 From: sadbeast Date: Tue, 16 Jul 2024 18:16:29 -0700 Subject: let's go --- src/templates/404.zmpl | 1 + src/templates/_nav.zmpl | 8 ++++++ src/templates/about.zmpl | 37 +++++++++++++++++++++++++ src/templates/body.zmpl | 6 +++++ src/templates/draft.zmpl | 60 +++++++++++++++++++++++++++++++++++++++++ src/templates/index.zmpl | 39 +++++++++++++++++++++++++++ src/templates/layout.zmpl | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 220 insertions(+) create mode 100644 src/templates/404.zmpl create mode 100644 src/templates/_nav.zmpl create mode 100644 src/templates/about.zmpl create mode 100644 src/templates/body.zmpl create mode 100644 src/templates/draft.zmpl create mode 100644 src/templates/index.zmpl create mode 100644 src/templates/layout.zmpl (limited to 'src/templates') diff --git a/src/templates/404.zmpl b/src/templates/404.zmpl new file mode 100644 index 0000000..03332b4 --- /dev/null +++ b/src/templates/404.zmpl @@ -0,0 +1 @@ +

Not Found

diff --git a/src/templates/_nav.zmpl b/src/templates/_nav.zmpl new file mode 100644 index 0000000..37ea090 --- /dev/null +++ b/src/templates/_nav.zmpl @@ -0,0 +1,8 @@ + diff --git a/src/templates/about.zmpl b/src/templates/about.zmpl new file mode 100644 index 0000000..9d13f89 --- /dev/null +++ b/src/templates/about.zmpl @@ -0,0 +1,37 @@ +

Team Draft is a 2-person sports team fantasy scoring league, where you draft sports teams and score points throughout the season based on wins and playoff appearances. The idea was taken from Mina Kimes's yearly NFL Team Draft with Mike Golic, Jr. on the Mina Kimes Show podcast.

+

Scoring

+

NFL

+ + + + + + + + + + + + + + + + + + + + + + + + +
When your team:You score:
Wins + 1
Makes the playoffs + 5
Makes the divisional round + 5
Makes the conference championship game + 10
Wins the Super Bowl + 5
+

Who made this?

+

This was made by me, and it's open source.

+

If you have any issues, reach out at sadbeast@sadbeast.com.

+ diff --git a/src/templates/body.zmpl b/src/templates/body.zmpl new file mode 100644 index 0000000..e3f8387 --- /dev/null +++ b/src/templates/body.zmpl @@ -0,0 +1,6 @@ +
+ @partial nav +
+ {{zmpl.content}} +
+
diff --git a/src/templates/draft.zmpl b/src/templates/draft.zmpl new file mode 100644 index 0000000..8957b29 --- /dev/null +++ b/src/templates/draft.zmpl @@ -0,0 +1,60 @@ +@zig { +const can_pick = data.getPresence("can_pick"); + if (!data.getPresence("running")) { +
+ @html HTML + + HTML +

https://teamdraft.net/invite/{{.code}}

+ } +
+
+ if (data.getPresence("running")) { +
Round Time Remaining: {{.round_time_remaining}} + } +
{{.message}} +
+ if (zmpl.get("teams")) |teams| { +
+ + + + + + + + + for (teams.items(.array)) |team| { + const id = team.get("id"); + const rank = team.get("rank"); + const name = team.get("name"); + const picked: bool = team.getT(.boolean, "picked") orelse true; + const pick_user = team.get("pick_user"); + + + + + + } + +
TeamRank
{{name}}{{rank}} + {{pick_user}} + if (can_pick and !picked) { +
+ +
+ } +
+
+ } +} +
diff --git a/src/templates/index.zmpl b/src/templates/index.zmpl new file mode 100644 index 0000000..78127d3 --- /dev/null +++ b/src/templates/index.zmpl @@ -0,0 +1,39 @@ +
+
+

Welcome! Team Draft is a 2-person fantasy sports league, where you draft entire sports teams - not players - and score points throughout the season based on wins and playoff appearances. The idea was taken from the Mina Kimes Show's yearly NFL Team Draft.

+
    +
  • Create a live draft to pick your teams!
  • +
  • Manage players' teams manually to support trades
  • +
  • Keeps track of game scores automatically
  • +
+

Create a league now, and schedule a live draft!

+
+
+
+
2024 NFL Season
+
+
+ + +
+
+ @zig { + + + } +
+ +
+
+
+
diff --git a/src/templates/layout.zmpl b/src/templates/layout.zmpl new file mode 100644 index 0000000..75cda7e --- /dev/null +++ b/src/templates/layout.zmpl @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + Team Draft + + + +
+ @partial nav +
+ {{zmpl.content}} +
+
+ + + + -- cgit v1.2.3