Skip to content

Commit

Permalink
moved a few things around, offline font css
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminplee committed Jun 7, 2012
1 parent 6e36540 commit f09db22
Show file tree
Hide file tree
Showing 2 changed files with 115 additions and 63 deletions.
40 changes: 40 additions & 0 deletions css/font.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* http://fonts.googleapis.com/css?family=Open+Sans:300italic,600italic,700italic,300,400,800
*/

@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url('http://themes.googleusercontent.com/static/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3bO3LdcAZYWl9Si6vvxL-qU.woff') format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 700;
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url('http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxhbnBKKEOwRKgsHDreGcocg.woff') format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url('http://themes.googleusercontent.com/static/fonts/opensans/v6/DXI1ORHCpsQm3Vp6mXoaTaRDOzjiPcYnFooOUGCOsRk.woff') format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 800;
src: local('Open Sans Extrabold'), local('OpenSans-Extrabold'), url('http://themes.googleusercontent.com/static/fonts/opensans/v6/EInbV5DfGHOiMmvb1Xr-hqRDOzjiPcYnFooOUGCOsRk.woff') format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 600;
src: local('Open Sans Semibold Italic'), local('OpenSans-SemiboldItalic'), url('http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxuw_rQOTGi-AJs5XCWaKIhU.woff') format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 300;
src: local('Open Sans Light Italic'), local('OpenSansLight-Italic'), url('http://themes.googleusercontent.com/static/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxvR_54zmj3SbGZQh3vCOwvY.woff') format('woff');
}
138 changes: 75 additions & 63 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="description" content="A first taste of Erlang: what you should know before you start your next project" />
<meta name="author" content="Benjamin P Lee and Matt Campbell" />

<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,600italic,700italic,300,400,800' rel='stylesheet' type='text/css'>
<link href='css/font.css' rel='stylesheet' type='text/css'>
<link href="css/normalize.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
<link href="css/shCore.css" rel="stylesheet" type="text/css" />
Expand Down Expand Up @@ -146,45 +146,6 @@
<p class="bold big">Erlang <b>has...</b></p>
</div>

<div class="step has" data-x="1100" data-y="200" data-scale="0.01">
<p class="bold">Single assignment</p>
<p><i>truth statements; synonyms</i></p>
<p><i>no mutable state</i></p>
<p class="big"><b>pattern matching</b></p>
<p><i>we will come back to this</i></p>
</div>

<div class="step has" data-x="700" data-y="-200" data-scale="0.5">
<p class="bold">Functions</p>
<p><i>{M, F, A} = {module, function, arity}</i></p>
</div>

<div class="step code" data-x="1000" data-y="-200" data-scale="0.2">
<pre class='brush: erlang'>
-module(math).

add(X, Y) -> X + Y.
increment(X) -> add(X, 1).
</pre>
</div>

<div class="step has" data-x="800" data-y="-100" data-scale="0.5">
<p class="bold">4 different expression terminators</p>
<p class="big"><b>period, comma, semi-colon,<br/> and nothing!</b></p>
</div>

<div class="step code" data-x="1200" data-y="-100" data-scale="0.2">
<pre class='brush: erlang'>
foo(X, Y) ->
Y = math:add(X, Y),
Z = Y rem 2,
case Z of
0 -> true;
1 -> undefined
end.
</pre>
</div>

<div class="step has" data-x="800" data-y="0" data-scale="0.5">
<p class="bold">Elementary data types ONLY</p>
<p><i>no objects</i></p>
Expand Down Expand Up @@ -229,6 +190,63 @@
</pre>
</div>

<div class="step has" data-x="1100" data-y="200" data-scale="0.01">
<p class="bold">Single assignment</p>
<p><i>truth statements; synonyms</i></p>
<p><i>no mutable state</i></p>
<p class="big"><b>pattern matching</b></p>
<p><i>we will come back to this</i></p>
</div>

<div class="step code" data-x="1100" data-y="150" data-scale="0.1">
<pre class='brush: erlang'>
X = 4.
Y = 2.
Z = X = Y + 2.

I = {point, X, Y}.
{Type, _, A} = I.
% Type = point.
% A = 2

List = [1, 2, 3].
[Head | Tail] = List.
% Head = 1
% Tail = [2, 3]
</pre>
</div>

<div class="step has" data-x="700" data-y="-200" data-scale="0.5">
<p class="bold">Functions</p>
<p><i>{M, F, A} = {module, function, arity}</i></p>
</div>

<div class="step code" data-x="1000" data-y="-200" data-scale="0.2">
<pre class='brush: erlang'>
-module(math).

add(X, Y) -> X + Y.
increment(X) -> add(X, 1).
</pre>
</div>

<div class="step has" data-x="800" data-y="-100" data-scale="0.5">
<p class="bold">4 different expression terminators</p>
<p class="big"><b>period, comma, semi-colon,<br/> and nothing!</b></p>
</div>

<div class="step code" data-x="1200" data-y="-100" data-scale="0.2">
<pre class='brush: erlang'>
foo(X, Y) ->
Y = math:add(X, Y),
Z = Y rem 2,
case Z of
0 -> true;
1 -> undefined
end.
</pre>
</div>

<div class="step code" data-x="1200" data-y="50" data-scale="0.1">
<p class="bold">Funs</p>
<p><i>lambdas. closures.</i></p>
Expand Down Expand Up @@ -258,27 +276,6 @@
<p class="big"><b>pattern matching</b></p>
</div>

<div class="step code" data-x="1100" data-y="150" data-scale="0.1">
<p class="bold">Simple Examples</p>
</div>

<div class="step code" data-x="1100" data-y="150" data-scale="0.1">
<pre class='brush: erlang'>
X = 4.
Y = 2.
Z = X = Y + 2.

I = {point, X, Y}.
{Type, _, _} = I.
Type = point.

List = [1, 2, 3].
[Head | Tail] = List.
% Head = 1
% Tail = [2, 3]
</pre>
</div>

<div class="step code" data-x="1100" data-y="200" data-scale="0.1">
<p class="bold">Recursive <b>Fibonacci</b> in Erlang</p>
<pre class='brush: erlang'>
Expand All @@ -289,6 +286,20 @@
</pre>
</div>

<div class="step code" data-x="1300" data-y="200" data-scale="0.1">
<p class="bold">Internal Pattern Matching</p>
<pre class='brush: erlang'>
loop() ->
receive
{Link, Chain, Link} ->
Found(Chain),
ok;
{Link, Chain, Goal} ->
loop()
end.
</pre>
</div>

<div class="step smallcode" data-x="1100" data-y="250" data-scale="0.1">
<p class="bold">Crazy bit string pattern matching</p>
<p><i>one byte TYPE, one byte LENGTH, then payload</i></p>
Expand All @@ -306,8 +317,9 @@


<div id="experience" class="step" data-x="-5000" data-y="100">
<p class="big bold"><b>Learn from our experience</b></p>
<p class="big bold"><b>Personal Experience</b></p>
</div>

<div id="experience1" class="step" data-x="-5000" data-y="500">
<p class="big">Not the solution to every problem</p>
<p class="extralight">
Expand Down Expand Up @@ -354,7 +366,7 @@

<div id="stillhungry" class="step" data-x="700" data-y="400">
<p class="big bold"><b>Still Hungry?</b></p>
<p>Ask us for more</p>
<p>Get your hands dirty</p>
</div>

<div id="forkme" class="step" data-x="1200" data-y="500">
Expand Down

0 comments on commit f09db22

Please sign in to comment.