Update docs theme (#1395)

This commit is contained in:
Veronica Berglyd Olsen
2023-03-10 16:44:53 +01:00
committed by GitHub
6 changed files with 51 additions and 37 deletions
+13 -2
View File
@@ -1,3 +1,14 @@
body article section { span.guilabel {
margin-top: 1.8em; font-weight: 400;
}
.nw-sidebar-title {
height: unset;
max-height: unset;
flex-direction: column;
justify-content: center;
gap: .25rem;
font-size: 1.25rem;
font-weight: normal;
text-align: center;
} }
@@ -0,0 +1,3 @@
{% if docstitle %}
<p class="nw-sidebar-title">{{ docstitle }}</p>
{% endif %}
+22 -25
View File
@@ -1,7 +1,7 @@
# """
# Configuration file for the Sphinx documentation builder. Configuration file for the Sphinx documentation builder.
# Documentation: http://www.sphinx-doc.org/en/master/config Documentation: http://www.sphinx-doc.org/en/master/config
# """
# -- Imports ----------------------------------------------------------------- # -- Imports -----------------------------------------------------------------
@@ -12,7 +12,7 @@ import datetime
# -- Project Information ----------------------------------------------------- # -- Project Information -----------------------------------------------------
project = "novelWriter" project = "novelWriter"
copyright = f"{datetime.date.today().year}, Veronica Berglyd Olsen" copyright = f"{datetime.date.today().year}"
author = "Veronica Berglyd Olsen" author = "Veronica Berglyd Olsen"
initFile = os.path.join( initFile = os.path.join(
@@ -34,7 +34,7 @@ version = release.split("-")[0]
os.environ["TZ"] = "Europe/Oslo" os.environ["TZ"] = "Europe/Oslo"
time.tzset() time.tzset()
needs_sphinx = "4.0" needs_sphinx = "5.0"
extensions = [] extensions = []
templates_path = ["_templates"] templates_path = ["_templates"]
source_suffix = ".rst" source_suffix = ".rst"
@@ -45,23 +45,27 @@ exclude_patterns = []
# -- Options for HTML Output ------------------------------------------------- # -- Options for HTML Output -------------------------------------------------
html_theme = "furo" html_theme = "sphinx_book_theme"
html_title = f"Version {release}"
html_static_path = ["_static"] html_static_path = ["_static"]
html_css_files = ["custom.css"] html_css_files = ["custom.css"]
html_theme_options = { html_theme_options = {
"light_logo": "novelwriter-light.png", "logo": {
"dark_logo": "novelwriter-dark.png", "image_light": "_static/novelwriter-light.png",
"image_dark": "_static/novelwriter-dark.png",
},
"show_toc_level": 2,
"show_navbar_depth": 1,
"repository_url": "https://github.com/vkbo/novelwriter",
"navigation_with_keys": True, "navigation_with_keys": True,
"dark_css_variables": { "use_repository_button": True,
"admonition-font-size": "92%", "use_issues_button": True,
}, "pygment_light_style": "tango",
"light_css_variables": { "pygment_dark_style": "dracula",
"admonition-font-size": "92%", }
}, html_sidebars = {
"**": ["navbar-logo", "sidebar-title", "sbt-sidebar-nav"],
} }
html_title = f"<div style='text-align: center'>Documentation Version {release}</div>"
pygments_style = "tango"
pygments_dark_style = "native"
# -- Options for HTMLHelp Output --------------------------------------------- # -- Options for HTMLHelp Output ---------------------------------------------
@@ -111,12 +115,5 @@ texinfo_documents = [(
# Bibliographic Dublin Core info. # Bibliographic Dublin Core info.
epub_title = project epub_title = project
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
# epub_identifier = ""
# A unique identification for the text.
# epub_uid = ""
# A list of files that should not be packed into the epub file. # A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"] epub_exclude_files = ["search.html"]
+4 -2
View File
@@ -3,8 +3,9 @@ Documentation for novelWriter
############################# #############################
.. image:: images/novelwriter_logo.png .. image:: images/novelwriter_logo.png
:class: dark-light
:align: right :align: right
:width: 48 :width: 64
| **For Release:** |release| | **For Release:** |release|
| **Last Updated:** |today| | **Last Updated:** |today|
@@ -17,6 +18,7 @@ editor that allows for easy organisation of text and notes, using human readable
storage for robustness. storage for robustness.
.. figure:: images/screenshot_multi.png .. figure:: images/screenshot_multi.png
:class: dark-light
:align: center :align: center
:width: 500 :width: 500
@@ -31,7 +33,7 @@ as well. novelWriter can also be run directly from the Python source, or install
the pip tool. See :ref:`a_started` for more details. the pip tool. See :ref:`a_started` for more details.
.. note:: .. note::
Version 1.5 introduced a few changes that will require you to make some minor modifications to Release 1.5 introduced a few changes that will require you to make some minor modifications to
some of the headings in your project. It should be fairly quick and straightforward. Please see some of the headings in your project. It should be fairly quick and straightforward. Please see
the :ref:`a_prjfmt_1_3` section for more details. the :ref:`a_prjfmt_1_3` section for more details.
+6 -6
View File
@@ -68,12 +68,12 @@ Below are some key features of novelWriter.
Screenshots Screenshots
=========== ===========
**novelWriter with default theme:** .. figure:: images/screenshot_default.png
:class: dark-light
.. image:: images/screenshot_default.png novelWriter with default theme
:width: 800
**novelWriter with dark theme:** .. figure:: images/screenshot_dark.png
:class: dark-light
.. image:: images/screenshot_dark.png novelWriter with dark theme
:width: 800
+3 -2
View File
@@ -1,4 +1,5 @@
furo sphinx-book-theme
sphinx>=4.0 sphinx>=5.0
sphinx-favicon
pygments>=2.7 pygments>=2.7
docutils>=0.17.1 docutils>=0.17.1