diff --git a/docs/assets/css/gradle.css b/docs/assets/css/gradle.css index 0d8e68c..0d40fb6 100644 --- a/docs/assets/css/gradle.css +++ b/docs/assets/css/gradle.css @@ -89,6 +89,10 @@ h4 { font-weight: bolder; span { margin-right: 0.5rem; + .section-icon { + width: 20px; + height: 20px; + } } } @@ -116,6 +120,10 @@ h4 { transition: background-color .3s ease, border .3s ease; } +.icon { + width: 20px; +} + .button--blue, .button--blue-lite { color: white; diff --git a/docs/assets/js/google-tag-support.js b/docs/assets/js/google-tag-support.js new file mode 100644 index 0000000..bc7d48a --- /dev/null +++ b/docs/assets/js/google-tag-support.js @@ -0,0 +1,15 @@ +// Support for DPE University follow ups +document.addEventListener("DOMContentLoaded", (event) => { + var links = document.getElementsByTagName("a"); + for (let i = 0; i < links.length; i++) { + var link = links[i] + if(link.getAttribute("href")?.startsWith("https://dpeuniversity.gradle.com/")) { + link.setAttribute("promo", "yes") + link.setAttribute("promo_offer", "DPEU") + link.setAttribute("promo_type", link.getElementsByTagName("a") ? "link" : "image") + if (!link.getAttribute("promo_location")) { + link.setAttribute("promo_location", "community-site") + } + } + } + }); diff --git a/docs/images/icons/learn.svg b/docs/images/icons/learn.svg new file mode 100644 index 0000000..d7b5777 --- /dev/null +++ b/docs/images/icons/learn.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/docs/resources/README.md b/docs/resources/README.md index 6fb7494..a636eb0 100644 --- a/docs/resources/README.md +++ b/docs/resources/README.md @@ -47,6 +47,12 @@ resources: - Android Studio - Eclipse Buildship - Netbeans +- section: Learn Gradle + icon: ../images/icons/learn.svg + links: + - Gradle Cookbook + - DPE University + - Gradle Events --- Below you can see the list of the Gradle community resources diff --git a/mkdocs.yml b/mkdocs.yml index f7073aa..d62a16a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -81,6 +81,8 @@ theme: extra_css: - assets/css/gradle.css +extra_javascript: + - assets/js/google-tag-support.js extra: social: diff --git a/overrides/resources.html b/overrides/resources.html index 784d67a..61ad12c 100644 --- a/overrides/resources.html +++ b/overrides/resources.html @@ -8,7 +8,7 @@