Skip to content

Commit 47eb9f1

Browse files
authored
docs: improve branding, design & fix warnings (#191)
* docs: fix warnings from sphinx build * docs: improve branding + design - Current header has a weird color contrast -> making bg gray and fixing the white text to a good color - Adding a favicon
1 parent 0430bc5 commit 47eb9f1

11 files changed

Lines changed: 24 additions & 16 deletions

File tree

docs/_static/custom.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.wy-side-nav-search > div.version {
2+
/* Version in Nav is off-white by default, but we restyle the header to have an off-white bg */
3+
color: #404040;
4+
}

docs/_static/favicon.png

688 Bytes
Loading

docs/api.clients.placement_groups.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PlacementGroupsClient
2-
==================
2+
=====================
33

44

55
.. autoclass:: hcloud.placement_groups.client.PlacementGroupsClient

docs/conf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#
6565
# This is also used if you do content translation via gettext catalogs.
6666
# Usually you set "language" from the command line for these cases.
67-
language = None
67+
language = "en"
6868

6969
# List of patterns, relative to source directory, that match files and
7070
# directories to ignore when looking for source files.
@@ -88,11 +88,15 @@
8888
#
8989
html_theme = "sphinx_rtd_theme"
9090
html_logo = "_static/logo-hetzner-online.svg"
91+
html_favicon = "_static/favicon.png"
9192
# Theme options are theme-specific and customize the look and feel of a
9293
# theme further. For a list of options available for each theme, see the
9394
# documentation.
9495
#
95-
html_theme_options = {"logo_only": True}
96+
html_theme_options = {"logo_only": True, "style_nav_header_background": "#EFEFEF"}
97+
html_css_files = [
98+
"custom.css",
99+
]
96100

97101
# Add any paths that contain custom static files (such as style sheets) here,
98102
# relative to this directory. They are copied after the builtin static files,

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ you through the process.
2424

2525

2626
Via conda (Third-Party)
27-
---------
27+
-----------------------
2828

2929
Hetzner Cloud Python is also available as a ``conda``-package via `conda-forge`. This package is not maintained by Hetzner Cloud and might be outdated._:
3030

hcloud/certificates/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def get_list(
142142
return self._add_meta_to_result(certificates, response)
143143

144144
def get_all(self, name=None, label_selector=None):
145-
# type: (Optional[str]) -> List[BoundCertificate]
145+
# type: (Optional[str], Optional[str]) -> List[BoundCertificate]
146146
"""Get all certificates
147147
148148
:param name: str (optional)
@@ -166,7 +166,7 @@ def get_by_name(self, name):
166166
return super(CertificatesClient, self).get_by_name(name)
167167

168168
def create(self, name, certificate, private_key, labels=None):
169-
# type: (str, str, Optional[Dict[str, str]]) -> BoundCertificate
169+
# type: (str, str, str, Optional[Dict[str, str]]) -> BoundCertificate
170170
"""Creates a new Certificate with the given name, certificate and private_key. This methods allows only creating
171171
custom uploaded certificates. If you want to create a managed certificate use :func:`~hcloud.certificates.client.CertificatesClient.create_managed`
172172

hcloud/firewalls/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def get_actions_list(self, status=None, sort=None, page=None, per_page=None):
7575
return self._client.get_actions_list(self, status, sort, page, per_page)
7676

7777
def get_actions(self, status=None, sort=None):
78-
# type: (Optional[List[str]]) -> List[BoundAction]
78+
# type: (Optional[List[str]], Optional[List[str]]) -> List[BoundAction]
7979
"""Returns all action objects for a Firewall.
8080
8181
:param status: List[str] (optional)

hcloud/floating_ips/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def get_actions_list(self, status=None, sort=None, page=None, per_page=None):
4343
return self._client.get_actions_list(self, status, sort, page, per_page)
4444

4545
def get_actions(self, status=None, sort=None):
46-
# type: (Optional[List[str]]) -> List[BoundAction]
46+
# type: (Optional[List[str]], Optional[List[str]]) -> List[BoundAction]
4747
"""Returns all action objects for a Floating IP.
4848
4949
:param status: List[str] (optional)
@@ -91,7 +91,7 @@ def assign(self, server):
9191
# type: (Server) -> BoundAction
9292
"""Assigns a Floating IP to a server.
9393
94-
:param server: :class:`BoundServer <hcloud.servers.client.BoundServer>` or :class:`Server <hcloud.servers.domain.Server>`
94+
:param server: :class:`BoundServer <hcloud.servers.client.BoundServer>` or :class:`Server <hcloud.servers.domain.Server>`
9595
Server the Floating IP shall be assigned to
9696
:return: :class:`BoundAction <hcloud.actions.client.BoundAction>`
9797
"""

hcloud/images/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def get_actions(self, sort=None, status=None):
5555
return self._client.get_actions(self, status=status, sort=sort)
5656

5757
def update(self, description=None, type=None, labels=None):
58-
# type: (Optional[str], Optional[Dict[str, str]]) -> BoundImage
58+
# type: (Optional[str], Optional[str], Optional[Dict[str, str]]) -> BoundImage
5959
"""Updates the Image. You may change the description, convert a Backup image to a Snapshot Image or change the image labels.
6060
6161
:param description: str (optional)

hcloud/server_types/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class ServerTypesClient(ClientEntityBase, GetEntityByNameMixin):
1010
results_list_attribute_name = "server_types"
1111

1212
def get_by_id(self, id):
13-
# type: (int) -> server_types.client.BoundServerType
13+
# type: (int) -> BoundServerType
1414
"""Returns a specific Server Type.
1515
1616
:param id: int

0 commit comments

Comments
 (0)