Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show version/language selectors below the title #1601

Merged
merged 31 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
bac696e
Show version/language selectors below the title
humitos Sep 16, 2024
79a7c2e
Use CSS styles from old attempt
humitos Sep 16, 2024
c8be08d
Update CSS to apply to both selectors
humitos Sep 17, 2024
b819795
Prepend the current version if it's hidden
humitos Sep 17, 2024
e0d296c
Split it into two different configs
humitos Sep 17, 2024
232c288
Use correct value for language
humitos Sep 17, 2024
cee1b45
Make the selectors more prominent
humitos Sep 17, 2024
64305f8
Typo fix on comment
humitos Sep 17, 2024
218c418
Update CSS
humitos Sep 17, 2024
71df765
Update JavaScript
humitos Sep 17, 2024
003ccc9
Always include the version javascript
humitos Sep 17, 2024
5989b4c
Only include the languages if there is one
humitos Sep 17, 2024
6ced13d
Change `display_version` default
humitos Sep 17, 2024
184167c
HTML layout rework
humitos Sep 17, 2024
9008e46
Update docs
humitos Sep 17, 2024
d760b0a
HTML layout fix
humitos Sep 17, 2024
96cfa2d
Docs typo
humitos Sep 17, 2024
98c9592
Update CSS
humitos Sep 17, 2024
c0a66d9
Updates from review
humitos Sep 19, 2024
b923b6f
re-compile CSS
humitos Sep 19, 2024
2fc2aaa
Update CSS
humitos Sep 19, 2024
ece85df
Apply suggestions from code review
humitos Sep 19, 2024
26cdafa
Use the prettier to lint the file
humitos Sep 19, 2024
9afe946
Merge branch 'humitos/selectors' of github.com:readthedocs/sphinx_rtd…
humitos Sep 19, 2024
a362256
Whitespaces
humitos Sep 19, 2024
2bfc378
Update event listener
humitos Sep 19, 2024
d3ea70a
Update CSS
humitos Sep 19, 2024
474290d
Update CSS
humitos Sep 19, 2024
7b63004
Remove language switch if there are not translations
humitos Sep 19, 2024
dbd7fd3
Tune version and language selector styles (#1603)
agjohnson Sep 20, 2024
3d795d2
Debug: trigger Read the Docs Addons event to test/debug locally (#1606)
humitos Sep 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
369 changes: 369 additions & 0 deletions docs/_static/addons.mocked.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,369 @@
{
"addons": {
"analytics": {
"code": null,
"enabled": true
},
"ethicalads": {
"ad_free": false,
"campaign_types": [
"community",
"house",
"paid"
],
"enabled": true,
"keywords": [
"only words"
],
"publisher": "readthedocs"
},
"external_version_warning": {
"enabled": true
},
"flyout": {
"enabled": true
},
"hotkeys": {
"doc_diff": {
"enabled": true,
"trigger": "KeyD"
},
"enabled": true,
"search": {
"enabled": true,
"trigger": "Slash"
}
},
"non_latest_version_warning": {
"enabled": true
},
"search": {
"default_filter": "project:sphinx-rtd-theme/stable",
"enabled": true,
"filters": [
[
"Include subprojects",
"subprojects:sphinx-rtd-theme/stable"
]
]
}
},
"api_version": "1",
"builds": {
"current": {
"commit": "7c9b1b5d391f6d7fae72274393eb25d1df96e546",
"created": "2023-11-28T04:14:06.510677Z",
"duration": 42,
"error": "",
"finished": "2023-11-28T04:14:48.510Z",
"id": 22677856,
"project": "sphinx-rtd-theme",
"state": {
"code": "finished",
"name": "Finished"
},
"success": true,
"urls": {
"build": "https://readthedocs.org/projects/sphinx-rtd-theme/builds/22677856/",
"project": "https://readthedocs.org/projects/sphinx-rtd-theme/",
"version": "https://readthedocs.org/projects/sphinx-rtd-theme/version/stable/edit/"
},
"version": "stable"
}
},
"domains": {
"dashboard": "readthedocs.org"
},
"projects": {
"current": {
"created": "2017-12-21T04:04:42.561793Z",
"default_branch": "master",
"default_version": "stable",
"external_builds_privacy_level": "public",
"homepage": null,
"id": 170010,
"language": {
"code": "en",
"name": "English"
},
"modified": "2021-03-16T17:13:52.465051Z",
"name": "sphinx_rtd_theme",
"privacy_level": "public",
"programming_language": {
"code": "words",
"name": "Only Words"
},
"repository": {
"type": "git",
"url": "https://github.com/readthedocs/sphinx_rtd_theme"
},
"single_version": false,
"slug": "sphinx-rtd-theme",
"subproject_of": null,
"tags": [],
"translation_of": null,
"urls": {
"builds": "https://readthedocs.org/projects/sphinx-rtd-theme/builds/",
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/stable/",
"downloads": "https://readthedocs.org/projects/sphinx-rtd-theme/downloads/",
"home": "https://readthedocs.org/projects/sphinx-rtd-theme/",
"versions": "https://readthedocs.org/projects/sphinx-rtd-theme/versions/"
},
"users": [
{
"username": "eric"
},
{
"username": "humitos"
},
{
"username": "agj"
}
],
"versioning_scheme": "multiple_versions_with_translations"
},
"translations": []
},
"readthedocs": {
"analytics": {
"code": null
}
},
"versions": {
"active": [
{
"active": true,
"aliases": [],
"built": true,
"downloads": {},
"hidden": false,
"id": 6692534,
"identifier": "b07560bf97dad3a4266f6145bd4b662ac708ab00",
"privacy_level": "public",
"ref": null,
"slug": "0.5.2",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/0.5.2/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/0.5.2/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/0.5.2/"
},
"verbose_name": "0.5.2"
},
{
"active": true,
"aliases": [],
"built": true,
"downloads": {},
"hidden": false,
"id": 7273098,
"identifier": "c9b1bde560d8ee31400e4e4f92f2e8d7a42265ce",
"privacy_level": "public",
"ref": null,
"slug": "1.0.0",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/1.0.0/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/1.0.0/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/1.0.0/"
},
"verbose_name": "1.0.0"
},
{
"active": true,
"aliases": [],
"built": true,
"downloads": {},
"hidden": false,
"id": 10496721,
"identifier": "f854c890e1445b99a43ac5f10463a5df83739a2e",
"privacy_level": "public",
"ref": null,
"slug": "1.1.1",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/1.1.1/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/1.1.1/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/1.1.1/"
},
"verbose_name": "1.1.1"
},
{
"active": true,
"aliases": [],
"built": true,
"downloads": {},
"hidden": false,
"id": 16340532,
"identifier": "9899ee4ee2f547f81e51297dc12317f018e62fdd",
"privacy_level": "public",
"ref": null,
"slug": "1.2.2",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/1.2.2/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/1.2.2/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/1.2.2/"
},
"verbose_name": "1.2.2"
},
{
"active": true,
"aliases": [],
"built": true,
"downloads": {},
"hidden": false,
"id": 17681643,
"identifier": "15ed4de08de55f7066ff4f2ac39883a397db30d3",
"privacy_level": "public",
"ref": null,
"slug": "1.3.0",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/1.3.0/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/1.3.0/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/1.3.0/"
},
"verbose_name": "1.3.0"
},
{
"active": true,
"aliases": [],
"built": true,
"downloads": {},
"hidden": false,
"id": 18862205,
"identifier": "7c9b1b5d391f6d7fae72274393eb25d1df96e546",
"privacy_level": "public",
"ref": null,
"slug": "2.0.0",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/2.0.0/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/2.0.0/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/2.0.0/"
},
"verbose_name": "2.0.0"
},
{
"active": true,
"aliases": [
{
"active": true,
"aliases": [],
"built": true,
"downloads": {},
"hidden": false,
"id": 18862205,
"identifier": "7c9b1b5d391f6d7fae72274393eb25d1df96e546",
"privacy_level": "public",
"ref": null,
"slug": "2.0.0",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/2.0.0/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/2.0.0/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/2.0.0/"
},
"verbose_name": "2.0.0"
}
],
"built": true,
"downloads": {},
"hidden": false,
"id": 3271725,
"identifier": "7c9b1b5d391f6d7fae72274393eb25d1df96e546",
"privacy_level": "public",
"ref": "2.0.0",
"slug": "stable",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/stable/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/stable/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/2.0.0/"
},
"verbose_name": "stable"
},
{
"active": true,
"aliases": [],
"built": true,
"downloads": {},
"hidden": false,
"id": 3271688,
"identifier": "master",
"privacy_level": "public",
"ref": null,
"slug": "latest",
"type": "branch",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/latest/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/latest/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/master/"
},
"verbose_name": "latest"
}
],
"current": {
"active": true,
"aliases": [
{
"active": true,
"aliases": [],
"built": true,
"downloads": {},
"hidden": false,
"id": 18862205,
"identifier": "7c9b1b5d391f6d7fae72274393eb25d1df96e546",
"privacy_level": "public",
"ref": null,
"slug": "2.0.0",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/2.0.0/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/2.0.0/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/2.0.0/"
},
"verbose_name": "2.0.0"
}
],
"built": true,
"downloads": {},
"hidden": false,
"id": 3271725,
"identifier": "7c9b1b5d391f6d7fae72274393eb25d1df96e546",
"privacy_level": "public",
"ref": "2.0.0",
"slug": "stable",
"type": "tag",
"urls": {
"dashboard": {
"edit": "https://readthedocs.org/projects/sphinx-rtd-theme/version/stable/edit/"
},
"documentation": "https://sphinx-rtd-theme.readthedocs.io/en/stable/",
"vcs": "https://github.com/readthedocs/sphinx_rtd_theme/tree/2.0.0/"
},
"verbose_name": "stable"
}
}
}
Loading