diff --git a/README-en.md b/README-en.md index c884e25..80dae48 100644 --- a/README-en.md +++ b/README-en.md @@ -6,9 +6,8 @@ **English** | [한국어](README.md) | [简体中文](README-zhcn.md) + -
-
@@ -205,4 +204,4 @@ _New contributions may take up to 1 hour to be reflected._

If you have any ideas or discover a bug, please report it. Contact : develxb@gmail.com

-
+
diff --git a/README-zhcn.md b/README-zhcn.md index b1b533d..430a05a 100644 --- a/README-zhcn.md +++ b/README-zhcn.md @@ -6,9 +6,8 @@ [English](README-en.md) | [한국어](README.md) | **简体中文** +
-
-
@@ -205,4 +204,4 @@ _新的贡献可能需要1个小时才能显示_

如果你发现了bug,或者有任何想法,欢迎联系我们!
联系方式: develxb@gmail.com

-
+
diff --git a/README.md b/README.md index a6f336c..7509301 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,10 @@ [English](README-en.md) | **한국어** | [简体中文](README-zhcn.md) +
-
- @@ -200,8 +199,5 @@ _새로운 contribution 반영은 최대 1시간이 소요될 수 있어요._

아이디어나 발견 한 버그가 있다면 제보 해주세요. Contact : develxb@gmail.com

- -
- diff --git a/src/main/kotlin/org/gitanimals/render/domain/FieldType.kt b/src/main/kotlin/org/gitanimals/render/domain/FieldType.kt index 2136b54..e58a0f2 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/FieldType.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/FieldType.kt @@ -151,6 +151,160 @@ enum class FieldType { return "" } }, + HALLOWEEN_FIELD { + override fun loadComponent(name: String, commit: Long): String { + return halloweenFieldSvg.replace(NAME_FIX, name.toSvg(0.0, 3.0)) + .replace(COMMIT_FIX, commit.toSvg("commit", 260.0, 4.0)) + } + + override fun fillBackground(): String { + return " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + } + + override fun drawBorder(): String { + return "" + } + }, + GRASS_FIELD { + override fun loadComponent(name: String, commit: Long): String { + return grassFieldSvg.replace(NAME_FIX, name.toSvg(0.0, 3.0)) + .replace(COMMIT_FIX, commit.toSvg("commit", 260.0, 4.0)) + } + + override fun fillBackground(): String = """ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + """.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 8d44e9c..cce1736 100644 --- a/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt +++ b/src/main/kotlin/org/gitanimals/render/domain/Svgs.kt @@ -12,6 +12,12 @@ val snowyFieldSvg: String = ClassPathResource("persona/field/snowy-field.svg") val carrotAndCoinSvg: String = ClassPathResource("persona/field/carrot-and-coin.svg") .getContentAsString(Charset.defaultCharset()) +val halloweenFieldSvg: String = ClassPathResource("persona/field/halloween-field.svg") + .getContentAsString(Charset.defaultCharset()) + +val grassFieldSvg: String = ClassPathResource("persona/field/grass-field.svg") + .getContentAsString(Charset.defaultCharset()) + val gooseSvg: String = ClassPathResource("persona/animal/goose.svg") .getContentAsString(Charset.defaultCharset()) diff --git a/src/main/resources/persona/field/grass-field.svg b/src/main/resources/persona/field/grass-field.svg new file mode 100644 index 0000000..4cf5285 --- /dev/null +++ b/src/main/resources/persona/field/grass-field.svg @@ -0,0 +1,10 @@ + + *{username} + + + + + + *{commit-count} + + diff --git a/src/main/resources/persona/field/halloween-field.svg b/src/main/resources/persona/field/halloween-field.svg new file mode 100644 index 0000000..4cf5285 --- /dev/null +++ b/src/main/resources/persona/field/halloween-field.svg @@ -0,0 +1,10 @@ + + *{username} + + + + + + *{commit-count} + +