Skip to content
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

Adopt the Xanadu Sphinx Theme #126

Merged
merged 9 commits into from
May 2, 2022
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
7 changes: 6 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@

### Documentation

* The centralized [Xanadu Sphinx Theme](https://github.com/XanaduAI/xanadu-sphinx-theme)
is now used to style the Sphinx documentation.
[(#126)](https://github.com/XanaduAI/MrMustard/pull/126)

### Contributors

This release contains contributions from (in alphabetical order):

[Filippo Miatto](https://github.com/ziofil)
[Mikhail Andrenkov](https://github.com/Mandrenkov), [Filippo Miatto](https://github.com/ziofil)


---

Expand Down
Binary file added doc/_static/mm_logo.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 removed doc/_static/mmlogo.png
Binary file not shown.
66 changes: 31 additions & 35 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# -- Project information -----------------------------------------------------

project = "Mr Mustard"
copyright = "Copyright 2021, Xanadu Quantum Technologies Inc."
copyright = "2022, Xanadu Quantum Technologies"
author = "Filippo Miatto"

# The version info for the project you're documenting, acts as replacement for
Expand Down Expand Up @@ -63,7 +63,7 @@
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates", "xanadu_theme"]
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -109,43 +109,17 @@
# to template names.
html_sidebars = {
"**": [
"logo-text.html",
"searchbox.html",
"globaltoc.html",
# 'sourcelink.html'
]
}

# Output file base name for HTML help builder.
htmlhelp_basename = "mrmustarddoc"

# -- Xanadu theme ---------------------------------------------------------
html_theme = "xanadu_theme"
html_theme_path = ["."]

# xanadu theme options (see theme.conf for more information)
html_theme_options = {
# Set the path to a special layout to include for the homepage
# "homepage": "special_index.html",
# Set the name of the project to appear in the left sidebar.
"project_nav_name": "Mr Mustard",
"touch_icon": "_static/logo_new.png",
# Set GA account ID to enable tracking
"google_analytics_account": "UA-116279123-2",
# colors
"navigation_button": "#b79226",
"navigation_button_hover": "#d7b348",
"toc_caption": "#b79226",
"toc_hover": "#b79226",
"table_header_bg": "#ffdce5",
"table_header_border": "#b79226",
"download_button": "#b79226",
}
htmlhelp_basename = "MrMustarddoc"

edit_on_github_project = "XanaduAI/MrMustard"
edit_on_github_branch = "master/doc"


# the order in which autodoc lists the documented members
autodoc_member_order = "bysource"

Expand All @@ -156,10 +130,32 @@
inheritance_node_attrs = dict(color="lightskyblue1", style="filled")


from custom_directives import CustomGalleryItemDirective, DetailsDirective

# -- Xanadu theme ---------------------------------------------------------
html_theme = "xanadu"

def setup(app):
app.add_directive("customgalleryitem", CustomGalleryItemDirective)
app.add_directive("details", DetailsDirective)
app.add_css_file("xanadu_gallery.css")
html_theme_options = {
"navbar_name": "Mr Mustard",
"navbar_logo_path": "_static/mm_logo.png",

"navbar_right_links": [
{
"name": "GitHub",
"href": "https://github.com/XanaduAI/MrMustard",
"icon": "fab fa-github",
}
],

"extra_copyrights": [
"TensorFlow, the TensorFlow logo, and any related marks are trademarks "
"of Google Inc."
],

"google_analytics_tracking_id": "UA-116279123-2",

"prev_next_button_colour": "#b79226",
"prev_next_button_hover_colour": "#d7b348",
"toc_marker_colour": "#b79226",
"table_header_background_colour": "#ffdce5",
"border_colour": "#b79226",
"text_accent_colour": "#b79226",
}
163 changes: 0 additions & 163 deletions doc/custom_directives.py

This file was deleted.

Loading