Skip to content

Commit

Permalink
docs: switch to sphinx_rtd_theme to match other docs
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Richards <[email protected]>
  • Loading branch information
joshtrichards committed Jun 28, 2024
1 parent f44eb5b commit 2ab298e
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 12 deletions.
4 changes: 2 additions & 2 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ html: html-com
html-all: html-release html-com

html-release:
$(SPHINXBUILD) -b html -D html_theme='nextcloud_release' $(ALLSPHINXOPTS) $(BUILDDIR)/html/release
$(SPHINXBUILD) -b html -D html_theme='sphinx_rtd_theme' $(ALLSPHINXOPTS) $(BUILDDIR)/html/release
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html/release."

html-com:
$(SPHINXBUILD) -b html -D html_theme='nextcloud_com' $(ALLSPHINXOPTS) $(BUILDDIR)/html/com
$(SPHINXBUILD) -b html -D html_theme='sphinx_rtd_theme' $(ALLSPHINXOPTS) $(BUILDDIR)/html/com
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html/com."

Expand Down
95 changes: 95 additions & 0 deletions doc/_shared_assets/static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/**
* FIX THE DESIGN OF THE RTD THEME
*/

/* NC blue */
.wy-side-nav-search {
background-color: #0082c9;
}

/* Reduce size of logo in top left */
.wy-side-nav-search > a img.logo {
max-width: 180px;
}

/* Remove unwanted background on top left logo on hover */
.wy-side-nav-search > a:hover {
background: none;
}

/* Remove unwanted data on the bottom left sidebar */
.rst-versions.shift-up .rst-other-versions > dl:not(:nth-child(1)),
.rst-versions.shift-up .rst-other-versions > a,
.rst-versions.shift-up .rst-other-versions > hr {
display:none
}
.rst-versions.shift-up .rst-other-versions {
color: transparent;
font-size: 0px;
}
.rst-versions.shift-up .rst-other-versions dt,.rst-versions.shift-up .rst-other-versions dl {
color: #808080;
font-size: 15px;
}

/* Remove readthedocs title in the sidebar bottom left section */
.rst-versions .rst-current-version .fa-book {
display: none;
}
.rst-versions .rst-current-version:before {
content: 'Nextcloud';
margin-right: auto;
}
.rst-versions .rst-current-version {
display: flex;
align-items: center;
color: #0082c9;
}
.rst-versions .rst-current-version .fa-caret-down {
margin-left: 5px;
}

/* Code blocks */
.highlight {
/* nc blue */
background: rgba(0, 130, 201, 0.1)
}

/* ICONS LIST */
div#list-of-available-icons > blockquote {
margin: 0;
}

div#list-of-available-icons > blockquote > div {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}

div#list-of-available-icons > blockquote > div > div {
width: 120px;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 30px;
}

div#list-of-available-icons > blockquote > div > div > a {
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
width: 60px;
height: 60px;
}

div#list-of-available-icons > blockquote > div > div > a.white-icon {
background-color: #343131;
}

div#list-of-available-icons > blockquote > div > div > p {
margin-top: 5px;
font-size: 90%;
font-style: normal;
text-align: center;
}
Binary file modified doc/_shared_assets/static/logo-blue.pdf
Binary file not shown.
Binary file modified doc/_shared_assets/static/logo-blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_shared_assets/static/logo-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions doc/advancedusage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Options
.. include:: options.rst

Mass Deployment And Account Creation
-------
------------------------------------
.. index:: mass deployment
.. include:: massdeploymentcommandline.rst

Expand All @@ -35,6 +35,6 @@ Low Disk Space
.. include:: lowdiskspace.rst

Wizard Account Setup Command-line Options
-------
-----------------------------------------
.. index:: wizard accountsetup command-line
.. include:: wizardaccountsetupcommandline.rst
27 changes: 21 additions & 6 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

import sys, os

#import sphinx_rtd_theme

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand All @@ -25,7 +27,7 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.todo']
extensions = ['sphinx_rtd_theme', 'sphinx_rtd_dark_mode', 'sphinx.ext.todo']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_shared_assets/templates']
Expand Down Expand Up @@ -71,7 +73,7 @@

# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
2

# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
Expand All @@ -92,15 +94,20 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
html_theme_options = {
'logo_only': True,
'style_external_links': True,
'display_version': False,
}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = ['_shared_assets/themes']
#html_theme_path = ['_shared_assets/themes']

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#html_theme = 'bootstrap'
html_theme = 'default'
#html_theme = 'default'
html_theme = 'sphinx-rtd-theme'
# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
#html_title = None
Expand All @@ -110,7 +117,7 @@

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
html_logo = "_shared_assets/static/logo-white.png"

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
Expand Down Expand Up @@ -290,3 +297,11 @@
todo_include_todos = True

rst_epilog = '.. |version| replace:: %s' % version

html_context = {
'current_version': version,
'READTHEDOCS': True,
'extra_css_files': ['_static/custom.css'],
}

default_dark_mode = False
4 changes: 4 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Pygments==2.18.0
Sphinx==7.2.6
sphinx-rtd-theme==2.0.0
sphinx-rtd-dark-mode==1.3.0
4 changes: 2 additions & 2 deletions doc/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ See https://github.com/owncloud/client/issues/5226 for more discussion of this
issue.

"Connection closed" message when syncing files
---------------------
----------------------------------------------

This message can be caused by using chunks that are too big or time-outs that
are set too liberally. You can configure the chunking behavior of the client in
Expand All @@ -79,7 +79,7 @@ the config file. For example, change these settings:
+----------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------+
| ``minChunkSize`` | ``1000000`` (1 MB) | Specifies the minimum chunk size of uploaded files in bytes. |
+----------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------+
| ``maxChunkSize`` | ``50000000`` (1000 MB) | Specifies the maximum chunk size of uploaded files in bytes. |
| ``maxChunkSize`` | ``50000000`` (1000 MB) | Specifies the maximum chunk size of uploaded files in bytes. |
+----------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------+
| ``targetChunkUploadDuration`` | ``6000`` (1 minute) | Target duration in milliseconds for chunk uploads. |
| | | The client adjusts the chunk size until each chunk upload takes approximately this long. |
Expand Down

0 comments on commit 2ab298e

Please sign in to comment.