Skip to content

Commit d9df5af

Browse files
author
Felicity Chapman
authored
Merge pull request github#1958 from jf205/slide-buttons
docs: a few slide improvements
2 parents 68a67c3 + 4adda10 commit d9df5af

File tree

5 files changed

+49
-20
lines changed

5 files changed

+49
-20
lines changed

docs/language/README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,11 @@ Building and previewing the QL training presentations
8989
*****************************************************
9090

9191
To build the QL training presentations, you need to install a Sphinx extension
92-
called `hieroglyph <https://github.com/nyergler/hieroglyph>`__.
92+
called `hieroglyph <https://github.com/nyergler/hieroglyph>`__.
93+
You also need to install `graphviz <https://graphviz.gitlab.io/download/>`__, which
94+
is used to generate graphs on some slides.
9395

94-
After installing hieroglyph, you can build the QL training presentations by running
96+
After installing hieroglyph and graphviz, you can build the QL training presentations by running
9597
``sphinx-build``, specifying the ``slides`` builder. For example
9698

9799
.. code::

docs/language/learn-ql/ql-training.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ Start learning how to use QL in variant analysis for a specific language by look
1919

2020
.. |arrow-r| unicode:: U+2192
2121

22-
When you have selected a presentation, use |arrow-r| and |arrow-l| to navigate between slides, press **p** to view the additional notes for a slide (where available), and press **f** to enter full-screen mode.
22+
.. |info| unicode:: U+24D8
23+
24+
When you have selected a presentation, use |arrow-r| and |arrow-l| to navigate between slides.
25+
Press **p** to view the additional notes on slides that have an information icon |info| in the top right corner, and press **f** to enter full-screen mode.
2326

2427
The presentations contain a number of QL query examples.
2528
We recommend that you download `QL for Eclipse <https://help.semmle.com/ql-for-eclipse/Content/WebHelp/home-page.html>`__ and import the example snapshot for each presentation so that you can find the bugs mentioned in the slides.

docs/language/ql-training/_static-training/slides-semmle-2/layout.html

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,18 @@
148148
</slides>
149149

150150

151+
<script type="text/javascript">
152+
153+
//insert info buttons on slides that have additional notes
154+
$(".admonition.note").before("<button id='extra-notes'>&#9432;</button>");
155+
$(".admonition-title").before("<button id='close-notes'>&times;</button>");
156+
$(document).ready(function() {
157+
$('button').click(function() {
158+
document.body.classList.toggle('with-notes');
159+
});
160+
});
161+
</script>
151162

152-
<!--[if IE]>
153-
<script src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script>
154-
<script>CFInstall.check({mode: 'overlay'});</script>
155-
<![endif]-->
156163
<script type="text/javascript">
157164

158165
//assigns font-size when document is ready

docs/language/ql-training/_static-training/slides-semmle-2/static/theme/css/default.css

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -587,15 +587,6 @@ dt {
587587
/* line 386, ../scss/default.scss */
588588
button {
589589
display: inline-block;
590-
background: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSI0MCUiIHN0b3AtY29sb3I9IiNmOWY5ZjkiLz48c3RvcCBvZmZzZXQ9IjcwJSIgc3RvcC1jb2xvcj0iI2UzZTNlMyIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
591-
background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(40%, #f9f9f9), color-stop(70%, #e3e3e3));
592-
background: -moz-linear-gradient(#f9f9f9 40%, #e3e3e3 70%);
593-
background: -webkit-linear-gradient(#f9f9f9 40%, #e3e3e3 70%);
594-
background: linear-gradient(#f9f9f9 40%, #e3e3e3 70%);
595-
border: 1px solid #a9a9a9;
596-
-moz-border-radius: 3px;
597-
-webkit-border-radius: 3px;
598-
border-radius: 3px;
599590
padding: 5px 8px;
600591
outline: none;
601592
white-space: nowrap;
@@ -605,7 +596,6 @@ button {
605596
user-select: none;
606597
cursor: pointer;
607598
text-shadow: 1px 1px #fff;
608-
font-size: 10pt;
609599
}
610600

611601
/* line 400, ../scss/default.scss */
@@ -1599,10 +1589,38 @@ p.first.admonition-title {
15991589
font-size: 1em;
16001590
}
16011591

1602-
.admonition.note ul {
1592+
.admonition.note ul li {
16031593
width: inherit;
16041594
}
16051595

1596+
1597+
/* styles for information buttons on slides that have notes */
1598+
1599+
#extra-notes {
1600+
display: block;
1601+
position: fixed;
1602+
top: 0;
1603+
right: 1%;
1604+
font-size: 1em;
1605+
}
1606+
1607+
#close-notes {
1608+
display: block;
1609+
position: fixed;
1610+
top: 0;
1611+
right: -1%;
1612+
font-size: 1.2em;
1613+
}
1614+
1615+
button {
1616+
border: none;
1617+
background: none;
1618+
}
1619+
1620+
button:hover {
1621+
text-decoration: underline;
1622+
}
1623+
16061624
/********* images ************/
16071625
/* general styles to scale and centre images*/
16081626

@@ -1774,4 +1792,4 @@ li > ul > li {
17741792
width: 90%;
17751793
height: 100%;
17761794
}
1777-
}
1795+
}

docs/language/ql-training/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
'sphinx.ext.intersphinx',
3434
'sphinx.ext.mathjax',
3535
'hieroglyph',
36-
'sphinxcontrib.blockdiag',
3736
'sphinx.ext.graphviz',
3837
]
3938

0 commit comments

Comments
 (0)