package starshipfights.info
import kotlinx.html.*
+import starshipfights.data.auth.User
import starshipfights.game.ShipType
import starshipfights.game.getDefiniteShortName
override fun ASIDE.display() = block()
}
-object IndexSidebar : Sidebar() {
+data class IndexSidebar(val madeBy: User) : Sidebar() {
override fun ASIDE.display() {
p {
- +"This game is in early development! Report bugs and flaws as you see them, but keep in mind that this game is still being worked on."
+ style = "text-align:center"
+ +"Starship Fights is made by"
+ }
+ img(src = madeBy.discordAvatarUrl) {
+ style = "border-radius:50%"
+ }
+ p {
+ style = "text-align:center"
+ +madeBy.discordName
+ +"#"
+ +madeBy.discordDiscriminator
}
}
}
import starshipfights.data.auth.User
suspend fun ApplicationCall.mainPage(): HTML.() -> Unit {
- return page(null, standardNavBar(), IndexSidebar) {
+ return page(null, standardNavBar(), CurrentConfiguration.discordClient?.ownerId?.let {
+ User.locate(User::discordId eq it)
+ }?.let {
+ IndexSidebar(it)
+ }) {
section {
img(alt = "Starship Fights Logo", src = "/static/images/logo.svg") {
style = "width:100%"