From 8305eaffbc51fccc72183b4fe64f4c9db047fb82 Mon Sep 17 00:00:00 2001 From: Vadim Mishenev Date: Fri, 15 Apr 2022 21:39:31 +0300 Subject: Decompose `base.ftl` template (#2432) --- .../src/main/resources/dokka/templates/base.ftl | 39 ++++------------------ .../resources/dokka/templates/includes/footer.ftl | 7 ++++ .../resources/dokka/templates/includes/header.ftl | 24 +++++++++++++ .../dokka/templates/includes/page_metadata.ftl | 6 ++++ .../templates/includes/source_set_selector.ftl | 9 +++++ 5 files changed, 52 insertions(+), 33 deletions(-) create mode 100644 plugins/base/src/main/resources/dokka/templates/includes/footer.ftl create mode 100644 plugins/base/src/main/resources/dokka/templates/includes/header.ftl create mode 100644 plugins/base/src/main/resources/dokka/templates/includes/page_metadata.ftl create mode 100644 plugins/base/src/main/resources/dokka/templates/includes/source_set_selector.ftl (limited to 'plugins/base/src/main') diff --git a/plugins/base/src/main/resources/dokka/templates/base.ftl b/plugins/base/src/main/resources/dokka/templates/base.ftl index fb8fabd9..78ce21e2 100644 --- a/plugins/base/src/main/resources/dokka/templates/base.ftl +++ b/plugins/base/src/main/resources/dokka/templates/base.ftl @@ -1,10 +1,12 @@ +<#import "includes/page_metadata.ftl" as page_metadata> +<#import "includes/header.ftl" as header> +<#import "includes/footer.ftl" as footer> - ${pageName} + <@page_metadata.display/> <@template_cmd name="pathToRoot"> - <#-- This script doesn't need to be there but it is nice to have @@ -19,43 +21,14 @@ if(savedDarkMode === true){ <@resources/> - + <@header.display/>
<@content/> - + <@footer.display/>
diff --git a/plugins/base/src/main/resources/dokka/templates/includes/footer.ftl b/plugins/base/src/main/resources/dokka/templates/includes/footer.ftl new file mode 100644 index 00000000..461a8162 --- /dev/null +++ b/plugins/base/src/main/resources/dokka/templates/includes/footer.ftl @@ -0,0 +1,7 @@ +<#macro display> + + \ No newline at end of file diff --git a/plugins/base/src/main/resources/dokka/templates/includes/header.ftl b/plugins/base/src/main/resources/dokka/templates/includes/header.ftl new file mode 100644 index 00000000..a7ba81ba --- /dev/null +++ b/plugins/base/src/main/resources/dokka/templates/includes/header.ftl @@ -0,0 +1,24 @@ +<#import "source_set_selector.ftl" as source_set_selector> +<#macro display> + + \ No newline at end of file diff --git a/plugins/base/src/main/resources/dokka/templates/includes/page_metadata.ftl b/plugins/base/src/main/resources/dokka/templates/includes/page_metadata.ftl new file mode 100644 index 00000000..f897c104 --- /dev/null +++ b/plugins/base/src/main/resources/dokka/templates/includes/page_metadata.ftl @@ -0,0 +1,6 @@ +<#macro display> + ${pageName} + <@template_cmd name="pathToRoot"> + + + \ No newline at end of file diff --git a/plugins/base/src/main/resources/dokka/templates/includes/source_set_selector.ftl b/plugins/base/src/main/resources/dokka/templates/includes/source_set_selector.ftl new file mode 100644 index 00000000..13650ee5 --- /dev/null +++ b/plugins/base/src/main/resources/dokka/templates/includes/source_set_selector.ftl @@ -0,0 +1,9 @@ +<#macro display> + <#if sourceSets??> +
+ <#list sourceSets as ss> + + +
+ + \ No newline at end of file -- cgit