@model Project_Unite.Models.Contest @{ ViewBag.Title = "Contest: " + Model.Name; }

@Model.Name

@if (!string.IsNullOrWhiteSpace(Model.VideoId)) { if (Model.IsEnded) {

This contest has ended on @Model.EndsAt

} else {

This contest is open - and will be closed at @Model.EndsAt

}

@Html.Markdown(Model.Description)

Contest rewards:

Gold:
@Model.CodepointReward1st Codepoints
Silver:
@Model.CodepointReward2nd Codepoints
Bronze:
@Model.CodepointReward3rd Codepoints
}

Want to win this contest?

@if (Model.IsEnded) {

Unfortunately, this contest has ended and you cannot submit an entry. Perhaps there's another contest still going?

} else {

Good news! This contest is still open. Hurry and submit your entry!

Go, go, go! Submit an entry! }

Current winners:

@{ var toptobottom = Model.Entries.OrderByDescending(x => (x.Upvotes.Length - x.Downvotes.Length)); } @if(toptobottom.Count() >= 3) { var first = toptobottom.ToArray()[0]; var second = toptobottom.ToArray()[1]; var third = toptobottom.ToArray()[2];
First place:
@first.Name by @Html.UserLink(first.AuthorId)
Second place:
@second.Name by @Html.UserLink(second.AuthorId)
Third place:
@third.Name by @Html.UserLink(third.AuthorId)
} else {

Not enough people have entered into this contest.

}