René's URL Explorer Experiment


Title: Dark theme by septatrix · Pull Request #44 · python/python-docs-theme · GitHub

Open Graph Title: Dark theme by septatrix · Pull Request #44 · python/python-docs-theme

X Title: Dark theme by septatrix · Pull Request #44 · python/python-docs-theme

Description: Closes #43. Closes #101. Update: I now consider this ready I have made a crude dark them as requested in #43, however there are still many unfinished areas. So far I've always tested based on the datetime.rst file from the official docs as an example, though this does not use all styles which need to be changed. TODO General areas Implement basic dark theme functionality Implement proper dark mode syntax highlighting (merged for Sphinx 3.0) Check complete docs for missing styles (e.g. find where .refcount and .stableabi are used) Add functionality to toggle theme (persistence would require JS or server side code) Maybe add small disclaimer on first visit to show how to change to dark theme (decided not to as it is just another annoying banner like cookies on other websites) Add dark mode compatible variants of images (e.g. pathlib images - maybe open issue in cpython repo) or alternatively add a white background for now (out of scope and has to be done in the python repo) Components / Classes Check contrast ratios Fix styles for highlights after a search (kinda, feedback welcome; too bright makes text unreadable, too dark makes highlights hard to spot; went for a halfway point but maybe an outline is better) Scrollbars (#44 (comment)) Sidebar collapse panel Notes Design decisions I choose the current main background color based on the header on python.org and went for a different one (#121212 from material design guidelines) for the background color around the edges as I thought this added a bit more depth to it. On second thought however it may be better to go with the single color approach as it is in the official docs. If we then were to the use the darker one this would also improve contrast and leave more space for fine tuning e.g. the anchor/link color. Most other colors are just from experimenting with the color wheel and by what felt right. The background for syntax however still needs to change but for that topic also see below. Syntax highlighting As neither Sphinx nor Pygments support switching themes based on a media query right now this would need to be a bit hacky. I might create an issue there and ask if they would be fine with pull request implementing such functionality (in whatever way though I already have an idea). Otherwise we would need to include another stylesheet after pygments.css overwriting the normal one. Theme toggling As not everybody likes to always have a dark theme it may be a good idea to implement theme switching functionality. This could be achieved using either CSS and some label/input magic or plain ole JS (or server side). CSS would be very accessible but not persistent. Therefore I think we should use the CSS way but save the state in a cookie (like we already do for whether the sidebar is expanded or not). Try it out Live version Updated somewhat regularly: https://septatrix.github.io/cpython-dark-docs/ Screenshot (outdated) Full size screenshot - rather large

Open Graph Description: Closes #43. Closes #101. Update: I now consider this ready I have made a crude dark them as requested in #43, however there are still many unfinished areas. So far I've always tested based on t...

X Description: Closes #43. Closes #101. Update: I now consider this ready I have made a crude dark them as requested in #43, however there are still many unfinished areas. So far I've always tested based ...

Opengraph URL: https://github.com/python/python-docs-theme/pull/44

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:4003ea28-976e-f4bf-5cca-cd52262d63bc
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9A76:3B507F:7AB0ED:AA965F:696A7E99
html-safe-nonce428020d7cb5138116e7057649d5655dc811f21a7073000151a7eb4243e186d1b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTc2OjNCNTA3Rjo3QUIwRUQ6QUE5NjVGOjY5NkE3RTk5IiwidmlzaXRvcl9pZCI6IjEyNTgwMjI5MjUyMjYzNzY4NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac91d5e6ce4ee1ddc28d356a1f69ecedadc21f9b45cc772ef8d72a2c52b9120d5d
hovercard-subject-tagpull_request:371637609
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/python-docs-theme/pull/44/files
twitter:imagehttps://avatars.githubusercontent.com/u/24257556?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/24257556?s=400&v=4
og:image:altCloses #43. Closes #101. Update: I now consider this ready I have made a crude dark them as requested in #43, however there are still many unfinished areas. So far I've always tested based on t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5b774e44f85c14a75886edd04ddda4e5a25ddebbb241bcbb590b08a3048730e8
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/python-docs-theme git https://github.com/python/python-docs-theme.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id93341818
octolytics-dimension-repository_nwopython/python-docs-theme
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id93341818
octolytics-dimension-repository_network_root_nwopython/python-docs-theme
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecc5f4eee261b3601c1e98e217ceaf28508b9567e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/python-docs-theme/pull/44/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fpython-docs-theme%2Fpull%2F44%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fpython-docs-theme%2Fpull%2F44%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fpython-docs-theme
Reloadhttps://github.com/python/python-docs-theme/pull/44/files
Reloadhttps://github.com/python/python-docs-theme/pull/44/files
Reloadhttps://github.com/python/python-docs-theme/pull/44/files
python https://github.com/python
python-docs-themehttps://github.com/python/python-docs-theme
Please reload this pagehttps://github.com/python/python-docs-theme/pull/44/files
Notifications https://github.com/login?return_to=%2Fpython%2Fpython-docs-theme
Fork 74 https://github.com/login?return_to=%2Fpython%2Fpython-docs-theme
Star 84 https://github.com/login?return_to=%2Fpython%2Fpython-docs-theme
Code https://github.com/python/python-docs-theme
Issues 12 https://github.com/python/python-docs-theme/issues
Pull requests 4 https://github.com/python/python-docs-theme/pulls
Actions https://github.com/python/python-docs-theme/actions
Projects 0 https://github.com/python/python-docs-theme/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/python-docs-theme/security
Please reload this pagehttps://github.com/python/python-docs-theme/pull/44/files
Insights https://github.com/python/python-docs-theme/pulse
Code https://github.com/python/python-docs-theme
Issues https://github.com/python/python-docs-theme/issues
Pull requests https://github.com/python/python-docs-theme/pulls
Actions https://github.com/python/python-docs-theme/actions
Projects https://github.com/python/python-docs-theme/projects
Security https://github.com/python/python-docs-theme/security
Insights https://github.com/python/python-docs-theme/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fpython-docs-theme%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fpython-docs-theme%2Fissues%2Fnew%2Fchoose
hugovkhttps://github.com/hugovk
python:mainhttps://github.com/python/python-docs-theme/tree/main
septatrix:dark-themehttps://github.com/septatrix/python-docs-theme/tree/dark-theme
Conversation 92 https://github.com/python/python-docs-theme/pull/44
Commits 9 https://github.com/python/python-docs-theme/pull/44/commits
Checks 0 https://github.com/python/python-docs-theme/pull/44/checks
Files changed https://github.com/python/python-docs-theme/pull/44/files
Please reload this pagehttps://github.com/python/python-docs-theme/pull/44/files
Dark theme https://github.com/python/python-docs-theme/pull/44/files#top
Show all changes 9 commits https://github.com/python/python-docs-theme/pull/44/files
b888ef7 Add preliminary dark theme implementation septatrix May 10, 2021 https://github.com/python/python-docs-theme/pull/44/commits/b888ef79dc967ab7afa56efd7dd87820fecbc00c
647a1a3 Show me the logs. JulienPalard May 10, 2021 https://github.com/python/python-docs-theme/pull/44/commits/647a1a3b694e59d664f08a25481b398353478e3c
31e888d Fix dark theme issues septatrix Nov 18, 2022 https://github.com/python/python-docs-theme/pull/44/commits/31e888d6065c70fff4bd62e06640bc22000fe28b
dd57722 Adjust to responsive changes septatrix May 10, 2021 https://github.com/python/python-docs-theme/pull/44/commits/dd5772236307153b1361b0e825f329cebe8df65d
3bf3806 Fix more bugs with the new mobile view septatrix Nov 18, 2022 https://github.com/python/python-docs-theme/pull/44/commits/3bf3806b1f829b29ed5664b6772c1e9d163f270c
9b75889 Update dark theme to work with mobile style septatrix Nov 18, 2022 https://github.com/python/python-docs-theme/pull/44/commits/9b7588938cfe85d58d422535c18ba2e4061940c5
df6eb42 Merge branch 'main' into dark-theme septatrix Jan 24, 2023 https://github.com/python/python-docs-theme/pull/44/commits/df6eb42a3efc48c5018da962197174cbaaec1392
eb5e3cb Fix search bar width and remove legacy fields septatrix Feb 24, 2023 https://github.com/python/python-docs-theme/pull/44/commits/eb5e3cb052c71e3344068f28c7ea1c5bc66101d1
84f34ae Merge branch 'master' into dark-theme septatrix Feb 24, 2023 https://github.com/python/python-docs-theme/pull/44/commits/84f34ae4c75102fcae4197255bdcf13c1a1a9ac3
Clear filters https://github.com/python/python-docs-theme/pull/44/files
Please reload this pagehttps://github.com/python/python-docs-theme/pull/44/files
Please reload this pagehttps://github.com/python/python-docs-theme/pull/44/files
layout.html https://github.com/python/python-docs-theme/pull/44/files#diff-b8720eb873be0650783a2222f27f97b9cca517270be4abac33ede8dbaadcaa63
caret-down.svg https://github.com/python/python-docs-theme/pull/44/files#diff-041c72e24227b88c3933dea5803552faa64f1d572db5b2fa92b5864508d73426
pydoctheme.css https://github.com/python/python-docs-theme/pull/44/files#diff-e2d78a098e64c4a8bc2e910a8e6daa72e5fa12df8c0f316c746f922fab9ab759
pydoctheme_dark.css https://github.com/python/python-docs-theme/pull/44/files#diff-c78c07524572d72fa4bc18f93c0243dc281b4a5dfe81832859cf2c1b1fd78139
themetoggle.js https://github.com/python/python-docs-theme/pull/44/files#diff-4ddda4de6ed9121d0a919fad357de789c6ef7e8b51402916659b96f3c2d494de
theme.conf https://github.com/python/python-docs-theme/pull/44/files#diff-cc29778c1deb8c27abeec3136d000ac58acc02504403e4bc5c18cf99eb84b799
python_docs_theme/layout.htmlhttps://github.com/python/python-docs-theme/pull/44/files#diff-b8720eb873be0650783a2222f27f97b9cca517270be4abac33ede8dbaadcaa63
View file https://github.com/septatrix/python-docs-theme/blob/84f34ae4c75102fcae4197255bdcf13c1a1a9ac3/python_docs_theme/layout.html
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/python-docs-theme/pull/44/{{ revealButtonHref }}
https://github.com/python/python-docs-theme/pull/44/files#diff-b8720eb873be0650783a2222f27f97b9cca517270be4abac33ede8dbaadcaa63
https://github.com/python/python-docs-theme/pull/44/files#diff-b8720eb873be0650783a2222f27f97b9cca517270be4abac33ede8dbaadcaa63
https://github.com/python/python-docs-theme/pull/44/files#diff-b8720eb873be0650783a2222f27f97b9cca517270be4abac33ede8dbaadcaa63
Please reload this pagehttps://github.com/python/python-docs-theme/pull/44/files
https://github.com/python/python-docs-theme/pull/44/files#diff-b8720eb873be0650783a2222f27f97b9cca517270be4abac33ede8dbaadcaa63
python_docs_theme/static/caret-down.svghttps://github.com/python/python-docs-theme/pull/44/files#diff-041c72e24227b88c3933dea5803552faa64f1d572db5b2fa92b5864508d73426
View file https://github.com/python/python-docs-theme/blob/b84c9134c18a400ffc8fb53a2c16a3e9dd0a2569/python_docs_theme/static/caret-down.svg
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/python/python-docs-theme/pull/44/files
Please reload this pagehttps://github.com/python/python-docs-theme/pull/44/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.