diff --git a/src/main/kotlin/org/gitanimals/render/domain/FieldType.kt b/src/main/kotlin/org/gitanimals/render/domain/FieldType.kt index e58a0f2..7f1edcf 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/FieldType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/FieldType.kt @@ -304,7 +304,505 @@ enum class FieldType { override fun drawBorder(): String { return "" } - } + }, + SNOW_HOUSE_FIELD { + override fun loadComponent(name: String, commit: Long): String { + return snowHouseFieldSvg.replace(NAME_FIX, name.toSvg(0.0, 3.0)) + .replace(COMMIT_FIX, commit.toSvg("commit", 260.0, 4.0)) + } + + override fun fillBackground(): String { + return """ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + """.trimIndent() + } + + override fun drawBorder(): String { + return "" + } + }, ; abstract fun loadComponent(name: String, commit: Long): String diff --git a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt index e8fed39..5b3b757 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt @@ -18,6 +18,9 @@ val halloweenFieldSvg: String = ClassPathResource("persona/field/halloween-field val grassFieldSvg: String = ClassPathResource("persona/field/grass-field.svg") .getContentAsString(Charset.defaultCharset()) +val snowHouseFieldSvg: String = ClassPathResource("persona/field/snow-house-field.svg") + .getContentAsString(Charset.defaultCharset()) + val gooseSvg: String = ClassPathResource("persona/animal/goose.svg") .getContentAsString(Charset.defaultCharset()) diff --git a/src/main/resources/persona/field/snow-house-field.svg b/src/main/resources/persona/field/snow-house-field.svg new file mode 100644 index 0000000..4cf5285 --- /dev/null +++ b/src/main/resources/persona/field/snow-house-field.svg @@ -0,0 +1,10 @@ + + *{username} + + + + + + *{commit-count} + +