Skip to content

Commit 38e42ed

Browse files
author
james
committed
docs: fix text overlap on small screen and dynamically resize images
1 parent 2707b2f commit 38e42ed

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

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

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,20 @@ p.first.admonition-title {
14871487
width: inherit;
14881488
}
14891489

1490+
/* scale and centre images*/
1491+
1492+
.image-box {
1493+
display: grid;
1494+
height: 100%;
1495+
}
1496+
1497+
img {
1498+
max-width: 100%;
1499+
max-height: 100vh;
1500+
margin: auto;
1501+
}
1502+
1503+
14901504
@media print {
14911505
/* line 978, ../scss/default.scss */
14921506
slides slide {
@@ -1572,7 +1586,7 @@ p.first.admonition-title {
15721586
overflow: auto;
15731587
position: fixed;
15741588
width: 100%;
1575-
font-size: 40%;
1589+
font-size: 45%;
15761590
}
15771591

15781592
body {
@@ -1585,12 +1599,11 @@ p.first.admonition-title {
15851599
height: auto;
15861600
}
15871601

1588-
img {
1602+
/*img {
15891603
transform: scale(0.6) translate(-20%, 0);
1590-
}
1604+
}*/
15911605

15921606
article {
1593-
position: absolute;
15941607
top: 20%;
15951608
left: 10%;
15961609
right: 10%;

docs/ql-documentation/ql-training-rst/intro-to-ql/intro-ql-general.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ Crashing bug found in Curiosity’s landing module through routine testing.
55

66
Patching is still possible mid-flight, but what if there are more such issues?
77

8-
.. image:: ../_static-training/curiosity.png
9-
:scale: 100 %
8+
.. container:: image-box
109

10+
.. image:: ../_static-training/curiosity.png
11+
1112
.. note::
1213

1314
When the Curiosity Rover was on its way to Mars in 2012, a flight software developer at NASA JPL discovered a mission-critical bug through manual code review. The problem occurred in Curiosity’s Entry, Descent, and Landing software–the software responsible for the Rover’s descent through the Martian atmosphere and landing it safely on the surface. of Mars.
@@ -79,8 +80,10 @@ Find all instances!
7980

8081
- All were fixed with a mid-flight patch.
8182

82-
.. image:: ../_static-training/curiosity2.png
83-
:scale: 75%
83+
.. container:: image-box
84+
85+
.. image:: ../_static-training/curiosity2.png
86+
8487

8588
.. note::
8689

@@ -101,8 +104,10 @@ Analysis overview
101104
- The database schema is (source) language specific, as are queries and libraries.
102105
- Multi-language code bases are analyzed one language at a time.
103106

104-
.. image:: ../_static-training/analysis-overview.png
105-
:scale: 75 %
107+
.. container:: image-box
108+
109+
.. image:: ../_static-training/analysis-overview.png
110+
106111

107112
.. note::
108113

0 commit comments

Comments
 (0)