<commit_before>package views.html.clas

import play.api.data.Form

import lila.api.Context
import lila.app.templating.Environment._
import lila.app.ui.ScalatagsTemplate._
import lila.clas.Clas
import lila.clas.ClasForm.ClasData
import controllers.routes

object clas {

  def home(doc: io.prismic.Document, resolver: io.prismic.DocumentLinkResolver)(implicit ctx: Context) =
    views.html.base.layout(
      moreCss = frag(
        cssTag("page"),
        cssTag("clas")
      ),
      title = ~doc.getText("doc.title")
    ) {
      main(cls := "page-small box box-pad page clas-home")(
        h1(doc.getText("doc.title")),
        div(cls := "clas-home__doc")(
          raw(~doc.getHtml("doc.content", resolver))
        ),
        div(cls := "clas-home__onboard")(
          button(cls := "button button-fat disabled", href := routes.Clas.verifyTeacher, disabled)(
            "Apply for Lichess Teacher"
          ),
          p("Only on invitation for now! We will take applications soon.")
        )
      )
    }

  def index(classes: List[Clas])(implicit ctx: Context) =
    bits.layout("Lichess Classes", Right("classes"))(
      cls := "clas-index",
      div(cls := "box__top")(
        h1("Lichess Classes"),
        a(
          href := routes.Clas.form,
          cls := "new button button-green button-empty",
          title := "New Class",
          dataIcon := "O"
        )
      ),
      if (classes.isEmpty)
        frag(hr, p(cls := "box__pad classes__empty")("No classes yet."))
      else
        div(cls := "classes")(
          classes.map { clas =>
            div(
              cls := List("clas-widget" -> true, "clas-widget-archived" -> clas.isArchived),
              dataIcon := "f"
            )(
              a(cls := "overlay", href := routes.Clas.show(clas.id.value)),
              div(
                h3(clas.name),<commit_msg>open teacher applications<commit_after>package views.html.clas

import play.api.data.Form

import lila.api.Context
import lila.app.templating.Environment._
import lila.app.ui.ScalatagsTemplate._
import lila.clas.Clas
import lila.clas.ClasForm.ClasData
import controllers.routes

object clas {

  def home(doc: io.prismic.Document, resolver: io.prismic.DocumentLinkResolver)(implicit ctx: Context) =
    views.html.base.layout(
      moreCss = frag(
        cssTag("page"),
        cssTag("clas")
      ),
      title = ~doc.getText("doc.title")
    ) {
      main(cls := "page-small box box-pad page clas-home")(
        h1(doc.getText("doc.title")),
        div(cls := "clas-home__doc")(
          raw(~doc.getHtml("doc.content", resolver))
        ),
        div(cls := "clas-home__onboard")(
          a(cls := "button button-fat", href := routes.Clas.verifyTeacher)(
            "Apply for Lichess Teacher"
          )
        )
      )
    }

  def index(classes: List[Clas])(implicit ctx: Context) =
    bits.layout("Lichess Classes", Right("classes"))(
      cls := "clas-index",
      div(cls := "box__top")(
        h1("Lichess Classes"),
        a(
          href := routes.Clas.form,
          cls := "new button button-green button-empty",
          title := "New Class",
          dataIcon := "O"
        )
      ),
      if (classes.isEmpty)
        frag(hr, p(cls := "box__pad classes__empty")("No classes yet."))
      else
        div(cls := "classes")(
          classes.map { clas =>
            div(
              cls := List("clas-widget" -> true, "clas-widget-archived" -> clas.isArchived),
              dataIcon := "f"
            )(
              a(cls := "overlay", href := routes.Clas.show(clas.id.value)),
              div(
                h3(clas.name),
{'fraction_non_alphanumeric': 0.14887794198139026, 'fraction_numerical': 0.0016420361247947454, 'mean_word_length': 2.1079931972789114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '6057039', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1167, 'n_words': 229}