diff options
Diffstat (limited to 'src/Formats/HtmlTemplateService.kt')
-rw-r--r-- | src/Formats/HtmlTemplateService.kt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Formats/HtmlTemplateService.kt b/src/Formats/HtmlTemplateService.kt new file mode 100644 index 00000000..5bb03fbd --- /dev/null +++ b/src/Formats/HtmlTemplateService.kt @@ -0,0 +1,28 @@ +package org.jetbrains.dokka + +public trait HtmlTemplateService { + fun appendHeader(to: StringBuilder) + fun appendFooter(to: StringBuilder) + + class object { + public fun default(css: String? = null): HtmlTemplateService { + return object : HtmlTemplateService { + override fun appendFooter(to: StringBuilder) { + to.appendln("</BODY>") + to.appendln("</HTML>") + } + override fun appendHeader(to: StringBuilder) { + to.appendln("<HTML>") + to.appendln("<HEAD>") + if (css != null) { + to.appendln("<link rel=\"stylesheet\" href=\"$css\">") + } + to.appendln("</HEAD>") + to.appendln("<BODY>") + } + } + } + } +} + + |