summaryrefslogtreecommitdiffstats
path: root/doc/_static/theme_extras.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-12-12 12:17:53 +0100
committerDaniel Baumann <daniel@debian.org>2024-12-12 12:17:53 +0100
commit11cb8088832071b55bba2aff046d1542dda46fed (patch)
treed3f24cca0040ee5587df8c9e10371d05f206f94a /doc/_static/theme_extras.js
parentInitial commit. (diff)
downloadpython-feedgen-14b03e5ea1404ff8f46e89da4793ec79417a00c7.tar.xz
python-feedgen-14b03e5ea1404ff8f46e89da4793ec79417a00c7.zip
Adding upstream version 1.0.0.upstream/1.0.0upstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'doc/_static/theme_extras.js')
-rw-r--r--doc/_static/theme_extras.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/_static/theme_extras.js b/doc/_static/theme_extras.js
new file mode 100644
index 0000000..73b00c3
--- /dev/null
+++ b/doc/_static/theme_extras.js
@@ -0,0 +1,28 @@
+$(document).ready(function() {
+ $('.headerlink').each(function( index ) {
+ var type = $(this).parent().get(0).nodeName
+ if (type == 'H1') {
+ var name = $(this).parent().get(0).childNodes[0].data;
+ var ln = $(this).attr('href');
+ $('div.apitoc').append('<a href="'+ln+'">'+name+'</a>');
+ } else if (type == 'H2') {
+ var name = $(this).parent().get(0).childNodes[0].data;
+ var ln = $(this).attr('href');
+ $('div.apitoc').append('<a class="h2" href="'+ln+'">'+name+'</a>');
+ } else if (type == 'DT') {
+ //var name = $(this).parent().text().replace('ΒΆ', '');
+ var name = $(this).parent().html().replace(/<a .*<\/a>/g, '')
+ .replace(/<tt class="desc/g, '<span class="apiln')
+ .replace(/<\/tt>/g, '</span>');
+ var ln = $(this).attr('href');
+ var p = $(this).parent().parent();
+ if ( p.hasClass('method') || p.hasClass('attribute') ) {
+ $('div.apitoc').append('<a class="partOfClass" href="'+ln+'">'+name+'</a>');
+ } else {
+ $('div.apitoc').append('<a class="second" href="'+ln+'">'+name+'</a>');
+ }
+ } else {
+ // alert( type );
+ }
+ });
+});