package be.simplenotes.app.views import be.simplenotes.app.utils.StaticFileResolver import be.simplenotes.domain.security.JwtPayload import kotlinx.html.* import kotlinx.html.div import org.intellij.lang.annotations.Language class BaseView(staticFileResolver: StaticFileResolver) : View(staticFileResolver) { fun renderHome(jwtPayload: JwtPayload?) = renderPage( title = "Home", description = "A fast and simple note taking website", jwtPayload = jwtPayload ) { section("text-center my-2 p-2") { h1("text-5xl casual") { span("text-teal-300") { +"Simplenotes " } +"- access your notes anywhere" } } div("container mx-auto flex flex-wrap justify-center content-center") { unsafe { @Language("html") val html = """

Notes

Trash (3) New
Title Updated Tags
Formula 1 moments ago
  • #demo
Syntax highlighting 2 hours ago
  • #features
  • #demo
report 5 days ago
  • #study
  • #demo
""".trimIndent() +html } welcome() } } @Suppress("NOTHING_TO_INLINE") private inline fun DIV.welcome() { div("w-full my-auto md:w-1/2 md:order-2 order-1 text-center") { div("m-4 rounded-lg p-6") { p("text-teal-400") { h2("text-3xl text-teal-400 underline") { +"Features:" } ul("list-disc text-lg list-inside") { li { +"Markdown support" } li { +"Full text search" } li { +"Structured search" } li { +"Code highlighting" } li { +"Fast and lightweight" } li { +"No tracking" } li { +"Works without javascript" } li { +"Data export" } } } } } } }