-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/gradle/kotlin-2.0.20
- Loading branch information
Showing
6 changed files
with
97 additions
and
30 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
15 changes: 15 additions & 0 deletions
15
render-static-html/src/main/java/ink/ui/render/statichtml/InkUiBuilder.kt
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,15 @@ | ||
package ink.ui.render.statichtml | ||
|
||
import ink.ui.structures.elements.UiElement | ||
import ink.ui.structures.layouts.UiLayout | ||
import kotlinx.html.TagConsumer | ||
|
||
interface InkUiBuilder { | ||
val resourceBaseUrl: String | ||
fun addPageHeader(element: UiElement) | ||
fun addPageHeader(block: TagConsumer<*>.() -> Unit) | ||
fun addBody(block: TagConsumer<*>.() -> Unit) | ||
fun addBody(layout: UiLayout) | ||
fun addStyle(stylesheet: String) | ||
fun include(file: String) | ||
} |
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
11 changes: 11 additions & 0 deletions
11
render-static-html/src/main/java/ink/ui/render/statichtml/PartialScript.kt
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,11 @@ | ||
package ink.ui.render.statichtml | ||
|
||
import kotlin.script.experimental.annotations.KotlinScript | ||
|
||
@KotlinScript( | ||
fileExtension = "inkui.kts", | ||
compilationConfiguration = InkUiConfig::class | ||
) | ||
abstract class PartialScript( | ||
private val parent: InkUiScript, | ||
): InkUiBuilder by parent |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
addPageHeader(TextElement("Page Header", TextStyle.H1)) | ||
addPageHeader(TextElement("Subtitle")) |