rdfa 0.0.1

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.
@@ -0,0 +1,408 @@
1
+ /*--------------------------------------------------------------
2
+ Header
3
+ --------------------------------------------------------------*/
4
+
5
+ #header {
6
+ background: url(/images/theme/header_shadow.gif) repeat-x left bottom;
7
+ }
8
+
9
+ #header a:link,
10
+ #header a:visited {
11
+ color:#000;
12
+ text-decoration: none;
13
+ }
14
+
15
+ #header a:hover,
16
+ #header a:active {
17
+ color:#930; background: transparent;
18
+ text-decoration: none;
19
+ }
20
+
21
+ #header img{
22
+ float:left;
23
+ margin:0;
24
+ padding:0;
25
+ height:50px;
26
+ margin-right: 10px;
27
+ }
28
+
29
+ #header h1 {
30
+ font: bold 40px georgia, serif;
31
+ letter-spacing: -1px;
32
+ margin: 0;
33
+ padding:0;
34
+ }
35
+
36
+ #header h2 {
37
+ font: normal 12px verdana, arial, sans-serif;
38
+ color:lightgray;
39
+ padding:0;
40
+ margin:0;
41
+ margin-top:-7px;
42
+ }
43
+
44
+ /*--------------------------------------------------------------
45
+ Content
46
+ --------------------------------------------------------------*/
47
+
48
+ #content {}
49
+
50
+ #content h1,
51
+ #content h2,
52
+ #content h3,
53
+ #content h4,
54
+ #content h5 {
55
+ font-family: "lucidamac bold", "lucida grande", arial, sans-serif;
56
+ letter-spacing: -1px;
57
+ }
58
+
59
+ #content h1 {
60
+ font-size: 24px;
61
+ margin: 0 0 0.3em;
62
+ }
63
+
64
+ #content h2 {
65
+ font-size: 22px;
66
+ margin: 0 0 0.3em;
67
+ }
68
+
69
+ #content h3 {
70
+ font-size: 20px;
71
+ margin: 1.2em 0 0.3em;
72
+ }
73
+
74
+ #content h4 {
75
+ font-size: 18px;
76
+ margin: 1.2em 0 0.3em;
77
+ border-bottom: 1px dotted #bbb;
78
+ }
79
+
80
+ #content h5 {
81
+ font-size: 18px;
82
+ background: #ffd;
83
+ margin: 1.2em 0 0.3em;
84
+ border-bottom: 1px dotted #aaa;
85
+ }
86
+
87
+ #content p {
88
+ line-height: 15px;
89
+ margin: 0 0 1.2em;
90
+ }
91
+
92
+ #content ul,
93
+ #content ol {
94
+ margin: 1em;
95
+ padding:0;
96
+ }
97
+
98
+ #content ul {
99
+ list-style-type: square;
100
+ }
101
+
102
+ #content li {
103
+ line-height: 15px;
104
+ margin: 0 0 0 1em; padding: 0;
105
+ }
106
+
107
+ #content blockquote {
108
+ color: #555;
109
+ border-left: 5px solid #ccc;
110
+ margin: 1.3em 1em; padding: 0 1em;
111
+ }
112
+
113
+ #content code {
114
+ font: normal 12px "bitstream vera sans mono", monaco "lucida console", "courier new", courier, serif;
115
+ }
116
+
117
+ #content pre {
118
+ color: #63FF00;
119
+ background: #000;
120
+ overflow: auto;
121
+ font: normal 12px "bitstream vera sans mono", monaco "lucida console", "courier new", courier, serif;
122
+ margin: 0.9em 0; padding: 8px;
123
+ }
124
+
125
+ /* Article Entries - class names based on http://microformats.org/wiki/hatom] */
126
+ #content .article {
127
+ margin: 0 0 3em 0;
128
+ }
129
+
130
+ #content .article .title {
131
+ font-size: 24px;
132
+ line-height: 94%;
133
+ letter-spacing: -1.5px;
134
+ margin: 0;
135
+ }
136
+
137
+ #content .article .title a:link,
138
+ #content .article .title a:visited {
139
+ color: #930;
140
+ text-decoration: none;
141
+ }
142
+
143
+ #content .article .title a:hover,
144
+ #content .article .title a:active {
145
+ color: #000;
146
+ background: transparent;
147
+ }
148
+
149
+ #content .article .title .comment_count { color: #eee; }
150
+
151
+ #content .article .author {
152
+ color: #bbb;
153
+ font: normal 16px/14px "lucidamac bold", "lucida grande", arial, verdana, sans-serif;
154
+ letter-spacing: -1px;
155
+ margin: 0 0 1em;
156
+ }
157
+
158
+ #content .article .author cite a,
159
+ #content .article .author cite a:hover { /* author mailto: link (if any) */
160
+ color: #aaa; background: transparent;
161
+ text-decoration: none;
162
+ }
163
+
164
+ #content .article .author abbr { /* posted date */
165
+ font-weight: bold;
166
+ color: #aaa;
167
+ }
168
+
169
+ #content .article .content {}
170
+
171
+ #content .article ul.meta {
172
+ font-size: 10px;
173
+ background: #eee;
174
+ margin: 0; padding: 5px;
175
+ border: 1px solid #ddd;
176
+ list-style-type: none;
177
+ }
178
+
179
+ #content .article ul.meta li {
180
+ line-height: 13px;
181
+ margin: 0; padding: 0;
182
+ }
183
+
184
+ #content .article .meta a:link,
185
+ #content .article .meta a:visited {
186
+ color: #555;
187
+ }
188
+
189
+ #content .article .meta a:hover,
190
+ #content .article .meta a:active {
191
+ color: #fff;
192
+ }
193
+
194
+
195
+ /* Comments and Trackbacks */
196
+ #content ol.comments,
197
+ #content ol.trackbacks {
198
+ list-style-type: none;
199
+ margin: 0; padding: 0;
200
+ }
201
+
202
+ #content .comment,
203
+ #content .trackback {
204
+ border: 2px solid #ddd;
205
+ margin: 0 0 1.5em; padding: 1em;
206
+ }
207
+
208
+ #content .comment.preview {
209
+ background: #ffc;
210
+ border: 3px solid #fab444;
211
+ }
212
+
213
+ #content .comment .author,
214
+ #content .trackback .author {
215
+ font-weight: bold;
216
+ margin-bottom: 1em;
217
+ }
218
+
219
+ #content .comment .author cite,
220
+ #content .trackback .author cite {
221
+ font-size: 16px;
222
+ letter-spacing: -1px;
223
+ }
224
+
225
+ #content .comment .author abbr,
226
+ #content .trackback .author abbr { color: #999; }
227
+
228
+ #content .comment .author .gravatar {
229
+ margin: 0 0 0.5em 0.5em;
230
+ float: right;
231
+ }
232
+
233
+ /* uncomment to enable a default gravatar
234
+ #content .comment .author div {
235
+ margin: 0 0 0.5em 0.5em;
236
+ width: 60px; height: 60px;
237
+ background: url(/images/theme/gravatar.gif) no-repeat left top;
238
+ float: right;
239
+ }*/
240
+
241
+
242
+ #content form.comments {
243
+ background: #f2f2f2;
244
+ border-top: 1px solid #ddd;
245
+ padding: 1em 0.5em;
246
+ }
247
+
248
+ #content form.comments fieldset {
249
+ border: none;
250
+ }
251
+
252
+ #content form.comments legend {
253
+ display: none;
254
+ }
255
+
256
+ #content form.comments label {
257
+ font-weight: bold;
258
+ }
259
+
260
+ #content form.comments textarea {
261
+ width: 90%; height: 150px;
262
+ padding: 3px;
263
+ }
264
+
265
+ /*--------------------------------------------------------------
266
+ Sidebar
267
+ --------------------------------------------------------------*/
268
+ #sidebar {
269
+ font-size: 11px;
270
+ }
271
+
272
+ #sidebar h3 {
273
+ font: bold 14px "lucidamac bold", "lucida grande", verdana, arial, helvetica, sans-serif;
274
+ margin: 0 0 0.5em;
275
+ }
276
+
277
+ #sidebar h3 a:link,
278
+ #sidebar h3 a:visited {
279
+ color: #000; text-decoration: none;
280
+ }
281
+
282
+ #sidebar h3 a:hover,
283
+ #sidebar h3 a:active {
284
+ background: transparent; text-decoration: underline;
285
+ }
286
+
287
+ #sidebar ul {
288
+ list-style-type: none;
289
+ margin: 0 0 2em; padding: 0;
290
+ }
291
+
292
+ #sidebar li {
293
+ margin: 0;
294
+ padding: 1px 0;
295
+ }
296
+
297
+ #sidebar em { font-style: normal; }
298
+
299
+ /* Live-search and results */
300
+ #sidebar .search p {
301
+ margin: 0;
302
+ }
303
+
304
+ #sidebar .search p input {
305
+ font-size: 11px; width: 92%;
306
+ }
307
+
308
+ #sidebar .search .loading {
309
+ background: url(/images/theme/spinner.gif) no-repeat left 50%;
310
+ margin: 1em 0; padding: 0 0 0 20px;
311
+ height: 15px;
312
+ }
313
+
314
+ #sidebar .search .results {
315
+ margin: 0 0 1.25em;
316
+ }
317
+
318
+ #sidebar .search .results h3 {
319
+ margin-top: 1em;
320
+ }
321
+
322
+ #sidebar .search .results p {
323
+ font: bold 14px "lucidamac bold", "lucida grande", verdana, arial, helvetica, sans-serif;
324
+ margin: 0 0 0.5em;
325
+ }
326
+
327
+ #sidebar .search .results ul {
328
+ margin: 0; padding: 3px;
329
+ }
330
+
331
+ #sidebar .search .results li { background: #ffc; padding: 0.2em; }
332
+
333
+ #sidebar .search .results a:link,
334
+ #sidebar .search .results a:visited {
335
+ color: #222;
336
+ }
337
+
338
+ #sidebar .search .results a:hover,
339
+ #sidebar .search .results a:active {
340
+ color: #fff;
341
+ }
342
+
343
+ /* Flickr sidebar-node */
344
+ #sidebar #flickr {
345
+ margin: 0 0 2em;
346
+ clear: both;
347
+ }
348
+
349
+ #sidebar #flickr div {
350
+ }
351
+
352
+ #sidebar #flickr img {
353
+ margin: 0 0 5px;
354
+ padding: 5px;
355
+ border: 1px solid #ddd;
356
+ display: block;
357
+ }
358
+
359
+ #sidebar #flickr img:hover {
360
+ background: #ffc;
361
+ }
362
+
363
+ #sidebar #flickr a {
364
+ border: none;
365
+ }
366
+
367
+ /*--------------------------------------------------------------
368
+ Footer
369
+ --------------------------------------------------------------*/
370
+
371
+ #footer {
372
+ border-top: 1px solid #ccc;
373
+ font-size: 90%;
374
+ }
375
+
376
+ #footer a:link,
377
+ #footer a:visited {
378
+ color: #000;
379
+ }
380
+
381
+ #footer a:hover,
382
+ #footer a:active {
383
+ color: #fff;
384
+ background: #000;
385
+ }
386
+
387
+ #footer hr {
388
+ display: none;
389
+ }
390
+
391
+ #footer p {
392
+ width: 40%;
393
+ float: left;
394
+ margin: 0; padding: 0;
395
+ }
396
+
397
+ #footer ul {
398
+ width: 40%;
399
+ margin: 0; padding: 0;
400
+ list-style-type: none;
401
+ text-align: right;
402
+ float: right;
403
+ }
404
+
405
+ #footer li {
406
+ margin: 0; padding: 0 0 0 1em;
407
+ display: inline;
408
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Controls the main layout (width, height, margin, padding)
3
+ *
4
+ * #container
5
+ * #header
6
+ * #page
7
+ * #content
8
+ * #sidebar
9
+ * #footer
10
+ */
11
+ body {
12
+ text-align: center;
13
+ margin: 0; padding: 1em;
14
+ }
15
+
16
+ #container {
17
+ width: 740px;
18
+ text-align: left;
19
+ margin: 0 auto; padding: 0;
20
+ }
21
+
22
+ #header {
23
+ height: 60px;
24
+ margin: 0 0 15px; padding: 0;
25
+ }
26
+
27
+
28
+ #page {
29
+ clear:both;
30
+ }
31
+
32
+ #content {
33
+ width: 500px;
34
+ }
35
+
36
+ #sidebar {
37
+ width: 200px;
38
+ }
39
+
40
+ #footer {
41
+ height: 40px;
42
+ margin: 10px 0 0; padding: 10px 0 0;
43
+ clear:both;
44
+ }
45
+
46
+ /*--------------------------------------------------------------
47
+ Sidebar Alignment: you can have left or right
48
+ --------------------------------------------------------------*/
49
+
50
+ /* BEGIN: Right Sidebar */
51
+ #sidebar {
52
+ float: right; text-align: left;
53
+ padding-left: 15px;
54
+ border-left: 1px dotted #ddd;
55
+ }
56
+ #content {
57
+ float: left;
58
+ padding-left: 5px;
59
+ }
60
+ /* END: Right Sidebar */
61
+
62
+
63
+ /* BEGIN: Left Sidebar
64
+ #sidebar {
65
+ float: left; text-align: right;
66
+ padding-right: 20px;
67
+ border-right: 1px dotted #ddd;
68
+ }
69
+
70
+ #content {
71
+ float: right; text-align: left;
72
+ }
73
+ /* END: Left Sidebar */
@@ -0,0 +1,47 @@
1
+ <% rdfa_post article.permalink_url do %>
2
+ <div class="article" id="article-<%= article.id %>">
3
+ <h2 class="title">
4
+ <% rdfa_title(article.title) do %>
5
+ <%= (controller.action_name.include? 'permalink') ? article.title : link_to(article.title, article.permalink_url) %>
6
+ <% end %>
7
+ <%= content_tag(:span, article.published_comments.size, :class => 'comment_count') if article.published_comments.size > 0 %>
8
+ </h2>
9
+
10
+ <p class="author">
11
+ Posted by <cite><%= rdfa_creator author_link(article) %></cite> the
12
+ <% rdfa_date article.published_at do %><%= article.published_at.to_formatted_s(:short) %><% end %>
13
+ </p>
14
+
15
+ <div class="content">
16
+ <%= rdfa_post_content article.html(:body) %>
17
+
18
+ <% if article.extended? -%>
19
+ <div class="extended">
20
+ <% if controller.action_name == 'index' -%>
21
+ <p><%= link_to_permalink article,"Continue reading..." %></p>
22
+ <% else -%>
23
+ <%= article.html(:extended) %>
24
+ <% end -%>
25
+ </div>
26
+ <% end -%>
27
+ </div>
28
+
29
+ <ul class="meta">
30
+ <%= content_tag(:li, category_links(article), :class => 'categories') unless article.categories.empty? %>
31
+ <!-- content_tag(:li, tag_links(article), :class => 'tags') unless article.tags.empty? -->
32
+ <li class=tags>Tags
33
+ <% for tag in article.tags %>
34
+ <%= rdfa_link_to_tag tag.display_name, tag.permalink_url %>
35
+ <% end %>
36
+ <li>
37
+ <li>Meta
38
+ <%= trackbacks_link(article) << ',' if article.allow_pings? %>
39
+ <%= comments_link(article) << ',' if article.allow_comments? %>
40
+ <a href="<%= article.permalink_url %>" rel="bookmark">permalink</a>,
41
+ <a href="<%= url_for :controller => 'xml', :action=>'feed', :type=>'article', :format => 'rss', :id => article %>">rss</a>,
42
+ <a href="<%= url_for :controller => 'xml', :action=>'feed', :type=>'article', :format => 'atom', :id => article %>">atom</a>
43
+ </li>
44
+ </ul>
45
+ </div>
46
+
47
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <li class="comment" id="comment-<%= comment.id %>">
2
+ <div class="author">
3
+ <%= content_tag(:div, gravatar_tag(comment.email)) if this_blog.use_gravatar and comment.email %>
4
+ <cite><%= (comment.url.blank?) ? h(comment.author) : link_to(h(comment.author), comment.url) %></cite>
5
+ <abbr title="<%= comment.created_at.xmlschema %>"><%= distance_of_time_in_words comment.article.published_at, comment.created_at %> later:</abbr>
6
+ </div>
7
+ <div class="content">
8
+ <%= comment.html %>
9
+ </div>
10
+ <% unless comment.published -%>
11
+ <div class="spamwarning"><%= _("This comment has been flagged for moderator approval.") %></div>
12
+ <% end -%>
13
+ </li>
14
+
@@ -0,0 +1,52 @@
1
+ <%= form_remote_tag :url => {:action => 'comment', :id => @article},
2
+ :position => :bottom,
3
+ :update => {:success => 'commentList'},
4
+ :loading => "loading()",
5
+ :complete => "complete(request)",
6
+ :failure => "failure(request)",
7
+ :html => {:id => 'commentform', :class => 'comments' } %>
8
+
9
+ <div id="preview" style="display:none"></div>
10
+
11
+ <fieldset>
12
+ <legend>Comments</legend>
13
+ <p>
14
+ <label>Name:<br />
15
+ <%= text_field "comment", "author" %>
16
+ <small>(<%= link_to_function("leave url/email &#187;", "Effect.toggle('extra_fields', 'blind', {duration: .3})") %>)</small>
17
+ </label>
18
+ </p>
19
+
20
+ <div id="extra_fields" style="display:none;">
21
+ <p>
22
+ <label>Email: <%= content_tag('small', "(#{link_to('gravatar', 'http://gravatar.com')} enabled)") if this_blog.use_gravatar %><br />
23
+ <%= text_field "comment", "email" %>
24
+ </label>
25
+ </p>
26
+ <p>
27
+ <label>Url:<br />
28
+ <%= text_field "comment", "url" %>
29
+ </label>
30
+ </p>
31
+ </div>
32
+
33
+ <p>
34
+ <label>
35
+ Comments:
36
+ <%= content_tag('small', link_to("Textile enabled", "http://hobix.com/textile/")) if this_blog.comment_text_filter.include? 'textile' %>
37
+ <%= content_tag('small', link_to("Markdown enabled", "http://daringfireball.net/projects/markdown/")) if this_blog.comment_text_filter.include? 'markdown' %>
38
+ <br />
39
+ <%= text_area 'comment', 'body' %>
40
+ </label>
41
+ </p>
42
+
43
+ <p>
44
+ <%= submit_to_remote('preview', 'Preview!',
45
+ :update => 'preview',
46
+ :complete => "Element.show('preview')",
47
+ :url => { :action => 'comment_preview' }) %>
48
+ <%= submit_tag 'Submit', :id => 'form-submit-button', :onclick => "$('commentform').onsubmit();this.disabled=true;Element.hide('preview');return false;" %>
49
+ <%= image_tag '/images/theme/spinner.gif', :id => 'comment_loading', :style => 'display:none' %>
50
+ </p>
51
+ </fieldset>
52
+ <%= end_form_tag %>
@@ -0,0 +1,7 @@
1
+ <ol id="commentList" class="comments">
2
+ <% if @article.published_comments.any? -%>
3
+ <%= render(:partial => "comment", :collection => @article.published_comments) %>
4
+ <% else -%>
5
+ <li class="dummy_comment" style="display:none">No comments</li>
6
+ <% end -%>
7
+ </ol>
@@ -0,0 +1,16 @@
1
+ <div id="search" class="search">
2
+ <% form_tag({ :controller => 'articles', :action => 'search' },
3
+ { :method => 'get', :id => 'sform' }) do -%>
4
+ <p><input type="text" id="q" name="q" value="" /></p>
5
+ <% end -%>
6
+
7
+ <div id="loading" class="loading" style="display:none;">Searching...</div>
8
+ <div id="results" class="results"></div>
9
+ <%= observe_field 'q',
10
+ :url => { :controller => 'live', :action => 'search' },
11
+ :frequency => 1,
12
+ :loading => "Element.show('loading')",
13
+ :complete => "Element.hide('loading')",
14
+ :update => 'results',
15
+ :with => "'q=' + escape($F('q'))" %>
16
+ </div>
@@ -0,0 +1,9 @@
1
+ <li class="trackback" id="trackback-<%= trackback.id %>">
2
+ <div class="author">
3
+ <a href="<%= trackback.url %>" rel="nofollow"><%= trackback.title %></a>
4
+ <abbr>From <cite><%= trackback.blog_name %></cite></abbr>
5
+ </div>
6
+ <div class="content">
7
+ <%= trackback.excerpt %>
8
+ </div>
9
+ </li>
@@ -0,0 +1,10 @@
1
+ <div class="comment preview">
2
+ <div class="author">
3
+ <%= content_tag(:div, gravatar_tag(@comment.email)) if this_blog.use_gravatar and @comment.email %>
4
+ <cite><%= (@comment.url.blank?) ? h(@comment.author) : link_to(h(@comment.author), @comment.url) %></cite>
5
+ <abbr>is about to say</abbr>
6
+ </div>
7
+ <div class="content">
8
+ <%= @comment.html %>
9
+ </div>
10
+ </div>
@@ -0,0 +1,5 @@
1
+ <%= render :partial => 'article', :collection => @articles %>
2
+
3
+ <% unless @pages.item_count <= this_blog.limit_article_display -%>
4
+ <p class="pagination">Older posts: <%= pagination_links @pages, :params => { :action => @controller.action_name } %></p>
5
+ <% end -%>
@@ -0,0 +1,42 @@
1
+ <!--
2
+ <rdf:RDF
3
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
4
+ xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
6
+ <rdf:Description
7
+ rdf:about=""
8
+ trackback:ping="<%= @article.trackback_url %>"
9
+ dc:title="<%=h @article.title.gsub(/-+/, '-') %>"
10
+ dc:identifier="<%= @article.permalink_url %>"
11
+ dc:description="<%=h (@article.html.strip_html[0..255]).gsub(/-+/, '-') %>"
12
+ dc:creator="<%= h @article.author %>"
13
+ dc:date="<%= @article.updated_at.xmlschema %>" />
14
+ </rdf:RDF>
15
+ -->
16
+
17
+ <%= render :partial => 'article', :object => @article %>
18
+
19
+ <% if @article.allow_pings? -%>
20
+ <h5><a name="trackbacks">Trackbacks</a></h5>
21
+ <p>
22
+ Use the following link to trackback from your own site:<br />
23
+ <%= @article.trackback_url %>
24
+ </p>
25
+
26
+ <% unless @article.published_trackbacks.blank? -%>
27
+ <ol id="trackbacks" class="trackbacks">
28
+ <%= render(:partial => "trackback", :collection => @article.published_trackbacks) %>
29
+ </ol>
30
+ <% end -%>
31
+ <% end -%>
32
+
33
+ <% if @article.allow_comments? or @article.published_comments.size > 0 -%>
34
+ <h5><a name="comments">Comments</a></h5>
35
+ <p><a href="#commentform">Leave a response</a></p>
36
+
37
+ <div id="comments_div">
38
+ <%= render :partial => "comment_list" %>
39
+ </div>
40
+ <% end -%>
41
+
42
+ <%= render :partial => 'comment_form' if @article.allow_comments? %>