aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/resources
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2022-03-10 12:33:28 +0300
committerGitHub <noreply@github.com>2022-03-10 12:33:28 +0300
commit597b365ad4512b63387e54d16ba00eb94dccb97d (patch)
tree463f77cb2b27b0664b03be444bba1cbcb10bcbce /plugins/base/src/main/resources
parent8537f0f6fc0d84c0f9918db4f7db9be053d632a8 (diff)
downloaddokka-597b365ad4512b63387e54d16ba00eb94dccb97d.tar.gz
dokka-597b365ad4512b63387e54d16ba00eb94dccb97d.tar.bz2
dokka-597b365ad4512b63387e54d16ba00eb94dccb97d.zip
KT-50452 Make flexible html for customization (#2374)
Diffstat (limited to 'plugins/base/src/main/resources')
-rw-r--r--plugins/base/src/main/resources/dokka/templates/base.ftl62
1 files changed, 62 insertions, 0 deletions
diff --git a/plugins/base/src/main/resources/dokka/templates/base.ftl b/plugins/base/src/main/resources/dokka/templates/base.ftl
new file mode 100644
index 00000000..853d1ca2
--- /dev/null
+++ b/plugins/base/src/main/resources/dokka/templates/base.ftl
@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
+ <title>${pageName}</title>
+ <@template_cmd name="pathToRoot">
+ <link href="${pathToRoot}images/logo-icon.svg" rel="icon" type="image/svg">
+ <script>var pathToRoot = "${pathToRoot}";</script>
+ </@template_cmd>
+ <#-- This script doesn't need to be there but it is nice to have
+ since app in dark mode doesn't 'blink' (class is added before it is rendered) -->
+ <script>const storage = localStorage.getItem("dokka-dark-mode")
+const savedDarkMode = storage ? JSON.parse(storage) : false
+if(savedDarkMode === true){
+ document.getElementsByTagName("html")[0].classList.add("theme-dark")
+}</script>
+ <#-- Resources (scripts, stylesheets) are handled by Dokka.
+ Use customStyleSheets and customAssets to change them. -->
+ <@resources/>
+</head>
+<body>
+<div class="navigation-wrapper" id="navigation-wrapper">
+ <div id="leftToggler"><span class="icon-toggler"></span></div>
+ <div class="library-name">
+ <@template_cmd name="pathToRoot">
+ <a href="${pathToRoot}index.html">
+ <@template_cmd name="projectName">
+ <span>${projectName}</span>
+ </@template_cmd>
+ </a>
+ </@template_cmd>
+ </div>
+ <div>
+ <#-- This can be handled by a versioning plugin -->
+ <@version/>
+ </div>
+ <div class="pull-right d-flex">
+ <button id="theme-toggle-button"><span id="theme-toggle"></span></button>
+ <div id="searchBar"></div>
+ <#if sourceSets??>
+ <div class="filter-section" id="filter-section">
+ <#list sourceSets as ss>
+ <button class="platform-tag platform-selector ${ss.platform}-like" data-active="" data-filter="${ss.filter}">${ss.name}</button>
+ </#list>
+ </div>
+ </#if>
+ </div>
+</div>
+<div id="container">
+ <div id="leftColumn">
+ <div id="sideMenu"></div>
+ </div>
+ <div id="main">
+ <@content/>
+ <div class="footer"><span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>${footerMessage}</span><span
+ class="pull-right"><span>Generated by </span><a
+ href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
+ </div>
+ </div>
+</div>
+</body>
+</html> \ No newline at end of file