diff --git a/source/_static/analytics-events.js b/source/_static/analytics-events.js new file mode 100644 index 000000000..d8a69abb0 --- /dev/null +++ b/source/_static/analytics-events.js @@ -0,0 +1,56 @@ +/** + * The name of the analytics event property in the data-* attributes. + */ +const datasetEventProperty = "analyticsEvent"; + +/** + * List of properties set in the data-* attributes of the element + * that will be passed into the eventInfo object. + */ +const datasetEntries = [ + ["analyticsAction", "action"], + ["analyticsDetail", "detail"], + ["analyticsLabel", "label"], + ["analyticsLocation", "location"], +]; + +const datasetProperties = new Map(datasetEntries); +Object.freeze(datasetProperties); + +function handleAnalyticsEvent({ event, eventInfo }) { + window.adobeDataLayer = window.adobeDataLayer || []; + window.adobeDataLayer.push({ + event, + eventInfo, + }); +} + +document.addEventListener("click", function (event) { + const { target } = event; + + let element = target; + // eslint-disable-next-line security/detect-object-injection + if (element.dataset[datasetEventProperty]) { + element = target; + } else { + element = target.closest("[data-analytics-event]"); + } + + if (element) { + const { dataset } = element; + + const eventInfo = {}; + for (const [property, analyticsValue] of datasetProperties) { + if (Object.hasOwn(dataset, property)) { + // eslint-disable-next-line security/detect-object-injection + eventInfo[analyticsValue] = dataset[property]; + } + } + + handleAnalyticsEvent({ + // eslint-disable-next-line security/detect-object-injection + event: dataset[datasetEventProperty], + eventInfo, + }); + } +}); diff --git a/source/_static/theme_overrides.css b/source/_static/theme_overrides.css index 04e1c5e78..c3e5e8831 100644 --- a/source/_static/theme_overrides.css +++ b/source/_static/theme_overrides.css @@ -119,4 +119,29 @@ body { min-height:100%; background:#edf0f2 } -.wy-text-left { + +.is-flex { + display: flex !important; +} + +.is-flex-direction-row { + flex-direction: row !important; +} + +.has-gap-4 { + gap: 1rem !important; +} + +.is-link { + color: #2980b9 !important; + text-decoration: inherit; + background-color: transparent !important; + border: none !important; + padding: 0; + margin: 0; +} + +.is-link:hover { + color: #3091d1 !important; + outline: 0; +} diff --git a/source/_templates/breadcrumbs.html b/source/_templates/breadcrumbs.html new file mode 100644 index 000000000..9388f956e --- /dev/null +++ b/source/_templates/breadcrumbs.html @@ -0,0 +1,79 @@ +{%- if meta is defined and meta is not none %} + {%- set check_meta = True %} +{%- else %} + {%- set check_meta = False %} +{%- endif %} + +{%- if check_meta and 'github_url' in meta %} + {%- set display_github = True %} +{%- endif %} + +{%- if check_meta and 'bitbucket_url' in meta %} + {%- set display_bitbucket = True %} +{%- endif %} + +{%- if check_meta and 'gitlab_url' in meta %} + {%- set display_gitlab = True %} +{%- endif %} + +{%- set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %} + +{#- Translators: This is an ARIA section label for page links, including previous/next page link and links to GitHub/GitLab/etc. -#} +
+ + + {%- if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %} + {#- Translators: This is an ARIA section label for sequential page links, such as previous and next page links. -#} + + {%- endif %} +
+
diff --git a/source/_templates/footer.html b/source/_templates/footer.html index 534172bfa..ad8710bac 100644 --- a/source/_templates/footer.html +++ b/source/_templates/footer.html @@ -1,15 +1,85 @@ -{% extends "!footer.html" %} -{%-block contentinfo %} + diff --git a/source/_templates/layout.html b/source/_templates/layout.html index a68cee7c2..dd2478706 100644 --- a/source/_templates/layout.html +++ b/source/_templates/layout.html @@ -2,112 +2,111 @@ {% block content %} -{% if pagename == 'index' %} + {%- if pagename == 'index' %} -
- - Book a Demo - -
-{% endif %} +
+ + Book a Demo + +
-{{ super() }} + {%- endif %} + + {{ super() }} {% endblock %} {% block sidebartitle %} - - - + + + -
- {{ version }} -
+
+ {{ version }} +
-{% include "searchbox.html" %} + {% include "searchbox.html" %} {% endblock %} {%- block extrahead %} -{{ super() }} - - + {{ super() }} - - -{% endblock %} + {%- if adobe_analytics_url %} + - + + + {%- endif %} - window.CookieConsent = cookieConsent; - +{% endblock %} + +{% block footer %} + {{ super() }} + + {%- if adobe_analytics_url %} + + {%- endif %} {% endblock %} diff --git a/source/_templates/searchbox.html b/source/_templates/searchbox.html index 122551d50..413e310cb 100644 --- a/source/_templates/searchbox.html +++ b/source/_templates/searchbox.html @@ -1,6 +1,6 @@ {% if search_version == 'default' %} -
+