Skip to content

Commit

Permalink
Docs: change theme and overhaul structure (#689)
Browse files Browse the repository at this point in the history
The documentation is currently quite outdated, and the main page was
quite an overwhelming amount of information, with very little guidance
on where to begin.

Here we switch to the `sphinx-book-theme` used by several other AiiDA
projects and clean up the layout somewhat. We also add:

* The CLI reference
* An installation section on the main page
* A Getting started section on the main page that points to the AiiDA
Quantum ESPRESSO tutorial on the AiiDA tutorials readthedocs.
* A warning on the main page that indicates that some of the material
may be outdated.
* Add an amazingly beautiful logo that will never require any further 
revisions, ever.
  • Loading branch information
mbercx authored May 11, 2021
1 parent 5e2ec1f commit 9b083e7
Show file tree
Hide file tree
Showing 14 changed files with 297 additions and 205 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ repos:
name: yapf
types: [python]
args: ['-i']
exclude: 'docs/source/conf.py'

- repo: https://github.com/PyCQA/pylint
rev: pylint-2.6.0
Expand Down
117 changes: 117 additions & 0 deletions docs/source/_static/aiida-custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/* Fix CSS of top bar link icons */
a.nav-link.nav-external i {
padding-left: 0.3em !important;
font-size: inherit !important;
vertical-align: inherit !important;
}
/* Current fix for https://github.com/pandas-dev/pydata-sphinx-theme/issues/193 */
dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) minmax(0, 1fr);
}
/* For icon unicodes see https://fontawesome.com/v4.7.0/icons/ */
.title-icon-rocket .admonition-title:before {
margin-right:.5rem;
content: "\f135"
}
.title-icon-info-circle .admonition-title:before {
margin-right:.5rem;
content: "\f05a"
}
.title-icon-question-circle .admonition-title:before {
margin-right:.5rem;
content: "\f059"
}
.title-icon-download .admonition-title:before {
margin-right:.5rem;
content: "\f019"
}
.title-icon-external-link .admonition-title:before {
margin-right:.5rem;
content: "\f08e"
}
.title-icon-lightbulb .admonition-title:before {
margin-right:.5rem;
content: "\f0eb"
}
.title-icon-wrench .admonition-title:before {
margin-right:.5rem;
content: "\f0ad"
}
.title-icon-cog .admonition-title:before {
margin-right:.5rem;
content: "\f013"
}
.title-icon-cogs .admonition-title:before {
margin-right:.5rem;
content: "\f085"
}
.title-icon-code-fork .admonition-title:before {
margin-right:.5rem;
content: "\f126"
}
/* Semantic icon names */
.title-icon-launch-software .admonition-title:before {
margin-right:.5rem;
content: "\f135" /* rocket */
}
.title-icon-install-software .admonition-title:before {
margin-right:.5rem;
content: "\f019" /* download */
}
.title-icon-information .admonition-title:before {
margin-right:.5rem;
content: "\f05a" /* info-circle */
}
.title-icon-tip .admonition-title:before {
margin-right:.5rem;
content: "\f0eb" /* lightbulb */
}
.title-icon-important .admonition-title:before {
margin-right:.5rem;
content: "\f06a" /* exclamation-circle */
}
.title-icon-warning .admonition-title:before {
margin-right:.5rem;
content: "\f071" /* exclamation-triangle */
}
.title-icon-troubleshoot .admonition-title:before {
margin-right:.5rem;
content: "\f0ad" /* wrench */
}
.title-icon-read-more .admonition-title:before {
margin-right:.5rem;
content: "\f518" /* external-link */
}

.dropdown-group .dropdown .summary-title {
border-bottom: 0 !important;
font-weight:700 !important;
}
.dropdown-group .dropdown:not(:last-child) {
margin-bottom: 0 !important;
border-radius: 0 !important;
}
.dropdown-group .dropdown:first-child,
.dropdown-group .dropdown:first-child .summary-title {
border-radius: 1rem 1rem 0rem 0rem !important;
}
.dropdown-group .dropdown:last-child,
.dropdown-group .dropdown:last-child .summary-title {
border-radius: 0rem 0rem 1rem 1rem !important;
}

.dropdown-group .dropdown:last-child {
margin-bottom: 24px !important;
}

div.admonition :last-child {
margin-bottom: 0
}

div.highlight-bash div.highlight {
background-color: aliceblue;
}
div.highlight-console div.highlight {
background-color: aliceblue;
}
28 changes: 28 additions & 0 deletions docs/source/_static/aiida-qe-custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.logo-table td {
padding: 20px 10px;
}

.center {
text-align: center;
max-width: 90%;
}

.bigfont {
font-size: 140%;
}

div.navbar-brand-box a.navbar-brand img {
display: block;
height: auto;
width: auto;
max-height: 100vh;
max-width: 90%;
margin: 0 auto;
padding-left: 30px
}

@media (min-width: 768px) {
div.navbar-brand-box a.navbar-brand img {
max-height: 100vh !important
}
}
Binary file added docs/source/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions docs/source/cli/calculation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. click:: aiida_quantumespresso.cli.calculations:cmd_calculation
:prog: aiida-quantumespresso calculation
:nested: full
3 changes: 3 additions & 0 deletions docs/source/cli/data.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. click:: aiida_quantumespresso.cli.data:cmd_data
:prog: aiida-quantumespresso data
:nested: full
11 changes: 11 additions & 0 deletions docs/source/cli/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

#############
CLI reference
#############

.. toctree::
:maxdepth: 2

calculation <calculation>
data <data>
workflow <workflow>
3 changes: 3 additions & 0 deletions docs/source/cli/workflow.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. click:: aiida_quantumespresso.cli.workflows:cmd_workflow
:prog: aiida-quantumespresso workflow
:nested: full
Loading

0 comments on commit 9b083e7

Please sign in to comment.