ktor-html-builder
Module Contents
alltypes
Module Contents
class
HtmlContent
:
WriteChannelContent
Module Contents
HtmlContent
(
status
:
HttpStatusCode
?
=
null
,
builder
:
HTML
.
(
)
->
Unit
)
val
contentType
:
ContentType
val
status
:
HttpStatusCode
?
suspend
fun
writeTo
(
channel
:
ByteWriteChannel
)
:
Unit
open
class
Placeholder
<
TOuter
>
Module Contents
Placeholder
(
)
fun
apply
(
destination
:
TOuter
)
:
Unit
operator
fun
invoke
(
meta
:
String
=
""
,
content
:
TOuter
.
(
Placeholder
<
TOuter
>
)
->
Unit
)
:
Unit
var
meta
:
String
class
PlaceholderItem
<
TOuter
>
:
Placeholder
<
TOuter
>
Module Contents
PlaceholderItem
(
index
:
Int
,
collection
:
List
<
PlaceholderItem
<
TOuter
>
>
)
val
collection
:
List
<
PlaceholderItem
<
TOuter
>
>
val
first
:
Boolean
val
index
:
Int
val
last
:
Boolean
open
class
PlaceholderList
<
TOuter
,
TInner
>
Module Contents
PlaceholderList
(
)
fun
apply
(
destination
:
TOuter
,
render
:
TOuter
.
(
PlaceholderItem
<
TInner
>
)
->
Unit
)
:
Unit
operator
fun
invoke
(
meta
:
String
=
""
,
content
:
TInner
.
(
Placeholder
<
TInner
>
)
->
Unit
=
{}
)
:
Unit
fun
isEmpty
(
)
:
Boolean
interface
Template
<
in
TOuter
>
Module Contents
abstract
fun
TOuter
.
apply
(
)
:
Unit
open
class
TemplatePlaceholder
<
TTemplate
>
Module Contents
TemplatePlaceholder
(
)
fun
apply
(
template
:
TTemplate
)
:
Unit
operator
fun
invoke
(
content
:
TTemplate
.
(
)
->
Unit
)
:
Unit
io.ktor.application.ApplicationCall
Module Contents
suspend
fun
ApplicationCall
.
respondHtml
(
status
:
HttpStatusCode
=
HttpStatusCode.OK
,
block
:
HTML
.
(
)
->
Unit
)
:
Unit
suspend
fun
<
TTemplate
:
Template
<
HTML
>
>
ApplicationCall
.
respondHtmlTemplate
(
template
:
TTemplate
,
status
:
HttpStatusCode
=
HttpStatusCode.OK
,
body
:
TTemplate
.
(
)
->
Unit
)
:
Unit
package
io.ktor.html
Module Contents
class
HtmlContent
:
WriteChannelContent
Module Contents
HtmlContent
(
status
:
HttpStatusCode
?
=
null
,
builder
:
HTML
.
(
)
->
Unit
)
val
contentType
:
ContentType
val
status
:
HttpStatusCode
?
suspend
fun
writeTo
(
channel
:
ByteWriteChannel
)
:
Unit
open
class
Placeholder
<
TOuter
>
Module Contents
Placeholder
(
)
fun
apply
(
destination
:
TOuter
)
:
Unit
operator
fun
invoke
(
meta
:
String
=
""
,
content
:
TOuter
.
(
Placeholder
<
TOuter
>
)
->
Unit
)
:
Unit
var
meta
:
String
class
PlaceholderItem
<
TOuter
>
:
Placeholder
<
TOuter
>
Module Contents
PlaceholderItem
(
index
:
Int
,
collection
:
List
<
PlaceholderItem
<
TOuter
>
>
)
val
collection
:
List
<
PlaceholderItem
<
TOuter
>
>
val
first
:
Boolean
val
index
:
Int
val
last
:
Boolean
open
class
PlaceholderList
<
TOuter
,
TInner
>
Module Contents
PlaceholderList
(
)
fun
apply
(
destination
:
TOuter
,
render
:
TOuter
.
(
PlaceholderItem
<
TInner
>
)
->
Unit
)
:
Unit
operator
fun
invoke
(
meta
:
String
=
""
,
content
:
TInner
.
(
Placeholder
<
TInner
>
)
->
Unit
=
{}
)
:
Unit
fun
isEmpty
(
)
:
Boolean
interface
Template
<
in
TOuter
>
Module Contents
abstract
fun
TOuter
.
apply
(
)
:
Unit
open
class
TemplatePlaceholder
<
TTemplate
>
Module Contents
TemplatePlaceholder
(
)
fun
apply
(
template
:
TTemplate
)
:
Unit
operator
fun
invoke
(
content
:
TTemplate
.
(
)
->
Unit
)
:
Unit
fun
<
TOuter
,
TInner
>
TOuter
.
each
(
items
:
PlaceholderList
<
TOuter
,
TInner
>
,
itemTemplate
:
TOuter
.
(
PlaceholderItem
<
TInner
>
)
->
Unit
)
:
Unit
fun
<
TOuter
>
TOuter
.
insert
(
placeholder
:
Placeholder
<
TOuter
>
)
:
Unit
fun
<
TTemplate
:
Template
<
TOuter
>
,
TOuter
>
TOuter
.
insert
(
template
:
TTemplate
,
placeholder
:
TemplatePlaceholder
<
TTemplate
>
)
:
Unit
fun
<
TOuter
,
TTemplate
:
Template
<
TOuter
>
>
TOuter
.
insert
(
template
:
TTemplate
,
build
:
TTemplate
.
(
)
->
Unit
)
:
Unit
io.ktor.application.ApplicationCall
Module Contents
suspend
fun
ApplicationCall
.
respondHtml
(
status
:
HttpStatusCode
=
HttpStatusCode.OK
,
block
:
HTML
.
(
)
->
Unit
)
:
Unit
suspend
fun
<
TTemplate
:
Template
<
HTML
>
>
ApplicationCall
.
respondHtmlTemplate
(
template
:
TTemplate
,
status
:
HttpStatusCode
=
HttpStatusCode.OK
,
body
:
TTemplate
.
(
)
->
Unit
)
:
Unit