Commit Graph
80 Commits
Author SHA1 Message Date
Chris SewellandAdam Turner 134bd7f1fb Add `collapsible` option to admonition directives (#12507)
This PR adds the `collapsible` and option to the core admonition type directives, which are propagated to the nodes, e.g.

```restructuredtext
.. admonition:: title
   :collapsible:

   content

.. note:: content
   :collapsible: closed
```

For the HTML5 writer, this replaces the outer `div` with a `details` tag, and the title `p`  with a `summary` tag (with an `open` attribute if set), e.g.

```html
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>hallo</p>
</div>
```

changes to

```html
<details class="admonition note" open="open">
<summary class="admonition-title">Note</summary>
<p>hallo</p>
</details>
```

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-01-29 18:06:57 +01:00
Tim Hoffmann 647863ed55 sphinx13: Use a background for inline literals (#12943) 2024-10-02 16:42:17 +01:00
James AddisonandTim Hoffmann 92f024e2bf HTML search: adjustments to type-dependent CSS classnames and defaults (#12815)
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
2024-09-18 03:40:20 +01:00
646a5d7482 Support type-dependent search result highlighting via CSS (#12474)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: James Addison <55152140+jayaddison@users.noreply.github.com>
2024-08-11 20:22:21 +01:00
Tim Hoffmann feeee57dbe [HTML theme] sphinx13: include the project name in home link (#12700) 2024-07-28 09:50:48 +02:00
Tim Hoffmann 08adbb3c18 Fix positioning of logos on the homepage (#12684) 2024-07-26 22:54:40 +01:00
Tim Hoffmann a79768847f Improve the search field styling in the `sphinx13` theme (#12591) 2024-07-20 23:08:15 +01:00
Tim Hoffmann 00758033d3 [docs] CSS style improvements (#12546)
- increase paragraph line-height to 1.5
- Adapt the border color for all warning/error like admonitions
2024-07-14 08:02:02 +02:00
Chris Sewell 953c0097ef [docs] add icons to admonition titles (#12486)
and also replace ad-hoc "more" icon in quickstart, with using `seealso` admonition
2024-06-27 23:06:52 +02:00
Chris Sewell 0b5fd6289d [docs] Improve contents title style (#12485) 2024-06-27 21:31:15 +02:00
Chris Sewell ad6f659eb2 [docs] Add Previous/Next links after content (#12466) 2024-06-27 14:58:50 +02:00
Chris Sewell 53119133f2 [docs] Keep top-bar visible (#12464)
This commit ensures the top-bar is always visible, rather than being hidden on scrolling or navigating to a target.
2024-06-23 00:19:43 +02:00
Tim Hoffmann be92d6545a DOC: Reduce horizontal padding on small screens (#12465)
Maximize used horizontal space when the screen is small.
2024-06-23 00:04:52 +02:00
Chris Sewell a1bb165685 [docs] Add Github repo icon-link to topbar (#12462)
Add a link to sphinx-doc/sphinx, via an icon on the right of the top-bar
2024-06-22 20:48:18 +02:00
Chris Sewell bcf32428c8 [docs] Improve sidebar (#12461)
- Remove "Site navigation" header
  - this is already contextually clear (especially since separators were added in #12439)
- Hide "On this page" if `display_toc is False`
- Format "On this page" header similar to top-level site-nav sections
2024-06-22 15:32:06 +02:00
Chris Sewell c5bd2d42c5 [docs] improve RTD version selector (#12460)
ensure the border-radius is applied correctly
2024-06-22 14:50:38 +02:00
Chris Sewell 93e4eea307 [docs] Style ReadTheDocs version selector (#12457)
Style the ReadTheDocs version selector
(see https://docs.readthedocs.io/en/stable/flyout-menu.html)
inline with the rest of the theme.
2024-06-21 20:46:19 +02:00
Chris Sewell 8f97fd276a [docs] Improve landing page (#12453)
This commit is intended to improve new user's first-interaction with the Sphinx site:

- Make page header icon/text smaller and not capitalized
- Give min-width to left sidebar (it was getting too small at certain window sizes)
- Replace features list on landing page with admonition boxes, with adaptive layout
- Add landing page "used by" section
- Slightly restructure the Extension section, into Tutorials and How-tos
- Add code to `conf.py` to write HTML write redirect pages for moved documents
- Improve support page, by adding link to Stackoverflow, GH discussion and ReadtheDocs,
  and remove defunct link to libera chat and matplotlib tutorial
2024-06-21 20:12:57 +02:00
Nicolas Peugnet f5eb0b2df1 [docs] Fix horizontal overflow in theme header (#12455) 2024-06-21 16:01:13 +02:00
Tim Hoffmann e30430d2ba DOC: Improve internal sphinx13 style (#12439)
This commit adds a few changes to the theme to make it more readable and visually more appealing. In particular:

- Slightly increase the font weight of headings (300 --> 400).
- Adapt the color of the search box border to sphinx-blue.
- Add horizontal bars between the components of the side bar. 
- Re-style admonitions to use colored title backgrounds.
2024-06-19 00:44:44 +02:00
Thomas Weißschuh d5bdabdd80 themes: Don't duplicate "navigation" in aria-label (#12422)
The word "navigation" is not supposed to be included as part of the aria-label attribute:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/navigation_role
2024-06-17 12:50:34 +02:00
Adam Turner fba5d2af6c Convert `theme.conf to theme.toml` (part 2) 2024-04-11 19:01:17 +01:00
Adam Turner e29e5fed36 Convert `theme.conf to theme.toml` (part 1) 2024-04-11 19:01:17 +01:00
Shengyu Zhang 9c3b50b31c Avoid hard-coding 'index' for the master document in templates (#11801) 2023-12-28 07:05:14 +00:00
Adam Turner 5730329d83 Simplify the font selection 2023-10-04 16:56:47 +01:00
Adam Turner 8878bee000 Replace the header image with a new SVG logo 2023-10-04 16:56:46 +01:00
Stefanie MolinandAdam Turner e09d02e440 Allow `copyright` to contain multiple entries (#10983)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-05-11 22:43:48 +01:00
Adam Turner 4e27a5fba1 Remove unneeded JavaScript from `sphinx13` theme 2023-04-23 20:45:57 +01:00
Tim Hoffmann b430e05285 Create a 'search field' component for themes (#11045)
``searchfield.html`` is similar to the existing ``searchbox.html``, but does not
have the heading "Quick Search". Instead, it uses "Search" as a placeholder
text. This gives a cleaner and less cluttered appearance.

The searchfield component is added to the basic theme and thus can be used
in any derivative theme. It is not used by default for backward compatibility.

The searchfield compenent is made the default in the sphinx13 theme.

CSS changes ensure that the top of the search field is aligned with the
top of the main content.
2023-04-21 02:02:04 +01:00
Dimitri Papadopoulos 669bcc0a19 Fix typos found by codespell 2023-03-27 07:22:07 +02:00
Adam Turner 56aa3412ef Merge branch '5.x'
# Conflicts:
#	setup.py
#	sphinx/__init__.py
2022-09-23 17:27:00 +01:00
Adam Turner ee005caf22 Do not apply epigraph style to all block quotes
Correct indentation where appropriate for stanzas that should not be
rendered as `<blockquote>` HTML elements.

Closes GH-10686
2022-09-12 19:54:36 +01:00
Adam Turner 14c9b40f15 Merge branch '5.x'
# Conflicts:
#	setup.py
#	sphinx/application.py
#	sphinx/environment/__init__.py
#	sphinx/ext/autodoc/directive.py
#	tests/test_build_html.py
2022-09-09 09:58:24 +01:00
Tim Hoffmann 5951de4086 sphinx13.css: add left padding to the footer (#10789) 2022-08-28 01:33:26 +01:00
Adam Turner 94024e6efa Merge branch '5.x'
# Conflicts:
#	sphinx/ext/autodoc/__init__.py
#	sphinx/writers/html5.py
2022-07-18 22:49:56 +01:00
Chris HoldgrafandAdam Turner eb0a6c574f Update documentation structure and theming (#10677)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2022-07-18 22:48:28 +01:00
Adam Turner 1e3ade55fe Merge branch '5.x' 2022-07-10 23:05:23 +01:00
Adam Turner 9112cfeb8d Refresh the Sphinx13 theme (#10652) 2022-07-10 22:48:15 +01:00
Adam Turner b26bf0320c Add underscore.js to the sphinx13 theme (#10588) 2022-06-19 23:12:38 +01:00
Takeshi KOMIYA 4292630965 Fix #10574: Failed to search on sphinx-doc.org (again) 2022-06-19 22:47:41 +09:00
Takeshi KOMIYA 521a47b033 Fix #10574: Failed to search on sphinx-doc.org (again)
To make RtD search available, this adds jQuery patches on old Sphinx to
sphinx-doc.org.
2022-06-19 19:26:18 +09:00
Adam Turner 5806f0af27 Add nav.contents everywhere that div.topic is used 2022-06-07 23:12:29 +01:00
Adam Turner fbd374859a Add aside.topic for Docutils 0.18+ (sphinx13) 2022-06-04 17:09:44 +01:00
Adam Turner 3b01fbe2ad Drop JavaScript Frameworks (#10028)
* Delete jQuery and underscore.js

* Move underscores.js setup to searchtools.js

* Update jQuery.url(en|de)code

* Update jQuery.getQueryParameters

* Firefox bug is no longer present

xref https://bugzilla.mozilla.org/show_bug.cgi?id=645075#c49

* Update jQuery.fn.highlightText

* Use enum instead of magic number

* Update test descriptions to remove obsolete jQuery reference

* Update Documentation.getCurrentURL

* Revert accidental fix of Documentation.getCurrentURL

* Update Documentation.initOnKeyListeners

* Update Documentation.hideSearchWords

* Update Documentation.highlightSearchWords

* Update Documentation.initDomainIndexTable

* Use arrow functions and const

* Replace $(document).ready

* Strict mode

* Move Documentation.hideSearchWords next to Documentation.highlightSearchWords

* Update translation functions in Documentation

* Replace $(document).ready in searchtools.js

* Update Scorer

* Update Search.hasIndex, Search.deferQuery, Search.stopPulse

* Prefer window.location

* Update Search.init

* Update Search.loadIndex

* Update Search.setIndex

* Update Search.startPulse

* Add _escapeRegExp

* Update Search.makeSearchSummary

* Update Search.htmlToText

* Update Search.performSearch

* Factor out _displayNextItem

* Update Search.query

* Update Search.performObjectSearch

* Update Search.performTermsSearch

* Remove underscores.js setup

* Use Sets

* Update test configuration

* Fix test failures

* Drop unused make/get URL functions

* Strict mode in searchtools.js

* Remove outmoded check for jQuery and underscore.js

* Ran prettier

prettier --print-width 120 --no-semi --quote-props as-needed --no-bracket-spacing --arrow-parens avoid --write sphinx/themes/basic/static

* Remove more references to jQuery and underscore.js

* Remove jQuery and underscore.js licences

* Update classic theme for no jQuery

* Update all other themes for no jQuery

* Restore jQuery & underscores.js to Sphinx themes

Enables a more gradual deprecation

* Added deprecation note to CHANGES

* Run prettier with defaults

* Update deprecation message to include extensions, note that sources must be copied

* oops

* Address Pradyun's feedback

* Forgot this one

* `let` doesn't work, as it is scoped to the block...

* Remove missed jQuery in sphinx13 theme
2022-01-30 20:27:12 +01:00
Takeshi KOMIYA 0b238d897c Fix #9108: docs: Use default pygments_theme to get accessiblity
To increse accessiblity of our docs, this changes the pygments_theme of
sphinx-docs.org to "default".  It was updated to meet WCAG AA in
https://github.com/pygments/pygments/pull/1940.
2021-12-11 11:34:51 +09:00
Thibaud Colas 00e2c2e250 Fix broken "Extend" link in site header
Spotted while navigating https://www.sphinx-doc.org/en/master/.
2021-02-04 22:04:17 +00:00
Takeshi KOMIYA 51d500833e Merge branch '3.x' into 7774_remove_develop.rst 2021-01-24 16:34:47 +09:00
François Freitag 5166dd194c Strip trailing whitespaces and normalize line endings
Trailing whitespace do not have impact on the result, they are just
unused bytes. Most text editors are configured to strip trailing
whitespaces. Remove them all in one go.

Update a handful of files to use the UNIX line ending.
2020-10-03 13:47:01 +02:00
Stephen Finucane f40bbee221 docs: Remove the 'develop' guide
This contained a list of extensions, along with general contributing
information and pointers on how to develop your own extensions. The list
of extensions was very old, referenced the dead BitBucket repo and was
really not very helpful, while the contributing and development
information was just pointers to other, better documentation. Remove the
document wholesale and update any pointers we have to it to other,
better docs.

Signed-off-by: Stephen Finucane <stephen@that.guru>
2020-06-02 22:02:19 +01:00
Takeshi KOMIYA e1c7e9d481 Fix #7534: docs: Big vertical whitespace rendered in official doc 2020-04-22 23:37:44 +09:00