package starshipfights.info
import kotlinx.html.*
-import starshipfights.data.auth.User
import starshipfights.game.ShipType
import starshipfights.game.getDefiniteShortName
override fun ASIDE.display() = block()
}
-data class IndexSidebar(val madeBy: User) : Sidebar() {
- override fun ASIDE.display() {
- p {
- style = "text-align:center"
- +"Starship Fights is made by "
- a(href = "/user/${madeBy.id}") { +madeBy.profileName }
- }
- img(src = madeBy.discordAvatarUrl) {
- style = "border-radius:50%"
- }
- p {
- style = "text-align:center"
- +madeBy.discordName
- +"#"
- +madeBy.discordDiscriminator
- }
- }
-}
-
data class ShipViewSidebar(val shipType: ShipType) : Sidebar() {
override fun ASIDE.display() {
p {
import starshipfights.data.auth.User
suspend fun ApplicationCall.mainPage(): HTML.() -> Unit {
- return page(null, standardNavBar(), CurrentConfiguration.discordClient?.ownerId?.let {
- User.locate(User::discordId eq it)
- }?.let {
- IndexSidebar(it)
- }) {
+ return page(null, standardNavBar(), null) {
section {
img(alt = "Starship Fights Logo", src = "/static/images/logo.svg") {
style = "width:100%"