Skip to content

Commit be45b3d

Browse files
committed
add progit2 links, Bens name, bigger ebook downloads
1 parent ac46071 commit be45b3d

File tree

12 files changed

+46
-27
lines changed

12 files changed

+46
-27
lines changed

TODO.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
PG2:
22

3-
* link ebooks to show page
4-
* easier to find the epub/mobi/pdf?
53
* translation page?
6-
* update percent_complete and urls on new builds
7-
* seperate link for translation sources
4+
* link for translation sources
85
* show that newer content is available for missed slugs (fallback to v1)
96

107
3.1 Launch:

app/assets/stylesheets/book.css.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.ebooks img {
2+
padding: 5px;
3+
}
4+
15
#book-container {
26
position: relative;
37
@extend .callout;

app/views/books/show.html.erb

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,25 @@
1414
<img src="/images/progit2.png" width="118" height="157"/>
1515
<div style="light">2nd Edition (2014)</div>
1616
<div class="switch"><a href="/book/<%= @book.code %>/v1">Switch to 1st Edition</a></div>
17+
<div class="ebook-download">
18+
<h2>Download Ebook</h2>
19+
<div class="ebooks">
20+
<% if @book.ebook_pdf %>
21+
<a href="<%= @book.ebook_pdf %>"><img width="50px" src="/images/pdf.png"/></a>
22+
<% end %>
23+
<% if @book.ebook_epub %>
24+
<a href="<%= @book.ebook_epub %>"><img width="50px" src="/images/epub.png"/></a>
25+
<% end %>
26+
</div>
27+
<div class="ebooks">
28+
<% if @book.ebook_mobi %>
29+
<a href="<%= @book.ebook_mobi %>"><img width="50px" src="/images/mobi.png"/></a>
30+
<% end %>
31+
<% if @book.ebook_html %>
32+
<a href="<%= @book.ebook_html %>"><img width="50px" src="/images/html.png"/></a>
33+
<% end %>
34+
</div>
35+
</div>
1736
</div>
1837
<% else %>
1938
<div style="float:right;margin: -20px 40px 0 40px;">
@@ -25,12 +44,12 @@
2544
</div>
2645
<% end %>
2746
<p>
28-
The entire Pro Git book, written by Scott Chacon and Ben Straub and published by Apress, is available here. All content is licensed under the <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution Non Commercial Share Alike 3.0 license</a>. Print versions of the book are available on <a href="http://www.amazon.com/gp/product/1430218339?ie=UTF8&camp=1789&creative=9325&creativeASIN=1430218339&linkCode=as2&tag=git-sfconservancy-20">Amazon.com</a>.</>
47+
The entire Pro Git book, written by Scott Chacon and Ben Straub and published by Apress, is available here. All content is licensed under the <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution Non Commercial Share Alike 3.0 license</a>. Print versions of the book are available on <a href="http://www.amazon.com/Pro-Git-Scott-Chacon/dp/1484200772?ie=UTF8&camp=1789&creative=9325&creativeASIN=1430218339&linkCode=as2&tag=git-sfconservancy-20">Amazon.com</a>.</>
2948
</p>
3049
<ol class='book-toc'>
3150
<% @book.chapters.each do |chapter| %>
3251
<li class='chapter'>
33-
<h2><%= chapter.cs_number %>. <a href="/book/<%= @book.code %>/v<%= @book.edition %>/<%=u chapter.sections.first.slug %>"><%=raw chapter.title %></a></h2>
52+
<h2><%= chapter.cs_number %>. <a href="/book/<%= @book.code %>/v<%= @book.edition %>/<%=u chapter.sections.first.slug %>"><%= chapter.title %></a></h2>
3453
<ol>
3554
<% chapter.sections.each do |section| %>
3655
<% if !section.title.empty? %>

app/views/doc/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<div id="book-intro">
3737

3838
<p>
39-
Pro Git is written by Scott Chacon and published by Apress.
39+
Pro Git is written by Scott Chacon and Ben Straub and published by Apress.
4040
</p>
4141

4242
<p>

app/views/doc/rebase.html.haml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- content_for :sidebar do
55
%div.callout
66
%p
7-
The entire <strong><a href="#">Pro Git book</a></strong> written by Scott Chacon is available to <a href="#">read online for free</a>. Dead tree versions are available on <a href="#">Amazon.com</a>.
7+
The entire <strong><a href="#">Pro Git book</a></strong> written by Scott Chacon and Ben Straub is available to <a href="#">read online for free</a>. Dead tree versions are available on <a href="#">Amazon.com</a>.
88

99
%div#reference-version
1010
=link_to "Topics ▾", "#", {:class => 'dropdown-trigger', :id => 'reference-topics-trigger', 'data-panel-id' => 'topics-dropdown'}
@@ -120,15 +120,15 @@
120120

121121

122122
=link_to "Version 1.7.9.4 ▾", "#", {:class => 'dropdown-trigger', :id => 'reference-versions-trigger', 'data-panel-id' => 'previous-versions-dropdown'}
123-
<span class="light">git-rebase last updated in 1.7.7.1</span>
123+
<span class="light">git-rebase last updated in 1.7.7.1</span>
124124
%div#previous-versions-dropdown.dropdown-panel.left
125125
%header
126126
Changes in the <strong>git-rebase</strong> manual
127127
%ol.reference-previous-versions
128128
%li.no-change
129129
<span>1.7.7.1 → 1.7.9.4 no changes</span>
130130
%li
131-
<a href="#"><span class="version">1.7.7.1</span>
131+
<a href="#"><span class="version">1.7.7.1</span>
132132
<span class="diff">
133133
<img src="/images/icons/green-dot.png" />
134134
<img src="/images/icons/green-dot.png" />
@@ -143,7 +143,7 @@
143143
%li.no-change
144144
<span>1.7.6.5 no changes</span>
145145
%li
146-
<a href="#"><span class="version">1.7.6.1</span>
146+
<a href="#"><span class="version">1.7.6.1</span>
147147
<span class="diff">
148148
<img src="/images/icons/green-dot.png" />
149149
<img src="/images/icons/green-dot.png" />
@@ -158,7 +158,7 @@
158158
%li.no-change
159159
<span>1.7.5.1 → 1.7.6.0 no changes</span>
160160
%li
161-
<a href="#"><span class="version">1.7.5.0</span>
161+
<a href="#"><span class="version">1.7.5.0</span>
162162
<span class="diff">
163163
<img src="/images/icons/green-dot.png" />
164164
<img src="/images/icons/green-dot.png" />
@@ -175,6 +175,5 @@
175175

176176
%footer
177177
<span class="light">Check your version of git by running<br></span>
178-
<strong>$</strong>
178+
<strong>$</strong>
179179
<input type="text" class="copyable" value="git --version" />
180-

app/views/downloads/installers/index.html.haml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- content_for :sidebar do
55
%div.callout
66
%p
7-
The entire <strong><a href="#">Pro Git book</a></strong> written by Scott Chacon is available to <a href="#">read online for free</a>. Dead tree versions are available on <a href="#">Amazon.com</a>.
7+
The entire <strong><a href="#">Pro Git book</a></strong> written by Scott Chacon and Ben Straub is available to <a href="#">read online for free</a>. Dead tree versions are available on <a href="#">Amazon.com</a>.
88

99
%div#main
1010
%h1 Git Installers
@@ -17,27 +17,27 @@
1717
%td
1818
%strong Debian
1919
%td
20-
=link_to "Stable", "http://packages.debian.org/stable/devel/git"
20+
=link_to "Stable", "http://packages.debian.org/stable/devel/git"
2121
<span class="light">|</span>
22-
=link_to "Testing", "http://packages.debian.org/testing/devel/git"
22+
=link_to "Testing", "http://packages.debian.org/testing/devel/git"
2323
<span class="light">|</span>
2424
=link_to "Unstable", "http://packages.debian.org/unstable/devel/git"
2525
%tr
26-
%td
26+
%td
2727
%strong Windows
28-
%td
28+
%td
2929
=link_to "Stable", "https://github.com/msysgit/msysgit/releases"
3030
<span class="light">|</span>
3131
=link_to "Cygwin", "http://www.cygwin.com/setup.exe"
3232
%tr
3333
%td
3434
%strong Mac
35-
%td
35+
%td
3636
=link_to "Stable", "http://sourceforge.net/projects/git-osx-installer/files/"
3737
%tr
38-
%td
38+
%td
3939
%strong Solaris
40-
%td
40+
%td
4141
=link_to "v8-10", "http://sunfreeware.com"
4242
<span class="light">|</span>
4343
=link_to "v9-10", "http://opencsw.org/packages/git/"

app/views/shared/_book.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="callout">
22
<p>The entire <strong><a href="/book">Pro Git book</a></strong> written
3-
by Scott Chacon is available to <a href="/book">read online for free</a>.
4-
Dead tree versions are available on <a href="http://www.amazon.com/gp/product/1430218339?ie=UTF8&camp=1789&creative=9325&creativeASIN=1430218339&linkCode=as2&tag=git-sfconservancy-20">Amazon.com</a>.
3+
by Scott Chacon and Ben Straub is available to <a href="/book">read online for free</a>.
4+
Dead tree versions are available on <a href="http://www.amazon.com/Pro-Git-Scott-Chacon/dp/1484200772?ie=UTF8&camp=1789&creative=9325&creativeASIN=1430218339&linkCode=as2&tag=git-sfconservancy-20">Amazon.com</a>.
55
</p>
66
</div>

app/views/site/index.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@
3333
</ul>
3434
</nav>
3535
<div id="front-book">
36-
<img src="/images/[email protected]" width="56" height="74" />
36+
<img src="/images/progit2.png" width="56" height="74" />
3737
<p>
3838
<strong><a href="/book">Pro Git</a></strong>
39-
by Scott Chacon is available to
39+
by Scott Chacon and Ben Straub is available to
4040
<a href="/book">read online for free</a>.
41-
Dead tree versions are available on <a href="http://www.amazon.com/gp/product/1430218339?ie=UTF8&camp=1789&creative=9325&creativeASIN=1430218339&linkCode=as2&tag=git-sfconservancy-20">Amazon.com</a>.
41+
Dead tree versions are available on <a href="http://www.amazon.com/Pro-Git-Scott-Chacon/dp/1484200772?ie=UTF8&camp=1789&creative=9325&creativeASIN=1430218339&linkCode=as2&tag=git-sfconservancy-20">Amazon.com</a>.
4242
</p>
4343
</div>
4444
</section>

public/images/epub.png

12.3 KB
Loading

public/images/html.png

12.1 KB
Loading

0 commit comments

Comments
 (0)