Skip to content

Commit

Permalink
Add new book structure adjacent to current structure and add Makefile…
Browse files Browse the repository at this point in the history
…/Readme
  • Loading branch information
danheberden committed Mar 15, 2011
1 parent d59ba39 commit 55eb9dd
Show file tree
Hide file tree
Showing 31 changed files with 8,121 additions and 1 deletion.
31 changes: 31 additions & 0 deletions Makefile
@@ -0,0 +1,31 @@
V ?= 0

PREFIX = .
SRC_DIR = ${PREFIX}/book
INC_DIR = ${SRC_DIR}/include
DIST_DIR = ${PREFIX}/publish

BOOK = ${DIST_DIR}/index.html

TMPLPRE = '1h;1!H;$${;g;s/\(.*\)<%CONTENT%>\(.*\)/\1/g;p;}'
TMPLPOST = '1h;1!H;$${;g;s/\(.*\)<%CONTENT%>\(.*\)/\2/g;p;}'

book:
@@mkdir -p ${DIST_DIR}
@@bk=`sed -n ${TMPLPRE} ${SRC_DIR}/site.html`; \
end=`sed -n ${TMPLPOST} ${SRC_DIR}/site.html`; \
for file in ${SRC_DIR}/part*; do \
body=`cat $$file/ch*`; \
pre=`sed -n ${TMPLPRE} $$file/template.html`; \
post=`sed -n ${TMPLPOST} $$file/template.html`; \
bk="$$bk $$pre $$body $$post"; \
done; \
echo "$$bk $$end" > ${BOOK}
@@cp -rf ${INC_DIR}/* ${DIST_DIR}/
@@echo "Created ${BOOK} and copied the contents of ${INC_DIR} into ${DIST_DIR}."

clean:
@@echo "Removing Distribution directory:" ${DIST_DIR}
@@rm -rf ${DIST_DIR}

.PHONY: book clean
16 changes: 15 additions & 1 deletion README.md
Expand Up @@ -6,7 +6,21 @@ If you're looking for the latest release of the book, visit <http://jqfundamenta
## Contributing ##
This material is licensed under the Creative Commons Attribution-Share Alike 3.0 US license because I am eager to see other people contribute to it. Pull requests are welcome and encouraged! Check out the Issues page for the project to see the most recent list of things that still need to be done.

Want to contribute? Fork the repo, make your changes, and submit a pull request. The source for the book itself is in `/book/html/`.
Want to contribute? Fork the repo, make your changes, and submit a pull request. The source for the book itself is in the `/book/` folder.

## Building This Book ##
For editing and collaborating purposes, the contents of jQuery Fundamentals is broken into parts and chapters. If you would like to build a copy, simply type "make" in your terminal or console in the root folder of the project. If you are a windows user, you'll need either [GNU Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm) or [cygwin](http://cygwin.com/). For example:

Clone the jqfundamentals repository to your local machine<br>
`> git clone https://github.com/rmurphey/jqfundamentals.git`

Change to the newly cloned repository's directory<br>
`> cd jqfundamentals`

Make the book<br>
`> make`

This will create a folder called `/publish/` with the `index.html` file contents of the `/book/include/` folder inside of it.

## Using This Material ##
Per the license, you are welcome to use this material; if you're using it to teach a class, I'd love for you to let me know about it.
Expand Down
Binary file added book/.DS_Store
Binary file not shown.
Binary file added book/html/.DS_Store
Binary file not shown.
Binary file added book/include/.DS_Store
Binary file not shown.
Binary file added book/include/css/help.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/include/css/magnifier.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/include/css/page_white_code.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/include/css/page_white_copy.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added book/include/css/printer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
330 changes: 330 additions & 0 deletions book/include/css/shCore.css
@@ -0,0 +1,330 @@
/**
* SyntaxHighlighter
* http://alexgorbatchev.com/
*
* SyntaxHighlighter is donationware. If you are using it, please donate.
* http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
*
* @version
* 2.1.382 (June 24 2010)
*
* @copyright
* Copyright (C) 2004-2009 Alex Gorbatchev.
*
* @license
* This file is part of SyntaxHighlighter.
*
* SyntaxHighlighter is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SyntaxHighlighter is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
*/
.syntaxhighlighter,
.syntaxhighlighter div,
.syntaxhighlighter code,
.syntaxhighlighter table,
.syntaxhighlighter table td,
.syntaxhighlighter table tr,
.syntaxhighlighter table tbody
{
margin: 0 !important;
padding: 0 !important;
border: 0 !important;
outline: 0 !important;
background: none !important;
text-align: left !important;
float: none !important;
vertical-align: baseline !important;
position: static !important;
left: auto !important;
top: auto !important;
right: auto !important;
bottom: auto !important;
height: auto !important;
width: auto !important;
line-height: 1.1em !important;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important;
font-weight: normal !important;
font-style: normal !important;
font-size: 1em !important;
min-height: inherit !important; /* For IE8, FF & WebKit */
min-height: auto !important; /* For IE7 */
}

.syntaxhighlighter
{
width: 99% !important; /* 99% fixes IE8 horizontal scrollbar */
margin: 1em 0 1em 0 !important;
padding: 1px !important; /* adds a little border on top and bottom */
position: relative !important;
}

.syntaxhighlighter .bold
{
font-weight: bold !important;
}

.syntaxhighlighter .italic
{
font-style: italic !important;
}

.syntaxhighlighter .line
{
}

.syntaxhighlighter .no-wrap .line .content
{
white-space: pre !important;
}

.syntaxhighlighter .line table
{
border-collapse: collapse !important;
}

.syntaxhighlighter .line td
{
vertical-align: top !important;
}

.syntaxhighlighter .line .number
{
width: 3em !important;
}

.syntaxhighlighter .line .number code
{
width: 2.7em !important;
padding-right: .3em !important;
text-align: right !important;
display: block !important;
}

.syntaxhighlighter .line .content
{
padding-left: .5em !important;
}

.syntaxhighlighter .line .spaces
{
}

/* Disable border and margin on the lines when no gutter option is set */
.syntaxhighlighter.nogutter .line .content
{
border-left: none !important;
}

.syntaxhighlighter .bar
{
display: none !important;
}

.syntaxhighlighter .bar.show
{
display: block !important;
}

.syntaxhighlighter.collapsed .bar
{
display: block !important;
}

/* Adjust some properties when collapsed */

.syntaxhighlighter.collapsed .lines
{
display: none !important;
}

.syntaxhighlighter .lines.no-wrap
{
overflow: auto !important;
overflow-y: hidden !important;
}

/* Styles for the toolbar */

.syntaxhighlighter .toolbar
{
position: absolute !important;
right: 0px !important;
top: 0px !important;
font-size: 1px !important;
padding: 8px 8px 8px 0 !important; /* in px because images don't scale with ems */
}

.syntaxhighlighter.collapsed .toolbar
{
font-size: 80% !important;
padding: .2em 0 .5em .5em !important;
position: static !important;
}

.syntaxhighlighter .toolbar a.item,
.syntaxhighlighter .toolbar .item
{
display: block !important;
float: left !important;
margin-left: 8px !important;
background-repeat: no-repeat !important;
overflow: hidden !important;
text-indent: -5000px !important;
}

.syntaxhighlighter.collapsed .toolbar .item
{
display: none !important;
}

.syntaxhighlighter.collapsed .toolbar .item.expandSource
{
background-image: url(magnifier.png) !important;
display: inline !important;
text-indent: 0 !important;
width: auto !important;
float: none !important;
height: 16px !important;
padding-left: 20px !important;
}

.syntaxhighlighter .toolbar .item.viewSource
{
background-image: url(page_white_code.png) !important;
}

.syntaxhighlighter .toolbar .item.printSource
{
background-image: url(printer.png) !important;
}

.syntaxhighlighter .toolbar .item.copyToClipboard
{
text-indent: 0 !important;
background: none !important;
overflow: visible !important;
}

.syntaxhighlighter .toolbar .item.about
{
background-image: url(help.png) !important;
}

/**
* Print view.
* Colors are based on the default theme without background.
*/

.syntaxhighlighter.printing,
.syntaxhighlighter.printing .line.alt1 .content,
.syntaxhighlighter.printing .line.alt2 .content,
.syntaxhighlighter.printing .line.highlighted .number,
.syntaxhighlighter.printing .line.highlighted.alt1 .content,
.syntaxhighlighter.printing .line.highlighted.alt2 .content,
{
background: none !important;
}

/* Gutter line numbers */
.syntaxhighlighter.printing .line .number
{
color: #bbb !important;
}

/* Add border to the lines */
.syntaxhighlighter.printing .line .content
{
color: #000 !important;
}

/* Toolbar when visible */
.syntaxhighlighter.printing .toolbar
{
display: none !important;
}

.syntaxhighlighter.printing a
{
text-decoration: none !important;
}

.syntaxhighlighter.printing .plain,
.syntaxhighlighter.printing .plain a
{
color: #000 !important;
}

.syntaxhighlighter.printing .comments,
.syntaxhighlighter.printing .comments a
{
color: #008200 !important;
}

.syntaxhighlighter.printing .string,
.syntaxhighlighter.printing .string a
{
color: blue !important;
}

.syntaxhighlighter.printing .keyword
{
color: #069 !important;
font-weight: bold !important;
}

.syntaxhighlighter.printing .preprocessor
{
color: gray !important;
}

.syntaxhighlighter.printing .variable
{
color: #a70 !important;
}

.syntaxhighlighter.printing .value
{
color: #090 !important;
}

.syntaxhighlighter.printing .functions
{
color: #ff1493 !important;
}

.syntaxhighlighter.printing .constants
{
color: #0066CC !important;
}

.syntaxhighlighter.printing .script
{
font-weight: bold !important;
}

.syntaxhighlighter.printing .color1,
.syntaxhighlighter.printing .color1 a
{
color: #808080 !important;
}

.syntaxhighlighter.printing .color2,
.syntaxhighlighter.printing .color2 a
{
color: #ff1493 !important;
}

.syntaxhighlighter.printing .color3,
.syntaxhighlighter.printing .color3 a
{
color: red !important;
}

0 comments on commit 55eb9dd

Please sign in to comment.