This is an automated email from the ASF dual-hosted git repository.
samueler pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-pekko-sbt-paradox.git
The following commit(s) were added to refs/heads/main by this push:
new 9676045 Removing CDN assets from theme. (#86)
9676045 is described below
commit 9676045b328cc958a905a7c67cfa1ed6ee6abf1f
Author: Samuele Resca <[email protected]>
AuthorDate: Sun Dec 24 16:39:47 2023 +0000
Removing CDN assets from theme. (#86)
* Removing CDN assets from theme.
* Adding configurable hostname.
---
.../org/apache/pekko/PekkoParadoxPlugin.scala | 2 +
.../main/assets/assets/images/apache-incubator.svg | 155 --------------
.../main/assets/assets/images/pekko_favicon.png | Bin 1344 -> 0 bytes
theme/src/main/assets/assets/images/pekko_logo.png | Bin 6152 -> 0 bytes
theme/src/main/assets/assets/javascripts/groups.js | 171 ----------------
.../assets/javascripts/paradox-material-theme.js | 222 ---------------------
.../main/assets/assets/stylesheets/pekko-theme.css | 123 ------------
theme/src/main/assets/page.st | 32 +--
theme/src/main/assets/partials/footer.st | 2 +-
9 files changed, 19 insertions(+), 688 deletions(-)
diff --git a/plugin/src/main/scala/org/apache/pekko/PekkoParadoxPlugin.scala
b/plugin/src/main/scala/org/apache/pekko/PekkoParadoxPlugin.scala
index 0b57984..f249a86 100644
--- a/plugin/src/main/scala/org/apache/pekko/PekkoParadoxPlugin.scala
+++ b/plugin/src/main/scala/org/apache/pekko/PekkoParadoxPlugin.scala
@@ -45,6 +45,8 @@ object PekkoParadoxPlugin extends AutoPlugin {
def pekkoParadoxGlobalSettings: Seq[Setting[_]] = Seq(
paradoxTheme := Some("org.apache.pekko" % "pekko-theme-paradox" % version),
+ // Target hostname for static assets (CSS, JS, Icons, Font)
+ paradoxProperties ++= Map("assets.hostname" ->
"https://pekko.apache.org/"),
paradoxNavigationIncludeHeaders := true,
pekkoParadoxCopyright in Global :=
"""Copyright © 2011-2022 <a href="https://www.lightbend.com/">Lightbend,
Inc</a>.
diff --git a/theme/src/main/assets/assets/images/apache-incubator.svg
b/theme/src/main/assets/assets/images/apache-incubator.svg
deleted file mode 100644
index aed990f..0000000
--- a/theme/src/main/assets/assets/images/apache-incubator.svg
+++ /dev/null
@@ -1,155 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version:
6.00 Build 43363) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- version="1.1"
- id="Layer_1"
- x="0px"
- y="0px"
- width="473.26367"
- height="110.21871"
- viewBox="0 0 473.26367 110.21871"
- enable-background="new 0 0 1000 1000"
- xml:space="preserve"
- sodipodi:docname="incubator.svg"
- inkscape:version="0.92.3 (2405546, 2018-03-11)"><metadata
- id="metadata3643"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage"
/><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
- id="defs3641" /><sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="3726"
- inkscape:window-height="2049"
- id="namedview3639"
- showgrid="false"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:zoom="1.888"
- inkscape:cx="236.59168"
- inkscape:cy="55.071238"
- inkscape:window-x="114"
- inkscape:window-y="55"
- inkscape:window-maximized="1"
- inkscape:current-layer="Layer_1" />
-
-
-<polygon
- points="711.434,471.942 728.517,471.942 728.517,473.944 711.434,473.944
711.434,485.958 730.646,485.958 730.646,487.96 709.219,487.96 709.219,458.14
730.434,458.14 730.434,460.142 711.434,460.142 "
- id="polygon3599"
- style="clip-rule:evenodd;fill-rule:evenodd"
- transform="translate(-263.40832,-444.85252)" />
-<polygon
- points="662.357,458.14 664.572,458.14 664.572,487.96 662.357,487.96
662.357,473.987 643.272,473.987 643.272,487.96 641.057,487.96 641.057,458.14
643.272,458.14 643.272,471.985 662.357,471.985 "
- id="polygon3601"
- style="clip-rule:evenodd;fill-rule:evenodd"
- transform="translate(-263.40832,-444.85252)" />
-<path
- d="m 323.92968,43.619476 c -2.131,0 -4.104,-0.398 -5.922,-1.193
-1.817,-0.795 -3.387,-1.882 -4.707,-3.259 -1.321,-1.377 -2.351,-3.003
-3.089,-4.878 -0.738,-1.874 -1.107,-3.876 -1.107,-6.006 v -0.085 c 0,-2.102
0.376,-4.089 1.129,-5.964 0.752,-1.875 1.788,-3.515 3.109,-4.92 1.32,-1.406
2.89,-2.513 4.707,-3.323 1.818,-0.81 3.806,-1.214 5.965,-1.214 1.335,0
2.542,0.114 3.62,0.341 1.08,0.228 2.081,0.554 3.004,0.98 0.923,0.426 1.789,0.93
2.599,1.512 0.81,0.583 1.598,1.229 2.364,1.938 l -1. [...]
- id="path3603"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<path
- d="m 252.31768,13.074476 h 2.13 l 13.888,30.033 h -2.428 l -3.792,-8.35 h
-17.594 l -3.792,8.35 h -2.3 z m 8.86,19.681 -7.838,-17.253 -7.881,17.253 z"
- id="path3605"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<path
- d="m 176.74268,13.287476 h 10.821 c 1.647,0 3.145,0.206 4.494,0.618
1.349,0.412 2.514,1.008 3.493,1.789 0.98,0.781 1.74,1.732 2.279,2.854
0.54,1.122 0.81,2.407 0.81,3.855 v 0.085 c 0,1.562 -0.313,2.939 -0.937,4.132
-0.625,1.193 -1.47,2.187 -2.535,2.982 -1.065,0.795 -2.3,1.392 -3.706,1.789
-1.406,0.398 -2.889,0.597 -4.452,0.597 h -8.051 v 11.119 h -2.215 v -29.82 z m
10.395,16.699 c 1.392,0 2.655,-0.17 3.792,-0.511 1.136,-0.348 2.108,-0.838
2.918,-1.484 0.81,-0.639 1.441,-1.42 1.896,-2 [...]
- id="path3607"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<path
- d="m 118.63568,13.074476 h 2.13 l 13.888,30.033 h -2.428 l -3.792,-8.35 h
-17.594 l -3.792,8.35 h -2.301 z m 8.861,19.681 -7.839,-17.253 -7.881,17.253 z"
- id="path3609"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<path
- d="m 471.26168,70.853476 c 0,7.213 -3.147,11.758 -9.443,13.634 l
11.445,15.886004 h -9.382 l -10.444,-14.697004 h -9.693 v 14.697004 h -7.38 V
56.657476 h 16.261 c 6.671,0 11.444,1.126 14.322,3.377 2.875,2.252 4.314,5.858
4.314,10.819 z m -18.324,8.131 c 4.169,0 7.005,-0.646 8.506,-1.939 1.501,-1.292
2.251,-3.366 2.251,-6.223 0,-2.855 -0.771,-4.815 -2.313,-5.878 -1.543,-1.064
-4.295,-1.596 -8.256,-1.596 h -9.381 v 15.636 z"
- id="path3611"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<path
- d="m 422.12968,94.337476 c -4.419,4.315 -9.881,6.473004 -16.386,6.473004
-6.504,0 -11.966,-2.157004 -16.385,-6.473004 -4.42,-4.315 -6.63,-9.694
-6.63,-16.136 0,-6.442 2.21,-11.82 6.63,-16.136 4.419,-4.314 9.881,-6.473
16.385,-6.473 6.505,0 11.967,2.158 16.386,6.473 4.42,4.315 6.63,9.694
6.63,16.136 0,6.442 -2.21,11.821 -6.63,16.136 z m -5.409,-27.361 c
-2.981,-3.086 -6.64,-4.628 -10.977,-4.628 -4.336,0 -7.994,1.542 -10.976,4.628
-2.98,3.085 -4.472,6.827 -4.472,11.226 0,4.399 1.491,8.1 [...]
- id="path3613"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<polygon
- points="609.952,508.264 609.952,501.51 643.849,501.51 643.849,508.264
630.591,508.264 630.591,545.226 623.211,545.226 623.211,508.264 "
- id="polygon3615"
- style="clip-rule:evenodd;fill-rule:evenodd"
- transform="translate(-263.40832,-444.85252)" />
-<path
- d="m 315.61168,90.428476 -4.378,9.944004 h -7.88 l 19.263,-43.716004 h 7.88
l 19.263,43.716004 h -7.88 l -4.379,-9.944004 z m 18.886,-6.817 -7.942,-18.011
-7.942,18.011 z"
- id="path3617"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<path
- d="m 286.61768,100.37348 h -19.138 V 56.657476 h 17.012 c 2.96,0
5.514,0.354 7.661,1.063 2.146,0.709 3.741,1.668 4.784,2.878 2.001,2.251
3.002,4.795 3.002,7.63 0,3.418 -1.084,5.962 -3.253,7.63 -0.792,0.584
-1.334,0.948 -1.626,1.094 -0.292,0.146 -0.813,0.386 -1.563,0.72 2.71,0.584
4.868,1.803 6.474,3.658 1.604,1.855 2.407,4.159 2.407,6.911 0,3.043
-1.042,5.732 -3.127,8.067 -2.46,2.709 -6.671,4.065004 -12.633,4.065004 z m
-11.757,-6.818004 h 11.57 c 2.71,0 4.784,-0.427 6.223,-1.281 1.43 [...]
- id="path3619"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<path
- d="m 230.98168,90.366476 c 2.001,2.335 4.711,3.502 8.13,3.502 3.419,0
6.129,-1.167 8.13,-3.502 2.002,-2.335 3.002,-5.504 3.002,-9.506 v -24.203 h
7.38 v 24.516 c 0,6.296 -1.729,11.143 -5.19,14.541 -3.461,3.397 -7.901,5.097004
-13.321,5.097004 -5.42,0 -9.861,-1.699004 -13.321,-5.097004 -3.461,-3.398
-5.191,-8.245 -5.191,-14.541 v -24.516 h 7.38 v 24.203 c -0.001,4.002 1,7.171
3.001,9.506 z"
- id="path3621"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<path
- d="m 196.79768,93.680476 c 2.543,0 4.732,-0.427 6.567,-1.281 1.834,-0.855
3.752,-2.221 5.753,-4.097 l 4.753,4.878 c -4.628,5.128 -10.247,7.692004
-16.854,7.692004 -6.609,0 -12.091,-2.126004 -16.448,-6.379004 -4.357,-4.253
-6.536,-9.632 -6.536,-16.136 0,-6.504 2.22,-11.924 6.661,-16.26 4.44,-4.337
10.048,-6.505 16.823,-6.505 6.775,0 12.435,2.502 16.979,7.505 l -4.69,5.129 c
-2.084,-2.002 -4.055,-3.398 -5.91,-4.19 -1.855,-0.792 -4.034,-1.188
-6.536,-1.188 -4.419,0 -8.13,1.428 -11.132,4. [...]
- id="path3623"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<polygon
- points="397.065,513.33 397.065,545.226 389.686,545.226 389.686,501.51
397.065,501.51 422.456,534.155 422.456,501.51 429.836,501.51 429.836,545.226
421.831,545.226 "
- id="polygon3625"
- style="clip-rule:evenodd;fill-rule:evenodd"
- transform="translate(-263.40832,-444.85252)" />
-<rect
- x="108.47866"
- y="56.657494"
- width="7.3790002"
- height="43.716"
- id="rect3627"
- style="clip-rule:evenodd;fill-rule:evenodd" />
-<linearGradient
- id="SVGID_1_"
- gradientUnits="userSpaceOnUse"
- x1="298.37161"
- y1="547.52728"
- x2="313.06451"
- y2="470.18271"
- gradientTransform="translate(-263.40832,-444.85252)">
- <stop
- offset="0"
- style="stop-color:#1A1853"
- id="stop3629" />
- <stop
- offset="0.5"
- style="stop-color:#CA2026"
- id="stop3631" />
- <stop
- offset="1"
- style="stop-color:#F8991D"
- id="stop3633" />
-</linearGradient>
-<path
- d="m 44.922678,15.104476 c -0.003,-0.324 -0.008,-0.649 -0.016,-0.978
0.067,0.107 0.256,0.435 0.569,0.978 z m -11.763,34.23 c -3.432,6.382
-5.389,13.041 -5.889,19.971 -0.445,6.171 0.222,11.492 2.021,15.953 0.246,0.607
0.484,1.168 0.722,1.688 -1.422,-1.006 -2.779,-2.055 -4.073,-3.149 -0.109,-0.086
-0.188,-0.122 -0.238,-0.109 1.699,2.717 3.816,5.179 6.354,7.387 0.392,0.342
1.046,0.504 1.207,1.007 0.459,1.443 -0.789,14.400004 3.219,17.419004
2.549,1.918 13.815,-0.494 17.293,-1.617 18.147, [...]
- id="path3636"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill:url(#SVGID_1_);fill-rule:evenodd" />
-</svg>
\ No newline at end of file
diff --git a/theme/src/main/assets/assets/images/pekko_favicon.png
b/theme/src/main/assets/assets/images/pekko_favicon.png
deleted file mode 100644
index 2d26c10..0000000
Binary files a/theme/src/main/assets/assets/images/pekko_favicon.png and
/dev/null differ
diff --git a/theme/src/main/assets/assets/images/pekko_logo.png
b/theme/src/main/assets/assets/images/pekko_logo.png
deleted file mode 100644
index 6691539..0000000
Binary files a/theme/src/main/assets/assets/images/pekko_logo.png and /dev/null
differ
diff --git a/theme/src/main/assets/assets/javascripts/groups.js
b/theme/src/main/assets/assets/javascripts/groups.js
deleted file mode 100644
index cf812be..0000000
--- a/theme/src/main/assets/assets/javascripts/groups.js
+++ /dev/null
@@ -1,171 +0,0 @@
-/*!
- Adapted from original paradox generic theme to work with
paradox-material-theme
-
https://github.com/lightbend/paradox/blob/8e30c341f1f8351a19b71599219d2f636ba68eb4/themes/generic/src/main/assets/js/groups.js
- licensed under Apache License 2.0.
-*/
-
-groupChangeListeners = [];
-
-window.groupChanged = function(callback) {
- groupChangeListeners.push(callback);
-}
-
-$(function() {
-
- // Groups (like 'java' and 'scala') represent groups of 'switchable'
content, either in tabs or in regular text.
- // The catalog of groups can be defined in the sbt parameters to initialize
the group.
-
- var groupCookie = "paradoxGroups";
- var cookieTg = getCookie(groupCookie);
- var currentGroups = {};
-
- var catalog = {}
- var supergroupByGroup = {};
-
- if(cookieTg != "")
- currentGroups = JSON.parse(cookieTg);
-
- // See https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie for
more information
- function setCookie(cookieName, cookieValue, daysToExpire) {
- if (!daysToExpire) daysToExpire = 365;
- const now = new Date();
- now.setDate(now.getDate() + daysToExpire);
- // The lax value will send the cookie for all same-site
- // requests and top-level navigation GET requests. This
- // is sufficient for user tracking, but it will prevent
- // many CSRF attacks. This is the default value in modern browsers.
- document.cookie =
`${cookieName}=${encodeURIComponent(cookieValue)};expires=${now.toUTCString()};path=/;samesite=lax`;
- }
-
- // See
https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#Example_2_Get_a_sample_cookie_named_test2
for
- // more information
- function getCookie(cookieName) {
- const cookieAttr = decodeURIComponent(document.cookie)
- .split(";")
- .find(row => row.trimStart().startsWith(cookieName))
- return cookieAttr ? cookieAttr.split("=")[1] : "";
- }
-
- $("dl").has("dt.mdc-tab").each(function() {
- var dl = $(this);
- dl.addClass("tabbed");
- var dts = dl.find("dt");
- dts.each(function(i) {
- var dt = $(this);
- dt.html("<a href=\"#tab" + i + "\">" + dt.text() + "</a>");
- });
- var dds = dl.find("dd");
- dds.each(function(i) {
- var dd = $(this);
- dd.hide();
- if (dd.find("blockquote").length) {
- dd.addClass("has-note");
- }
- });
-
- // Default to the first tab, for grouped tabs switch again later
- switchToTab(dts.first());
-
- dts.first().addClass("first");
- dts.last().addClass("last");
- });
-
- // Determine all supergroups, populate 'catalog' and 'supergroupByGroup'
accordingly.
- $(".supergroup").each(function() {
- var supergroup = $(this).attr('name').toLowerCase();
- var groups = $(this).find(".group");
-
- catalog[supergroup] = [];
-
- groups.each(function() {
- var group = "group-" + $(this).text().toLowerCase();
- catalog[supergroup].push(group);
- supergroupByGroup[group] = supergroup;
- });
-
- $(this).on("change", function() {
- switchToGroup(supergroup, this.value);
- });
- });
-
- // Switch to the right initial groups
- for (var supergroup in catalog) {
- var current = queryParamGroup(supergroup) || currentGroups[supergroup] ||
catalog[supergroup][0];
-
- switchToGroup(supergroup, current);
- }
-
- $("dl dt.mdc-tab").click(function(e){
- e.preventDefault();
- var currentDt = $(this);//.parent("dt");
- var currentDl = currentDt.parent("dl");
-
- var currentGroup = groupOf(currentDt);
-
- var supergroup = supergroupByGroup[currentGroup]
- if (supergroup) {
- switchToGroup(supergroup, currentGroup);
- } else {
- switchToTab(currentDt);
- }
- });
-
- function queryParamGroup(supergroup) {
- var value = new URLSearchParams(window.location.search).get(supergroup)
- if (value) {
- return "group-" + value.toLowerCase();
- } else {
- return "";
- }
- }
-
- function switchToGroup(supergroup, group) {
- currentGroups[supergroup] = group;
- setCookie(groupCookie, JSON.stringify(currentGroups));
-
- // Dropdown switcher:
- $("select")
- .has("option[value=" + group +"]")
- .val(group);
-
- // Inline snippets:
- catalog[supergroup].forEach(peer => {
- if (peer === group) {
- $("." + group).show();
- } else {
- $("." + peer).hide();
- }
- })
-
- // Tabbed snippets:
- $("dl.tabbed").each(function() {
- var dl = $(this);
- dl.find("dt").each(function() {
- var dt = $(this);
- if(groupOf(dt) == group) {
- switchToTab(dt);
- }
- });
- });
-
- groupChangeListeners.forEach(listener => listener(group, supergroup,
catalog));
- }
-
- function switchToTab(dt) {
- // interplay with paradox-material-theme.js adding an activate function to
tabs
- if (dt[0].activate) dt[0].activate();
- }
-
- function groupOf(elem) {
- const classAttribute = elem.next("dd").find("pre").attr("class");
- if (classAttribute) {
- const currentClasses = classAttribute.split(' ');
- const regex = new RegExp("^group-.*");
- const matchingClass = currentClasses.find(cc => regex.test(cc));
- if (matchingClass) return matchingClass;
- }
-
- // No class found? Then use the tab title
- return "group-" + elem.find('a').text().toLowerCase();
- }
-});
diff --git a/theme/src/main/assets/assets/javascripts/paradox-material-theme.js
b/theme/src/main/assets/assets/javascripts/paradox-material-theme.js
deleted file mode 100644
index a21561a..0000000
--- a/theme/src/main/assets/assets/javascripts/paradox-material-theme.js
+++ /dev/null
@@ -1,222 +0,0 @@
-/*!
- Paradox Material Theme
- Copyright (c) 2017 Jonas Fonseca
- License: MIT
-*/
-
-// Adapted from paradox-material-theme 0.6.0 to simplify switching to a tab.
-//
https://github.com/jonas/paradox-material-theme/blob/2d57fe0567ea9fe7e8de14faef4fa777841d505a/theme/src/main/assets/assets/javascripts/paradox-material-theme.js
-
-function initParadoxMaterialTheme() {
- // callout -> ammonition
- document.querySelectorAll('.callout').forEach(callout => {
- callout.classList.add('admonition')
- callout.querySelectorAll('.callout-title').forEach(title => {
- title.classList.add('admonition-title')
- })
- callout.style.visibility = 'visible';
- })
-
- var headers = ['h2', 'h3', 'h4', 'h5', 'h6']
- headers.forEach(headerName => {
- document.querySelectorAll(headerName).forEach(header => {
- var link = header.querySelector('a')
- if (link) {
- header.id = link.name
- link.name = ''
- header.removeChild(link)
- link.text = '¶'
- link.title = 'Permanent link'
- link.className = 'headerlink'
- header.appendChild(link)
- }
- })
- })
-
- document.querySelectorAll('nav.md-nav--primary > ul').forEach((root,
rootIndex) => {
- function createNavToggle(path, active) {
- var input = document.createElement('input')
- input.classList.add('md-toggle')
- input.classList.add('md-nav__toggle')
- input.type = 'checkbox'
- input.id = path
- input.checked = active || false
- input.setAttribute('data-md-toggle', path)
- return input
- }
-
- function createNavLabel(path, active, contentNode) {
- var label = document.createElement('label')
- label.classList.add('md-nav__link')
- if (active)
- label.classList.add('md-nav__link--active')
- label.setAttribute('for', path)
- if (contentNode)
- label.appendChild(contentNode)
- return label
- }
-
- function visitListItem(item, path, level) {
- item.classList.add('md-nav__item')
-
- var link = item.querySelector(':scope > a')
- if (link) {
- link.classList.add('md-nav__link')
- link.classList.remove('page')
- if (link.classList.contains('active')) {
- item.classList.add('md-nav__item--active')
- link.classList.add('md-nav__link--active')
- }
- link.setAttribute('data-md-state', '')
- }
-
- var nestedNav = null
- var nestedRoot = item.querySelector(':scope > ul')
- if (nestedRoot) {
- var active = item.querySelector(':scope a.active') != null
- item.classList.add('md-nav__item--nested')
- var nestedNav = document.createElement('nav')
- nestedNav.classList.add('md-nav')
- nestedNav.setAttribute('data-md-component', 'collapsible')
- nestedNav.setAttribute('data-md-level', level)
-
- var input = createNavToggle(path, active)
-
- var label = createNavLabel(path, false, link)
- if (link)
- link.classList.remove('md-nav__link')
-
- var labelInner = document.createElement('label')
- labelInner.classList.add('md-nav__title')
- labelInner.setAttribute('for', path)
- labelInner.textContent = link ? link.textContent : '???'
-
- nestedNav.appendChild(labelInner)
- nestedNav.appendChild(nestedRoot)
- item.appendChild(input)
- item.appendChild(label)
- item.appendChild(nestedNav)
- visitList(nestedRoot, path, level + 1)
- }
-
- if (link && link.classList.contains('active')) {
- var toc = document.querySelector('nav.md-nav--primary >
.md-nav--secondary')
- if (toc && toc.children.length > 0) {
- var input = createNavToggle('__toc', false)
- var labelText = nestedNav ? 'Table of contents' : link ?
link.textContent : '???'
- var label = createNavLabel('__toc', true,
document.createTextNode(labelText))
-
- if (nestedNav) {
- var node = nestedNav.children[1]
- nestedNav.insertBefore(input, node)
- nestedNav.insertBefore(label, node)
- nestedNav.appendChild(toc)
- } else if (link) {
- item.insertBefore(input, link)
- item.insertBefore(label, link)
- item.appendChild(toc)
- }
- }
- }
- }
-
- function visitList(list, path, level) {
- list.classList.add('md-nav__list')
- list.setAttribute('data-md-scrollfix', '')
- list.querySelectorAll('li').forEach((item, itemIndex) => {
- visitListItem(item, path + '-' + itemIndex, level)
- })
- }
-
- visitList(root, 'nav-' + rootIndex, 1)
- var projectVersion = document.getElementById("project.version")
- if (projectVersion) {
- root.appendChild(projectVersion)
- }
- root.parentNode.style.visibility = 'visible'
- })
-
- document.querySelectorAll('.md-sidebar--secondary .md-nav--secondary >
ul').forEach(tocRoot => {
- function visitListItem(item) {
- item.classList.add('md-nav__item')
- item.querySelectorAll(':scope> a').forEach(link => {
- link.classList.add('md-nav__link')
- link.setAttribute('data-md-state', '')
- })
- item.querySelectorAll(':scope > ul').forEach(list => {
- visitList(list)
- })
- }
-
- function visitList(list) {
- list.classList.add('md-nav__list')
- list.querySelectorAll(':scope > li').forEach(item => {
- visitListItem(item)
- })
- }
-
- var parent = tocRoot.parentNode
- parent.removeChild(tocRoot)
-
- tocRoot.querySelectorAll(':scope > li > ul').forEach(list => {
- parent.append(list)
- list.setAttribute('data-md-scrollfix', '')
- visitList(list)
- })
-
- parent.style.visibility = 'visible';
- })
-
- document.querySelectorAll('dl').forEach(dl => {
- const tabContents = dl.querySelectorAll(':scope > dd > pre')
- if (tabContents.length > 0) {
- dl.classList.add('mdc-tab-bar')
- var first = true
- var contentContainer = document.createElement('div')
- contentContainer.classList.add('mdc-tab-content-container')
-
- tabContents.forEach(pre => {
- var dd = pre.parentNode
- var dt = dd.previousSibling
- while (dt.nodeType != dt.ELEMENT_NODE) {
- dt = dt.previousSibling
- }
-
- var tabContent = document.createElement('div')
- tabContent.classList.add('mdc-tab-content')
- contentContainer.appendChild(tabContent)
- while (dd.childNodes.length > 0) {
- tabContent.appendChild(dd.childNodes[0]);
- }
- dl.removeChild(dd)
-
- dt.classList.add('mdc-tab')
- if (first) {
- dt.classList.add('mdc-tab--active')
- tabContent.classList.add('mdc-tab-content--active')
- }
- first = false
- dt.activate = function() {
- dl.querySelectorAll(':scope .mdc-tab--active').forEach(active => {
- active.classList.remove('mdc-tab--active')
- })
- contentContainer.querySelectorAll(':scope
.mdc-tab-content--active').forEach(active => {
- active.classList.remove('mdc-tab-content--active')
- })
- dt.classList.add('mdc-tab--active')
- tabContent.classList.add('mdc-tab-content--active')
- }
- dt.onclick = event => {
- dt.activate()
- }
- })
-
- if (dl.nextSibling)
- dl.parentNode.insertBefore(contentContainer, dl.nextSibling)
- else
- dl.parentNode.appendChild(contentContainer)
- }
- })
-}
-
-initParadoxMaterialTheme()
diff --git a/theme/src/main/assets/assets/stylesheets/pekko-theme.css
b/theme/src/main/assets/assets/stylesheets/pekko-theme.css
deleted file mode 100644
index d9531af..0000000
--- a/theme/src/main/assets/assets/stylesheets/pekko-theme.css
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-
-select.supergroup {
- width: 50%;
- border: none;
- font-size: larger;
- margin: 1rem;
- padding: 0.5rem;
-}
-
-ul.md-nav__links li {
- display: inline;
-}
-ul.md-nav__links li a {
- display: inline;
-}
-
-/* fix paradox snippet links to fit with material docs style */
-
-/* material docs brings its own copy button, remove ours */
-.snippet-button.copy-snippet { display: none; }
-
-/* style our "link to source" similar to material docs one */
-.snippet-button.go-to-source {
- font-family: "Material Icons";
- position: absolute;
- top: 0.6rem;
- right: 2.6rem;
- width: 2.8rem;
- height: 2.8rem;
- border-radius: 0.2rem;
- font-size: 1.6rem;
- cursor: pointer;
- z-index: 1;
- -webkit-backface-visibility: hidden;
- backface-visibility: hidden;
-}
-
-/* remove link text */
-.snippet-button.go-to-source span { display: none; }
-
-/* and replace with button similar to material copy one */
-.snippet-button.go-to-source::before {
- transition: color 0.25s, opacity 0.25s;
- color: rgba(0, 0, 0, 0.07);
- content: "\E157";
-}
-
-pre:hover .snippet-button.go-to-source::before {
- color: rgba(0, 0, 0, 0.54);
-}
-
-a.snippet-button.go-to-source:hover::before,
.snippet-button.go-to-source:active::before {
- color: #ff9100;
-}
-
-/* style for tables */
-tbody th {
- font-weight: bold;
-}
-
-tbody th, tbody td {
- padding: 5px;
-}
-
-tbody tr:nth-child(even) {
- background-color: #eaeaea;
-}
-
-
-/* Footer styling */
-.md-footer-meta__inner p {
- color: #999;
- font-size: 14px;
-}
-
-.md-footer-meta__inner {
- box-sizing: border-box;
- flex-wrap: wrap;
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-@media (max-width: 850px) {
- .md-footer-meta__inner {
- flex-direction: column;
- }
-}
-
-.md-footer-meta__inner div {
- flex: 1;
- text-align: center;
-}
-
-.md-footer-meta__inner .md-footer-copyright {
- flex-basis: 100%;
-}
-
-#incubator__logo {
- background-color: white;
- max-width: inherit;
- padding: 10px;
- width: 380px;
- margin: auto;
-}
diff --git a/theme/src/main/assets/page.st b/theme/src/main/assets/page.st
index 9414258..b1c4b1b 100644
--- a/theme/src/main/assets/page.st
+++ b/theme/src/main/assets/page.st
@@ -54,21 +54,21 @@ $!
$ else $
<title>$page.home.title$</title>
$ endif $
- <link rel="stylesheet"
href="$page.base$assets/stylesheets/application.451f80e5.css">
+ <link rel="stylesheet"
href="$page.properties.("assets.hostname")$$page.base$assets/stylesheets/application.451f80e5.css">
$ if (page.properties.("material.color.primary")) $
- <link rel="stylesheet"
href="$page.base$assets/stylesheets/application-palette.22915126.css">
+ <link rel="stylesheet"
href="$page.properties.("assets.hostname")$$page.base$assets/stylesheets/application-palette.22915126.css">
$ if (page.properties.("material.color.primary.theme")) $
- <meta name="theme-color"
content="$page.properties.("material.color.primary.theme")$" />
+ <meta name="theme-color"
content="$page.properties.("assets.hostname")$$page.properties.("material.color.primary.theme")$"
/>
$ endif $
$ endif $
- <link rel="stylesheet"
href="$page.base$lib/material__tabs/dist/mdc.tabs.min.css">
- <link rel="stylesheet" href="$page.base$lib/prettify/prettify.css">
- <script src="$page.base$assets/javascripts/modernizr.1aa3b519.js"></script>
- <link rel="stylesheet" href="$page.base$assets/fonts/font-awesome.css">
- <link rel="stylesheet" href="$page.base$assets/fonts/material-icons.css">
- <link rel="stylesheet"
href="$page.base$assets/stylesheets/paradox-material-theme.css">
+ <link rel="stylesheet"
href="$page.properties.("assets.hostname")$$page.base$lib/material__tabs/dist/mdc.tabs.min.css">
+ <link rel="stylesheet"
href="$page.properties.("assets.hostname")$$page.base$lib/prettify/prettify.css">
+ <script
src="$page.properties.("assets.hostname")$$page.base$assets/javascripts/modernizr.1aa3b519.js"></script>
+ <link rel="stylesheet"
href="$page.properties.("assets.hostname")$$page.base$assets/fonts/font-awesome.css">
+ <link rel="stylesheet"
href="$page.properties.("assets.hostname")$$page.base$assets/fonts/material-icons.css">
+ <link rel="stylesheet"
href="$page.properties.("assets.hostname")$$page.base$assets/stylesheets/paradox-material-theme.css">
$ if (page.properties.("material.custom.stylesheet")) $
- <link rel="stylesheet"
href="$page.base$$page.properties.("material.custom.stylesheet")$">
+ <link rel="stylesheet"
href="$page.properties.("assets.hostname")$$page.base$$page.properties.("material.custom.stylesheet")$">
$ endif $
$ if (page.properties.("material.custom.page-stylesheet")) $
<link rel="stylesheet"
href="$page.base$$page.properties.("material.custom.page-stylesheet")$">
@@ -134,8 +134,8 @@ $!
</main>
$partials/footer()$
</div>
- <script
src="$page.base$assets/javascripts/application.583bbe55.js"></script>
- <script
src="$page.base$assets/javascripts/paradox-material-theme.js"></script>
+ <script
src="$page.properties.("assets.hostname")$$page.base$assets/javascripts/application.583bbe55.js"></script>
+ <script
src="$page.properties.("assets.hostname")$$page.base$assets/javascripts/paradox-material-theme.js"></script>
$!
The ending "." enables search to work without providing the site URL,
since the
@@ -149,10 +149,10 @@ $!
!$
<script>app.initialize({version:"0.17",url:{base:"$page.base$."}})</script>
- <script type="text/javascript"
src="$page.base$lib/prettify/prettify.js"></script>
- <script type="text/javascript"
src="$page.base$lib/prettify/lang-scala.js"></script>
- <script type="text/javascript"
src="$page.base$lib/jquery/jquery.min.js"></script>
- <script type="text/javascript"
src="$page.base$assets/javascripts/groups.js"></script>
+ <script type="text/javascript"
src="$page.properties.("assets.hostname")$$page.base$lib/prettify/prettify.js"></script>
+ <script type="text/javascript"
src="$page.properties.("assets.hostname")$$page.base$lib/prettify/lang-scala.js"></script>
+ <script type="text/javascript"
src="$page.properties.("assets.hostname")$$page.base$lib/jquery/jquery.min.js"></script>
+ <script type="text/javascript"
src="$page.properties.("assets.hostname")$$page.base$assets/javascripts/groups.js"></script>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function(event) {
diff --git a/theme/src/main/assets/partials/footer.st
b/theme/src/main/assets/partials/footer.st
index 9e40060..7e7408e 100644
--- a/theme/src/main/assets/partials/footer.st
+++ b/theme/src/main/assets/partials/footer.st
@@ -63,7 +63,7 @@ $!
<div class="md-footer-meta__inner md-grid">
<div class="logo">
<a href="https://incubator.apache.org/" one-link-mark="yes">
- <img src="assets/images/apache-incubator.svg" alt="Apache Incubator
logo" id="incubator__logo">
+ <img
src="$page.properties.("assets.hostname")$assets/images/apache-incubator.svg"
alt="Apache Incubator logo" id="incubator__logo">
</a>
</div>
<div class="incubation-disclaimer">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]