Skip to content

Use a new sphinx theme for the website #654

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

Merged
merged 4 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Contributing Guidelines
=======================
Contributing
============

You want to contribute to vimiv? Great! Every little help counts and is appreciated!

Expand Down
103 changes: 39 additions & 64 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -1,79 +1,54 @@
/* Underline headers with differently sized blue lines */
h1 {
border-bottom: solid 4px #1F7DE6;
}

h2 {
border-bottom: solid 2px #1F7DE6;
}
html[data-theme="light"] {
--pst-color-primary: #3F8DB4;
--pst-color-info: #3F8DB4;

h3, h4, h5, h6 {
border-bottom: solid 1px #1F7DE6;
}

/* Add a margin around images */
img {
margin: 8px;
}
--pst-color-secondary: #7AACBC;
--pst-color-link-hover: #7AACBC;

/* But not in the navbar on the top */
.navbar img {
margin: 0px;
margin-right: 4px;
}
--pst-color-warning: #c79537;
--pst-color-success: #4aa56f;
--pst-color-attention: #f44336;
--pst-color-danger: #f44336;

/* Change navbar color to blue */
.navbar {
background: #1861B3;
color: #FFFFFF;
border-bottom: solid 4px #1F7DE6;
}
--pst-color-background: rgb(244, 243, 245);
--pst-color-on-background: rgb(244, 243, 245);
--pst-color-surface: rgb(234, 233, 235);
--pst-color-on-surface: rgb(214, 213, 215);

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
background-color: #1F7DE6;
--pst-color-text-base: #1F1D21;
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
background-color: #1F7DE6;
}
html[data-theme="dark"] {
--pst-color-secondary: #9FE2F6;
--pst-color-link-hover: #9FE2F6;

.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
background-color: #1F7DE6;
}
--pst-color-primary: #89C3D4;
--pst-color-info: #89C3D4;

.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
background-color: #1F7DE6;
}
--pst-color-warning: #c79537;
--pst-color-success: #4aa56f;
--pst-color-attention: #f44336;
--pst-color-danger: #f44336;

@media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
background-color: #1F7DE6;
}
.navbar-default .navbar-nav .open .dropdown-menu > .active > a,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
background-color: #1F7DE6;
}
}
--pst-color-background: #1F1D21;
--pst-color-on-background: #2b292d;
--pst-color-surface: #2e2c30;
--pst-color-on-surface: #444246;

/* Change info box color from purple to dark blue */
.alert-info {
background-color: #1861B3;
color: #FFFFFF;
--pst-color-text-base: #F4F3F6;
--pst-color-text-muted: rgb(208, 204, 212)
}

.alert-info a {
color: #999999;
.bordered-image-light img {
border: 3px solid #3F8DB4;
margin: 4px;
margin-top: 0px;
margin-bottom: 16px;
}

.alert-info a:hover {
color: #BBBBBB;
text-decoration: underline;
.bordered-image-dark img {
border: 3px solid #7AACBC;
margin: 4px;
margin-top: 0px;
margin-bottom: 16px;
}
Binary file modified docs/_static/scrots/command_dark.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 modified docs/_static/scrots/command_light.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 modified docs/_static/scrots/image_dark.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 modified docs/_static/scrots/image_light.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 modified docs/_static/scrots/library_dark.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 modified docs/_static/scrots/library_light.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 docs/_static/scrots/manipulate_dark.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 docs/_static/scrots/manipulate_light.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 modified docs/_static/scrots/thumbnail_dark.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 modified docs/_static/scrots/thumbnail_light.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 docs/_static/vimiv/vimiv_banner_darkmode_800.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file removed docs/_templates/globaltoc.html
Empty file.
53 changes: 0 additions & 53 deletions docs/_templates/layout.html

This file was deleted.

5 changes: 0 additions & 5 deletions docs/_templates/navbar.html

This file was deleted.

81 changes: 21 additions & 60 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import os
import sys

import sphinx_bootstrap_theme
from sphinx.ext import autodoc

sys.path.insert(0, os.path.abspath(".."))
Expand All @@ -39,7 +38,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.autodoc", "sphinx.ext.napoleon"]
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinxcontrib.images"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down Expand Up @@ -91,9 +90,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "bootstrap"
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
html_sidebars = {}
html_theme = "pydata_sphinx_theme"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand All @@ -106,19 +103,26 @@
#
html_logo = "_static/vimiv/vimiv.svg"
html_theme_options = {
"bootswatch_theme": "cosmo",
"navbar_title": "vimiv",
"navbar_pagenav": True,
"navbar_sidebarrel": False,
"navbar_links": [
("Docs", "documentation/index"),
("Install", "documentation/install"),
("Screenshots", "screenshots"),
("Changelog", "changelog"),
("Contributing", "documentation/contributing"),
("GitHub", "https://github.com/karlch/vimiv-qt", True),
"logo": {
"text": "vimiv",
},
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/karlch/vimiv-qt",
"icon": "fa-brands fa-square-github",
},
{
"name": "PyPI",
"url": "https://pypi.org/project/vimiv",
"icon": "fa-solid fa-box",
},
],
"source_link_position": "footer",
"navbar_start": ["navbar-logo"],
}

html_sidebars = {
"**": [],
}

# -- Options for HTMLHelp output ------------------------------------------
Expand All @@ -127,31 +131,6 @@
htmlhelp_basename = "vimivdoc"


# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "vimiv.tex", "vimiv Documentation", "Christian Karl", "manual")
]


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
Expand All @@ -167,24 +146,6 @@
]


# -- Options for Texinfo output -------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
master_doc,
"vimiv",
"vimiv Documentation",
author,
"vimiv",
"One line description of project.",
"Miscellaneous",
)
]


def setup(app):
app.add_css_file("custom.css")
ignore_separator = "^" + 88 * "-" + "$"
Expand Down
4 changes: 2 additions & 2 deletions docs/documentation/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Documentation
=============
Docs
====

The following documents are available:

Expand Down
Loading