diff --git a/.gitignore b/.gitignore index a25cc0d3..2951515f 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ __pycache__/ .Python _build/ build/ +_build/ develop-eggs/ dist/ downloads/ diff --git a/src/ansys_sphinx_theme/announcement_layout.html b/src/ansys_sphinx_theme/announcement_layout.html new file mode 100644 index 00000000..96e868e8 --- /dev/null +++ b/src/ansys_sphinx_theme/announcement_layout.html @@ -0,0 +1,14 @@ +{% if theme_switcher %} +
+ +{% endif %} diff --git a/src/ansys_sphinx_theme/layout.html b/src/ansys_sphinx_theme/layout.html index 6b6e992c..839fe6bd 100644 --- a/src/ansys_sphinx_theme/layout.html +++ b/src/ansys_sphinx_theme/layout.html @@ -26,6 +26,7 @@ {% block docs_navbar %} {{ super() }} + {% include 'announcement_layout.html' %} {% if theme_show_breadcrumbs %} {% include 'breadcrumbs.html' %} {% endif %} diff --git a/src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css b/src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css index a6e76799..74bb3d2d 100644 --- a/src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css +++ b/src/ansys_sphinx_theme/static/css/ansys_sphinx_theme.css @@ -113,6 +113,7 @@ html[data-theme="dark"] { --pst-color-on-surface: rgb(55, 55, 55); --pst-color-info: var(--pst-color-secondary); + /***************************************************************************** * extensions */ diff --git a/src/ansys_sphinx_theme/static/css/breadcrumbs.css b/src/ansys_sphinx_theme/static/css/breadcrumbs.css index cc907569..d239b9ca 100644 --- a/src/ansys_sphinx_theme/static/css/breadcrumbs.css +++ b/src/ansys_sphinx_theme/static/css/breadcrumbs.css @@ -21,4 +21,44 @@ body { *, :after, :before { box-sizing: border-box; +} + +#announcement_msg { + display: flex; + justify-content: center; + position: relative; + width: 100%; + padding: 0.5rem 12.5%; + text-align: center; +} + +#announcement_msg :after { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + background-color:rgb(223, 95, 114); + opacity: 0.2; + content: ""; + z-index: -1; +} + +#announcement_msg :empty { + display: none; +} + +#announcement_msg p { + font-weight: bold; + margin: auto; + color:black; +} + +html[data-theme="dark"] #announcement_msg :after{ + background-color:lightpink; + opacity: 0.5; +} + +#announcement_msg a { + color:#1E6DDC } \ No newline at end of file