diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css index 5be72283d4..5789dfff8b 100644 --- a/docs/source/_static/css/custom.css +++ b/docs/source/_static/css/custom.css @@ -103,3 +103,7 @@ h3.admonition-title::before { mask-image: var(--icon-admonition-default); mask-repeat: no-repeat; } +/* Apply SVG from inline page.html */ +.hidden-svg { + display: none; +} diff --git a/docs/source/_static/css/dark_light_mode.css b/docs/source/_static/css/dark_light_mode.css new file mode 100644 index 0000000000..405fdb59a0 --- /dev/null +++ b/docs/source/_static/css/dark_light_mode.css @@ -0,0 +1,20 @@ +body { + --color-code-background: #f8f8f8; + --color-code-foreground: black; +} + +/* Dark theme styles */ +@media not print { + body[data-theme="dark"] { + --color-code-background: #272822; + --color-code-foreground: #f8f8f2; + } + + /* For users who prefer dark color scheme */ + @media (prefers-color-scheme: dark) { + body:not([data-theme="light"]) { + --color-code-background: #272822; + --color-code-foreground: #f8f8f2; + } + } +} diff --git a/docs/source/_static/js/loadShortbread.js b/docs/source/_static/js/loadShortbread.js new file mode 100644 index 0000000000..6b31b35f4a --- /dev/null +++ b/docs/source/_static/js/loadShortbread.js @@ -0,0 +1,27 @@ +// Load shortbread +document.addEventListener('DOMContentLoaded', function() { + + document.body.dataset.theme = localStorage.getItem("theme") || "auto"; + + if (typeof AWSCShortbread !== 'undefined') { + const shortbread = AWSCShortbread({ + // domain: ".amazonaws.com" + domain: "d3o2vvnrhogbwx.cloudfront.net" + }); + + // Check for cookie consent + shortbread.checkForCookieConsent(); + + // Add event listener for 'Cookie preferences' button read from page.html + const cookiePreferencesLink = document.getElementById('cookie-button-link'); + if (cookiePreferencesLink) { + cookiePreferencesLink.addEventListener('click', function(event) { + event.preventDefault(); + shortbread.customizeCookies(); + }); + } + console.log("AWSCShortbread loaded successfully loaded!!!") + } else { + console.error("AWSCShortbread failed to load!!!") + } +}); diff --git a/docs/source/_templates/_head_css_variables.html b/docs/source/_templates/_head_css_variables.html new file mode 100644 index 0000000000..8c635eb50b --- /dev/null +++ b/docs/source/_templates/_head_css_variables.html @@ -0,0 +1,31 @@ +{# + This is where user-provided CSS variables get converted into actual values. +#} +{% macro declare_css_variables(user_customisations, pygments_theme) -%} + + --color-code-background: {{ pygments_theme.background }}; + --color-code-foreground: {{ pygments_theme.foreground }}; + {% if user_customisations -%} + {% for name, value in user_customisations.items() -%} + --{{ name }}: {{ value }}; + {% endfor %} + {%- endif %} +{%- endmacro %} + + + + diff --git a/docs/source/_templates/base.html b/docs/source/_templates/base.html new file mode 100644 index 0000000000..580a01028c --- /dev/null +++ b/docs/source/_templates/base.html @@ -0,0 +1,107 @@ + + +
+ + + + {%- block site_meta -%} + + + + + {%- if metatags %}{{ metatags }}{% endif -%} + + {%- block linktags %} + {%- if hasdoc('about') -%} + + {%- endif -%} + {%- if hasdoc('genindex') -%} + + {%- endif -%} + {%- if hasdoc('search') -%} + + {%- endif -%} + {%- if hasdoc('copyright') -%} + + {%- endif -%} + {%- if next -%} + + {%- endif -%} + {%- if prev -%} + + {%- endif -%} + {#- rel="canonical" (set by html_baseurl) -#} + {%- if pageurl %} + + {%- endif %} + {%- endblock linktags %} + + {# Favicon #} + {%- if favicon_url -%} + + {%- endif -%} + + + + {%- endblock site_meta -%} + + {#- Site title -#} + {%- block htmltitle -%} + {% if not docstitle %} +