From 72db3a16521408509f4a0f61ef110851a252d2cc Mon Sep 17 00:00:00 2001 From: Filip ZybaƂa Date: Mon, 6 Apr 2020 14:24:07 +0200 Subject: Change PlatformHintedContent rendering, js and css to match Figma style --- .../out/html/root//f.html | 4 +- .../out/html/root//index.html | 4 +- .../annotatedFunction/out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../annotatedFunction/out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//-fancy/-init-.html | 4 +- .../out/html/root//-fancy/equals.html | 4 +- .../out/html/root//-fancy/hash-code.html | 4 +- .../out/html/root//-fancy/index.html | 16 ++++--- .../out/html/root//-fancy/to-string.html | 4 +- .../out/html/root//f.html | 4 +- .../out/html/root//index.html | 7 ++- .../out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../out/html/styles/style.css | 50 ++++++++++++++++++++++ .../function/out/html/root//fn.html | 7 ++- .../function/out/html/root//index.html | 4 +- .../expect/function/out/html/root/index.html | 1 + .../function/out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../expect/function/out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//-fancy/-init-.html | 4 +- .../out/html/root//-fancy/equals.html | 4 +- .../out/html/root//-fancy/hash-code.html | 4 +- .../out/html/root//-fancy/index.html | 13 ++++-- .../out/html/root//-fancy/to-string.html | 4 +- .../out/html/root//function.html | 4 +- .../out/html/root//index.html | 7 ++- .../out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//f.html | 4 +- .../out/html/root//index.html | 4 +- .../out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//function.html | 4 +- .../out/html/root//index.html | 4 +- .../out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//f.html | 4 +- .../out/html/root//index.html | 4 +- .../out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//function.html | 7 ++- .../out/html/root//index.html | 4 +- .../functionWithParams/out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../functionWithParams/out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//fn.html | 13 ++++-- .../out/html/root//index.html | 7 ++- .../functionWithReceiver/out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../functionWithReceiver/out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//generic.html | 7 ++- .../out/html/root//index.html | 4 +- .../genericFunction/out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../genericFunction/out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//generic.html | 7 ++- .../out/html/root//index.html | 4 +- .../out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../out/html/styles/style.css | 50 ++++++++++++++++++++++ .../inlineFunction/out/html/root//f.html | 4 +- .../out/html/root//index.html | 4 +- .../expect/inlineFunction/out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../inlineFunction/out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//f.html | 4 +- .../out/html/root//index.html | 4 +- .../inlineSuspendFunction/out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../out/html/styles/style.css | 50 ++++++++++++++++++++++ .../expect/signatureTest/out/html/root/index.html | 1 + .../out/html/root/signatureTest/index.html | 7 ++- .../out/html/root/signatureTest/test.html | 4 +- .../out/html/root/signatureTest/test2.html | 4 +- .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../expect/signatureTest/out/html/styles/style.css | 50 ++++++++++++++++++++++ .../html/root//available-since1.1.html | 7 ++- .../out/html/root//index.html | 4 +- .../expect/sinceKotlin/out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../expect/sinceKotlin/out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//f.html | 4 +- .../out/html/root//index.html | 4 +- .../suspendFunction/out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../suspendFunction/out/html/styles/style.css | 50 ++++++++++++++++++++++ .../out/html/root//f.html | 4 +- .../out/html/root//index.html | 4 +- .../suspendInlineFunction/out/html/root/index.html | 1 + .../out/html/scripts/navigationLoader.js | 4 +- .../out/html/scripts/platformContentHandler.js | 29 +++++++++++++ .../out/html/styles/style.css | 50 ++++++++++++++++++++++ 113 files changed, 1567 insertions(+), 98 deletions(-) create mode 100644 plugins/base/src/test/resources/expect/annotatedFunction/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/function/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/functionWithParams/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/functionWithReceiver/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/genericFunction/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/inlineFunction/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/signatureTest/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/sinceKotlin/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/suspendFunction/out/html/scripts/platformContentHandler.js create mode 100644 plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/scripts/platformContentHandler.js (limited to 'plugins/base/src/test/resources/expect') diff --git a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root//f.html b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root//f.html index dafca58f..9de96412 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root//f.html +++ b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root//f.html @@ -4,6 +4,7 @@ f + @@ -20,7 +21,8 @@

f

-
final fun f()
+
final fun f()
+ diff --git a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root//index.html b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root//index.html index 59b7070b..1ebe6dce 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@ f -
final fun f()
+ +
final fun f()
diff --git a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root/index.html b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/styles/style.css b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunction/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/annotatedFunction/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/-init-.html b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/-init-.html index 0ad7d7df..d1bfe590 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/-init-.html +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/-init-.html @@ -4,6 +4,7 @@ <init> + @@ -20,7 +21,8 @@

<init>

-
final fun <init>(size: Int)
+
final fun <init>(size: Int)
+ diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/equals.html b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/equals.html index d1a73c8d..2645051d 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/equals.html +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/equals.html @@ -4,6 +4,7 @@ equals + @@ -20,7 +21,8 @@

equals

-
open fun equals(other: Any): Boolean
+
open fun equals(other: Any): Boolean
+ diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/hash-code.html b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/hash-code.html index 68e223af..09cf0e01 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/hash-code.html +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/hash-code.html @@ -4,6 +4,7 @@ hashCode + @@ -20,7 +21,8 @@

hashCode

-
open fun hashCode(): Int
+
open fun hashCode(): Int
+ diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/index.html b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/index.html index 77b20479..743c6dcc 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/index.html +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/index.html @@ -4,6 +4,7 @@ Fancy + @@ -20,14 +21,16 @@

Fancy

-
annotation class Fancy
+
annotation class Fancy
+

Functions

- - - - - - -
equals
open fun equals(other: Any): Boolean
+
+
open fun equals(other: Any): Boolean
@@ -36,7 +39,8 @@
hashCode
open fun hashCode(): Int
+
+
open fun hashCode(): Int
@@ -45,7 +49,8 @@
toString
open fun toString(): String
+
+
open fun toString(): String
@@ -60,7 +65,8 @@
size + +
diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/to-string.html b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/to-string.html index 905cddc2..48b4711c 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/to-string.html +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//-fancy/to-string.html @@ -4,6 +4,7 @@ toString + @@ -20,7 +21,8 @@

toString

-
open fun toString(): String
+
open fun toString(): String
+ diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//f.html b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//f.html index dafca58f..9de96412 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//f.html +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//f.html @@ -4,6 +4,7 @@ f + @@ -20,7 +21,8 @@

f

-
final fun f()
+
final fun f()
+ diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//index.html b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//index.html index cbe266c3..25340ae7 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
Fancy
annotation class Fancy
+
+
annotation class Fancy
@@ -42,7 +44,8 @@
f
final fun f()
+
+
final fun f()
diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root/index.html b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/styles/style.css b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/annotatedFunctionWithAnnotationParameters/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/function/out/html/root//fn.html b/plugins/base/src/test/resources/expect/function/out/html/root//fn.html index 91d784c8..e49ade86 100644 --- a/plugins/base/src/test/resources/expect/function/out/html/root//fn.html +++ b/plugins/base/src/test/resources/expect/function/out/html/root//fn.html @@ -4,6 +4,7 @@ fn + @@ -20,9 +21,11 @@

fn

-
final fun fn()
+
final fun fn()
+

Description

-Function fn +
Function fn
+ diff --git a/plugins/base/src/test/resources/expect/function/out/html/root//index.html b/plugins/base/src/test/resources/expect/function/out/html/root//index.html index 1f7ac4a3..58d5c404 100644 --- a/plugins/base/src/test/resources/expect/function/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/function/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
fn
final fun fn()
+
+
final fun fn()
diff --git a/plugins/base/src/test/resources/expect/function/out/html/root/index.html b/plugins/base/src/test/resources/expect/function/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/function/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/function/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/function/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/function/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/function/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/function/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/function/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/function/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/function/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/function/out/html/styles/style.css b/plugins/base/src/test/resources/expect/function/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/function/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/function/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/-init-.html b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/-init-.html index 755863db..03d4d238 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/-init-.html +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/-init-.html @@ -4,6 +4,7 @@ <init> + @@ -20,7 +21,8 @@

<init>

-
final fun <init>()
+
final fun <init>()
+ diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/equals.html b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/equals.html index d1a73c8d..2645051d 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/equals.html +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/equals.html @@ -4,6 +4,7 @@ equals + @@ -20,7 +21,8 @@

equals

-
open fun equals(other: Any): Boolean
+
open fun equals(other: Any): Boolean
+ diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/hash-code.html b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/hash-code.html index 68e223af..09cf0e01 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/hash-code.html +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/hash-code.html @@ -4,6 +4,7 @@ hashCode + @@ -20,7 +21,8 @@

hashCode

-
open fun hashCode(): Int
+
open fun hashCode(): Int
+ diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/index.html b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/index.html index 28585a2a..4f02e43a 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/index.html +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/index.html @@ -4,6 +4,7 @@ Fancy + @@ -20,14 +21,16 @@

Fancy

-
annotation class Fancy
+
annotation class Fancy
+

Functions

- - - - - - - - - - - - - - - - - - - -
equals
open fun equals(other: Any): Boolean
+
+
open fun equals(other: Any): Boolean
@@ -36,7 +39,8 @@
hashCode
open fun hashCode(): Int
+
+
open fun hashCode(): Int
@@ -45,7 +49,8 @@
toString
open fun toString(): String
+
+
open fun toString(): String
diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/to-string.html b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/to-string.html index 905cddc2..48b4711c 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/to-string.html +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//-fancy/to-string.html @@ -4,6 +4,7 @@ toString + @@ -20,7 +21,8 @@

toString

-
open fun toString(): String
+
open fun toString(): String
+ diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//function.html b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//function.html index a6a78b74..6464397a 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//function.html +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//function.html @@ -4,6 +4,7 @@ function + @@ -20,7 +21,8 @@

function

-
final fun function(notInlined:
() -> Unit
)
+
final fun function(notInlined:
() -> Unit
)
+ diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//index.html b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//index.html index 61723ee4..b6f76db9 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
Fancy
annotation class Fancy
+
+
annotation class Fancy
@@ -42,7 +44,8 @@
function
final fun function(notInlined:
() -> Unit
)
+
+
final fun function(notInlined:
() -> Unit
)
diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root/index.html b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/styles/style.css b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/functionWithAnnotatedParam/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root//f.html b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root//f.html index 0165e179..47b3db1c 100644 --- a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root//f.html +++ b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root//f.html @@ -4,6 +4,7 @@ f + @@ -20,7 +21,8 @@

f

-
final fun f(x: String)
+
final fun f(x: String)
+ diff --git a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root//index.html b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root//index.html index 2d08f84f..fb7eacf2 100644 --- a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
f
final fun f(x: String)
+
+
final fun f(x: String)
diff --git a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root/index.html b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/styles/style.css b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/functionWithDefaultParameter/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root//function.html b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root//function.html index a6a78b74..6464397a 100644 --- a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root//function.html +++ b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root//function.html @@ -4,6 +4,7 @@ function + @@ -20,7 +21,8 @@

function

-
final fun function(notInlined:
() -> Unit
)
+
final fun function(notInlined:
() -> Unit
)
+ diff --git a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root//index.html b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root//index.html index a14357c0..c509e95e 100644 --- a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
function
final fun function(notInlined:
() -> Unit
)
+
+
final fun function(notInlined:
() -> Unit
)
diff --git a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root/index.html b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/styles/style.css b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/functionWithNoinlineParam/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root//f.html b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root//f.html index dafca58f..9de96412 100644 --- a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root//f.html +++ b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root//f.html @@ -4,6 +4,7 @@ f + @@ -20,7 +21,8 @@

f

-
final fun f()
+
final fun f()
+ diff --git a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root//index.html b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root//index.html index 59b7070b..1ebe6dce 100644 --- a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
f
final fun f()
+
+
final fun f()
diff --git a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root/index.html b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/styles/style.css b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/functionWithNotDocumentedAnnotation/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/functionWithParams/out/html/root//function.html b/plugins/base/src/test/resources/expect/functionWithParams/out/html/root//function.html index 41bbfa81..6e34095f 100644 --- a/plugins/base/src/test/resources/expect/functionWithParams/out/html/root//function.html +++ b/plugins/base/src/test/resources/expect/functionWithParams/out/html/root//function.html @@ -4,6 +4,7 @@ function + @@ -20,9 +21,11 @@

function

-
final fun function(x: Int)
+
final fun function(x: Int)
+

Description

-MultilineFunction Documentation +
MultilineFunction Documentation
+ diff --git a/plugins/base/src/test/resources/expect/functionWithParams/out/html/root//index.html b/plugins/base/src/test/resources/expect/functionWithParams/out/html/root//index.html index c05dafcb..42458c2a 100644 --- a/plugins/base/src/test/resources/expect/functionWithParams/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/functionWithParams/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
function
final fun function(x: Int)
+
+
final fun function(x: Int)
diff --git a/plugins/base/src/test/resources/expect/functionWithParams/out/html/root/index.html b/plugins/base/src/test/resources/expect/functionWithParams/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/functionWithParams/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/functionWithParams/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/functionWithParams/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/functionWithParams/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/functionWithParams/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/functionWithParams/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/functionWithParams/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/functionWithParams/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/functionWithParams/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/functionWithParams/out/html/styles/style.css b/plugins/base/src/test/resources/expect/functionWithParams/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/functionWithParams/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/functionWithParams/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root//fn.html b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root//fn.html index 2ef82b0e..fdcd4a9d 100644 --- a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root//fn.html +++ b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root//fn.html @@ -4,6 +4,7 @@ fn + @@ -20,13 +21,17 @@

fn

-
final fun String.fn()
+
final fun String.fn()
+

Description

-Function with receiver
+
Function with receiver
+

fn

-
final fun String.fn(x: Int)
+
final fun String.fn(x: Int)
+

Description

-Function with receiver +
Function with receiver
+ diff --git a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root//index.html b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root//index.html index fbe99965..4e481086 100644 --- a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
fn
final fun String.fn()
+
+
final fun String.fn()
@@ -36,7 +38,8 @@
fn
final fun String.fn(x: Int)
+
+
final fun String.fn(x: Int)
diff --git a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root/index.html b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/styles/style.css b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/functionWithReceiver/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/genericFunction/out/html/root//generic.html b/plugins/base/src/test/resources/expect/genericFunction/out/html/root//generic.html index 7a811876..2d8a5c7f 100644 --- a/plugins/base/src/test/resources/expect/genericFunction/out/html/root//generic.html +++ b/plugins/base/src/test/resources/expect/genericFunction/out/html/root//generic.html @@ -4,6 +4,7 @@ generic + @@ -20,9 +21,11 @@

generic

-
private final fun <T : Any> generic()
+
private final fun <T : Any> generic()
+

Description

-generic function +
generic function
+ diff --git a/plugins/base/src/test/resources/expect/genericFunction/out/html/root//index.html b/plugins/base/src/test/resources/expect/genericFunction/out/html/root//index.html index 02e9c431..4cf172df 100644 --- a/plugins/base/src/test/resources/expect/genericFunction/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/genericFunction/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
generic
private final fun <T : Any> generic()
+
+
private final fun <T : Any> generic()
diff --git a/plugins/base/src/test/resources/expect/genericFunction/out/html/root/index.html b/plugins/base/src/test/resources/expect/genericFunction/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/genericFunction/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/genericFunction/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/genericFunction/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/genericFunction/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/genericFunction/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/genericFunction/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/genericFunction/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/genericFunction/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/genericFunction/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/genericFunction/out/html/styles/style.css b/plugins/base/src/test/resources/expect/genericFunction/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/genericFunction/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/genericFunction/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root//generic.html b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root//generic.html index 0c135b62..0c00617f 100644 --- a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root//generic.html +++ b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root//generic.html @@ -4,6 +4,7 @@ generic + @@ -20,9 +21,11 @@

generic

-
final fun <T : R, R : Any> generic()
+
final fun <T : R, R : Any> generic()
+

Description

-generic function +
generic function
+ diff --git a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root//index.html b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root//index.html index 3161a78f..a59f1ad7 100644 --- a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
generic
final fun <T : R, R : Any> generic()
+
+
final fun <T : R, R : Any> generic()
diff --git a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root/index.html b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/styles/style.css b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/genericFunctionWithConstraints/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/inlineFunction/out/html/root//f.html b/plugins/base/src/test/resources/expect/inlineFunction/out/html/root//f.html index 1d2532b6..37795eb2 100644 --- a/plugins/base/src/test/resources/expect/inlineFunction/out/html/root//f.html +++ b/plugins/base/src/test/resources/expect/inlineFunction/out/html/root//f.html @@ -4,6 +4,7 @@ f + @@ -20,7 +21,8 @@

f

-
final fun f(a:
() -> String
)
+
final fun f(a:
() -> String
)
+ diff --git a/plugins/base/src/test/resources/expect/inlineFunction/out/html/root//index.html b/plugins/base/src/test/resources/expect/inlineFunction/out/html/root//index.html index 8666b724..cfd0ab30 100644 --- a/plugins/base/src/test/resources/expect/inlineFunction/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/inlineFunction/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
f
final fun f(a:
() -> String
)
+
+
final fun f(a:
() -> String
)
diff --git a/plugins/base/src/test/resources/expect/inlineFunction/out/html/root/index.html b/plugins/base/src/test/resources/expect/inlineFunction/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/inlineFunction/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/inlineFunction/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/inlineFunction/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/inlineFunction/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/inlineFunction/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/inlineFunction/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/inlineFunction/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/inlineFunction/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/inlineFunction/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/inlineFunction/out/html/styles/style.css b/plugins/base/src/test/resources/expect/inlineFunction/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/inlineFunction/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/inlineFunction/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root//f.html b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root//f.html index 1d2532b6..37795eb2 100644 --- a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root//f.html +++ b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root//f.html @@ -4,6 +4,7 @@ f + @@ -20,7 +21,8 @@

f

-
final fun f(a:
() -> String
)
+
final fun f(a:
() -> String
)
+ diff --git a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root//index.html b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root//index.html index 8666b724..cfd0ab30 100644 --- a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
f
final fun f(a:
() -> String
)
+
+
final fun f(a:
() -> String
)
diff --git a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root/index.html b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/styles/style.css b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/inlineSuspendFunction/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/signatureTest/out/html/root/index.html b/plugins/base/src/test/resources/expect/signatureTest/out/html/root/index.html index 8dded9be..7cec6415 100644 --- a/plugins/base/src/test/resources/expect/signatureTest/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/signatureTest/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/index.html b/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/index.html index 2f75a288..f6c108eb 100644 --- a/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/index.html +++ b/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/index.html @@ -4,6 +4,7 @@ signatureTest + @@ -27,7 +28,8 @@
test
final fun test(i:
(Int) -> Int
)
+
+
final fun test(i:
(Int) -> Int
)
@@ -36,7 +38,8 @@
test2
final fun test2(i:
Int.(Int) -> Int
)
+
+
final fun test2(i:
Int.(Int) -> Int
)
diff --git a/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/test.html b/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/test.html index 6eda8f33..b0e440b1 100644 --- a/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/test.html +++ b/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/test.html @@ -4,6 +4,7 @@ test + @@ -20,7 +21,8 @@

test

-
final fun test(i:
(Int) -> Int
)
+
final fun test(i:
(Int) -> Int
)
+ diff --git a/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/test2.html b/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/test2.html index d01ffd73..3128a10b 100644 --- a/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/test2.html +++ b/plugins/base/src/test/resources/expect/signatureTest/out/html/root/signatureTest/test2.html @@ -4,6 +4,7 @@ test2 + @@ -20,7 +21,8 @@

test2

-
final fun test2(i:
Int.(Int) -> Int
)
+
final fun test2(i:
Int.(Int) -> Int
)
+ diff --git a/plugins/base/src/test/resources/expect/signatureTest/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/signatureTest/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/signatureTest/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/signatureTest/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/signatureTest/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/signatureTest/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/signatureTest/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/signatureTest/out/html/styles/style.css b/plugins/base/src/test/resources/expect/signatureTest/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/signatureTest/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/signatureTest/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root//available-since1.1.html b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root//available-since1.1.html index b3075587..628af947 100644 --- a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root//available-since1.1.html +++ b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root//available-since1.1.html @@ -4,6 +4,7 @@ availableSince1.1 + @@ -20,9 +21,11 @@

availableSince1.1

-
+ +

Description

-Quite useful String +
Quite useful String
+ diff --git a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root//index.html b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root//index.html index 069b17ac..0f343034 100644 --- a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
availableSince1.1 + +
diff --git a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root/index.html b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/styles/style.css b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/sinceKotlin/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/sinceKotlin/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/suspendFunction/out/html/root//f.html b/plugins/base/src/test/resources/expect/suspendFunction/out/html/root//f.html index dafca58f..9de96412 100644 --- a/plugins/base/src/test/resources/expect/suspendFunction/out/html/root//f.html +++ b/plugins/base/src/test/resources/expect/suspendFunction/out/html/root//f.html @@ -4,6 +4,7 @@ f + @@ -20,7 +21,8 @@

f

-
final fun f()
+
final fun f()
+ diff --git a/plugins/base/src/test/resources/expect/suspendFunction/out/html/root//index.html b/plugins/base/src/test/resources/expect/suspendFunction/out/html/root//index.html index 59b7070b..1ebe6dce 100644 --- a/plugins/base/src/test/resources/expect/suspendFunction/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/suspendFunction/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
f
final fun f()
+
+
final fun f()
diff --git a/plugins/base/src/test/resources/expect/suspendFunction/out/html/root/index.html b/plugins/base/src/test/resources/expect/suspendFunction/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/suspendFunction/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/suspendFunction/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/suspendFunction/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/suspendFunction/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/suspendFunction/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/suspendFunction/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/suspendFunction/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/suspendFunction/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/suspendFunction/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/suspendFunction/out/html/styles/style.css b/plugins/base/src/test/resources/expect/suspendFunction/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/suspendFunction/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/suspendFunction/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { diff --git a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root//f.html b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root//f.html index 1d2532b6..37795eb2 100644 --- a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root//f.html +++ b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root//f.html @@ -4,6 +4,7 @@ f + @@ -20,7 +21,8 @@

f

-
final fun f(a:
() -> String
)
+
final fun f(a:
() -> String
)
+ diff --git a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root//index.html b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root//index.html index 8666b724..cfd0ab30 100644 --- a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root//index.html +++ b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root//index.html @@ -4,6 +4,7 @@ <jvm root> + @@ -27,7 +28,8 @@
f
final fun f(a:
() -> String
)
+
+
final fun f(a:
() -> String
)
diff --git a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root/index.html b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root/index.html index f8c89bbf..a3211166 100644 --- a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root/index.html +++ b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/root/index.html @@ -4,6 +4,7 @@ root + diff --git a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/scripts/navigationLoader.js b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/scripts/navigationLoader.js index 5fe52ade..ecbabb4c 100644 --- a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/scripts/navigationLoader.js +++ b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/scripts/navigationLoader.js @@ -1,4 +1,4 @@ -onload = () => { +window.addEventListener('load', () => { fetch(pathToRoot + "navigation.html") .then(response => response.text()) .then(data => { @@ -15,7 +15,7 @@ onload = () => { }).then(() => { revealNavigationForCurrentPage() }) -}; +}) revealNavigationForCurrentPage = () => { let pageId = document.getElementById("content").attributes["pageIds"].value.toString(); diff --git a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/scripts/platformContentHandler.js b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/scripts/platformContentHandler.js new file mode 100644 index 00000000..b4a9e7c9 --- /dev/null +++ b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/scripts/platformContentHandler.js @@ -0,0 +1,29 @@ +window.addEventListener('load', () => { + document.querySelectorAll("div[data-platform-hinted]") + .forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event,elem))) + } +) + +function togglePlatformDependent(e, container) { + let target = e.target + if (target.tagName != 'BUTTON') return; + let index = target.getAttribute('data-toggle') + + for(let child of container.children){ + if(child.hasAttribute('data-toggle-list')){ + for(let bm of child.children){ + if(bm == target){ + bm.setAttribute('data-active',"") + } else if(bm != target) { + bm.removeAttribute('data-active') + } + } + } + else if(child.getAttribute('data-togglable') == index) { + child.setAttribute('data-active',"") + } + else { + child.removeAttribute('data-active') + } + } +} diff --git a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/styles/style.css b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/styles/style.css index 5c347128..720998ad 100644 --- a/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/styles/style.css +++ b/plugins/base/src/test/resources/expect/suspendInlineFunction/out/html/styles/style.css @@ -487,6 +487,56 @@ td.content { color: #5B5DEF; } +.platform-hinted { + display: block; +} + +.platform-hinted > .platform-bookmarks-row { + display: flex; + flex-direction: row; + padding: 0px; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark { + min-width: 64px; + height: 36px; + border: 2px solid white; + background: white; + outline: none; + flex: none; + order: 5; + align-self: flex-start; + margin: 0; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(1):hover { + border-top: 2px solid gray; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(2):hover { + border-top: 2px solid orange; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(3):hover { + border-top: 2px solid crimson; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark:nth-child(4):hover { + border-top: 2px solid blue; +} + +.platform-hinted > .platform-bookmarks-row > .platform-bookmark[data-active=''] { + border: 2px solid #F4F4F4; + border-top: 2px solid #4DBB5F; + + background: #F4F4F4; +} + +.platform-hinted > .content:not([data-active]) { + display: none +} + + @media print, screen and (max-width: 960px) { div.wrapper { -- cgit