Skip to content

Commit 2b4771a

Browse files
authored
release: 2.5.5 (#465)
2 parents 2135280 + 4e29d85 commit 2b4771a

File tree

4 files changed

+2721
-0
lines changed

4 files changed

+2721
-0
lines changed

โ€Žsrc/main/kotlin/org/gitanimals/core/FieldType.ktโ€Ž

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,36 @@ enum class FieldType {
401401
override fun drawBorder(): String =
402402
"<rect x=\"0.5\" y=\"0.5\" width=\"599\" height=\"299\" rx=\"4.5\" stroke=\"#C4F2F7\" fill=\"none\"/>"
403403
},
404+
BRICK {
405+
override fun loadComponent(name: String, commit: Long): String {
406+
return whiteFieldSvg.replace(NAME_FIX, name.toSvg(0.0, 3.0))
407+
.replace(COMMIT_FIX, commit.toSvg("commit", 260.0, 4.0))
408+
}
409+
410+
override fun fillBackground(): String =
411+
"""
412+
<rect x="0.5" y="0.5" width="599" height="299" rx="4.5" fill="#C4F2F7"/>
413+
$brickFieldSvg
414+
"""
415+
416+
override fun drawBorder(): String =
417+
"<rect x=\"0.5\" y=\"0.5\" width=\"599\" height=\"299\" rx=\"4.5\" stroke=\"#000000\" fill=\"none\"/>"
418+
},
419+
BRICK_CHRISTMAS {
420+
override fun loadComponent(name: String, commit: Long): String {
421+
return whiteFieldSvg.replace(NAME_FIX, name.toSvg(0.0, 3.0))
422+
.replace(COMMIT_FIX, commit.toSvg("commit", 260.0, 4.0))
423+
}
424+
425+
override fun fillBackground(): String =
426+
"""
427+
<rect x="0.5" y="0.5" width="599" height="299" rx="4.5" fill="#C4F2F7"/>
428+
$brickChristmasFieldSvg
429+
"""
430+
431+
override fun drawBorder(): String =
432+
"<rect x=\"0.5\" y=\"0.5\" width=\"599\" height=\"299\" rx=\"4.5\" stroke=\"#000000\" fill=\"none\"/>"
433+
},
404434
;
405435

406436
abstract fun loadComponent(name: String, commit: Long): String

โ€Žsrc/main/kotlin/org/gitanimals/core/Svgs.ktโ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ val redComputerFieldSvg: String = ClassPathResource("persona/field/red-computer.
5353
val folderFieldSvg: String = ClassPathResource("persona/field/folder.svg")
5454
.getContentAsString(Charset.defaultCharset())
5555

56+
val brickFieldSvg: String = ClassPathResource("persona/field/brick.svg")
57+
.getContentAsString(Charset.defaultCharset())
58+
59+
val brickChristmasFieldSvg: String = ClassPathResource("persona/field/brick-christmas.svg")
60+
.getContentAsString(Charset.defaultCharset())
61+
5662
val gooseSvg: String = ClassPathResource("persona/animal/goose.svg")
5763
.getContentAsString(Charset.defaultCharset())
5864

0 commit comments

Comments
ย (0)