Skip to content

Commit

Permalink
docs: add documentation for announcement
Browse files Browse the repository at this point in the history
  • Loading branch information
lepture committed Dec 30, 2023
1 parent 3588f48 commit f2a0274
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
Binary file added docs/_static/screenshots/dark-homepage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/screenshots/light-homepage.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions docs/customisation/announcement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
:description: A theme option enables the display of an announcement banner.

Announcement
============

.. rst-class:: lead

Display an announcement banner at the top of the page.

----

When there's something to announce, you can include the announcement
content in the ``conf.py`` announcement option.

.. code-block:: python
:caption: conf.py
html_theme_options = {
"announcement": "The content of the announcement",
}
.. note::

HTML is allowed in the ``announcement`` option.

Here shows an example with ``announcement`` configuration.

.. container:: image-container

.. image:: /_static/screenshots/light-homepage.jpg
:class: light-only
:align: center

.. image:: /_static/screenshots/dark-homepage.jpg
:class: dark-only
:align: center
1 change: 1 addition & 0 deletions docs/customisation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ footer, navbar, and sidebar.
logos
colors
navbar
announcement
social
fonts
sidebar
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/sphinx-tabs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ How it looks like
-----------------

.. image:: /_static/screenshots/light-sphinx-tabs.png
:class: dark-hidden
:class: light-only
:align: center

.. image:: /_static/screenshots/dark-sphinx-tabs.png
:class: light-hidden
:class: dark-only
:align: center

0 comments on commit f2a0274

Please sign in to comment.