blob: 7707eb4e6239755b625720eafdc3180d8834fb45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
<%- @section = 'documentation' %>
<%- @subsection = 'book' %>
<%- @page_title = "Git - Book" %>
<% content_for :sidebar do %>
<%= render 'translations' %>
<% end %>
<div id='main'>
<h1>Book</h1>
<% if @book.edition == 2 %>
<div class="book-wrapper">
<img src="/images/progit2.png" width="118" height="157"/>
<div style="light">2nd Edition (2014)</div>
<% if (@book.ebook_pdf || @book.ebook_epub || @book.ebook_mobi) %>
<div class="ebook-download">
<h2>Download Ebook</h2>
<div class="ebooks">
<% if @book.ebook_pdf %>
<a href="<%= @book.ebook_pdf %>"><img width="50px" src="/images/pdf.png"/></a>
<% end %>
<% if @book.ebook_epub %>
<a href="<%= @book.ebook_epub %>"><img width="50px" src="/images/epub.png"/></a>
<% end %>
</div>
<div class="ebooks">
<% if @book.ebook_mobi %>
<a href="<%= @book.ebook_mobi %>"><img width="50px" src="/images/mobi.png"/></a>
<% end %>
</div>
</div>
<% end %>
</div>
<% else %>
<div class="book-wrapper">
<img src="/images/books/pro-git@2x.jpg" width="118" height="157"/>
<div>1st Edition (2009)</div>
<% if @book.has_edition(2) %>
<div class="switch"><a href="/book/<%= @book.code %>/v2">Switch to 2nd Edition</a></div>
<% end %>
</div>
<% end %>
<p>
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="https://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="https://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>.</>
</p>
<p>The version found here has been updated with corrections and additions from <a href="https://github.com/progit/progit2/graphs/contributors">hundreds of contributors</a>. If you see an error or have a suggestion, patches and issues are welcome in its <a href="https://github.com/progit/progit2">GitHub repository</a>.
</p>
<ol class='book-toc'>
<% @book.chapters.includes(:sections).each do |chapter| %>
<% next if chapter.sections.size == 0 %>
<li class='chapter'>
<h2><%= chapter.cs_number %>. <a href="/book/<%= @book.code %>/v<%= @book.edition %>/<%=u chapter.sections.first.slug %>"><%= chapter.title %></a></h2>
<ol>
<% chapter.sections.each do |section| %>
<% if !section.title.empty? %>
<li>
<%= chapter.cs_number %>.<%= section.number %>
<a href="/book/<%= @book.code %>/v<%= @book.edition %>/<%= u(section.slug) %>"><%=raw section.title %></a>
</li>
<% end %>
<% end %>
</ol>
</li>
<% end %>
</ol>
</div>
|