Skip to content

Commit

Permalink
Used html instead of haml
Browse files Browse the repository at this point in the history
  • Loading branch information
friedrich committed Apr 10, 2013
1 parent add0c04 commit 34e295e
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 39 deletions.
13 changes: 12 additions & 1 deletion Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = (grunt) ->
grunt.loadNpmTasks("grunt-contrib-connect")
grunt.loadNpmTasks("grunt-contrib-livereload")
grunt.loadNpmTasks("grunt-regarde")
grunt.loadNpmTasks("grunt-contrib-copy")
# grunt.loadNpmTasks("grunt-contrib-uglify")

grunt.initConfig
Expand All @@ -42,6 +43,12 @@ module.exports = (grunt) ->
path.replace(/^src\//, "build/").replace(/\.haml$/, ".html")
})

copy:
all:
files: [
{ expand: true, cwd: "src", src: ["**/*.html"], dest: "build" }
]

concat:
js:
files:
Expand Down Expand Up @@ -82,10 +89,14 @@ module.exports = (grunt) ->
files: ["src/**/*.haml"]
tasks: ["haml"]
spawn: true
copy:
files: ["src/**/*.html"]
tasks: ["copy"]
spawn: true
livereload:
files: ["assets/**", "build/**"]
tasks: ["livereload"]

grunt.registerTask("build", ["haml", "compass", "coffee", "concat", "symlink"])
grunt.registerTask("build", ["copy", "haml", "compass", "coffee", "concat", "symlink"])
grunt.registerTask("default", ["clean", "build"])
grunt.registerTask("server", ["clean", "build", "livereload-start", "connect", "regarde"])
49 changes: 48 additions & 1 deletion build/index.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,49 @@
<!DOCTYPE html>
<html><head><meta charset="utf-8" /><link href="/styles/screen.css" rel="stylesheet" type="text/css" /><title>The Interactive String</title></head><body><div class="container"><header><h1>The Interactive String</h1><p>Friedrich Schöller</p></header><div data-string="main" class="string"><div data-string-display="data-string-display" class="display"><noscript><p>Javascript is required.</p></noscript></div><div data-string-controls="data-string-controls" class="controls"><!--%button.string-type open / closed--><textarea data-string-modes="data-string-modes"></textarea></div></div><div class="description"><h2 class="numbered">Calculations</h2><p>The length of the string is set equal to one. Center of mass variables are chosen to make the string oscillate around the point of origin. This leaves us with the transverse oscillators as degrees of freedom. In the classical description the string is massive, except when all modes have zero amplitude which makes it massless (and boring).</p><!--%h3.numbered Open String--><!--\[X^i = 2 sqrt{2alpha'} sum_{n=1}^infty rac{1}{n} left( a_n^i sin(pi cn au) - b_n^i cos(pi cn au) ight) cos(pi nsigma) ]--><!--%h3.numbered Closed String--><h2>References</h2><ol><li>Polchinski, Joseph (1998). <i>String Theory</i>, Cambridge University Press</li></ol></div></div><script src="/js/index.js"></script></body></html>
<html>
<head>
<meta charset="utf-8">
<link href="/styles/screen.css" rel="stylesheet" type="text/css">
<title>The Interactive String</title>
</head>
<body>
<div class="container">
<header>
<h1>
The Interactive String
</h1>
<p>Friedrich Schöller</p>
</header>
<div class="string" data-string="main">
<div class="display" data-string-display>
<noscript>
<p>Javascript is required.</p>
</noscript>
</div>
<div class="controls" data-string-controls>
<!-- %button.string-type open / closed -->
<textarea data-string-modes></textarea>
</div>
</div>
<div class="description">
<h2 class="numbered">Calculations</h2>
<p>
The length of the string is set equal to one. Center of mass variables are chosen to make the string oscillate around the point of origin. This leaves us with the transverse oscillators as degrees of freedom. In the classical description the string is massive, except when all modes have zero amplitude which makes it massless (and boring).
</p>
<!-- %h3.numbered Open String -->
<!-- \\[X^i = 2 \sqrt{2\alpha'} \sum_{n=1}^\infty \frac{1}{n} \left( a_n^i \sin(\pi cn\tau) - b_n^i \cos(\pi cn\tau) \right) \cos(\pi n\sigma) \] -->
<!-- %h3.numbered Closed String -->
<h2>References</h2>
<ol>
<li>
Polchinski, Joseph (1998).

<i>String Theory</i>
, Cambridge University Press
</li>
</ol>
</div>
</div>
<script src="/js/index.js"></script>
<!-- <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> -->
</body>
</html>
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"grunt-contrib-connect": "~0.2.0",
"grunt-haml": "~0.4.0",
"grunt": "~0.4.1",
"grunt-symbolic-link": "~0.3.1"
"grunt-symbolic-link": "~0.3.1",
"grunt-contrib-copy": "~0.4.1"
}
}
36 changes: 0 additions & 36 deletions src/index.haml

This file was deleted.

49 changes: 49 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="/styles/screen.css" rel="stylesheet" type="text/css">
<title>The Interactive String</title>
</head>
<body>
<div class="container">
<header>
<h1>
The Interactive String
</h1>
<p>Friedrich Schöller</p>
</header>
<div class="string" data-string="main">
<div class="display" data-string-display>
<noscript>
<p>Javascript is required.</p>
</noscript>
</div>
<div class="controls" data-string-controls>
<!-- %button.string-type open / closed -->
<textarea data-string-modes></textarea>
</div>
</div>
<div class="description">
<h2 class="numbered">Calculations</h2>
<p>
The length of the string is set equal to one. Center of mass variables are chosen to make the string oscillate around the point of origin. This leaves us with the transverse oscillators as degrees of freedom. In the classical description the string is massive, except when all modes have zero amplitude which makes it massless (and boring).
</p>
<!-- %h3.numbered Open String -->
<!-- \\[X^i = 2 \sqrt{2\alpha'} \sum_{n=1}^\infty \frac{1}{n} \left( a_n^i \sin(\pi cn\tau) - b_n^i \cos(\pi cn\tau) \right) \cos(\pi n\sigma) \] -->
<!-- %h3.numbered Closed String -->
<h2>References</h2>
<ol>
<li>
Polchinski, Joseph (1998).

<i>String Theory</i>
, Cambridge University Press
</li>
</ol>
</div>
</div>
<script src="/js/index.js"></script>
<!-- <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> -->
</body>
</html>

0 comments on commit 34e295e

Please sign in to comment.