Skip to content

Commit d013b9d

Browse files
committed
documentation template update.
1 parent aeb5e70 commit d013b9d

File tree

2 files changed

+65
-25
lines changed

2 files changed

+65
-25
lines changed

docs/_themes/sphinxawesome_theme/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
{%- if theme_extra_header_link_icons|tobool %}
7272
{%- for text,url in theme_extra_header_link_icons.items() %}
7373
{%- if url is mapping %}
74-
<a href="{{ url.link }}" title="Visit {{ text }}" rel="noopener nofollow">
74+
<a href="{{ url.link }}" title="{{ text }}" rel="noopener nofollow">
7575
<div
7676
class="inline-flex items-center justify-center px-0 text-sm font-medium transition-colors rounded-md disabled:opacity-50 disabled:pointer-events-none hover:bg-accent hover:text-accent-foreground h-9 w-9">
7777
{{ url.icon }}

docs/conf.py

Lines changed: 64 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
sys.path.insert(0, os.path.abspath('_themes'))
2626

2727
import NodeGraphQt
28+
from sphinxawesome_theme.postprocess import Icons
2829

2930
# -- Project information -----------------------------------------------------
3031

@@ -153,19 +154,77 @@
153154
# further. For a list of options available for each theme, see the
154155
# documentation.
155156
html_title = 'NodeGraphQt'
157+
html_permalinks_icon = (
158+
'<svg xmlns="http://www.w3.org/2000/svg" '
159+
'height="1em" width="1em" viewBox="0 0 24 24"'
160+
'>'
161+
'<path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 '
162+
'5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 '
163+
'0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/>'
164+
'</svg>'
165+
)
156166
html_theme_options = {
157167
'logo_light': '_images/favicon.png',
158168
'logo_dark': '_images/favicon.png',
159-
'main_nav_links': {
160-
'Source': 'https://github.com/jchanvfx/NodeGraphQt',
161-
'Issues': 'https://github.com/jchanvfx/NodeGraphQt/issues',
162-
'Releases': 'https://github.com/jchanvfx/NodeGraphQt/releases',
163-
},
169+
# 'main_nav_links': {
170+
# 'Releases': 'https://github.com/jchanvfx/NodeGraphQt/releases',
171+
# },
164172
'show_scrolltop': True,
165173
'show_prev_next': True,
166174
'awesome_external_links': True,
175+
'extra_header_link_icons': {
176+
"GitHub Repository": {
177+
"link": "https://github.com/jchanvfx/NodeGraphQt",
178+
"icon": (
179+
'<svg height="26px" style="margin-top:-2px;display:inline" '
180+
'viewBox="0 0 45 44" '
181+
'fill="currentColor" xmlns="http://www.w3.org/2000/svg">'
182+
'<path fill-rule="evenodd" clip-rule="evenodd" '
183+
'd="M22.477.927C10.485.927.76 10.65.76 22.647c0 9.596 6.223 17.736 '
184+
"14.853 20.608 1.087.2 1.483-.47 1.483-1.047 "
185+
"0-.516-.019-1.881-.03-3.693-6.04 "
186+
"1.312-7.315-2.912-7.315-2.912-.988-2.51-2.412-3.178-2.412-3.178-1.972-1.346.149-1.32.149-1.32 " # noqa
187+
"2.18.154 3.327 2.24 3.327 2.24 1.937 3.318 5.084 2.36 6.321 "
188+
"1.803.197-1.403.759-2.36 "
189+
"1.379-2.903-4.823-.548-9.894-2.412-9.894-10.734 "
190+
"0-2.37.847-4.31 2.236-5.828-.224-.55-.969-2.759.214-5.748 0 0 "
191+
"1.822-.584 5.972 2.226 "
192+
"1.732-.482 3.59-.722 5.437-.732 1.845.01 3.703.25 5.437.732 "
193+
"4.147-2.81 5.967-2.226 "
194+
"5.967-2.226 1.185 2.99.44 5.198.217 5.748 1.392 1.517 2.232 3.457 "
195+
"2.232 5.828 0 "
196+
"8.344-5.078 10.18-9.916 10.717.779.67 1.474 1.996 1.474 4.021 0 "
197+
"2.904-.027 5.247-.027 "
198+
"5.96 0 .58.392 1.256 1.493 1.044C37.981 40.375 44.2 32.24 44.2 "
199+
'22.647c0-11.996-9.726-21.72-21.722-21.72" '
200+
'fill="currentColor"/></svg>'
201+
),
202+
},
203+
"PyPI Package": {
204+
"link": "https://pypi.org/project/NodeGraphQt",
205+
"icon": (
206+
'<svg width="28px" height="28px" viewBox="0 0 20 20" '
207+
'<svg fill="currentColor" viewBox="0 0 24 24" '
208+
'xmlns="http://www.w3.org/2000/svg"><g id="SVGRepo_bgCarrier" '
209+
'stroke-width="0"></g><g id="SVGRepo_tracerCarrier" '
210+
'stroke-linecap="round" stroke-linejoin="round"></g>'
211+
'<g id="SVGRepo_iconCarrier">'
212+
'<path d="M9.585 11.692h4.328s2.432.039 2.432-2.35V5.391S16.714'
213+
' 3 11.936 3C7.362 3 7.647 4.983 7.647 4.983l.006 2.055h4.363v.'
214+
'617H5.92s-2.927-.332-2.927 4.282 2.555 4.45 2.555 4.45h1.524v-'
215+
'2.141s-.083-2.554 2.513-2.554zm-.056-5.74a.784.784 0 1 1 0-1.5'
216+
'7.784.784 0 1 1 0 1.57z"></path><path d="M18.452 7.532h-1.524v'
217+
'2.141s.083 2.554-2.513 2.554h-4.328s-2.432-.04-2.432 2.35v3.95'
218+
'1s-.369 2.391 4.409 2.391c4.573 0 4.288-1.983 4.288-1.983l-.00'
219+
'6-2.054h-4.363v-.617h6.097s2.927.332 2.927-4.282-2.555-4.451-2'
220+
'.555-4.451zm-3.981 10.436a.784.784 0 1 1 0 1.57.784.784 0 1 1 '
221+
'0-1.57z" /></path></g></svg>'
222+
)
223+
}
224+
}
167225
}
168226

227+
169228
# Add any paths that contain custom static files (such as style sheets) here,
170229
# relative to this directory. They are copied after the builtin static files,
171230
# so a file named "default.css" will overwrite the builtin "default.css".
@@ -218,25 +277,6 @@
218277
'Miscellaneous'),
219278
]
220279

221-
222-
# -- Options for Epub output -------------------------------------------------
223-
224-
# Bibliographic Dublin Core info.
225-
epub_title = project
226-
227-
# The unique identifier of the text. This can be a ISBN number
228-
# or the project homepage.
229-
#
230-
# epub_identifier = ''
231-
232-
# A unique identification for the text.
233-
#
234-
# epub_uid = ''
235-
236-
# A list of files that should not be packed into the epub file.
237-
epub_exclude_files = ['search.html']
238-
239-
240280
# -- Options for autodoc ----------------------------------------------------
241281
autodoc_member_order = 'groupwise'
242282

0 commit comments

Comments
 (0)