This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #278 from Derek52/Bugfix-StringDiff
Bugfix string diff
- Loading branch information
Showing
5 changed files
with
93 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ ext { | |
} | ||
|
||
group 'com.github.kwebio' | ||
version '0.11.3' | ||
version '0.11.4' | ||
|
||
repositories { | ||
mavenCentral() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package kweb.demos.testPages | ||
|
||
import kweb.* | ||
import kweb.plugins.fomanticUI.fomantic | ||
import kweb.plugins.fomanticUI.fomanticUIPlugin | ||
import kweb.state.KVar | ||
import kweb.state.render | ||
import mu.KotlinLogging | ||
|
||
|
||
fun main() { | ||
DiffTestPage() | ||
} | ||
|
||
class DiffTestPage { | ||
|
||
private val logger = KotlinLogging.logger {} | ||
|
||
val plugins = listOf(fomanticUIPlugin) | ||
val server: Kweb | ||
|
||
var username = KVar("Initial") | ||
init { | ||
|
||
/** Create a Kweb instance, and configure it to use the Fomantic | ||
* UI framework. Build a simple to-do list app listening on | ||
* http://localhost:7659/ | ||
* */ | ||
server = Kweb(port = 7659, debug = true, plugins = plugins, buildPage = { | ||
|
||
doc.head { | ||
// Not required, but recommended by HTML spec | ||
meta(name = "Description", content = "A page to test server updating") | ||
} | ||
|
||
doc.body { | ||
/** Kweb allows you to modularize your code however suits your needs | ||
best. Here I use an extension function defined elsewhere to | ||
draw some util outer page DOM elements */ | ||
/** Kweb allows you to modularize your code however suits your needs | ||
best. Here I use an extension function defined elsewhere to | ||
draw some util outer page DOM elements */ | ||
div(fomantic.ui.text.center.aligned.container) { | ||
val usernameInput = input(initialValue = "Initial") | ||
username = usernameInput.value | ||
println("initialValue: ${usernameInput.value.value}") | ||
usernameInput.setAttribute("class", "fomantic ui input") | ||
|
||
render(username) { | ||
p().text("username: $it") | ||
} | ||
} | ||
|
||
} | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters