Skip to content
This repository has been archived by the owner on Jun 25, 2019. It is now read-only.

Commit

Permalink
moving things around and updating codesplit
Browse files Browse the repository at this point in the history
  • Loading branch information
runemadsen committed Apr 23, 2016
1 parent 4ebfdb4 commit b40e768
Show file tree
Hide file tree
Showing 293 changed files with 61 additions and 2,587 deletions.
14 changes: 5 additions & 9 deletions chapters/01_vectors.html
Expand Up @@ -38,37 +38,33 @@ <h2>1.1 Vectors, You Complete Me</h2>

<div data-type="example"><h5>Example 1.1: Bouncing ball with no vectors</h5></div>

<pre data-code-language="java" data-type="programlisting">
//[full] Variables for location and speed of ball.
<pre data-code-language="java" data-type="programlisting" class="codesplit">
// Variables for location and speed of ball.
float x = 100;
float y = 100;
float xspeed = 1;
float yspeed = 3.3;
//[end]

//[full] Remember how Processing works? setup() is executed once when the sketch starts and draw() loops forever and ever (until you quit).
// {!4} Remember how Processing works? setup() is executed once when the sketch starts and draw() loops forever and ever (until you quit).
void setup() {
size(640,360);
background(255);
}
//[end]

void draw() {
background(255);

//[full] Move the ball according to its speed.
// Move the ball according to its speed.
x = x + xspeed;
y = y + yspeed;
//[end]

//[full] Check for bouncing.
// {!6} Check for bouncing.
if ((x &gt; width) || (x &lt; 0)) {
xspeed = xspeed * -1;
}
if ((y &gt; height) || (y &lt; 0)) {
yspeed = yspeed * -1;
}
//[end]

stroke(0);
fill(175);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
25 changes: 2 additions & 23 deletions magicbook.json
Expand Up @@ -2,22 +2,7 @@
"title":"The Nature of Code",
"destination":"build/:build",
"files":[
"chapters/00_1_titlepage.html",
"chapters/00_2_dedication.html",
"chapters/00_3_creditscopyright.html",
"chapters/00_5_preface.html",
"chapters/00_7_intro.html",
"chapters/01_vectors.html",
"chapters/02_forces.html",
"chapters/03_oscillation.html",
"chapters/04_particles.html",
"chapters/05_physicslib.html",
"chapters/06_steering.html",
"chapters/07_ca.html",
"chapters/08_fractals.html",
"chapters/09_ga.html",
"chapters/10_nn.html",
"chapters/xx_1_furtherreading.html"
"chapters/01_vectors.html"
],
"addPlugins":["magicbook-codesplit"],
"builds":[
Expand All @@ -29,18 +14,12 @@
},
"layout":"layouts/pdf.html",
"stylesheets":{
"files":[
"noc_pdf/stylesheets/print.css",
"noc_pdf/stylesheets/code-print.css",
"noc_pdf/stylesheets/fonts.scss",
"noc_pdf/stylesheets/math.css"
]
"files": [ "stylesheets/pdf.scss" ]
},
"images" : {
"files" : "noc_pdf/imgs/**/*.*"
},
"fonts" : {
"files" : "noc_pdf/fonts/*",
"destination" : "assets/fonts/"
}
}
Expand Down
312 changes: 0 additions & 312 deletions noc_html/stylesheets/fonts.css

This file was deleted.

Binary file removed noc_pdf/fonts/23AC3F_0_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_0_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_0_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_10_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_10_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_10_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_11_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_11_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_11_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_12_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_12_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_12_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_13_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_13_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_13_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_14_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_14_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_14_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_15_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_15_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_15_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_16_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_16_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_16_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_17_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_17_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_17_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_18_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_18_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_18_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_19_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_19_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_19_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1A_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1A_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1A_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1B_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1B_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1B_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1C_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1C_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1C_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1D_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1D_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1D_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1E_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1E_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1E_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1F_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1F_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1F_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_1_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_20_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_20_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_20_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_21_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_21_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_21_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_22_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_22_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_22_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_23_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_23_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_23_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_24_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_24_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_24_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_25_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_25_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_25_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_26_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_26_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_26_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_27_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_27_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_27_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_28_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_28_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_28_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_29_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_29_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_29_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_2_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_2_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_2_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_3_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_3_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_3_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_4_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_4_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_4_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_5_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_5_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_5_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_6_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_6_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_6_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_7_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_7_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_7_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_8_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_8_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_8_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_9_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_9_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_9_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_A_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_A_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_A_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_B_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_B_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_B_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_C_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_C_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_C_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_D_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_D_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_D_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_E_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_E_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_E_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_F_0.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_F_0.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/23AC3F_F_0.woff
Binary file not shown.
Binary file removed noc_pdf/fonts/ProximaNova-Bold.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/ProximaNova-BoldIt.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/ProximaNova-RegIt.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/ProximaNova-Regular.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/ProximaNova-Regular.svg
Binary file not shown.
Binary file removed noc_pdf/fonts/ProximaNova-Regular.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/ProximaNova-Semibold.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/ProximaNova-Semibold.svg
Binary file not shown.
Binary file removed noc_pdf/fonts/ProximaNova-Semibold.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/Vijaya.eot
Binary file not shown.
Binary file removed noc_pdf/fonts/Vijaya.otf
Binary file not shown.
2,228 changes: 0 additions & 2,228 deletions noc_pdf/fonts/Vijaya.svg

This file was deleted.

Binary file removed noc_pdf/fonts/Vijaya.ttf
Binary file not shown.
Binary file removed noc_pdf/fonts/Vijaya.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"dependencies": {
"magicbook-codesplit": "0.0.6",
"magicbook-codesplit": "0.0.10",
"magicbook-katex": "0.0.1"
}
}
4 changes: 4 additions & 0 deletions stylesheets/html.scss
@@ -0,0 +1,4 @@
@import 'shared/fonts';
@import 'shared/codesplit';
@import 'html/html';
@import 'html/code';
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions stylesheets/pdf.scss
@@ -0,0 +1,5 @@
@import 'shared/fonts';
@import 'shared/codesplit';
@import 'pdf/print';
@import 'pdf/code';
//@import 'pdf/math';
File renamed without changes.
3 changes: 1 addition & 2 deletions noc_pdf/stylesheets/math.css → stylesheets/pdf/_math.scss
Expand Up @@ -13,7 +13,6 @@ math[mode="display"] {

@media screen { /* hide from old browsers */


/* Rules dealing with the various values of the "mathvariant" attribute: */

math *.[mathvariant="normal"] {
Expand Down Expand Up @@ -275,4 +274,4 @@ math *.[mathbackground="aqua"] {
} /* Close "@media screen" scope */

@media aural {
}
}
24 changes: 12 additions & 12 deletions noc_pdf/stylesheets/print.css → stylesheets/pdf/_print.scss
Expand Up @@ -27,7 +27,7 @@ body {
/* Page Breaks
_____________________________________________________________________________ */

div[data-type="note"],
div[data-type="note"],
div[data-type="tip"],
div[data-type="exercise"]
{
Expand All @@ -43,7 +43,7 @@ span.example {
page-break-after: avoid;
}

section[data-type="chapter"], section[data-type="acknowledgments"],
section[data-type="chapter"], section[data-type="acknowledgments"],
section[data-type="dedication"],
section[data-type="credits"],
section[data-type="introduction"],
Expand Down Expand Up @@ -535,7 +535,7 @@ div[data-type="note"] h2, div[data-type="tip"] h2 {
color: #000000;/*#191919;*/
margin: 0 0 0.3em 0;
font-style: normal;
font-family: "ProximaNova-Semibold";
font-family: "ProximaNova-Semibold";
}

/* == BREAKOUT BOXES */
Expand All @@ -561,7 +561,7 @@ div.example, div[data-type="exercise"] {
div.example h3[id],
div.example h4[id],
div.example h5[id],
div.example h6[id], div[data-type="exercise"] h5 {
div.example h6[id], div[data-type="exercise"] h5 {
text-align: right;
margin: 1em 0.9em;
position: absolute;
Expand Down Expand Up @@ -597,7 +597,7 @@ div.example *, div[data-type="exercise"] * {
font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
/*a little bit smaller than body?*/
font-size: 8pt;
color: #00000;
color: #000000;
}

.mono, .formula, .formula2{
Expand Down Expand Up @@ -723,19 +723,19 @@ figure.three-col
float: left;
}

figure.two-col,
figure.two-col,
figure.two-col-borderless,
figure.three-col
figure.three-col
{
position: relative;
margin: 1.7em 0;
}

figure.two-col img,
figure..two-col canvas,
figure..two-col-borderless canvas,
figure..three-col img,
figure..three-col canvas
figure.two-col canvas,
figure.two-col-borderless canvas,
figure.three-col img,
figure.three-col canvas
{
width: 100%;
max-width: 100%;
Expand Down Expand Up @@ -856,4 +856,4 @@ pre {
background-color: #f0f0f0;
display: none;
width: 100%;
}
}
31 changes: 31 additions & 0 deletions stylesheets/shared/_codesplit.scss
@@ -0,0 +1,31 @@
.codesplit {

.pair {

background-color: #e5e5e5;

&:after {
content: "";
display: table;
clear: both;
}

&.no-comment {
background-color: transparent;
}
}

.comment {
width: 40%;
float: right;
p {
margin: 0;
}
}

.code {
width: 58%;
float: left;
}

}
File renamed without changes.

0 comments on commit b40e768

Please sign in to comment.