🏠

An HTML Slide 🐦

This is some text

A DSL Slide 🐦

This is some text

Code with a dslSlide


fun main() {
  for (i in (0..5)) {
    println("Hello World $i")
  }
}

            

Slide Definition


dslSlide {
  val src = "kslides-examples/src/main/kotlin/content/HelloWorldK.kt"
  val url = githubRawUrl("kslides", "kslides", src)
  content {
    h2 { +"Code with a dslSlide" }
    // Display lines 3-7 of the url content and highlight lines 1 and 5, 2 and 4, and finally 3
    codeSnippet {
      language = "kotlin"
      highlightPattern = "[1,5|2,4|3]"
      +include(url, "[3-7]")
    }
  }
}

            
GitHub Source

Animated Code without Line Numbers


{
  "id":"555",
  "language":"C++",
  "author":"Bjarne Stroustrup"
}

            

Animated Code without Line Numbers


{
  "id":"444",
  "language":"C",
  "author":"Dennis Ritchie"
},
{
  "id":"555",
  "language":"C++",
  "author":"Bjarne Stroustrup"
}

            

Animated Code without Line Numbers


"books":[
  {
    "id":"444",
    "language":"C",
    "author":"Dennis Ritchie"
  },
  {
    "id":"555",
    "language":"C++",
    "author":"Bjarne Stroustrup"
  }
]

            

Animated Code without Line Numbers


{
  "books":[
    {
      "id":"444",
      "language":"C",
      "author":"Dennis Ritchie"
    },
    {
      "id":"555",
      "language":"C++",
      "author":"Bjarne Stroustrup"
    }
  ]
}

            

Animated Code with Line Numbers


{
  "id":"555",
  "language":"C++",
  "author":"Bjarne Stroustrup"
}

            

Animated Code with Line Numbers


{
  "id":"444",
  "language":"C",
  "author":"Dennis Ritchie"
},
{
  "id":"555",
  "language":"C++",
  "author":"Bjarne Stroustrup"
}

            

Animated Code with Line Numbers


"books":[
  {
    "id":"444",
    "language":"C",
    "author":"Dennis Ritchie"
  },
  {
    "id":"555",
    "language":"C++",
    "author":"Bjarne Stroustrup"
  }
]

            

Animated Code with Line Numbers


{
  "books":[
    {
      "id":"444",
      "language":"C",
      "author":"Dennis Ritchie"
    },
    {
      "id":"555",
      "language":"C++",
      "author":"Bjarne Stroustrup"
    }
  ]
}

            

A Background Image

backgroundSize and backgroundPosition keep it clear of the text.

Lists

  • Unordered items
  • Written as varargs
  • One li per string
  1. Ordered items
  2. Numbered automatically

Tables

DeckPathSlides
Mainindex.htmlmany
Great Talk 1greattalk1/2
Great Talk 2greattalk2.html2

Mermaid Diagrams

flowchart LR
  A[Slides.kt] --> B[kslides]
  B --> C[docs/]
  B --> D[HTTP server]

Kotlin Playground

A Lets-Plot Figure

Kroki Diagrams