diff --git a/src/docc/plugins/html/static/docc.css b/src/docc/plugins/html/static/docc.css index 205d7d4..cc003f4 100644 --- a/src/docc/plugins/html/static/docc.css +++ b/src/docc/plugins/html/static/docc.css @@ -292,3 +292,27 @@ details[open] > summary::after { .hi-call > .hi-attribute > .hi-name:last-child { font-weight: bold; } + +.header-anchor a { + color: inherit; + text-decoration: none; +} + +.header-anchor a:visited { + color: inherit; +} + +.header-anchor .link-logo { + visibility: hidden; + margin-left: 0.2em; + text-decoration: none; + color: #888; + font-weight: normal; + cursor: pointer; + transition: color 0.2s; +} + +.header-anchor:hover .link-logo, +.header-anchor:focus-within .link-logo { + visibility: visible; +} diff --git a/src/docc/plugins/python/templates/html/attribute.html b/src/docc/plugins/python/templates/html/attribute.html index e065041..329c30d 100644 --- a/src/docc/plugins/python/templates/html/attribute.html +++ b/src/docc/plugins/python/templates/html/attribute.html @@ -17,7 +17,12 @@

{% for name in node.names %} - {{ name|html -}} + + {% reference name.full_name %} + {{ name|html -}} + + {% endreference %} + {%- if not loop.last %}, {% endif %} {% endfor %}

diff --git a/src/docc/plugins/python/templates/html/class.html b/src/docc/plugins/python/templates/html/class.html index e1f9aac..67956e3 100644 --- a/src/docc/plugins/python/templates/html/class.html +++ b/src/docc/plugins/python/templates/html/class.html @@ -15,7 +15,14 @@ # along with this program. If not, see . -#}
-

{{ node.name|html }}

+

+ + {% reference node.name.full_name %} + {{ node.name|html }} + + {% endreference %} + +

{% if node.docstring %}
diff --git a/src/docc/plugins/python/templates/html/function.html b/src/docc/plugins/python/templates/html/function.html index ccd9a3e..5433896 100644 --- a/src/docc/plugins/python/templates/html/function.html +++ b/src/docc/plugins/python/templates/html/function.html @@ -15,7 +15,14 @@ # along with this program. If not, see . -#}
-

{{ node.name|html }}

+

+ + {% reference node.name.full_name %} + {{ node.name|html }} + + {% endreference %} + +

{% if node.docstring %}
{{ node.docstring|html }}