Skip to content

Commit 83b950d

Browse files
committed
Render chapter pictures
1 parent 02d5536 commit 83b950d

21 files changed

+48
-19
lines changed

01_values.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ essence stays invisibly below.
1111

1212
quote}}
1313

14-
{{index "Yuan-Ma", "Book of Programming", "binary data", data, bit, memory}}
14+
{{index "Yuan-Ma", "Book of Programming"}}
15+
16+
{{figure {url: "img/chapter_picture_1.jpg", alt: "A sea of bits", chapter: framed}}}
17+
18+
{{index "binary data", data, bit, memory}}
1519

1620
Inside the computer's world, there is only data. You can read data,
1721
modify data, create new data—but that which isn't data cannot be

02_program_structure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ quote}}
1111

1212
{{index why, "Poignant Guide"}}
1313

14+
{{figure {url: "img/chapter_picture_2.jpg", alt: "Tentacles holding objects", chapter: framed}}}
15+
1416
In this chapter, we start to do things that can actually be called
1517
_programming_. We will expand our command of the JavaScript language
1618
beyond the nouns and sentence fragments we've seen so far, to the
@@ -137,8 +139,6 @@ same value. A program can only access the values that it still has a
137139
hold on. When you need to remember something, you grow a tentacle to
138140
hold on to it or you reattach one of your existing tentacles to it.
139141

140-
{{figure {url: "img/octopus.jpg", alt: "Bindings as tentacles"}}}
141-
142142
Let's look at another example. To remember the number of dollars that
143143
Luigi still owes you, you create a binding. And then when he pays back
144144
$35, you give this binding a new value.

03_functions.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ build on each other, like a wall of mini stones.
88

99
quote}}
1010

11-
{{index "Knuth, Donald", function, "code structure"}}
11+
{{index "Knuth, Donald"}}
12+
13+
{{figure {url: "img/chapter_picture_3.jpg", alt: "Fern leaves with a fractal shape", chapter: framed}}}
14+
15+
{{index function, "code structure"}}
1216

1317
Functions are the bread and butter of JavaScript programming. The
1418
concept of wrapping a piece of program in a value has many uses. It

04_data.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ ideas that could provoke such a question.
1111

1212
quote}}
1313

14-
{{index "Babbage, Charles", object, "data structure"}}
14+
{{index "Babbage, Charles"}}
15+
16+
{{figure {url: "img/chapter_picture_4.jpg", alt: "A weresquirrel", chapter: framed}}}
17+
18+
{{index object, "data structure"}}
1519

1620
Numbers, Booleans, and strings are the atoms that ((data)) structures
1721
are built from. Many types of information require more than one

05_higher_order.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ deficiencies.
2727

2828
quote}}
2929

30+
{{figure {url: "img/chapter_picture_5.jpg", alt: "Letters from different scripts", chapter: true}}}
31+
3032
{{index "program size"}}
3133

3234
A large program is a costly program, and not just because of the time

html/css/ejs.css

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,20 @@ figure {
379379
margin: 0 30px;
380380
}
381381

382+
figure.chapter {
383+
text-align: center;
384+
margin: 3em 0 2em;
385+
}
386+
387+
figure.chapter img {
388+
max-width: 75%;
389+
}
390+
391+
figure.framed img {
392+
border-radius: 50%;
393+
border: 2px solid black;
394+
}
395+
382396
@media screen and (max-width: 500px) {
383397
figure {
384398
margin: 0;

html/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ <h1>Eloquent JavaScript<div style="font-size: 70%">3rd edition</div></h2>
3232
may also be considered licensed under
3333
an <a href="http://opensource.org/licenses/MIT">MIT license</a>.</p>
3434

35-
<p>Illustrations by various artists: Cover by
36-
Madalina Tantareanu. Octopus in Chapter 2 by Jim Tierney. Pixel art in
37-
Chapters 7 and 16 by Antonio Perdomo Pastor. Regular expression
38-
diagrams in Chapter 9 generated
35+
<p>Illustrations by various artists: Cover and chapter illustrations
36+
by Madalina Tantareanu. Pixel art in Chapters 7 and 16 by Antonio
37+
Perdomo Pastor. Regular expression diagrams in Chapter 9 generated
3938
with <a href="http://regexper.com">regexper.com</a> by Jeff
4039
Avallone. Village photograph in Chapter 11 by Fabrice Creuzot. Game
4140
concept for Chapter 15 by <a href="http://lessmilk.com">Thomas

img/chapter_picture_1.jpg

68.4 KB
Loading

img/chapter_picture_2.jpg

42.2 KB
Loading

img/chapter_picture_3.jpg

58 KB
Loading

0 commit comments

Comments
 (0)