Add flag of faction
authorTheSaminator <TheSaminator@users.noreply.github.com>
Tue, 15 Feb 2022 21:15:57 +0000 (16:15 -0500)
committerTheSaminator <TheSaminator@users.noreply.github.com>
Tue, 15 Feb 2022 21:15:57 +0000 (16:15 -0500)
src/jvmMain/kotlin/starshipfights/info/views_ships.kt

index 44f278db3ae5eab5b2d42d93992841fc6eb7fc4d..e2b7467c5f0966a84be5e83f55fa037a26bc6475 100644 (file)
@@ -48,6 +48,13 @@ suspend fun ApplicationCall.shipsPage(): HTML.() -> Unit = page("Game Manual", s
                        
                        h2 { +faction.shortName }
                        
+                       p {
+                               style = "text-align:center"
+                               img(src = faction.flagUrl, alt = "Flag of ${faction.getDefiniteShortName()}") {
+                                       style = "width:40%"
+                               }
+                       }
+                       
                        faction.blurbDesc(consumer)
                        
                        factionShipTypes.groupBy { it.weightClass }.toSortedMap(Comparator.comparingInt(ShipWeightClass::rank)).forEach { (weightClass, weightedShipTypes) ->