forked from lichess-org/lila
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
11 changed files
with
117 additions
and
20 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
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,19 @@ | ||
package lila | ||
package templating | ||
|
||
import com.roundeights.hasher.Implicits._ | ||
import eu.henkelmann.actuarius.ActuariusTransformer | ||
import play.api.templates.Html | ||
|
||
trait MarkdownHelper { | ||
|
||
private val cache = collection.mutable.Map[String, Html]() | ||
|
||
def markdown(text: String): Html = cache.getOrElseUpdate(text.md5, doMarkdown(text)) | ||
|
||
def markdown(text: Html): Html = markdown(text.toString) | ||
|
||
private def doMarkdown(text: String) = Html { | ||
new ActuariusTransformer() apply text | ||
} | ||
} |
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,34 @@ | ||
@(players: String = "all") | ||
|
||
@text = { | ||
|
||
## When will the tournament start? | ||
As soon as @players players join it. | ||
You will be notified when the tournament starts, so it is safe to | ||
<a target="_blank" href="@routes.Lobby.home()">play in another tab</a> while waiting. | ||
|
||
## Is it rated? | ||
No, tournament games won't impact your ELO. | ||
|
||
## How to win? | ||
The players with the more points at the end of the tournament duration wins. | ||
A game win is worth 2 points, a draw 1 point, and a defeat 0 points. | ||
|
||
## How does the pairing work? | ||
At the beginning of the tournament, players are paired randomly. | ||
As soon as you finish a game, return to the tournament lobby: | ||
you will then be paired with the first available player. This ensures minimum wait time, | ||
but you may not play every other players of the tournament. It is normal. | ||
Play fast and return to the lobby to play more games and win more points. | ||
|
||
## What is the win streak? | ||
It represents the number of games won in a row. It is added to the points you win. | ||
For instance, if you win 3 games in a row, you get 2 + 3 points for the last game. | ||
If you lose a game, your win streak returns to zero. | ||
|
||
## How does it end? | ||
The tournament has a countdown clock. When it reaches zero, all current tournament games | ||
are cancelled. The tournament ranking is frozen, and the winner is known. | ||
} | ||
|
||
<article class="faq">@markdown(text)</article> |
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,17 @@ | ||
@()(implicit ctx: Context) | ||
|
||
@goodies = { | ||
<div class="tournament_links"> | ||
<a href="@routes.Tournament.home()">Back to tournaments</a> | ||
</div> | ||
} | ||
|
||
@tournament.layout(title = "Tournament FAQ", goodies = goodies.some) { | ||
<div id="tournament"> | ||
<div class="content_box small_box faq_page"> | ||
<h1>Tournament FAQ</h1> | ||
@tournament.faq() | ||
</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
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
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