rog 0.1.1 → 0.1.2

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.
data/Rakefile CHANGED
@@ -87,7 +87,7 @@ spec = Gem::Specification.new do |s|
87
87
  s.platform = Gem::Platform::RUBY
88
88
  s.summary = "Static Ruby Blog Engine."
89
89
  s.name = 'rog'
90
- s.version = '0.1.1'
90
+ s.version = '0.1.2'
91
91
 
92
92
  s.add_dependency('rote', '>= 0.3.2.2')
93
93
  s.add_dependency('rake')
data/lib/rog/blog.rb CHANGED
@@ -42,6 +42,8 @@ Questa scelta implementativa permetterebbe di:
42
42
  module Rog
43
43
 
44
44
  class Blog
45
+ attr_reader :blog_title, :blog_subtitle
46
+
45
47
  def initialize(blog_path='blog', pages_path="#{blog_path}/pages",
46
48
  archives_path = "#{pages_path}/archives",
47
49
  posts_path="#{pages_path}/posts")
@@ -104,18 +106,23 @@ module Rog
104
106
 
105
107
  month_posts = Array.new
106
108
 
109
+ @blog_posts << nil
110
+
107
111
  @blog_posts.each do |post|
108
- if post.year == prev_year and post.month == prev_month then
112
+ if (not post.nil?) and (post.year == prev_year and post.month == prev_month) then
109
113
  month_posts.push post
110
114
  else
111
115
  yield month_posts
116
+ break if post.nil?
112
117
  prev_year = post.year
113
118
  prev_month = post.month
114
119
  month_posts = [ post ]
115
120
  end
116
121
  end
117
122
 
118
- yield [ @blog_posts.last ] if @blog_posts.length >= 1
123
+ @blog_posts.pop
124
+
125
+ #yield [ @blog_posts.last ] if not month_posts.include? @blog_posts.last
119
126
  end
120
127
 
121
128
  def get_last_posts
@@ -192,6 +199,8 @@ module Rog
192
199
 
193
200
  @url = @config["blogurl"]
194
201
  @publish_url = @config["publish_url"]
202
+ @blog_title = @config["blog_title"]
203
+ @blog_subtitle = @config["blog_subtitle"]
195
204
 
196
205
  rescue Errno::ENOENT
197
206
  STDERR.puts "Unable to open blog.yaml"
@@ -1,12 +1,14 @@
1
1
  blogurl: http://myblogurl/
2
- publish_url : myuser@myblogurl:/home/myurl/public_html
2
+ blog_title: My Blog Name
3
+ blog_subtitle: blog sutitle
4
+ publish_url : myuser@myblogurl:/home/myuser/public_html
3
5
 
4
6
  pages:
5
7
  - About: about.html
6
8
  - Blog: index.html
7
9
 
8
10
  buttons:
9
- - rog_powered.png: http://www.salug.it/~ripley/projects/rog.html
11
+ - rog_powered.png: http://rog.rubyforge.org
10
12
  - ruby_powered.png: http://www.ruby-lang.it
11
13
  - emacs_powered.png: http://www.gnu.org/software/emacs
12
14
  - gnulinux_powered.png: http://www.gnu.org
@@ -1,13 +1,17 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1
+ <!DOCTYPE html PUBLIC "-//W2C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
2
 
3
3
  <html>
4
4
  <head>
5
5
  <title><%= @page_title + ' - ' + @site_title %></title>
6
6
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
7
7
  <link rel="stylesheet" href="<%= link_rel("/styles.css") %>" />
8
+ <link rel="stylesheet" href="<%= link_rel("/ruby.css") %>" />
9
+ <link rel="stylesheet" href="<%= link_rel("/yaml.css") %>" />
10
+ <link rel="stylesheet" href="<%= link_rel("/xml.css") %>" />
8
11
  </head>
9
12
 
10
13
  <body>
14
+
11
15
  <div class="conteneur">
12
16
 
13
17
  <div class="menu">
@@ -20,7 +24,7 @@
20
24
  <li>
21
25
  <span class="menu-section-title"><b>Projects:</b></span>
22
26
  <% $blog.projects.each do |key, value| %>
23
- <a href='<%= link_rel("/projects/#{value}/") %>'>
27
+ <a href='<%= value %>'>
24
28
  <%= key %>
25
29
  </a>
26
30
  <% end %>
@@ -48,16 +52,10 @@
48
52
  </li>
49
53
  </ul>
50
54
  </div>
51
-
52
- <div class="buttons">
53
- <% $blog.buttons.each do |img,url| %>
54
- <a href='<%= url %>'> <img src='<%= link_rel("/images/#{img}") %>'/></a>
55
- <% end %>
56
- </div>
57
55
 
58
56
  <div class="header">
59
- <span class="header-title">MY BLOG NAME</span><br />
60
- <span class="header-title-two">my blog subtitle</span>
57
+ <span class="header-title"><%= $blog.blog_title %></span><br />
58
+ <span class="header-title-two"><%= $blog.blog_subtitle %></span>
61
59
  </div>
62
60
 
63
61
  <div class="centre">
@@ -66,15 +64,28 @@
66
64
  </div>
67
65
 
68
66
  <div class="pied">
67
+ <div>
68
+ HTML and CSS Design by
69
+ <a href="http://nicolas.freezee.org" target="_BLANK">Nicolas Fafchamps</a>
70
+ </div>
69
71
  <div align='right'>
70
- <span>Generate with</span>
72
+ <span>Generated with</span>
71
73
  <%# use the link_rel helper to make absolute links relative to current page #%>
72
74
  <a href='http://rote.rubyforge.org/' target='_blank'>
73
75
  <img src='<%= link_rel '/images/rote-tiny.png' %>' alt='Rote'/>
74
76
  </a>
77
+ and
78
+ <a href='http://rog.rubyforge.org/' target='_blank'>
79
+ <img src='<%= link_rel '/images/rog-tiny.png' %>' alt='Rog'/>
80
+ </a>
75
81
  </div>
76
82
  </div>
77
-
78
83
  </div>
84
+
85
+ <div class="buttons">
86
+ <% $blog.buttons.each do |img,url| %>
87
+ <a href='<%= url %>'> <img src='<%= link_rel("/images/#{img}") %>'/></a>
88
+ <% end %>
89
+ </div>
79
90
  </body>
80
91
  </html>
@@ -5,6 +5,9 @@
5
5
  <title><%= @page_title + ' - ' + @site_title %></title>
6
6
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
7
7
  <link rel="stylesheet" href="<%= link_rel("/styles.css") %>" />
8
+ <link rel="stylesheet" href="<%= link_rel("/ruby.css") %>" />
9
+ <link rel="stylesheet" href="<%= link_rel("/yaml.css") %>" />
10
+ <link rel="stylesheet" href="<%= link_rel("/xml.css") %>" />
8
11
  </head>
9
12
 
10
13
  <body>
@@ -20,7 +23,7 @@
20
23
  <li>
21
24
  <span class="menu-section-title"><b>Projects:</b></span>
22
25
  <% $blog.projects.each do |key, value| %>
23
- <a href='<%= link_rel("/projects/#{value}/") %>'>
26
+ <a href='<%= value %>'>
24
27
  <%= key %>
25
28
  </a>
26
29
  <% end %>
@@ -48,16 +51,10 @@
48
51
  </li>
49
52
  </ul>
50
53
  </div>
51
-
52
- <div class="buttons">
53
- <% $blog.buttons.each do |img,url| %>
54
- <a href='<%= url %>'> <img src='<%= link_rel("/images/#{img}") %>'/></a>
55
- <% end %>
56
- </div>
57
54
 
58
55
  <div class="header">
59
- <span class="header-title">$ cat /dev/random</span><br />
60
- <span class="header-title-two">ripley's miscellanous debris</span>
56
+ <span class="header-title"><%= $blog.blog_title %></span><br />
57
+ <span class="header-title-two"><%= $blog.blog_subtitle %></span>
61
58
  </div>
62
59
 
63
60
  <div class="centre">
@@ -74,14 +71,25 @@
74
71
  <a href="http://nicolas.freezee.org" target="_BLANK">Nicolas Fafchamps</a>
75
72
  </div>
76
73
  <div align='right'>
77
- <span>Generate with</span>
74
+ <span>Generated with</span>
78
75
  <%# use the link_rel helper to make absolute links relative to current page #%>
79
76
  <a href='http://rote.rubyforge.org/' target='_blank'>
80
77
  <img src='<%= link_rel '/images/rote-tiny.png' %>' alt='Rote'/>
81
78
  </a>
79
+ and
80
+ <a href='http://rog.rubyforge.org/' target='_blank'>
81
+ <img src='<%= link_rel '/images/rog-tiny.png' %>' alt='Rog'/>
82
+ </a>
82
83
  </div>
83
84
  </div>
84
85
 
85
86
  </div>
87
+
88
+ <div class="buttons">
89
+ <% $blog.buttons.each do |img,url| %>
90
+ <a href='<%= url %>'> <img src='<%= link_rel("/images/#{img}") %>'/></a>
91
+ <% end %>
92
+ </div>
93
+
86
94
  </body>
87
95
  </html>
@@ -6,6 +6,6 @@
6
6
  #
7
7
  # Any COMMON.rb files found in directories above this will also
8
8
  # be loaded.
9
- @site_title = "$cat /dev/random - ripley's miscellanous debris"
9
+ @site_title = "MY BLOG HTML TITLE"
10
10
 
11
11
 
@@ -39,11 +39,14 @@ body {
39
39
  }
40
40
 
41
41
  .buttons {
42
- float:right;
43
- position:relative;
44
- margin: 0px;
42
+ position:absolute;
45
43
  padding: 0px;
46
- margin-left:88%;
44
+ top: 192px;
45
+ left:50%;
46
+ margin-left: -370px;
47
+ width:740px;
48
+
49
+
47
50
  }
48
51
 
49
52
  .buttons img {
@@ -58,6 +61,8 @@ body {
58
61
  .centre {
59
62
  padding:20px;
60
63
  padding-left:40px;
64
+ text-align:left;
65
+ max-width:490px;
61
66
  }
62
67
 
63
68
  .pied {
@@ -122,15 +127,11 @@ body {
122
127
  display: block;
123
128
  }
124
129
 
125
- .p{
126
-
127
- }
128
-
129
130
  h2{
130
131
  margin-left:-20px;
131
132
  margin-top:15px;
132
133
  padding-left:5px;
133
- font-size: 1.3em;
134
+ font-size: 1.2em;
134
135
  color: #F5F8EF;
135
136
  font-weight:normal;
136
137
  }
@@ -139,7 +140,7 @@ h1{
139
140
  margin-left:-30px;
140
141
  margin-top:5px;
141
142
  padding-left:5px;
142
- font-size: 1.6em;
143
+ font-size: 1.4em;
143
144
  color: #F5F8EF;
144
145
  font-weight:normal;
145
146
  }
@@ -164,8 +165,8 @@ a:hover{
164
165
  text-decoration:underline;
165
166
  }
166
167
 
167
- blockquote{
168
+ pre {
168
169
  background-color:rgb(142, 168, 69);
169
170
  padding : 3px;
170
- border-left:2px solid #F5F8EF;
171
+ border-left:2px solid #faff5b;
171
172
  }
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rog
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
7
- date: 2006-05-16 00:00:00 +02:00
6
+ version: 0.1.2
7
+ date: 2006-05-17 00:00:00 +02:00
8
8
  summary: Static Ruby Blog Engine.
9
9
  require_paths:
10
10
  - lib
@@ -30,86 +30,86 @@ authors: []
30
30
  files:
31
31
  - lib/rog
32
32
  - lib/rog.rb
33
- - lib/rog/project
34
33
  - lib/rog/app.rb
35
- - lib/rog/builtin.rf
36
- - lib/rog/page.rb
34
+ - lib/rog/project
37
35
  - lib/rog/blog.rb
38
36
  - lib/rog/post.rb
37
+ - lib/rog/page.rb
38
+ - lib/rog/builtin.rf
39
39
  - lib/rog/rogtasks.rb
40
40
  - lib/rog/project/blog
41
41
  - lib/rog/project/README
42
42
  - lib/rog/project/Rakefile
43
- - lib/rog/project/blog/pages
44
43
  - lib/rog/project/blog/res
44
+ - lib/rog/project/blog/pages
45
45
  - lib/rog/project/blog/layouts
46
46
  - lib/rog/project/blog/templates
47
47
  - lib/rog/project/blog/blog.yaml
48
- - lib/rog/project/blog/pages/about.rb
49
- - lib/rog/project/blog/pages/posts
50
- - lib/rog/project/blog/pages/about.thtml
51
- - lib/rog/project/blog/pages/index.thtml
52
- - lib/rog/project/blog/pages/archives
53
- - lib/rog/project/blog/pages/COMMON.rb
54
- - lib/rog/project/blog/pages/index.rb
55
- - lib/rog/project/blog/pages/posts/README
56
- - lib/rog/project/blog/pages/posts/COMMON.rb
57
- - lib/rog/project/blog/pages/archives/README
58
48
  - lib/rog/project/blog/res/images
59
49
  - lib/rog/project/blog/res/styles.css
60
- - lib/rog/project/blog/res/images/rote-tiny.png
61
50
  - lib/rog/project/blog/res/images/header.jpg
51
+ - lib/rog/project/blog/res/images/rote-tiny.png
52
+ - lib/rog/project/blog/res/images/cc_powered.png
53
+ - lib/rog/project/blog/res/images/rog_powered.png
62
54
  - lib/rog/project/blog/res/images/ruby_powered.png
63
55
  - lib/rog/project/blog/res/images/emacs_powered.png
64
- - lib/rog/project/blog/res/images/copyleft_powered.png
65
- - lib/rog/project/blog/res/images/cc_powered.png
66
56
  - lib/rog/project/blog/res/images/gnulinux_powered.png
67
- - lib/rog/project/blog/res/images/rog_powered.png
57
+ - lib/rog/project/blog/res/images/copyleft_powered.png
58
+ - lib/rog/project/blog/res/images/rog-tiny.png
59
+ - lib/rog/project/blog/pages/posts
60
+ - lib/rog/project/blog/pages/archives
61
+ - lib/rog/project/blog/pages/index.rb
62
+ - lib/rog/project/blog/pages/about.rb
63
+ - lib/rog/project/blog/pages/COMMON.rb
64
+ - lib/rog/project/blog/pages/index.thtml
65
+ - lib/rog/project/blog/pages/about.thtml
66
+ - lib/rog/project/blog/pages/posts/README
67
+ - lib/rog/project/blog/pages/posts/COMMON.rb
68
+ - lib/rog/project/blog/pages/archives/README
69
+ - lib/rog/project/blog/layouts/post_mini.thtml
68
70
  - lib/rog/project/blog/layouts/soft_green_post.thtml
69
- - lib/rog/project/blog/layouts/soft_green_archive.thtml
70
71
  - lib/rog/project/blog/layouts/soft_green_static.thtml
72
+ - lib/rog/project/blog/layouts/soft_green_archive.thtml
71
73
  - lib/rog/project/blog/layouts/soft_green.thtml
72
- - lib/rog/project/blog/layouts/post_mini.thtml
73
- - lib/rog/project/blog/templates/archive-tag.thtml.tpl
74
+ - lib/rog/project/blog/templates/post.rb.tpl
75
+ - lib/rog/project/blog/templates/post.thtml.tpl
74
76
  - lib/rog/project/blog/templates/archive-tag.rb.tpl
75
- - lib/rog/project/blog/templates/archive-month.thtml.tpl
76
77
  - lib/rog/project/blog/templates/archive-month.rb.tpl
77
- - lib/rog/project/blog/templates/post.thtml.tpl
78
- - lib/rog/project/blog/templates/post.rb.tpl
78
+ - lib/rog/project/blog/templates/archive-tag.thtml.tpl
79
+ - lib/rog/project/blog/templates/archive-month.thtml.tpl
79
80
  - bin/rog
80
- - Rakefile
81
- - LICENSE
82
81
  - README
82
+ - LICENSE
83
+ - Rakefile
83
84
  - tests/data
84
- - tests/tc_rogpost.rb
85
85
  - tests/ts_rog.rb
86
- - tests/tc_rogtasks.rb
87
- - tests/output
86
+ - tests/tc_rogpost.rb
88
87
  - tests/tc_rogblog.rb
88
+ - tests/tc_rogtasks.rb
89
89
  - tests/data/pages
90
90
  - tests/data/layouts
91
- - tests/data/blog.yaml
92
91
  - tests/data/templates
92
+ - tests/data/blog.yaml
93
93
  - tests/data/pages/posts
94
- - tests/data/pages/COMMON.rb
95
- - tests/data/pages/about.rb
96
- - tests/data/pages/about.thtml
94
+ - tests/data/pages/archives
97
95
  - tests/data/pages/index.rb
96
+ - tests/data/pages/about.rb
97
+ - tests/data/pages/COMMON.rb
98
98
  - tests/data/pages/index.thtml
99
- - tests/data/pages/archives
100
- - tests/data/pages/posts/20050603-prova123.thtml
99
+ - tests/data/pages/about.thtml
101
100
  - tests/data/pages/posts/20050603-prova123.rb
101
+ - tests/data/pages/posts/20050603-prova123.thtml
102
102
  - tests/data/layouts/post_mini.thtml
103
103
  - tests/data/layouts/soft_green.thtml
104
- - tests/data/layouts/soft_green_archive.thtml
105
104
  - tests/data/layouts/soft_green_post.thtml
106
105
  - tests/data/layouts/soft_green_static.thtml
107
- - tests/data/templates/archive-tag.thtml.tpl
106
+ - tests/data/layouts/soft_green_archive.thtml
107
+ - tests/data/templates/post.rb.tpl
108
+ - tests/data/templates/post.thtml.tpl
108
109
  - tests/data/templates/archive-tag.rb.tpl
109
- - tests/data/templates/archive-month.thtml.tpl
110
110
  - tests/data/templates/archive-month.rb.tpl
111
- - tests/data/templates/post.thtml.tpl
112
- - tests/data/templates/post.rb.tpl
111
+ - tests/data/templates/archive-tag.thtml.tpl
112
+ - tests/data/templates/archive-month.thtml.tpl
113
113
  test_files:
114
114
  - tests/ts_rog.rb
115
115
  rdoc_options: []