File tree Expand file tree Collapse file tree 2 files changed +3
-29
lines changed
Expand file tree Collapse file tree 2 files changed +3
-29
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ parent: Built-in DSLs
88
99# HTMX DSL
1010
11- This DSL allows you to seamlessly integrate [ HTMX ] ( https://htmx.org ) with the Kotlin HTML DSL .
11+ This DSL allows you to seamlessly integrate [ KHTMX ] ( https://github.com/wakingrufus/khtmx ) with a Spring Funk WebMvc Application .
1212
1313## Usage
1414
@@ -60,33 +60,7 @@ page("/index") {
6060}
6161```
6262
63- ### Templates
64- Templates can be declared which define how a given binding response should be rendered to htmx.
65-
66- ``` kotlin
67- val myTemplate = htmxTemplate<ResponseDataClass > {
68- div {
69- span {
70- + it.name
71- }
72- }
73- }
74- ```
75-
76- Templates can be composed.
77-
78- ``` kotlin
79- val itemTemplate = htmxTemplate<String > {
80- li { + it }
81- }
82- val listTemplate = htmxTemplate<List <String >> {
83- ul {
84- it.forEach {
85- template(itemTemplate, it)
86- }
87- }
88- }
89- ```
63+ See the [ KHTMX DSL Documentation] ( https://wakingrufus.github.io/khtmx/dsl.html ) for more information on authoring htmx.
9064
9165### HTMX Interaction
9266
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ dependencies {
1111 implementation(libs.jackson.databind)
1212 implementation(libs.jackson.datatype.jdk8)
1313
14- api(" io.github.wakingrufus:khtmx-dsl-jvm:0.+ " )
14+ api(" io.github.wakingrufus:khtmx-dsl-jvm:0.0.10 " )
1515 api(" org.jetbrains.kotlin-wrappers:kotlin-css-jvm:2025.3.20" )
1616
1717 testImplementation(project(" :spring-funk-test" ))
You can’t perform that action at this time.
0 commit comments