Skip to content

Commit

Permalink
Play with Sphinx furo theme
Browse files Browse the repository at this point in the history
- Currently this commit shows what's furo's defaults!!!
- No customization required when features.rst tables specify width and
  align (defaults are centered/not-full-width)
- Leave CSS experiments in synadm.css commented out for now
- CSS with this theme should rather go to conf.py
  html_theme_options light/dark_css_variables...
  • Loading branch information
JOJ0 committed Oct 6, 2024
1 parent 1dbe654 commit e1dff9e
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 18 deletions.
8 changes: 7 additions & 1 deletion doc/source/_static/synadm.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ html[data-theme="light"] {
html[data-theme="light"] {
--pst-color-inline-code: #a23632;
}
*/
table tr:hover td {
background-color: var(--bs-gray-300);
}
table {
display: table;
overflow-x: auto;
white-space: nowrap;
}
table,thead,tbody {width:98%}
*/

/* pydata teal (primary): #126A7E */
/* pydata violet (secondary): #7D0E70 */
27 changes: 13 additions & 14 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,28 +60,27 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_book_theme"
#html_theme = "pydata_sphinx_theme"
#html_theme = "furo"
#html_theme = "press"
#html_theme = "alabaster"
# html_theme = "sphinx_book_theme"
# html_theme = "pydata_sphinx_theme"
html_theme = "furo"
# html_theme = "press"
# html_theme = "alabaster"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']

html_theme_options = {
"collapse_navigation": True,
"logo": {
"text": "synadm - The Synapse Admin CLI",
},
"pygment_light_style": "bw",
# "light_css_variables": {
# "color-brand-primary": "#343a40",
# # "color-brand-content": "#495057",
# # "color-admonition-background": "orange",
# },
}
html_title = "synadm"
#html_logo = "_static/beets_logo_nobg.png"
html_static_path = ["_static"]
html_css_files = ["synadm.css"]
# html_title = "synadm - the Synapse Admin CLI"
# html_static_path = ["_static"]
# html_css_files = ["synadm.css"]


# -- Extension configuration -------------------------------------------------
35 changes: 34 additions & 1 deletion doc/source/features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,136 +12,169 @@ Account Validity
.. csv-table::
:file: features/account_validity.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Background Updates
------------------

.. csv-table::
:file: features/background_updates.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Delete Group
------------

.. csv-table::
:file: features/delete_group.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Event Reports
-------------

.. csv-table::
:file: features/event_reports.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Experimental Features
---------------------

.. csv-table::
:file: features/experimental_features.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Media
-----

.. csv-table::
:file: features/media.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:keepspace:
:align: left

Purge History
-------------

.. csv-table::
:file: features/purge_history.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Register Users
--------------

.. csv-table::
:file: features/register_users.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Registration Tokens
-------------------

.. csv-table::
:file: features/registration_tokens.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Manipulate Room Membership
--------------------------

.. csv-table::
:file: features/manipulate_room_membership.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Rooms
-----

.. csv-table::
:file: features/rooms.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Server Notices
--------------

.. csv-table::
:file: features/server_notices.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Statistics
----------

.. csv-table::
:file: features/statistics.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Users
-----

.. csv-table::
:file: features/users.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Server Version
--------------

.. csv-table::
:file: features/server_version.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Federation
----------

.. csv-table::
:file: features/federation.csv
:header: "Synapse Admin API","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left

Miscellaneous
-------------

.. csv-table::
:file: features/miscellaneous.csv
:header: "Description","synadm command(s)"
:width: 98%
:widths: 1 1
:align: left


.. _documentation source directory:
Expand Down
2 changes: 1 addition & 1 deletion rtd_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ requests==2.31.0
snowballstemmer==2.2.0
Sphinx==7.2.3
sphinx-click==5.0.1
sphinx-book-theme==1.1.3
furo==2024.8.6
sphinxcontrib-applehelp==1.0.7
sphinxcontrib-devhelp==1.0.5
sphinxcontrib-htmlhelp==2.0.4
Expand Down
2 changes: 1 addition & 1 deletion sphinx_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Jinja2<3.1
Sphinx
sphinx-click
sphinx-book-theme
furo
myst-parser

0 comments on commit e1dff9e

Please sign in to comment.