Skip to content

Commit

Permalink
adds slim for templating, changes haml templates to slim
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremytregunna committed Sep 12, 2011
1 parent 3ff17bd commit 2099839
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 225 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ source :rubygems
gem "proton", "~> 0.3.4"
gem "rack-cache", "~> 1.0.0"
gem "sass", "~> 3.1.7"
gem "slim"
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ GEM
rack (>= 0.4)
sass (3.1.7)
shake (0.1.3)
slim (1.0.2)
temple (~> 0.3.3)
tilt (~> 1.3.2)
syntax (1.0.0)
temple (0.3.4)
tilt (1.3.3)

PLATFORMS
Expand All @@ -40,3 +44,4 @@ DEPENDENCIES
proton (~> 0.3.4)
rack-cache (~> 1.0.0)
sass (~> 3.1.7)
slim
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
Instructions
------------
# Acute website

The website isn't anything spectacular, but it serves its purpose: Present information, including documentation to the user.

## Contributing

If you want to make some changes, a few things to keep in mind.

1. Make sure Ruby (>= v1.8) is installed.
2. Install the proton gem: `gem install proton`
3. Build the site HTML files by typing: `proton build`
2. Install bundler (`gem install bundler`)
3. Run `bundle install`
4. Build the site HTML files by typing: `proton build`

(If #2 fails, you may need to type `sudo gem install proton` instead.)
(If #2 fails, you may need to type `sudo gem install bundler` instead.)


1 change: 1 addition & 0 deletions _extensions/slim.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require 'slim'
40 changes: 0 additions & 40 deletions _layouts/default.haml

This file was deleted.

36 changes: 36 additions & 0 deletions _layouts/default.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
doctype 5
html
head
title= page.title

meta charset='UTF-8'
meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'
meta name='viewport' content='width=device-width, initial-scale=1.0'

- if page.meta.keywords
meta name='keywords' content=page.meta.keywords
- if page.meta.description
meta name='description' content=page.meta.description

link rel='stylesheet' href='/css/style.css'

body
#container
#header
h1
a href="/" style="text-decoration:none;background-color:#fff;" Acute!
- if page.subtitle
h6 = page.subtitle
- else
h6 = page.title

#content
== yield

#footer
p
| Generated by
a href="http://sinefunc.com/proton/" Proton
| and hosted on
a href="https://github.com/" class='period' GitHub

60 changes: 15 additions & 45 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Acute Programming Language</title>
<meta charset='UTF-8' />
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<link href='/css/style.css' rel='stylesheet' />
</head>
<body>
<div id='container'>
<div id='header'>
<h1>
<a href='/' style='text-decoration:none;background-color:#fff;'>Acute!</a>
</h1>
<h6>Small, focused documentation</h6>
</div>
<div id='content'>
<h2 id='documentation'>Documentation</h2>

<p>This list of documentation is by no means complete, and will be expanded on as appropriate. Feel free to <a href='https://github.com/acutelanguage/acutelanguage.github.com'>clone this repository</a>, add to the documentation and send a pull request.</p>

<h3 id='syntax'><a href='/docs/syntax.html'>Syntax</a></h3>

<p>This document describes the syntax of Acute, including some code examples.</p>

<h3 id='object_model'>Object Model</h3>

<p>Here we discuss the object model in detail, including all hooks you have access to, why we do things this way, and why we believe our model to be awesome.</p>

<h3 id='methods'>Methods</h3>

<p>In this section, you&#8217;ll learn how methods are implemented, how to use them, and why they&#8217;re so powerful.</p>
</div>
<div id='footer'>
<p>
Generated by
<a href='http://sinefunc.com/proton/'>Proton</a>
and hosted on
<a class='period' href='https://github.com/'>GitHub</a>
</p>
</div>
</div>
</body>
</html>
<!DOCTYPE html><html><head><title>Acute Programming Language</title><meta charset="UTF-8" /><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" /><meta content="width=device-width, initial-scale=1.0" name="viewport" /><link href="/css/style.css" rel="stylesheet" /></head><body><div id="container"><div id="header"><h1><a href="/" style="text-decoration:none;background-color:#fff;">Acute!</a></h1><h6>Small, focused documentation</h6></div><div id="content"><h2 id='documentation'>Documentation</h2>

<p>This list of documentation is by no means complete, and will be expanded on as appropriate. Feel free to <a href='https://github.com/acutelanguage/acutelanguage.github.com'>clone this repository</a>, add to the documentation and send a pull request.</p>

<h3 id='syntax'><a href='/docs/syntax.html'>Syntax</a></h3>

<p>This document describes the syntax of Acute, including some code examples.</p>

<h3 id='object_model'>Object Model</h3>

<p>Here we discuss the object model in detail, including all hooks you have access to, why we do things this way, and why we believe our model to be awesome.</p>

<h3 id='methods'>Methods</h3>

<p>In this section, you&#8217;ll learn how methods are implemented, how to use them, and why they&#8217;re so powerful.</p></div><div id="footer"><p><Generated>by</Generated><a href="http://sinefunc.com/proton/">Proton</a><and>hosted on</and><a class="period" href="https://github.com/">} GitHub</a></p></div></div></body></html>
96 changes: 33 additions & 63 deletions docs/syntax.html
Original file line number Diff line number Diff line change
@@ -1,63 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<title>Acute Programming Language</title>
<meta charset='UTF-8' />
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<link href='/css/style.css' rel='stylesheet' />
</head>
<body>
<div id='container'>
<div id='header'>
<h1>
<a href='/' style='text-decoration:none;background-color:#fff;'>Acute!</a>
</h1>
<h6>Small, focused documentation</h6>
</div>
<div id='content'>
<h2 id='syntax'>Syntax</h2>

<p>Acute implements a basic syntax, which can be composed out of three rules:</p>

<pre><code>expression ::= literal | message
literal ::= [0-9]+ | &quot;[^&quot;]*&quot;
message ::= identifier [ &#39;(&#39; [ arg [ &#39;,&#39; arg ]* ]? &#39;)&#39; ]?</code></pre>

<p>All message sends take this form. We do not support any operators at all, including assignment. Everything is done through message sends, including assignment.</p>

<h3 id='examples'>Examples</h3>

<p>To add two numbers, one might construct a chain of messages like the following:</p>

<pre><code>1 +(2)</code></pre>

<p>Note the parenthesis, these are required. Any message that takes arguments requires parenthesis, addition is no different than any other message, it is not an operator.</p>

<p>We can create a new object by passing the <code>clone</code> message to some other object.</p>

<pre><code>Object clone</code></pre>

<p>…and methods can be defined like this:</p>

<pre><code>method(a, b, a +(b))</code></pre>

<p>Obviously, we&#8217;ll want to define a name for our method; or rather, associate our method with some slot named something. To do this, we can call <code>setSlot</code>.</p>

<pre><code>setSlot(&quot;add&quot;, method(a, b, a +(b)))</code></pre>

<p>Now we can call it like this:</p>

<pre><code>add(1, 2)</code></pre>
</div>
<div id='footer'>
<p>
Generated by
<a href='http://sinefunc.com/proton/'>Proton</a>
and hosted on
<a class='period' href='https://github.com/'>GitHub</a>
</p>
</div>
</div>
</body>
</html>
<!DOCTYPE html><html><head><title>Acute Programming Language</title><meta charset="UTF-8" /><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" /><meta content="width=device-width, initial-scale=1.0" name="viewport" /><link href="/css/style.css" rel="stylesheet" /></head><body><div id="container"><div id="header"><h1><a href="/" style="text-decoration:none;background-color:#fff;">Acute!</a></h1><h6>Small, focused documentation</h6></div><div id="content"><h2 id='syntax'>Syntax</h2>

<p>Acute implements a basic syntax, which can be composed out of three rules:</p>

<pre><code>expression ::= literal | message
literal ::= [0-9]+ | &quot;[^&quot;]*&quot;
message ::= identifier [ &#39;(&#39; [ arg [ &#39;,&#39; arg ]* ]? &#39;)&#39; ]?</code></pre>

<p>All message sends take this form. We do not support any operators at all, including assignment. Everything is done through message sends, including assignment.</p>

<h3 id='examples'>Examples</h3>

<p>To add two numbers, one might construct a chain of messages like the following:</p>

<pre><code>1 +(2)</code></pre>

<p>Note the parenthesis, these are required. Any message that takes arguments requires parenthesis, addition is no different than any other message, it is not an operator.</p>

<p>We can create a new object by passing the <code>clone</code> message to some other object.</p>

<pre><code>Object clone</code></pre>

<p>…and methods can be defined like this:</p>

<pre><code>method(a, b, a +(b))</code></pre>

<p>Obviously, we&#8217;ll want to define a name for our method; or rather, associate our method with some slot named something. To do this, we can call <code>setSlot</code>.</p>

<pre><code>setSlot(&quot;add&quot;, method(a, b, a +(b)))</code></pre>

<p>Now we can call it like this:</p>

<pre><code>add(1, 2)</code></pre></div><div id="footer"><p><Generated>by</Generated><a href="http://sinefunc.com/proton/">Proton</a><and>hosted on</and><a class="period" href="https://github.com/">} GitHub</a></p></div></div></body></html>
52 changes: 1 addition & 51 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,51 +1 @@
<!DOCTYPE html>
<html>
<head>
<title>Acute Programming Language</title>
<meta charset='UTF-8' />
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible' />
<meta content='width=device-width, initial-scale=1.0' name='viewport' />
<link href='/css/style.css' rel='stylesheet' />
</head>
<body>
<div id='container'>
<div id='header'>
<h1>
<a href='/' style='text-decoration:none;background-color:#fff;'>Acute!</a>
</h1>
<h6>A small, focused language</h6>
</div>
<div id='content'>
<p>
Acute is an object-oriented programming language based on prototypes. It is an implementation of
<a href='http://www.iolanguage.com/'>Io</a>
and aims to be entirely self-hosting. After all, any language worth its weight in NAND flash is self-hosting, isn't it?
</p>
<h3>Feature list, ready for it?</h3>
<p>
Here's a list of the features in Acute, more detail will be covered in the
<a href='/docs/index.html'>documentation.</a>
<ul>
<li>Lightweight Object-Oriented language</li>
<li>Bootstrapped in Ruby (later, LLVM IR)</li>
<li>Enhanced lightweight object model (differs from Io, more powerful)</li>
<li>Slots as first class citizens (known as Metas in Acute)</li>
</ul>
</p>
<h3>Where's the code, Jack?</h3>
<p>
<a href='https://github.com/acutelanguage/acute'>GitHub</a>
of course!
</p>
</div>
<div id='footer'>
<p>
Generated by
<a href='http://sinefunc.com/proton/'>Proton</a>
and hosted on
<a class='period' href='https://github.com/'>GitHub</a>
</p>
</div>
</div>
</body>
</html>
<!DOCTYPE html><html><head><title>Acute Programming Language</title><meta charset="UTF-8" /><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" /><meta content="width=device-width, initial-scale=1.0" name="viewport" /><link href="/css/style.css" rel="stylesheet" /></head><body><div id="container"><div id="header"><h1><a href="/" style="text-decoration:none;background-color:#fff;">Acute!</a></h1><h6>A small, focused language</h6></div><div id="content"><p>Acute is an object-oriented programming language based on prototypes. It is an implementation of <a href="http://www.iolanguage.com/">Io</a> and aims to be entirely self-hosting. After all, any language worth its weight in NAND flash is self-hosting, isn't it?</p><h3>Feature list, ready for it?</h3><p>Here's a list of the features in Acute, more detail will be covered in the<a href="/docs/index.html">documentation.</a><ul><li>Lightweight Object-Oriented language</li><li>Bootstrapped in Ruby (later, LLVM IR)</li><li>Enhanced lightweight object model (differs from Io, more powerful)</li><li>Slots as first class citizens (known as Metas in Acute)</li></ul></p><h3>Where's the code, Jack?</h3><p><a href="https://github.com/acutelanguage/acute">GitHub</a> of course!</p></div><div id="footer"><p><Generated>by</Generated><a href="http://sinefunc.com/proton/">Proton</a><and>hosted on</and><a class="period" href="https://github.com/">} GitHub</a></p></div></div></body></html>
21 changes: 0 additions & 21 deletions site/index.haml

This file was deleted.

21 changes: 21 additions & 0 deletions site/index.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
layout: default
title: Acute Programming Language
subtitle: A small, focused language
--
p
| Acute is an object-oriented programming language based on prototypes. It is an implementation of
a href="http://www.iolanguage.com/" Io
| and aims to be entirely self-hosting. After all, any language worth its weight in NAND flash is self-hosting, isn't it?
h3 Feature list, ready for it?
p
| Here's a list of the features in Acute, more detail will be covered in the
a href="/docs/index.html" documentation.
ul
li Lightweight Object-Oriented language
li Bootstrapped in Ruby (later, LLVM IR)
li Enhanced lightweight object model (differs from Io, more powerful)
li Slots as first class citizens (known as Metas in Acute)
h3 Where's the code, Jack?
p
a href="https://github.com/acutelanguage/acute" GitHub
| of course!

0 comments on commit 2099839

Please sign in to comment.