Skip to content

Commit

Permalink
Add styling & fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jules-ch committed Oct 9, 2022
1 parent ac7731a commit 4f5db6d
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 20 deletions.
54 changes: 45 additions & 9 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,45 @@
/* Main index page overview cards */

.sd-card-img-top {
width: 33% !important;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 10px;
}
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap');

body {
font-family: 'Open Sans', sans-serif;
}

h1 {
font-family: "Lato", sans-serif;
}

pre, code {
font-size: 100%;
line-height: 155%;
}

/* Main page overview cards */

.sd-card {
border-radius: 0;
padding: 30px 10px 20px 10px;
margin: 10px 0px;
}

.sd-card .sd-card-header {
text-align: center;
}

.sd-card .sd-card-header .sd-card-text {
margin: 0px;
}

.sd-card .sd-card-img-top {
height: 52px;
width: 52px;
margin-left: auto;
margin-right: auto;
}

.sd-card .sd-card-header {
border: none;
color: #150458 !important;
font-size: var(--pst-font-size-h5);
font-weight: bold;
padding: 2.5rem 0rem 0.5rem 0rem;
}
1 change: 0 additions & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,5 @@ That's all! You can check that Pint is correctly installed by starting up python
:hidden:

user/overview
.. user/getting
user/tutorial
user/faq
28 changes: 20 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,51 @@ Pint: makes units easy
.. grid:: 1 1 2 2
:gutter: 2

.. grid-item-card:: Getting started
.. grid-item-card::
:img-top: _static/index_getting_started.svg
:link: getting_started
:link-type: doc

New to *pint*? Check out the getting started guides. They contain an
introduction to *pint's* main concepts and links to additional tutorials.
Getting Started
^^^^^^^^^^^^^^^

.. grid-item-card:: User guide
New to Pint? Check out the getting started guides. They contain an
introduction to Pint's main concepts and links to additional tutorials.

.. grid-item-card::
:img-top: _static/index_user_guide.svg
:link: user/index
:link-type: doc

User Guide
^^^^^^^^^^

The user guide provides in-depth information on the
key concepts of pint with useful background information and explanation.
key concepts of Pint with useful background information and explanation.

.. grid-item-card:: API reference
.. grid-item-card::
:img-top: _static/index_api.svg
:link: api
:link-type: doc

API reference
^^^^^^^^^^^^^

The reference guide contains a detailed description of the pint API.
The reference describes how the methods work and which parameters can
be used. It assumes that you have an understanding of the key concepts.

.. grid-item-card:: Developer guide
.. grid-item-card::
:img-top: _static/index_contribute.svg
:link: dev/contributing
:link-type: doc

Developer guide
^^^^^^^^^^^^^^^

Saw a typo in the documentation? Want to improve existing functionalities?
The contributing guidelines will guide you through the process of improving
pint.
Pint.


.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion pint/facets/context/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def with_context(self, name, **kwargs) -> Callable[[F], F]:
"""Decorator to wrap a function call in a Pint context.
Use it to ensure that a certain context is active when
calling a function::
calling a function.
Parameters
----------
Expand Down
2 changes: 1 addition & 1 deletion pint/facets/system/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
from .objects import System
from .registry import SystemRegistry

__all__ = [SystemDefinition, System, SystemRegistry]
__all__ = ["SystemDefinition", "System", "SystemRegistry"]

0 comments on commit 4f5db6d

Please sign in to comment.