Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Larralde
peptides.py
Commits
a5efc8a6
Commit
a5efc8a6
authored
Oct 25, 2021
by
Martin Larralde
Browse files
Add some JS scripts to improve the styling of the documentation
parent
f4956f27
Changes
3
Hide whitespace changes
Inline
Side-by-side
docs/_static/js/apitoc.js
0 → 100644
View file @
a5efc8a6
$
(
document
).
ready
(
function
()
{
(
function
(
$
)
{
if
(
window
.
location
.
href
.
match
(
"
/api/*
"
)
!==
null
)
{
$
(
"
.nav-list
"
)
.
children
()
.
filter
(
"
li
"
)
.
append
(
"
<ul id='apitoc' class='nav nav-list'></ul>
"
);
$
(
"
dt
"
)
.
has
(
"
.sig-name
"
)
.
slice
(
1
)
.
each
(
function
(
index
)
{
var
html
=
(
"
<li><a href='#
"
+
$
(
this
).
attr
(
"
id
"
)
+
"
'><code>
"
+
$
(
this
).
find
(
"
.sig-name
"
).
text
()
+
"
</code></a></li>
"
);
$
(
"
#apitoc
"
).
append
(
html
);
});
}
else
if
(
window
.
location
.
href
.
match
(
"
/api/errors.html
"
)
!==
null
)
{
$
(
"
.nav-list
"
)
.
children
()
.
filter
(
"
li
"
)
.
append
(
"
<ul id='apitoc' class='nav nav-list scrollable-menu'></ul>
"
);
$
(
"
dt
"
)
.
each
(
function
(
index
)
{
var
html
=
(
"
<li><a href='#
"
+
$
(
this
).
attr
(
"
id
"
)
+
"
'><code>
"
+
$
(
this
).
find
(
"
.sig-name
"
).
text
()
+
"
</code></a></li>
"
);
$
(
"
#apitoc
"
).
append
(
html
);
});
}
})(
window
.
$jqTheme
||
window
.
jQuery
);
})
docs/_static/js/example-admonition.js
0 → 100644
View file @
a5efc8a6
$
(
document
).
ready
(
function
()
{
(
function
(
$
)
{
$
(
"
.admonition-example
"
)
.
removeClass
(
"
panel-info
"
)
.
addClass
(
"
panel-success
"
).
end
()
})(
window
.
$jqTheme
||
window
.
jQuery
);
})
docs/conf.py
View file @
a5efc8a6
...
...
@@ -36,8 +36,8 @@ sys.modules['peptides.tables'] = types.ModuleType('peptides.tables')
def
setup
(
app
):
# Add custom stylesheet
app
.
add_css_file
(
os
.
path
.
join
(
"_static/css/main.css"
))
#
app.add_js_file("js/apitoc.js")
#
app.add_js_file("js/example-admonition.js")
app
.
add_js_file
(
"js/apitoc.js"
)
app
.
add_js_file
(
"js/example-admonition.js"
)
# -- Project information -----------------------------------------------------
...
...
@@ -181,8 +181,8 @@ htmlhelp_basename = peptides.__name__
# -- Options for extlinks extension ------------------------------------------
extlinks
=
{
'doi'
:
(
'https://doi.org/%s'
,
'doi:
%s
'
),
'pmid'
:
(
'https://pubmed.ncbi.nlm.nih.gov/%s'
,
'PMID:
%s
'
),
'doi'
:
(
'https://doi.org/%s'
,
'doi:'
),
'pmid'
:
(
'https://pubmed.ncbi.nlm.nih.gov/%s'
,
'PMID:'
),
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment