Kotlin DSL wrapper around Reveal JS presentation library
Run server with presentation:
jbang [email protected] run ./MyAwesomePresentation.reveal.kts
Bundle presentation to static html site:
jbang [email protected] bundle ./MyAwesomePresentation.reveal.kts
Render presentation to pdf via playwright:
jbang [email protected] pdf ./MyAwesomePresentation.reveal.kts -o myPresentation.pdf
Caution
For now playwright requires to download chromium first (uses npm)
Playwright documentation: https://playwright.dev/java/docs/browsers
jbang [email protected] chrome install
Uninstall chrome
jbang [email protected] chrome uninstall
Create new presentation from template
jbang [email protected] init my-awesome-presentation
cd ./my-awesome-presentation
jbang [email protected] run ./presentation/my-awesome-presentation.reveal.kts
jbang app install [email protected]
revealkt run ./presentation/my-awesome-presentation.reveal.kts
MyAwesomeScript.reveal.kts:
import qrcode.color.Colors
title = "My awesome presentation"
configuration {
controls = false
progress = false
}
slides {
regularSlide {
autoanimate = true
+title { "Hello from my awesome presentation" }
}
regularSlide {
autoanimate = true
+qrCode("https://github.com/LimeBeck/reveal-kt") {
stretch = true
transformBuilder {
val logo = loadAsset("logo2.png")
it.withSize(20).withColor(Colors.css("#B125EA")).withLogo(logo, 150, 150, clearLogoArea = true)
}
}
}
verticalSlide {
val title = Title { "Some text" }
slide {
autoanimate = true
+title
+note {
"Some note"
}
}
slide {
autoanimate = true
+title
+title { "Updated text" }
+note {
"Some note"
}
}
slide {
autoanimate = true
+title
+code {
//language=JSON
"""
{
"string": "some string"
}
""".trimIndent()
}
}
slide {
+img(src = "image.png") {
stretch = true
}
}
}
}