Coder Social home page Coder Social logo

mrdogebro / sphinx_rtd_dark_mode Goto Github PK

View Code? Open in Web Editor NEW
46.0 2.0 15.0 118 KB

Adds a toggleable dark mode to the Read the Docs theme for Sphinx.

Home Page: sphinx-rtd-dark-mode.vercel.app

License: MIT License

Python 21.04% CSS 72.07% JavaScript 6.90%
sphinx sphinx-extension sphinx-doc sphinx-plugin python3 docs documentation

sphinx_rtd_dark_mode's People

Contributors

jakobdev avatar jdillard avatar mrdogebro avatar mrelbe1 avatar njzjz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sphinx_rtd_dark_mode's Issues

Add Option to Use Full Content Width

Hey,

I was waiting for this forever and I hope that you will maintain this!

Anyways,

.wy-nav-content {
    max-width: none;
}

is always required as custom css to use the full width of the screen. What do you think about making this a default?

Role :guilabel: not properly styled

First I would like to thank you for this great dark theme - I like it a lot.

The role :guilabel: is not propely styled. The background color is too bright. This is how it looks like:

grafik

Emphasized lines are not styled

Emphasized lines in line listings are not styled:

Example:

.. code-block:: batch  
   :linenos:  
   :emphasize-lines: 3  
  
   @echo off  
  
   set WORKSPACES=C:\path\to\workspace  
  
   for /d %%s in (%WORKSPACES%\*) do (  
       rem Do something  
       )

Renders like this:
Snag_1297e82

It's really hard to read the highlighted lines.

PR with a proposal is on its way.

Setup Automated Testing

Setup Travis CI to automatically run tests on new changes and on PRs. For now the only test will just be a test build but more might be added in the future. Also setup a way for PR's to be built (and hosted) while the PR is open so that everyone can see how the changes look without having to clone it and build it for yourself.

4th nested level for navigation bar white by default

Hi,

the fourth level of the navigation bar seem to be white by default and only get black on hover.
issue_dark_sphinx

I would be very happy if it weren't white by default since this is unreadable.

Thank you very much.
Cheers

RTD Font Changes

Description

The text in the bottom left hand corner that says Read the Docs gets the font changed when using the extension. There is two screenshots below showing the differences. This is potentially due to importing Font Awesome for use of icons. Will work on trying to figure this out.

Screenshots

Normal Font

Cap 05-13-21 20 46 17

Changed Font

Cap 05-13-21 20 43 09

Add Theme Customization

Add a set of parameters in the config that would allow the user to customize different colors within the theme. This would make tweaking the themes to your liking much easier and faster.

Extraneous Tests Folder

The library is creating a top-level folder called tests in site-packages:

__pycache__/
_distutils_hack/
alabaster/
alabaster-0.7.12.dist-info/
babel/
Babel-2.9.1.dist-info/
certifi/
certifi-2021.5.30.dist-info/
charset_normalizer/
charset_normalizer-2.0.4.dist-info/
distutils-precedence.pth
docutils/
docutils-0.16.dist-info/
idna/
idna-3.2.dist-info/
imagesize-1.2.0.dist-info/
imagesize.py
jinja2/
Jinja2-3.0.1.dist-info/
markupsafe/
MarkupSafe-2.0.1.dist-info/
packaging/
packaging-21.0.dist-info/
pip/
pip-21.1.3.dist-info/
pkg_resources/
pygments/
Pygments-2.9.0.dist-info/
pyparsing-2.4.7.dist-info/
pyparsing.py
pytz/
pytz-2021.1.dist-info/
requests/
requests-2.26.0.dist-info/
setuptools/
setuptools-57.0.0.dist-info/
snowballstemmer/
snowballstemmer-2.1.0.dist-info/
sphinx/
Sphinx-4.1.2.dist-info/
sphinx_rtd_dark_mode/
sphinx_rtd_dark_mode-1.2.3.dist-info/
sphinx_rtd_theme/
sphinx_rtd_theme-0.5.2.dist-info/
sphinxcontrib/
sphinxcontrib_applehelp-1.0.2-py3.8-nspkg.pth
sphinxcontrib_applehelp-1.0.2.dist-info/
sphinxcontrib_devhelp-1.0.2-py3.8-nspkg.pth
sphinxcontrib_devhelp-1.0.2.dist-info/
sphinxcontrib_htmlhelp-2.0.0-py3.9-nspkg.pth
sphinxcontrib_htmlhelp-2.0.0.dist-info/
sphinxcontrib_jsmath-1.0.1-py3.7-nspkg.pth
sphinxcontrib_jsmath-1.0.1.dist-info/
sphinxcontrib_qthelp-1.0.3-py3.8-nspkg.pth
sphinxcontrib_qthelp-1.0.3.dist-info/
sphinxcontrib_serializinghtml-1.1.5-py3.9-nspkg.pth
sphinxcontrib_serializinghtml-1.1.5.dist-info/
tests/
urllib3/
urllib3-1.26.6.dist-info/

The reason this is a problem is that this tests package being installed in my venv clobbers the local tests dir within my app, preventing the app from importing from within that directory structure (i.e. import tests.test_utils now give me a ModuleNotFoundError because the import system is looking within $VIRTUAL_ENV/lib/python3.9/site-packages/tests/ rather than (repo root)/tests and not finding my test_utils module).

Add a Lighter Dark Theme

This would add a lighter dark theme as some people think that the current theme is to dark (understandably). This would most likely move the current theme to being a high-contrast theme and add a normal dark theme which is a bit lighter.

Highlight sublevels better

Hey,

a request.
Currently:
image

sublevels (here usage and flags) are not really distinguishable from the header of the section based on colors. The light theme uses a dark grey for the sublevels. Maybe this theme could use dark greys for the sub levels?

Color Function Name and Parameters Differently

Hi,

I'll try to be more precise now :)
The dark theme colors the function names & the parameters with the same color.
image

I would prefer to have the function name maybe white and the parameters in blue or they other way around.
Example:
image
Much more readable in my opinion.

Again, if you prefer options here instead of implementing this for everyone I would be more than fine with this.
Just thought that I would provide some more feedback.

Disable animation/transition?

Hi, nice job with the package!

Is it possible to disable the animation/transition when changing theme? It is not very smooth on my PC. I would prefer an immediate transition.

/ Erik

Black text on sphinx-rtd-theme with Breathe C++ autodoc

Overall this is a great theme and I love the animation when switching light/dark themes.
Just a small issue with the api autodoc which causes class names to be black.

The specific CSS selector in the upstream sphinx-rtd-theme which causes this is:

html.writer-html4 .rst-content dl:not(.docutils) .descclassname,html.writer-html4 .rst-content dl:not(.docutils) .descname,html.writer-html4 .rst-content dl:not(.docutils) .sig-name,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descclassname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .descname,html.writer-html5 .rst-content dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.citation):not(.glossary):not(.simple) .sig-name{font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,Courier,monospace;color:#000}

Enhance dark theme and increase contrast for few stlyes

@MrDogeBro
Came across this repo yesterday and this exactly what I was looking for.
Great work and thanks for making it ๐ŸŽ‰

Could you please look into the below issue and fix it. I want to push my docs to production soon but blocked with this issue and the dark theme at few places isn't looking great.

Ex:
In the below snap the contrast of Danger isn't good, also the dark theme seems to be too dark.
image

It would be great if you could have a dark theme similar to mkdocs

Custom Theming

This would add the ability to add custom themes. These themes would be themes that user can create. They would be based off of one of the existing themes. This would make sure that if a theme were to be missing any part of it, it would just revert that part back to the default for the base theme.

As a part of custom themes, there would also be support for community themes. There would be a system put into place that would allow people to create custom themes and publish them. These themes could then be used by other people via the extension, which would make it easy to do for both sides. This would allow users of the extension to include themes that were built by others in their docs.

Coloring of tables is broken

Hi,

I have a rst table that I created with:

    +------------+------------+------------------------------+
    | Organism   | Tissue     | Marker File                  |
    +============+============+==============================+
    | Mouse      | Lung       | lung_particle_markers.txt    |
    +------------+------------+------------------------------+
    | Human      | NA         |                              |
    +------------+------------+------------------------------+

It gets rendered as
image

which is unreadable. There also shouldn't be any white.

Link to docs: https://sc-toolbox.readthedocs.io/en/latest/usage.html#sc_toolbox.api.calc.automated_marker_annotation if it helps.

Thank you very much!

Add Dark Mode to Mobile

Add dark mode to some of the UI components which only appear on the mobile version of the website.

Add Proper Docs

Add proper docs on RTD that document everything from setting it up to creating your own themes for the community. This would be an all in one place for people to get all the info they need to use the project. It could also have a way of showcasing what things can be done with it as well as possibly showcasing some community themes.

Admonition not properly styled

The dark theme is really great - many thanks!

However, I have found a problem with general admonitions:

.. admonition:: Title

   This is not a note or warning, just a general admonition with
   some ``monospaced text``. `Link color <#>`_ is fine.

This is rendered as:

Snag_b79408

I intend to make a PR as a proposal to fix this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.