Skip to content

Commit

Permalink
Merge pull request #11 from MolSSI/docs
Browse files Browse the repository at this point in the history
Migrating to MolSSI Docs Theme
  • Loading branch information
SinaMostafanejad authored Feb 25, 2023
2 parents 1704ee0 + 67a3a0d commit 4f93fcd
Show file tree
Hide file tree
Showing 11 changed files with 195 additions and 63 deletions.
87 changes: 64 additions & 23 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,73 @@
/* Make the page wider so e.g. the status table can be seen fully */
.wy-nav-content {
max-width: 1200px !important;
@import "../basic.css";

html[data-theme="light"] {
--pst-color-primary: #ed1c24;
--pst-color-warning: #ed1c24;
--pst-color-primary-highlight: #bc151b;
--pst-color-secondary: #1d35e7;
--pst-color-secondary-highlight: #3e51e3;

}
.column_left {
display: table-cell;
width: 60px;
vertical-align: middle;

html[data-theme="dark"] {
--pst-color-primary: #ed1c24;
--pst-color-warning: #ed1c24;
--pst-color-primary-highlight: #bc151b;
--pst-color-background: #1A1A1A;
--pst-color-secondary: #1d35e7;
--pst-color-secondary-highlight: #3e51e3;


}
.column {
display: table-cell;

html[data-theme="light"] a:hover {
color: #1A1A1A;
}
.column_right {
display: table-cell;
width: 60px;
vertical-align: middle;

html[data-theme="dark"] h1, html[data-theme="dark"] h2, html[data-theme="dark"] h3, html[data-theme="dark"] h4, html[data-theme="dark"] h5, html[data-theme="dark"] h6 {
color: #ffffff;
}

/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;

html[data-theme="dark"] a {
color: #ffffff;
}

html[data-theme="dark"] .reference.external {
text-decoration: underline;

}

html[data-theme="dark"] p .reference.internal {
text-decoration: underline;

}

/* Numbering equations */
.math {
text-align: left;
html[data-theme="dark"] a:hover {
color: #ed1c24;
}
.eqno {
float: right;

html[data-theme="dark"] .prev-next-area a p.prev-next-title {
color: white;
}

html[data-theme="dark"] .prev-next-area:hover a:hover p.prev-next-title:hover {
color: #ed1c24;
}

html[data-theme="dark"] dt:target {
background-color: #000000;
}

html .toctree-wrapper li[class^=toctree-l] {
list-style: circle;
}

img:not(.logo__image, .footer_logo) {
padding: 20px;
}


.footer_logo {
max-height: 60px;
}
Binary file added docs/_static/molssi_main_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 added docs/_static/molssi_main_logo_inverted_white.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/nsf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 0 additions & 22 deletions docs/_templates/footer.html

This file was deleted.

2 changes: 1 addition & 1 deletion docs/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- extends "sphinx_rtd_theme/layout.html" %}
{%- extends "pydata_sphinx_theme/layout.html" %}


{%- block content %}
Expand Down
44 changes: 44 additions & 0 deletions docs/_templates/molssi_footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{% if not theme_logo.get("link") %}
{% set href = pathto(root_doc) %}
{% elif hasdoc(theme_logo.get("link")) %}
{% set href = pathto(theme_logo.get("link")) %} {# internal page #}
{% else %}
{% set href = theme_logo.get("link") %} {# external url #}
{% endif %}

{# get all the brand information from html_theme_option #}
{% set is_logo = logo or theme_logo.get("image_light") or theme_logo.get("image_dark") %}
{% set image_light = theme_logo.get("molssi_light") or logo %}
{% set image_dark = theme_logo.get("molssi_dark") or logo %}
{% set image_light = image_light if image_light.startswith("http") else pathto('_static/' + image_light, 1) %}
{% set image_dark = image_dark if image_dark.startswith("http") else pathto('_static/' + image_dark, 1) %}
{% set alt = theme_logo.get("alt_text", "Logo image") %}
{% set nsf_logo = pathto('_static/' + 'nsf.png', 1) %}


<div class="row h-10">
<div class="col-2">
<a href="https://molssi.org/" target="_blank" title="Go to MolSSI in a new tab">
<img src="{{ image_light }}" class="logo__image only-light footer_logo" alt="{{ alt }}">
<img src="{{ image_dark }}" class="logo__image only-dark footer_logo" alt="{{ alt }}">
</a>
</div>
<div class="col-8">
<p> &copy; Copyright 2019-2023 <a href="https://molssi.org/">The Molecular Sciences Software Institute</a></p>
<p>Funded by the National Science Foundation
<a href="https://nsf.gov/awardsearch/showAward?AWD_ID=1547580">OAC-1547580</a> and
<a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2136142">CHE-2136142.</a></p>

{% if show_sphinx %}
<p class="sphinx-version">
{% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}<br>
</p>
{% endif %}

</div>
<div class="col-2">
<a href="https://nsf.gov/" target="_blank" title="Go to the NSF in a new tab">
<img src="{{ nsf_logo }}" class="footer_logo" alt="The NSF">
</a>
</div>
</div>
45 changes: 33 additions & 12 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
'sphinx.ext.napoleon',
'sphinx.ext.intersphinx',
'sphinx.ext.extlinks',
'sphinx_design',
'sphinx_copybutton'
]

autosummary_generate = True
Expand Down Expand Up @@ -91,25 +93,44 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'sphinx_rtd_theme'
html_theme = 'renku'
html_theme = 'pydata_sphinx_theme'

# 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,
# 'display_version': True,
# 'prev_next_buttons_location': 'bottom',
# 'style_external_links': False,
# # Toc options
# 'collapse_navigation': True,
# 'sticky_navigation': True,
# 'navigation_depth': 4,
# 'includehidden': True,
# 'titles_only': False
# }
html_theme_options = {
'logo_only': True,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False
"github_url": "https://github.com/MolSSI/zenopy",
"twitter_url": "https://twitter.com/MolSSI_NSF",

"logo": {
"image_light": "molssi-zenopy_white_bg.png",
"image_dark": "molssi-zenopy_white_bg.png",
"text": "",
"molssi_light": "molssi_main_logo.png",
"molssi_dark": "molssi_main_logo_inverted_white.png",
},
"show_toc_level": 2,
"header_links_before_dropdown": 4,
"external_links": [
{"name": "MolSSI", "url": "https://molssi.org"}
],

"secondary_sidebar_items": ["page-toc", "sourcelink"],
"footer_items": [ "molssi_footer" ],
}

# Path to project's logo
Expand Down
49 changes: 47 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,56 @@ of the `Zenodo <https://zenodo.org>`_ API to researchers and software developers
This package is a part of the data engineering domain infrastructure in the Chem-AI
software ecosystem.

.. grid:: 1 1 2 2

.. grid-item-card:: Quick Start
:margin: 0 3 0 0

Jump right into using zenopy!

.. button-link:: ./quick_start.html
:color: primary
:expand:

Quick Start Guide

.. grid-item-card:: How-to Guides
:margin: 0 3 0 0

A collection of How-to Guides for busy users

.. button-link:: ./howtos/index.html
:color: primary
:expand:

How-to Guides

.. grid-item-card:: API Reference
:margin: 0 3 0 0

Application programming interface (API) references

.. button-link:: ./api/index.html
:color: primary
:expand:

API Reference

.. grid-item-card:: Developer Guide
:margin: 0 3 0 0

Deeper insights into zenopy infrastructure

.. button-link:: ./tutorials/index.html
:color: primary
:expand:

Developer Guide

.. Table of Contents
.. toctree::
:maxdepth: 2
:hidden:
:titlesonly:
:numbered: 2

installation
quick_start
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
requests
validators
renku-sphinx-theme
pydata-sphinx-theme
sphinx-design
sphinx-copybutton
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@
"docs": [
"sphinx==1.2.3",
"sphinxcontrib-napoleon",
"sphinx_rtd_theme",
"renku-sphinx-theme",
"pydata-sphinx-theme",
"sphinx-design",
"sphinx-copybutton",
"numpydoc",
],
"tests": ["pytest", "pytest-cov"],
Expand Down

0 comments on commit 4f93fcd

Please sign in to comment.