staticmatic 0.8.8 → 0.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -155,11 +155,11 @@ module StaticMatic
155
155
  end
156
156
  end
157
157
 
158
- def generate_partial(name)
158
+ def generate_partial(name, options = {})
159
159
  partial_path = File.join(@src_dir, 'partials', "#{name}.haml")
160
160
 
161
161
  if File.exists?(partial_path)
162
- generate_html_from_template_source(File.read(partial_path))
162
+ generate_html_from_template_source(File.read(partial_path), options)
163
163
  end
164
164
  end
165
165
 
@@ -181,8 +181,8 @@ module StaticMatic
181
181
  #
182
182
  # generate_html_from_template_source("content:\n= yield") { "blah" } -> "content: blah"
183
183
  #
184
- def generate_html_from_template_source(source)
185
- html = Haml::Engine.new(source)
184
+ def generate_html_from_template_source(source, options = {})
185
+ html = Haml::Engine.new(source, options)
186
186
 
187
187
  html.render(@scope) { yield }
188
188
  end
@@ -138,8 +138,8 @@ module StaticMatic
138
138
  end
139
139
 
140
140
  # Include a partial template
141
- def partial(name)
142
- @staticmatic.generate_partial(name)
141
+ def partial(name, options = {})
142
+ @staticmatic.generate_partial(name, options)
143
143
  end
144
144
  end
145
145
  end
@@ -3,13 +3,13 @@
3
3
  <head>
4
4
  <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
5
5
  <title>StaticMatic</title>
6
- <link href="/stylesheets/application.css" media="all" rel="stylesheet"/>
6
+ <link media="all" href="/stylesheets/application.css" rel="stylesheet"/>
7
7
  </head>
8
8
  <body>
9
9
  <div id='container'>
10
10
  <div id='header'>
11
11
  <div class='bycurve21'>
12
- <a href="http://www.curve21.com"><img alt="Bycurve21" src="/images/bycurve21.gif"/>
12
+ <a href="http://www.curve21.com"><img alt="/images/bycurve21" src="/images/bycurve21.gif"/>
13
13
  </a>
14
14
  </div>
15
15
  <div class='title'>StaticMatic</div>
@@ -32,15 +32,15 @@
32
32
  <div id='side'>
33
33
  <div id='news'>
34
34
  <div class='heading'>News</div>
35
- <div class='title'>0.8.4 Released!</div>
35
+ <div class='title'>0.8.8 Released!</div>
36
36
  <p>
37
- You can now enjoy:
37
+ Complete with:
38
38
  </p>
39
39
  <ul>
40
- <li>Multiple directories</li>
41
- <li>Partials</li>
40
+ <li>Helpers</li>
41
+ <li>Configuration</li>
42
42
  </ul>
43
- <a href="/releases/0_8_4.html">And More!</a>
43
+ <a href="/releases/0_8_8.html">And More!</a>
44
44
  </div>
45
45
  </div>
46
46
  <div id='content'>
@@ -3,13 +3,13 @@
3
3
  <head>
4
4
  <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
5
5
  <title>StaticMatic</title>
6
- <link href="/stylesheets/application.css" media="all" rel="stylesheet"/>
6
+ <link media="all" href="/stylesheets/application.css" rel="stylesheet"/>
7
7
  </head>
8
8
  <body>
9
9
  <div id='container'>
10
10
  <div id='header'>
11
11
  <div class='bycurve21'>
12
- <a href="http://www.curve21.com"><img alt="Bycurve21" src="/images/bycurve21.gif"/>
12
+ <a href="http://www.curve21.com"><img alt="/images/bycurve21" src="/images/bycurve21.gif"/>
13
13
  </a>
14
14
  </div>
15
15
  <div class='title'>StaticMatic</div>
@@ -32,15 +32,15 @@
32
32
  <div id='side'>
33
33
  <div id='news'>
34
34
  <div class='heading'>News</div>
35
- <div class='title'>0.8.4 Released!</div>
35
+ <div class='title'>0.8.8 Released!</div>
36
36
  <p>
37
- You can now enjoy:
37
+ Complete with:
38
38
  </p>
39
39
  <ul>
40
- <li>Multiple directories</li>
41
- <li>Partials</li>
40
+ <li>Helpers</li>
41
+ <li>Configuration</li>
42
42
  </ul>
43
- <a href="/releases/0_8_4.html">And More!</a>
43
+ <a href="/releases/0_8_8.html">And More!</a>
44
44
  </div>
45
45
  </div>
46
46
  <div id='content'>
@@ -3,13 +3,13 @@
3
3
  <head>
4
4
  <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
5
5
  <title>StaticMatic</title>
6
- <link href="/stylesheets/application.css" media="all" rel="stylesheet"/>
6
+ <link media="all" href="/stylesheets/application.css" rel="stylesheet"/>
7
7
  </head>
8
8
  <body>
9
9
  <div id='container'>
10
10
  <div id='header'>
11
11
  <div class='bycurve21'>
12
- <a href="http://www.curve21.com"><img alt="Bycurve21" src="/images/bycurve21.gif"/>
12
+ <a href="http://www.curve21.com"><img alt="/images/bycurve21" src="/images/bycurve21.gif"/>
13
13
  </a>
14
14
  </div>
15
15
  <div class='title'>StaticMatic</div>
@@ -32,15 +32,15 @@
32
32
  <div id='side'>
33
33
  <div id='news'>
34
34
  <div class='heading'>News</div>
35
- <div class='title'>0.8.4 Released!</div>
35
+ <div class='title'>0.8.8 Released!</div>
36
36
  <p>
37
- You can now enjoy:
37
+ Complete with:
38
38
  </p>
39
39
  <ul>
40
- <li>Multiple directories</li>
41
- <li>Partials</li>
40
+ <li>Helpers</li>
41
+ <li>Configuration</li>
42
42
  </ul>
43
- <a href="/releases/0_8_4.html">And More!</a>
43
+ <a href="/releases/0_8_8.html">And More!</a>
44
44
  </div>
45
45
  </div>
46
46
  <div id='content'>
@@ -3,13 +3,13 @@
3
3
  <head>
4
4
  <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
5
5
  <title>StaticMatic</title>
6
- <link href="/stylesheets/application.css" media="all" rel="stylesheet"/>
6
+ <link media="all" href="/stylesheets/application.css" rel="stylesheet"/>
7
7
  </head>
8
8
  <body>
9
9
  <div id='container'>
10
10
  <div id='header'>
11
11
  <div class='bycurve21'>
12
- <a href="http://www.curve21.com"><img alt="Bycurve21" src="/images/bycurve21.gif"/>
12
+ <a href="http://www.curve21.com"><img alt="/images/bycurve21" src="/images/bycurve21.gif"/>
13
13
  </a>
14
14
  </div>
15
15
  <div class='title'>StaticMatic</div>
@@ -32,15 +32,15 @@
32
32
  <div id='side'>
33
33
  <div id='news'>
34
34
  <div class='heading'>News</div>
35
- <div class='title'>0.8.4 Released!</div>
35
+ <div class='title'>0.8.8 Released!</div>
36
36
  <p>
37
- You can now enjoy:
37
+ Complete with:
38
38
  </p>
39
39
  <ul>
40
- <li>Multiple directories</li>
41
- <li>Partials</li>
40
+ <li>Helpers</li>
41
+ <li>Configuration</li>
42
42
  </ul>
43
- <a href="/releases/0_8_4.html">And More!</a>
43
+ <a href="/releases/0_8_8.html">And More!</a>
44
44
  </div>
45
45
  </div>
46
46
  <div id='content'>
@@ -61,16 +61,16 @@
61
61
  <div class='columns'>
62
62
  <div class='left_column'>
63
63
  <em>Concise and terse Haml Templating</em>
64
- <img alt="Homepage templating" src="/images/homepage-templating.jpg"/>
64
+ <img alt="Homepage templating" src="images/homepage-templating.jpg"/>
65
65
  </div>
66
66
  <div class='right_column'>
67
67
  <em>Live preview server for development</em>
68
- <img alt="Homepage previewing" src="/images/homepage-previewing.jpg"/>
68
+ <img alt="Homepage previewing" src="images/homepage-previewing.jpg"/>
69
69
  </div>
70
70
  </div>
71
71
  <p>
72
72
  <em>Output full HTML pages</em>
73
- <img alt="Homepage build" src="/images/homepage-build.jpg"/>
73
+ <img alt="Homepage build" src="images/homepage-build.jpg"/>
74
74
  </p>
75
75
  </div>
76
76
  </div>
@@ -3,13 +3,13 @@
3
3
  <head>
4
4
  <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
5
5
  <title>StaticMatic</title>
6
- <link href="/stylesheets/application.css" media="all" rel="stylesheet"/>
6
+ <link media="all" href="/stylesheets/application.css" rel="stylesheet"/>
7
7
  </head>
8
8
  <body>
9
9
  <div id='container'>
10
10
  <div id='header'>
11
11
  <div class='bycurve21'>
12
- <a href="http://www.curve21.com"><img alt="Bycurve21" src="/images/bycurve21.gif"/>
12
+ <a href="http://www.curve21.com"><img alt="/images/bycurve21" src="/images/bycurve21.gif"/>
13
13
  </a>
14
14
  </div>
15
15
  <div class='title'>StaticMatic</div>
@@ -32,15 +32,15 @@
32
32
  <div id='side'>
33
33
  <div id='news'>
34
34
  <div class='heading'>News</div>
35
- <div class='title'>0.8.4 Released!</div>
35
+ <div class='title'>0.8.8 Released!</div>
36
36
  <p>
37
- You can now enjoy:
37
+ Complete with:
38
38
  </p>
39
39
  <ul>
40
- <li>Multiple directories</li>
41
- <li>Partials</li>
40
+ <li>Helpers</li>
41
+ <li>Configuration</li>
42
42
  </ul>
43
- <a href="/releases/0_8_4.html">And More!</a>
43
+ <a href="/releases/0_8_8.html">And More!</a>
44
44
  </div>
45
45
  </div>
46
46
  <div id='content'>
@@ -0,0 +1,86 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
5
+ <title>StaticMatic</title>
6
+ <link media="all" href="/stylesheets/application.css" rel="stylesheet"/>
7
+ </head>
8
+ <body>
9
+ <div id='container'>
10
+ <div id='header'>
11
+ <div class='bycurve21'>
12
+ <a href="http://www.curve21.com"><img alt="/images/bycurve21" src="/images/bycurve21.gif"/>
13
+ </a>
14
+ </div>
15
+ <div class='title'>StaticMatic</div>
16
+ </div>
17
+ <div id='menu'>
18
+ <ul>
19
+ <li><a href="/">Home</a></li>
20
+ <li><a href="/download.html">Download</a></li>
21
+ <li><a href="/how_to_use.html">How to use</a></li>
22
+ <li>
23
+ <a href="http://rubyforge.org/projects/staticmatic">Development</a>
24
+ </li>
25
+ <li>
26
+ <a href="http://groups.google.co.uk/group/staticmatic">Community</a>
27
+ </li>
28
+ <li><a href="/faq.html">FAQ</a></li>
29
+ </ul>
30
+ </div>
31
+ <div id='content_wrapper'>
32
+ <div id='side'>
33
+ <div id='news'>
34
+ <div class='heading'>News</div>
35
+ <div class='title'>0.8.8 Released!</div>
36
+ <p>
37
+ Complete with:
38
+ </p>
39
+ <ul>
40
+ <li>Helpers</li>
41
+ <li>Configuration</li>
42
+ </ul>
43
+ <a href="/releases/0_8_8.html">And More!</a>
44
+ </div>
45
+ </div>
46
+ <div id='content'>
47
+ <h1>StaticMatic 0.8.8</h1>
48
+ <h2>Helpers</h2>
49
+ <p>
50
+ Thanks to Craig Webster, we now have Rails-style helpers.
51
+ </p>
52
+ src/application_helper.rb:
53
+ <pre class="code">&#x000A;module ApplicationHelper&#x000A; def greet(name)&#x000A; "Hello, #{name}!"&#x000A; end&#x000A;end&#x000A;</pre>&#x000A;&#x000A;
54
+ <h2>Configuration</h2>
55
+ <p>
56
+ We also now have configuration. It's only basic right now but expect this to expand.
57
+ </p>
58
+ src/configuration.rb:
59
+ <div class='code'>
60
+ configuration.preview_server_port = 3000
61
+ configuration.use_relative_paths_for_links = false
62
+ configuration.use_relative_paths_for_images = false
63
+ configuration.use_relative_paths_for_stylesheets = false
64
+ configuration.use_relative_paths_for_javascripts = false
65
+ </div>
66
+ <p>
67
+ The configuration file is also loaded before StaticMatic starts so it can be used to monkey-patch to demonstrate new features.
68
+ </p>
69
+ </div>
70
+ </div>
71
+ <div id='footer'>
72
+ <p>
73
+ Made with StaticMatic, Hosted by
74
+ <a href="http://rubyforge.org">RubyForge</a>
75
+ </p>
76
+ </div>
77
+ <script src='http://www.google-analytics.com/urchin.js' type='text/javascript'>
78
+ _hamlspace = "";
79
+ </script>
80
+ <script type='text/javascript'>
81
+ _uacct = "UA-775359-8";
82
+ urchinTracker();
83
+ </script>
84
+ </div>
85
+ </body>
86
+ </html>
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: staticmatic
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.8.8
7
- date: 2007-09-25 00:00:00 +01:00
6
+ version: 0.8.9
7
+ date: 2007-09-26 00:00:00 +01:00
8
8
  summary: Manage static sites using Haml & Sass
9
9
  require_paths:
10
10
  - lib
@@ -104,6 +104,7 @@ files:
104
104
  - website/site/javascripts
105
105
  - website/site/releases
106
106
  - website/site/releases/0_8_4.html
107
+ - website/site/releases/0_8_8.html
107
108
  - website/site/stylesheets
108
109
  - website/site/stylesheets/application.css
109
110
  - website/src