Commit Graph

1521 Commits

Author SHA1 Message Date
Manuel Kaufmann
474290d9be Update CSS 2024-09-19 11:57:04 +02:00
Manuel Kaufmann
d3ea70af1e Update CSS 2024-09-19 11:49:36 +02:00
Manuel Kaufmann
2bfc378323 Update event listener 2024-09-19 11:41:18 +02:00
Manuel Kaufmann
a36225603e Whitespaces 2024-09-19 11:35:17 +02:00
Manuel Kaufmann
9afe946742 Merge branch 'humitos/selectors' of github.com:readthedocs/sphinx_rtd_theme into humitos/selectors 2024-09-19 11:35:01 +02:00
Manuel Kaufmann
26cdafa32e Use the prettier to lint the file 2024-09-19 11:34:44 +02:00
Manuel Kaufmann
ece85df497
Apply suggestions from code review
Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
2024-09-19 11:28:16 +02:00
Manuel Kaufmann
2fc2aaa002 Update CSS 2024-09-19 11:12:48 +02:00
Manuel Kaufmann
b923b6f98d re-compile CSS 2024-09-19 11:02:44 +02:00
Manuel Kaufmann
c0a66d98e3 Updates from review 2024-09-19 11:00:57 +02:00
Manuel Kaufmann
98c9592799 Update CSS 2024-09-17 16:13:18 +02:00
Manuel Kaufmann
96cfa2de2d Docs typo 2024-09-17 16:01:38 +02:00
Manuel Kaufmann
d760b0a48a HTML layout fix 2024-09-17 16:00:32 +02:00
Manuel Kaufmann
9008e46aeb Update docs 2024-09-17 15:52:39 +02:00
Manuel Kaufmann
184167cfa0 HTML layout rework 2024-09-17 15:50:46 +02:00
Manuel Kaufmann
6ced13d082 Change display_version default 2024-09-17 14:39:06 +02:00
Manuel Kaufmann
5989b4c273 Only include the languages if there is one 2024-09-17 14:34:11 +02:00
Manuel Kaufmann
003ccc94b1 Always include the version javascript 2024-09-17 14:29:48 +02:00
Manuel Kaufmann
71df765bf9 Update JavaScript 2024-09-17 14:25:53 +02:00
Manuel Kaufmann
218c4183ea Update CSS 2024-09-17 14:18:56 +02:00
Manuel Kaufmann
64305f8bd0 Typo fix on comment 2024-09-17 14:16:35 +02:00
Manuel Kaufmann
cee1b45c64 Make the selectors more prominent 2024-09-17 14:16:27 +02:00
Manuel Kaufmann
232c288ac3 Use correct value for language 2024-09-17 14:16:15 +02:00
Manuel Kaufmann
e0d296c909 Split it into two different configs 2024-09-17 13:58:44 +02:00
Manuel Kaufmann
b8197958e7 Prepend the current version if it's hidden 2024-09-17 11:49:05 +02:00
Manuel Kaufmann
c8be08d253 Update CSS to apply to both selectors 2024-09-17 11:48:42 +02:00
Manuel Kaufmann
79a7c2e44b Use CSS styles from old attempt
https://github.com/readthedocs/sphinx_rtd_theme/pull/438
2024-09-16 18:54:24 +02:00
Manuel Kaufmann
bac696ec69 Show version/language selectors below the title 2024-09-16 18:19:08 +02:00
Manuel Kaufmann
9c75444a73
Docs: do not sign Git tag (#1596)
Closes #1593
2024-08-20 18:52:27 +02:00
Manuel Kaufmann
3a3473dc15
Release 3.0.0rc1 (#1597) 2024-08-20 13:34:51 +02:00
Manuel Kaufmann
6b587d1c67
Prepare for 3.0 release (#1576)
* Tests: `sphinxdev` tox environment installs Sphinx from `master`

It seems we had a bug in the name and it wasn't installing Sphinx from `master`.
I expect this test to fail now because we pin `Sphinx<8`, but that's fine for now.

* Prepare for 3.0 release

- Drop Python <3.8
- Drop docutils <=0.18
- Add support for docutils 0.21
- Add support for Python 3.12

This follows the plan we wrote in
https://sphinx-rtd-theme.readthedocs.io/en/stable/development.html#roadmap-release-3-0-0

The main idea here is to move forward with newer versions and drop support for
old stuffs so we reduce the maintanence burden.

* Update CircleCI matrix

* More fixes to CircleCI

* Run test over Sphinx 8.0

* Update contributing guide

* Remove deprecated `readthedocs-sphinx-ext`

* Remove old Sphinx versions

* Uninstall our extension

* Show a warning if `extra_css_files` is in the `html_context`

See https://github.com/readthedocs/sphinx_rtd_theme/pull/450

* Update development page

* Add deprecate warning for `analytics_` theme options

* Update docs

* Remove unused dependency

Closes #1533

* Remove environment variables from our docs

This was already added in a more generic way to the theme itself.

* Require Sphinx >=6.0

* Deprecation warning about `get_html_theme_path`

See https://github.com/readthedocs/sphinx_rtd_theme/pull/1479#issuecomment-2296317034
2024-08-20 13:18:34 +02:00
Manuel Kaufmann
768dcc1467
Docs: update the installation note (#1595)
* Docs: update the installation note

Translated string work with/without the theme added into the ``extensions``.
However, it's still required to be inside the extensions because of
``sphinxcontrib-jquery``.

I'm keeping the note, but changing it content.

* Update docs/installing.rst

Co-authored-by: Anthony <aj@ohess.org>

---------

Co-authored-by: Anthony <aj@ohess.org>
2024-08-20 12:07:28 +02:00
Manuel Kaufmann
2c19bb149b
Release 2.1.0rc2 (#1592) 2024-08-14 12:30:58 +02:00
Manuel Kaufmann
a359d40e28
Theme option flyout to enable/disable theme's flyout (#1580)
* Theme option `flyout` to enable/disable theme's flyout

Add a theme option to enable/disable the theme's flyout integrated at the bottom
left into the navigation bar.

Closes #1579

* Use `flyout_display` with `hidden` and `attached` as options

* Make `hidden` as `flyout_display`

* Update docs/configuring.rst

Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>

---------

Co-authored-by: Eric Holscher <25510+ericholscher@users.noreply.github.com>
2024-08-14 12:14:42 +02:00
Manuel Kaufmann
cf898d3acc
Populate html_context with READTHEDOCS_* environment variables (#1581)
* Populate `html_context` with `READTHEDOCS_*` environment variables

Closes #1578

* Typo
2024-08-01 19:18:37 +02:00
Manuel Kaufmann
42557430ef
Tests: sphinxdev tox environment installs Sphinx from master (#1575)
It seems we had a bug in the name and it wasn't installing Sphinx from `master`.
I expect this test to fail now because we pin `Sphinx<8`, but that's fine for now.
2024-07-25 12:14:52 +02:00
Manuel Kaufmann
5c72f6504f
Docs: update releasing (#1574)
* Docs: update releasing

* Use the pattern we already have

* Use tab :/
2024-07-25 12:14:27 +02:00
Manuel Kaufmann
68a89bb07e
Release 2.1.0rc1 (#1573)
I wasn't able to update translations because it fails with non-zero exit when
running `python setup.py update_translations`.
2024-07-23 11:21:33 +02:00
Karolina Surma
76a933b997
Adjust the expected test_basic output to match Sphinx 7.3+ (#1572)
The previous behavior was deemed a bug and fixed in
https://github.com/sphinx-doc/sphinx/pull/11970

Closes #1558

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
2024-07-15 15:16:39 +02:00
Manuel Kaufmann
357e76dc42
Addons: integrate with new beta addons flyout (#1526)
* Addons: integrate with new beta addons flyout

Initial experimentation to use the `CustomEvent` triggered by the addons called
`readthedocsdataready` event (from
https://github.com/readthedocs/addons/pull/64/) to build the Read the Docs
flyout being integrated into the theme keeping the original look & feel.

* Related: https://github.com/readthedocs/addons/pull/64/
* Closes #1523

* `READTHEDOCS` variable has to be passed to the `html_context`

This is because we are not executing the Read the Docs magic that modifies the
`conf.py` file on the fly :/

* Update code to match the latest changes

* Use `.join` to avoid rendering the Array with `,`

* Update code to use the v1 API structure response

* Don't auto-remove the original flyout

This can be disabled per-project by using the settings UI from the dashboard.

* Join the values to avoid strange `,`s

* Support translations

Use the current pattern to translate string generated for the flyout.

* Remove HTML tags for testing

* Show "Search" section on flyout

* Render footer

* Add some styling

* TODO comments to work on

* add `div.injected`

* Apply suggestions from code review

Co-authored-by: Anthony <aj@ohess.org>

* Translate privacy policy

* Add `.rtd-current-item` class to selected version/language

* Refactor code to show sections only if there is content

* Epub instead of EPUB for backward compatibility

* Show the modal when clicking on the "Search docs" from navbar

* Remove privacy policy link from flyout

* Add UTM analytics

* Move CSS style into SASS file

* Move the `script` tag into its own file

* Rename JS file to mark it as a Sphinx template

* Build css/js files

Run `npm ci` and `npm run build` using NodeJS 14.20.1.

* Add the JS template in the package

---------

Co-authored-by: Anthony <aj@ohess.org>
2024-07-15 15:11:33 +02:00
Max Dudzinski
28c377f99a
Remove html5shiv (#1482)
* Fix typo

* Lock file changes after running 'npm install --lockfile-version 1' w/ Node 14

* Format file prior to change

* Remove the html5shiv JS package & all references to it

* Remove the copy-webpack-plugin JS package as no longer used

---------

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
2024-01-25 12:03:15 -08:00
Manuel Kaufmann
80de90aecf
Remove Sphinx<5 compatibility leftovers (#1512)
* Remove Sphinx<5 compatibility

Since 2.0 we do not support Sphinx<5.

* Always use `writer-html5`

Since 2.0 HTML4 writer is not supported.

* Use `css_tag` helper to inject CSS files

* Revert "Remove Sphinx<5 compatibility"

Keep `sphinx_version_info`. It will be required.

This reverts commit 3afbed2950.

* Set `data-content_root` for Sphinx >= 7.2

Copied from https://github.com/readthedocs/sphinx_rtd_theme/pull/1507

* Default value for `DISPLAY` and `--new-tab`

* Visual test with Firefox and tox

Allows developer to run

```
tox -e py310-sphinx72-firefox
```

This will run the tests and open a Firefox after building the demo site
showing the `demo/demo.html` page on it.

Then, you can also run:

```
tox -e py310-sphinx61-firefox
```

and compare the visual differences.

Idea copied from #1388
Closes #1388

* Update sphinx_rtd_theme/layout.html

Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>

* Remove code from merge conflict

* Revert a mistake done on merging

* Update CSS logic again

* Minor refactor to undocumented `extra_css_files` option

---------

Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
2024-01-03 12:19:50 +01:00
Manuel Kaufmann
17111add80
Remove pytest warnings (#1515)
* Remove pytest warnings

Ignore deprecations on Sphinx 9.0 that comes from readthedocs-sphinx-ext and use
`findall()` instead of `.traverse()` as suggested by docutils.

* We can't ignore a warning from Sphinx 9.0

We are testing in older versions where this exception is not defined.

The deprecation warning we are seeing here is not related to `sphinx_rtd_theme`
but with `readthedocs-sphinx-ext` because at:

13edf78bab/readthedocs_ext/readthedocs.py (L118-L122)

In any case, we will stop using that Sphinx extension at some point.
2024-01-02 13:22:55 +01:00
Anthony
2da37d6afd
Set up for next release (#1545) 2023-11-28 10:00:56 -08:00
Anthony
7c9b1b5d39
Release 2.0 final (#1544) 2023-11-27 20:04:13 -08:00
Anthony
c104410760
Bump for next potential release, 2.0.0rc5 (#1539) 2023-10-31 14:27:11 -07:00
Anthony
53ca116ef6
Release 2.0.0rc4 (#1538) 2023-10-31 14:15:47 -07:00
Dmitry Shachnev
4498e97b46
Fix AttributeError when one of css_files is a string (#1537)
Fix AttributeError when one of css_files is a string
2023-10-30 11:41:11 -07:00
Anthony
84aea9b0ba
Increment for next potential release (#1536) 2023-10-24 11:49:43 -07:00
Anthony
febde39c7c
Release 2.0.0rc3 (#1535) 2023-10-23 19:12:58 -07:00