mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Sphinx: Add support for collapsible sections
This commit is contained in:
@@ -446,4 +446,19 @@ blockquote.pull-quote > :last-child {
|
||||
div.embed iframe {
|
||||
height:100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -- COLLAPSIBLE SECTIONS --------------------------------------------------------------------------------- */
|
||||
|
||||
.toggle .name {
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.toggle .name:after {
|
||||
content: " ▶";
|
||||
}
|
||||
|
||||
.toggle .name.open:after {
|
||||
content: " ▼";
|
||||
}
|
||||
@@ -4,6 +4,8 @@
|
||||
This header (including the SVG logo) is copied from the Semmle
|
||||
documentation home page at help.semmle.com.
|
||||
|
||||
It also adds some JavaScript (in the footer) to allow collapsible sections.
|
||||
|
||||
The source for the default Alabaster stylesheet can be found at:
|
||||
https://github.com/bitprophet/alabaster/blob/master/alabaster/layout.html
|
||||
#}
|
||||
@@ -108,6 +110,18 @@
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(".toggle > *").hide();
|
||||
$(".toggle .name").show();
|
||||
$(".toggle .name").click(function() {
|
||||
$(this).parent().children().not(".name").toggle(400);
|
||||
$(this).parent().children(".name").toggleClass("open");
|
||||
})
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user