File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed
docs/language/global-sphinx-files Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change @@ -446,4 +446,23 @@ blockquote.pull-quote > :last-child {
446446 div.embed iframe {
447447 height:100%;
448448 }
449- }
449+ }
450+
451+ /* -- COLLAPSIBLE SECTIONS --------------------------------------------------------------------------------- */
452+
453+ .toggle .name {
454+ display: block;
455+ clear: both;
456+ }
457+
458+ .toggle .name:hover {
459+ cursor: pointer;
460+ }
461+
462+ .toggle .name:after {
463+ content: " ▶";
464+ }
465+
466+ .toggle .name.open:after {
467+ content: " ▼";
468+ }
Original file line number Diff line number Diff line change 44 This header (including the SVG logo) is copied from the Semmle
55 documentation home page at help.semmle.com.
66
7+ It also adds some JavaScript (in the footer) to allow collapsible sections.
8+
79 The source for the default Alabaster stylesheet can be found at:
810 https://github.com/bitprophet/alabaster/blob/master/alabaster/layout.html
911#}
@@ -108,6 +110,18 @@ <h4>Contents</h4>
108110
109111{% endblock %}
110112
113+ {% block footer %}
114+ < script type ="text/javascript ">
115+ $ ( document ) . ready ( function ( ) {
116+ $ ( ".toggle > *" ) . hide ( ) ;
117+ $ ( ".toggle .name" ) . show ( ) ;
118+ $ ( ".toggle .name" ) . click ( function ( ) {
119+ $ ( this ) . parent ( ) . children ( ) . not ( ".name" ) . toggle ( 400 ) ;
120+ $ ( this ) . parent ( ) . children ( ".name" ) . toggleClass ( "open" ) ;
121+ } )
122+ } ) ;
123+ </ script >
124+ {% endblock %}
111125
112126
113127
You can’t perform that action at this time.
0 commit comments