@(data: play.api.libs.json.JsObject, userTimeline: Vector[lila.timeline.Entry], forumRecent: List[lila.forum.MiniForumPost], tours: List[Tournament], events: List[lila.event.Event], simuls: List[lila.simul.Simul], featured: Option[Game], leaderboard: List[User.LightPerf], tournamentWinners: List[lila.tournament.Winner], puzzle: Option[lila.puzzle.DailyPuzzle], streams: lila.streamer.LiveStreams.WithTitles, lastPost: List[lila.blog.MiniPost], playban: Option[lila.playban.TempBan], currentGame: Option[lila.app.mashup.Preload.CurrentGame], nbRounds: Int)(implicit ctx: Context) @import play.api.libs.json.Json @underchat = { } @side = { @NotForKids {
@streamer.liveStreams(streams)
} @events.map { e => @event.homepageSpotlight(e) } @lila.tournament.Spotlight.select(tours, ctx.me, 3).map { tour => @tournament.homepageSpotlight(tour) } @simuls.find(_.spotlightable).take(2).map { s => @simul.homepageSpotlight(s) } @ctx.me.map { u =>
@timeline.entries(userTimeline)
}.getOrElse {
lichess.org is a (really) free, no-ads, open source chess server.
Read more about lichess.org
} } @baseline = { @trans.nbPlayers(Html("-,---")) @trans.nbGamesInPlay.plural(nbRounds, Html(s"${nbRounds}")) @if(ctx.isMobileBrowser) { @if(lila.common.HTTPRequest.isAndroid(ctx.req)) { @mobile.googlePlayButton() } else { @if(lila.common.HTTPRequest.isIOS(ctx.req)) { @mobile.appleStoreButton() } } } } @moreJs = { @jsAt(s"compiled/lichess.lobby${isProd??(".min")}.js", async = true) @embedJs { window.customWS = true; lichess_lobby = { data: @safeJson(data), playban: @htmlOrNull(playban) { pb => @safeJson(Json.obj("minutes" -> pb.mins, "remainingSeconds" -> (pb.remainingSeconds + 3))) }, currentGame: @htmlOrNull(currentGame) { cg => @safeJson(cg.json) }, i18n: @jsI18n() }; } } @base.layout( title = "", fullTitle = Some("lichess.org • " + trans.freeOnlineChess.txt()), baseline = baseline.some, side = side.some, moreJs = moreJs, moreCss = cssTag("home.css"), underchat = underchat.some, chessground = false, openGraph = lila.app.ui.OpenGraph( image = staticUrl("images/large_tile.png").some, title = "The best free, adless Chess server", url = netBaseUrl, description = trans.siteDescription.txt() ).some, asyncJs = true) {
@currentGame.map(currentGameInfo(_))
@playban.map(ban => playbanInfo(ban.remainingSeconds))
@trans.createAGame() @trans.playWithAFriend() @trans.playWithTheMachine()
@puzzle.map { p =>
@p.html
@trans.puzzleOfTheDay()
@p.color.fold(trans.whitePlays, trans.blackPlays)()
}
@trans.more() » @trans.openTournaments()
@tournament.enterable(tours)
@trans.more() » @trans.simultaneousExhibitions()
@simul.allCreated(simuls)
@trans.more() » @trans.leaderboard()
@leaderboard.map { l => @lila.rating.PerfType(l.perfKey).map { pt => } }
@lightUserLink(l.user)@l.rating@showProgress(l.progress, withTitle = false)
@trans.more() » @trans.tournamentWinners()
@tournamentWinners.take(10).map { w => }
@userIdLink(w.userId.some) @scheduledTournamentNameShortHtml(w.tourName)
@NotForKids {
@trans.more() » @trans.latestForumPosts()
    @forum.post.recent(forumRecent)
} @if(lastPost.nonEmpty) {
@trans.more() » @trans.latestUpdates()
@lastPost.map { post =>
@defining(routes.Blog.show(post.id, post.slug)) { url =>
@semanticDate(post.date) @post.title

@post.shortlede

}
}
}
Lichess Patron @trans.directlySupportLichess() Swag Store @trans.playChessInStyle()
}