Skip to content

Commit a23d386

Browse files
committed
doc: overhaul documentation
1 parent 40e9bdc commit a23d386

27 files changed

Lines changed: 470 additions & 550 deletions

docs/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Minimal makefile for Sphinx documentation
22
#
33

4-
# You can set these variables from the command line.
5-
SPHINXOPTS =
6-
SPHINXBUILD = sphinx-build
7-
SPHINXPROJ = topggpy
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = .
99
BUILDDIR = _build
1010

@@ -17,4 +17,4 @@ help:
1717
# Catch-all target: route all unknown targets to Sphinx using the new
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
20-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/_static/css/custom.css

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/_static/favicon.ico

15 KB
Binary file not shown.

docs/_static/img/favicon-16x16.png

-1.12 KB
Binary file not shown.

docs/_static/script.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
document.addEventListener('load', () => {
2+
try {
3+
document.querySelector('.edit-this-page').remove()
4+
5+
// remove these useless crap that appears on official readthedocs builds
6+
document.querySelector('#furo-readthedocs-versions').remove()
7+
document.querySelector('.injected').remove()
8+
} catch {
9+
// we're building this locally, forget it
10+
}
11+
})
12+
13+
const tocDrawer = document.querySelector('aside.toc-drawer')
14+
15+
if (document.querySelector('section#topggpy')) {
16+
// we don't need the right sidebar on the main landing page
17+
tocDrawer.remove()
18+
} else {
19+
tocDrawer.style.visibility = 'visible'
20+
}
21+
22+
// remove related pages in the footer
23+
document.querySelector('.related-pages').remove()
24+
25+
// remove all header links
26+
for (const headerLink of document.querySelectorAll('.headerlink')) {
27+
headerLink.remove()
28+
}
29+
30+
for (const page of document.querySelectorAll('.sidebar-scroll li')) {
31+
const link = page.querySelector('a')
32+
const label = page.querySelector('label')
33+
34+
if (label) {
35+
link.addEventListener('click', event => {
36+
event.preventDefault()
37+
label.click()
38+
})
39+
}
40+
}

docs/_static/style.css

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
body {
2+
--color-link-underline: rgba(0, 0, 0, 0%);
3+
--color-link-underline--hover: var(--color-link);
4+
--color-inline-code-background: rgba(0, 0, 0, 0%);
5+
--color-api-background-hover: var(--color-background-primary);
6+
--color-highlight-on-target: var(--color-background-primary) !important;
7+
--font-stack: "Manrope", sans-serif !important;
8+
--font-stack--monospace: "Roboto Mono", monospace !important;
9+
}
10+
11+
aside.toc-drawer {
12+
visibility: hidden;
13+
}
14+
15+
#furo-readthedocs-versions, .injected, .edit-this-page, .related-pages, .headerlink {
16+
visibility: hidden;
17+
user-select: none;
18+
}
19+
20+
dd dt {
21+
color: var(--color-foreground-secondary);
22+
}
23+
24+
aside.toc-drawer .docutils:hover, .sidebar-brand-text:hover {
25+
transition: 0.15s;
26+
filter: opacity(75%);
27+
}
28+
29+
.highlight *, em {
30+
font-style: normal !important;
31+
text-decoration: none !important;
32+
font-weight: normal !important;
33+
}
34+
35+
.sig-paren, span.p, :not(.sig-name) > span.pre {
36+
font-weight: normal !important;
37+
}
38+
39+
:not(h1) > a.reference {
40+
text-decoration: underline;
41+
}
42+
43+
:not(h1) > a.reference:hover {
44+
text-decoration: none;
45+
}
46+
47+
.field-even p strong, .field-odd p strong {
48+
font-family: var(--font-stack--monospace);
49+
}
50+
51+
h1 > a.reference:hover {
52+
text-decoration: underline;
53+
}
54+
55+
h1 {
56+
font-weight: 900;
57+
}
58+
59+
.sidebar-brand-text {
60+
font-weight: bolder;
61+
}
62+
63+
.sidebar-scroll .reference.internal {
64+
color: var(--color-brand-primary);
65+
}

docs/api.rst

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/api/autopost.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/api/client.rst

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
####################
2-
Client API Reference
3-
####################
1+
Client reference
2+
================
43

5-
.. automodule:: topgg.client
6-
:members:
7-
:inherited-members:
4+
.. autoclass:: topgg.client.Client
5+
:members:
6+
7+
.. autoclass:: topgg.errors.Error()
8+
:members:
9+
10+
.. autoclass:: topgg.errors.RequestError()
11+
:members:
12+
13+
.. autoclass:: topgg.errors.Ratelimited()
14+
:members:

docs/api/data.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)