Skip to content

Commit f56a423

Browse files
committed
Updating the html
1 parent 19e5e91 commit f56a423

File tree

4 files changed

+167
-50
lines changed

4 files changed

+167
-50
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ hevea:
4545
imagen -png -pdf $(F)_
4646
hacha $(F)_.html
4747
cp hevea/*.png heveahtml
48-
mv index.html $(F)_.css $(F)_?*.html $(F)_*.png heveahtml
48+
cat custom.css >> $(F)_.css
49+
mv index.html $(F)_?*.html $(F)_*.png $(F)_.css heveahtml
4950
rm *motif.gif $(F)_.*
5051
sed -i 's/\\%/%/g' heveahtml/*.html
5152
sed -i 's/\\{/{/g' heveahtml/*.html
@@ -85,3 +86,14 @@ trinket:
8586
# gather images for ease of uploading to CDN
8687
mkdir trinkethtml/img
8788
cp trinkethtml/*.png trinkethtml/img
89+
90+
DEST = /home/downey/public_html/greent/thinkjava7
91+
92+
distrib:
93+
rm -rf dist
94+
mkdir dist
95+
rsync -a $(F).pdf dist
96+
rsync -a heveahtml/ dist/html/
97+
rsync -a dist/* $(DEST)
98+
chmod -R o+r $(DEST)/*
99+
cd $(DEST)/..; sh back

custom.css

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
2+
div#main {
3+
display: grid;
4+
grid-template-columns: 1fr;
5+
grid-auto-rows: minmax(100px, auto);
6+
grid-gap: 10px;
7+
gap: 10px;
8+
}
9+
div#colorbar {
10+
display: none;
11+
/* background: #DC143C; */
12+
}
13+
div#content {
14+
min-width: 0;
15+
padding: 10px;
16+
}
17+
div#content p:first-of-type {
18+
margin-top: 0;
19+
}
20+
h1, h2, h3, h4, h5, h6 {
21+
margin-bottom: 0;
22+
}
23+
h1 span, h2 span, h3 span, h4 span, h5 span, h6 span {
24+
display: block;
25+
}
26+
27+
img {
28+
max-width: 100%
29+
}
30+
pre.verbatim {
31+
overflow-x: auto;
32+
max-width: 100%;
33+
}
34+
35+
/* navarrow links */
36+
img.navarrow {
37+
padding: 0 5px;
38+
text-decoration: none;
39+
color: #DC143C;
40+
}
41+
42+
body > a, body > a:link {
43+
color: #DC143C;
44+
}
45+
body > a:hover {
46+
text-decoration: underline;
47+
}
48+
49+
body div#content a, body div#sidebar a {
50+
text-decoration: underline;
51+
}
52+
53+
img.prevarrow:after {
54+
content: " 🡄"
55+
}
56+
img.uparrow:after {
57+
content: " 🡅"
58+
}
59+
img.nextarrow:after {
60+
content: " 🡆"
61+
}
62+
/* end navarrow links */
63+
64+
div.notice {
65+
background-color: #f0f0f0;
66+
padding: 8px;
67+
border: 1px solid #d0d0d0;
68+
margin-bottom: 12px;
69+
}
70+
71+
@media (max-width: 800px) {
72+
body > hr:first-of-type {
73+
color: #DC143C;
74+
background-color: #DC143C;
75+
height: 12px;
76+
margin-bottom: 0px;
77+
border: 0;
78+
}
79+
div#content {
80+
padding: 10px 2px;
81+
}
82+
}
83+
84+
@media (min-width: 800px) {
85+
hr { border: 0; }
86+
div#colorbar {
87+
display: block;
88+
}
89+
div#main {
90+
grid-template-columns: 1fr 5fr 200px;
91+
}
92+
div#content {
93+
max-width: 600px;
94+
}
95+
div#sidebar {
96+
max-width: 200px;
97+
padding: 0px 10px;
98+
}
99+
img.prevarrow {
100+
margin-left: 15%;
101+
}
102+
}

hevea/footer.html

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
</td>
1+
</div>
22

3-
<td valign="top" width="130" style="padding: 0px 10px;">
3+
<div id="sidebar">
44

55
<p>
66
<h4>Are you using one of our books in a class?</h4> We'd like to know
@@ -9,60 +9,63 @@ <h4>Are you using one of our books in a class?</h4> We'd like to know
99
<p>
1010
<br>
1111

12+
<!-- Think Java 2e -->
13+
14+
<p>
15+
<a rel="nofollow" href="https://amzn.to/2Bg9iVi">Think Java 2e</a>
16+
17+
<p>
18+
<a rel="nofollow" href="https://amzn.to/2Bg9iVi"><img src="https://greenteapress.com/covers/think_java_cover_small.jpeg"></a>
19+
20+
<!-- Think Data Structures -->
21+
1222
<p>
13-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1491938455/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1491938455&linkCode=as2&tag=greenteapre01-20&linkId=2JJH4SWCAVVYSQHO">Think DSP</a>
14-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1491938455" width="1" height="1" border="0" alt="">
23+
<a rel="nofollow" href="https://amzn.to/2ZfjxkH">Think Data Structures</a>
1524

1625
<p>
17-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1491938455/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1491938455&linkCode=as2&tag=greenteapre01-20&linkId=CTV7PDT7E5EGGJUM">
18-
<img border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=1491938455&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=greenteapre01-20"></a>
19-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1491938455" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;">
26+
<a rel="nofollow" href="https://amzn.to/2ZfjxkH"><img src="https://greenteapress.com/covers/think_dast_cover_small.jpeg"></a>
27+
28+
<!-- Think Python 2e -->
2029

2130
<p>
22-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1491929561/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1491929561&linkCode=as2&tag=greenteapre01-20&linkId=ZY6MAYM33ZTNSCNZ">Think Java</a>
23-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1491929561" width="1" height="1" border="0" alt="">
31+
<a rel="nofollow" href="https://amzn.to/2YE5KoT">Think Python 2e</a>
2432

2533
<p>
26-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1491929561/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1491929561&linkCode=as2&tag=greenteapre01-20&linkId=PT77ANWARUNNU3UK">
27-
<img border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=1491929561&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=greenteapre01-20"></a>
28-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1491929561" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;">
34+
<a rel="nofollow" href="https://amzn.to/2YE5KoT"><img src="https://greenteapress.com/covers/think_python_cover_small.jpeg"></a>
35+
36+
<!-- Think Stats 2e -->
2937

3038
<p>
31-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1449370780/ref=as_li_qf_sp_asin_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1449370780&linkCode=as2&tag=greenteapre01-20">Think Bayes</a>
32-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1449370780" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
39+
<a rel="nofollow" href="https://amzn.to/3g5wTqm">Think Stats 2e</a>
3340

3441
<p>
35-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1449370780/ref=as_li_qf_sp_asin_il?ie=UTF8&camp=1789&creative=9325&creativeASIN=1449370780&linkCode=as2&tag=greenteapre01-20">
36-
<img border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=1449370780&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=greenteapre01-20" /></a>
37-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1449370780" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
42+
<a rel="nofollow" href="https://amzn.to/3g5wTqm"><img src="https://greenteapress.com/covers/think_stats_cover_small.jpeg"></a>
43+
44+
<!-- Think Complexity 2e -->
3845

3946
<p>
40-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1491939362/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1491939362&linkCode=as2&tag=greenteapre01-20&linkId=FJKSQ3IHEMY2F2VA">Think Python 2e</a>
41-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1491939362" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
47+
<a rel="nofollow" href="https://amzn.to/3dONEEX">Think Complexity 2e</a>
4248

4349
<p>
44-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1491939362/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1491939362&linkCode=as2&tag=greenteapre01-20&linkId=ZZ454DLQ3IXDHNHX">
45-
<img border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=1491939362&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=greenteapre01-20" ></a>
46-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1491939362" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
50+
<a rel="nofollow" href="https://amzn.to/3dONEEX"><img src="https://greenteapress.com/covers/think_complexity_cover_small.jpeg"></a>
51+
52+
<!-- Think Bayes -->
4753

4854
<p>
49-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1491907339/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1491907339&linkCode=as2&tag=greenteapre01-20&linkId=O7WYM6H6YBYUFNWU">Think Stats 2e</a>
50-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1491907339" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
55+
<a rel="nofollow" href="https://amzn.to/3eHapvD">Think Bayes</a>
5156

5257
<p>
53-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1491907339/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1491907339&linkCode=as2&tag=greenteapre01-20&linkId=JVSYKQHYSUIEYRHL">
54-
<img border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=1491907339&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=greenteapre01-20" /></a>
55-
<img src="http://ir-na.amazon-adsystem.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1491907339" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
58+
<a rel="nofollow" href="https://amzn.to/3eHapvD"><img src="https://greenteapress.com/covers/think_bayes_cover_small.jpeg"></a>
59+
60+
<!-- Think DSP -->
5661

5762
<p>
58-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1449314635/ref=as_li_tf_tl?ie=UTF8&tag=greenteapre01-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=1449314635">Think Complexity</a>
59-
<img src="http://www.assoc-amazon.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1449314635" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
63+
<a rel="nofollow" href="https://amzn.to/3g2JACs">Think DSP</a>
6064

6165
<p>
62-
<a rel="nofollow" href="http://www.amazon.com/gp/product/1449314635/ref=as_li_tf_il?ie=UTF8&camp=1789&creative=9325&creativeASIN=1449314635&linkCode=as2&tag=greenteapre01-20">
63-
<img border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&amp;ASIN=1449314635&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=US&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=greenteapre01-20" /></a>
64-
<img src="http://www.assoc-amazon.com/e/ir?t=greenteapre01-20&l=as2&o=1&a=1449314635" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
66+
<a rel="nofollow" href="https://amzn.to/3g2JACs"><img src="https://greenteapress.com/covers/think_dsp_cover_small.jpeg"></a>
67+
6568

66-
</td>
67-
</tr>
68-
</table>
69+
</div>
70+
</div>
71+
</body>

hevea/header.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<table>
2-
3-
<tr>
4-
5-
<td valign="top" width="100" bgcolor="#542889" style="padding: 0px 10px;">
6-
</td>
7-
8-
<td valign="top" width="600" style="padding: 10px;">
9-
10-
<p>This HTML version of <i>Think Java</i> is provided for convenience, but it is not the best format of the book.
11-
In particular, some of the symbols are not rendered correctly.</p>
12-
13-
<p>You might prefer to read the <a href="../thinkjava2.pdf">PDF version</a>, or you can buy a hardcopy at
14-
<a href="http://www.amazon.com/gp/product/1491929561/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1491929561&linkCode=as2&tag=greenteapre01-20">Amazon</a>.
1+
<div id="main">
2+
<div id="colorbar"></div>
3+
<div id="content">
4+
5+
<div class="notice">
6+
<p>This HTML version of <it>Think Java</it> is provided for convenience, but it
7+
is not the best format for the book. In particular, some of the
8+
math symbols are not rendered correctly.
9+
10+
<p style="margin-bottom:0">You might prefer to read
11+
the <a href="https://greenteapress.com/thinkjava7/thinkjava2.pdf">PDF version</a>, or
12+
you can buy a hard copy from
13+
<a href="https://amzn.to/2BEmdAn">Amazon</a>.
14+
</div>

0 commit comments

Comments
 (0)