<commit_before>package views.html.base

import lila.api.Context
import lila.app.templating.Environment._
import lila.app.ui.ScalatagsTemplate._

import controllers.routes

object topnav {

  private def linkTitle(url: String, name: Frag)(implicit ctx: Context) =
    if (ctx.blind) h2(name) else a(href := url)(name)

  def apply()(implicit ctx: Context) = st.nav(
    id := "topnav",
    cls := (if (ctx.blind) "blind" else "hover")
  )(
      st.section(
        linkTitle("/", trans.play()),
        div(role := "group")(
          if (ctx.noBot) a(href := "/?any#hook")(trans.createAGame())
          else a(href := "/?any#friend")(trans.playWithAFriend()),
          ctx.noBot option frag(
            a(href := routes.Tournament.home())(trans.tournament()),
            a(href := routes.Simul.home)(trans.simultaneousExhibitions())
          )
        )
      ),
      st.section(
        linkTitle(routes.Puzzle.home.toString, trans.learnMenu()),
        div(role := "group")(
          ctx.noBot option frag(
            a(href := routes.Learn.index)(trans.chessBasics()),
            a(href := routes.Puzzle.home)(trans.training()),
            a(href := routes.Practice.index)("Practice"),
            a(href := routes.Coordinate.home)(trans.coordinates.coordinates())
          ),
          a(href := routes.Study.allDefault(1))("Study"),
          a(href := routes.Coach.allDefault(1))(trans.coaches())
        )
      ),
      st.section(
        linkTitle(routes.Tv.index.toString, trans.watch()),
        div(role := "group")(
          a(href := routes.Tv.index)("Lichess TV"),
          a(href := routes.Tv.games)(trans.currentGames()),
          a(href := routes.Streamer.index())("Streamers"),
          a(href := routes.Relay.index())("Broadcasts (beta)"),
          ctx.noBot option a(href := routes.Video.index)(trans.videoLibrary())
        )
      ),
      st.section(
        linkTitle(routes.User.list.toString, trans.community()),
        div(role := "group")(
          a(href := routes.User.list)(trans.players()),
          NotForKids(frag(
            a(href := routes.Team.home())(trans.teams()),
            a(href := routes.ForumCateg.index)(trans.forum())
          ))
        )
      ),
      st.section(
        linkTitle(routes.UserAnalysis.index.toString, trans.tools()),
        div(role := "group")(
          a(href := routes.UserAnalysis.index)(trans.analysis()),
          a(href := s"${routes.UserAnalysis.index}#explorer")(trans.openingExplorer()),
          a(href := routes.Editor.index)(trans.boardEditor()),
          a(href := routes.Importer.importGame)(trans.importGame()),
          a(href := routes.Search.index())(trans.advancedSearch())
        )
      )
    )<commit_msg>remove the broadcast beta tag<commit_after>package views.html.base

import lila.api.Context
import lila.app.templating.Environment._
import lila.app.ui.ScalatagsTemplate._

import controllers.routes

object topnav {

  private def linkTitle(url: String, name: Frag)(implicit ctx: Context) =
    if (ctx.blind) h2(name) else a(href := url)(name)

  def apply()(implicit ctx: Context) = st.nav(
    id := "topnav",
    cls := (if (ctx.blind) "blind" else "hover")
  )(
      st.section(
        linkTitle("/", trans.play()),
        div(role := "group")(
          if (ctx.noBot) a(href := "/?any#hook")(trans.createAGame())
          else a(href := "/?any#friend")(trans.playWithAFriend()),
          ctx.noBot option frag(
            a(href := routes.Tournament.home())(trans.tournament()),
            a(href := routes.Simul.home)(trans.simultaneousExhibitions())
          )
        )
      ),
      st.section(
        linkTitle(routes.Puzzle.home.toString, trans.learnMenu()),
        div(role := "group")(
          ctx.noBot option frag(
            a(href := routes.Learn.index)(trans.chessBasics()),
            a(href := routes.Puzzle.home)(trans.training()),
            a(href := routes.Practice.index)("Practice"),
            a(href := routes.Coordinate.home)(trans.coordinates.coordinates())
          ),
          a(href := routes.Study.allDefault(1))("Study"),
          a(href := routes.Coach.allDefault(1))(trans.coaches())
        )
      ),
      st.section(
        linkTitle(routes.Tv.index.toString, trans.watch()),
        div(role := "group")(
          a(href := routes.Tv.index)("Lichess TV"),
          a(href := routes.Tv.games)(trans.currentGames()),
          a(href := routes.Streamer.index())("Streamers"),
          a(href := routes.Relay.index())("Broadcasts"),
          ctx.noBot option a(href := routes.Video.index)(trans.videoLibrary())
        )
      ),
      st.section(
        linkTitle(routes.User.list.toString, trans.community()),
        div(role := "group")(
          a(href := routes.User.list)(trans.players()),
          NotForKids(frag(
            a(href := routes.Team.home())(trans.teams()),
            a(href := routes.ForumCateg.index)(trans.forum())
          ))
        )
      ),
      st.section(
        linkTitle(routes.UserAnalysis.index.toString, trans.tools()),
        div(role := "group")(
          a(href := routes.UserAnalysis.index)(trans.analysis()),
          a(href := s"${routes.UserAnalysis.index}#explorer")(trans.openingExplorer()),
          a(href := routes.Editor.index)(trans.boardEditor()),
          a(href := routes.Importer.importGame)(trans.importGame()),
          a(href := routes.Search.index())(trans.advancedSearch())
        )
      )
    )
{'fraction_non_alphanumeric': 0.17559904883848546, 'fraction_numerical': 0.001097494055240534, 'mean_word_length': 2.4476670870113493, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5972567', 'n_tokens_mistral': 1720, 'n_tokens_neox': 1682, 'n_words': 251}