Change the order of the tags?????????? AGAIN
authorTheSaminator <TheSaminator@users.noreply.github.com>
Sun, 20 Feb 2022 23:02:40 +0000 (18:02 -0500)
committerTheSaminator <TheSaminator@users.noreply.github.com>
Sun, 20 Feb 2022 23:03:52 +0000 (18:03 -0500)
src/jvmMain/kotlin/starshipfights/info/html_metadata.kt
src/jvmMain/kotlin/starshipfights/info/views_ships.kt
src/jvmMain/kotlin/starshipfights/info/views_user.kt

index 2fe178021123c64d6c3d7a7276b808dad552bc0c..f39be0b8b69075359124b0ac259f3a528d687433 100644 (file)
@@ -5,44 +5,20 @@ import kotlinx.html.HEAD
 data class PageMetadata(
        val title: String,
        val description: String,
-       val type: PageMetadataType,
 ) {
        companion object {
                val default = PageMetadata(
                        title = "Starship Fights",
                        description = "Starship Fights is a space fleet battle game. Choose your allegiance, create your admiral, build up your fleet, and destroy your enemies' fleets with it!",
-                       type = PageMetadataType.Website,
                )
        }
 }
 
-sealed class PageMetadataType {
-       object Website : PageMetadataType()
-       
-       data class Profile(
-               val name: String,
-               val isFemale: Boolean?,
-       ) : PageMetadataType()
-}
-
 fun HEAD.metadata(pageMetadata: PageMetadata, url: String) {
        metaOG("og:title", pageMetadata.title)
        metaOG("og:description", pageMetadata.description)
        metaOG("og:url", url)
-       
-       when (pageMetadata.type) {
-               is PageMetadataType.Profile -> {
-                       metaOG("og:type", "profile")
-                       metaOG("og:profile:username", pageMetadata.type.name)
-                       pageMetadata.type.isFemale?.let {
-                               metaOG("og:profile:gender", if (it) "female" else "male")
-                       }
-               }
-               PageMetadataType.Website -> {
-                       metaOG("og:type", "website")
-               }
-       }
-       
+       metaOG("og:type", "website")
        metaOG("og:site_name", "Starship Fights")
        metaOG("og:image", "https://starshipfights.net/static/images/embed-logo.png")
 }
index 44c89fbbeee0d4020933221cffaa33320826f890..f7bc1cc98a2111c5561fcd780dd473204a30b954 100644 (file)
@@ -77,8 +77,7 @@ suspend fun ApplicationCall.shipPage(shipType: ShipType): HTML.() -> Unit = page
        ShipViewSidebar(shipType),
        PageMetadata(
                shipType.displayName + "-class Starship",
-               "A ${shipType.weightClass.displayName} of the ${shipType.faction.navyName}",
-               PageMetadataType.Website
+               "A ${shipType.weightClass.displayName} of the ${shipType.faction.navyName}"
        )
 ) {
        section {
index 57957c840a5cb0a9ba9ba81ac46694bdb602fc14..32963bc16bb35589a8d96f7983ea6d67c6e6dca0 100644 (file)
@@ -101,11 +101,7 @@ suspend fun ApplicationCall.userPage(): HTML.() -> Unit {
                },
                PageMetadata(
                        user.profileName,
-                       user.profileBio,
-                       PageMetadataType.Profile(
-                               user.profileName,
-                               null
-                       )
+                       user.profileBio
                )
        ) {
                section {
@@ -453,11 +449,7 @@ suspend fun ApplicationCall.admiralPage(): HTML.() -> Unit {
                ),
                PageMetadata(
                        admiral.name,
-                       "${admiral.rank.getDisplayName(admiral.faction)} of the ${admiral.faction.navyName}",
-                       PageMetadataType.Profile(
-                               admiral.name,
-                               admiral.isFemale
-                       )
+                       "${admiral.rank.getDisplayName(admiral.faction)} of the ${admiral.faction.navyName}"
                )
        ) {
                section {