shinmun 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/.gitignore +1 -0
  2. data/LICENSE +18 -0
  3. data/README.md +249 -0
  4. data/Rakefile +60 -0
  5. data/bin/shinmun +12 -0
  6. data/example/posts/2008/9/example.md +19 -0
  7. data/example/posts/blog.yml +10 -0
  8. data/example/posts/uuid.state +3 -0
  9. data/example/public/controllers/comments.php +56 -0
  10. data/example/public/images/loading.gif +0 -0
  11. data/example/public/javascripts/comments.js +60 -0
  12. data/example/public/javascripts/highlight.js +505 -0
  13. data/example/public/javascripts/images/bg-fill.png +0 -0
  14. data/example/public/javascripts/images/bg.png +0 -0
  15. data/example/public/javascripts/images/blockquote.png +0 -0
  16. data/example/public/javascripts/images/bold.png +0 -0
  17. data/example/public/javascripts/images/code.png +0 -0
  18. data/example/public/javascripts/images/h1.png +0 -0
  19. data/example/public/javascripts/images/hr.png +0 -0
  20. data/example/public/javascripts/images/img.png +0 -0
  21. data/example/public/javascripts/images/italic.png +0 -0
  22. data/example/public/javascripts/images/link.png +0 -0
  23. data/example/public/javascripts/images/ol.png +0 -0
  24. data/example/public/javascripts/images/redo.png +0 -0
  25. data/example/public/javascripts/images/separator.png +0 -0
  26. data/example/public/javascripts/images/ul.png +0 -0
  27. data/example/public/javascripts/images/undo.png +0 -0
  28. data/example/public/javascripts/images/wmd-on.png +0 -0
  29. data/example/public/javascripts/images/wmd.png +0 -0
  30. data/example/public/javascripts/jquery-form.js +869 -0
  31. data/example/public/javascripts/jquery.js +3383 -0
  32. data/example/public/javascripts/languages/1c.js +82 -0
  33. data/example/public/javascripts/languages/axapta.js +52 -0
  34. data/example/public/javascripts/languages/bash.js +80 -0
  35. data/example/public/javascripts/languages/diff.js +64 -0
  36. data/example/public/javascripts/languages/dos.js +33 -0
  37. data/example/public/javascripts/languages/dynamic.js +460 -0
  38. data/example/public/javascripts/languages/ini.js +36 -0
  39. data/example/public/javascripts/languages/javascript.js +38 -0
  40. data/example/public/javascripts/languages/lisp.js +86 -0
  41. data/example/public/javascripts/languages/mel.js +50 -0
  42. data/example/public/javascripts/languages/profile.js +50 -0
  43. data/example/public/javascripts/languages/renderman.js +71 -0
  44. data/example/public/javascripts/languages/smalltalk.js +53 -0
  45. data/example/public/javascripts/languages/sql.js +50 -0
  46. data/example/public/javascripts/languages/static.js +175 -0
  47. data/example/public/javascripts/languages/vbscript.js +25 -0
  48. data/example/public/javascripts/languages/www.js +245 -0
  49. data/example/public/javascripts/prettyDate.js +36 -0
  50. data/example/public/javascripts/showdown.js +421 -0
  51. data/example/public/javascripts/template.js +165 -0
  52. data/example/public/javascripts/wmd-base.js +1799 -0
  53. data/example/public/javascripts/wmd-plus.js +311 -0
  54. data/example/public/javascripts/wmd.js +73 -0
  55. data/example/public/stylesheets/grid.css +243 -0
  56. data/example/public/stylesheets/grid.png +0 -0
  57. data/example/public/stylesheets/highlight/ascetic.css +38 -0
  58. data/example/public/stylesheets/highlight/dark.css +96 -0
  59. data/example/public/stylesheets/highlight/default.css +91 -0
  60. data/example/public/stylesheets/highlight/far.css +95 -0
  61. data/example/public/stylesheets/highlight/idea.css +75 -0
  62. data/example/public/stylesheets/highlight/sunburst.css +112 -0
  63. data/example/public/stylesheets/highlight/zenburn.css +108 -0
  64. data/example/public/stylesheets/print.css +76 -0
  65. data/example/public/stylesheets/reset.css +45 -0
  66. data/example/public/stylesheets/style.css +141 -0
  67. data/example/public/stylesheets/typography.css +59 -0
  68. data/example/templates/feed.rxml +21 -0
  69. data/example/templates/layout.rhtml +54 -0
  70. data/example/templates/page.rhtml +4 -0
  71. data/example/templates/post.rhtml +57 -0
  72. data/example/templates/posts.rhtml +10 -0
  73. data/lib/shinmun.rb +420 -0
  74. metadata +151 -0
@@ -0,0 +1,141 @@
1
+
2
+ #header {
3
+ height: 40px;
4
+ }
5
+
6
+ #header h1 {
7
+ font-size: 20px;
8
+ font-weight: bold;
9
+ padding: 20px 20px 5px 0;
10
+ display: inline;
11
+ }
12
+
13
+ #header h1 a {
14
+ color: #069;
15
+ text-decoration: none;
16
+ }
17
+
18
+ #header h1 a:hover {
19
+ color: #222;
20
+ text-decoration: none;
21
+ }
22
+
23
+ #header h2 {
24
+ color: #69c;
25
+ font-size: 16px;
26
+ font-weight: bold;
27
+ padding: 0 0 0 0;
28
+ display: inline;
29
+ }
30
+
31
+ #footer {
32
+ border-top: 1px solid #ccc;
33
+ padding: 1em;
34
+ text-align: center;
35
+ }
36
+
37
+ #navi ul {
38
+ clear: both;
39
+ list-style-type: none;
40
+ margin: 0;
41
+ padding: 0;
42
+ }
43
+
44
+ #navi ul li {
45
+ float: left;
46
+ border-right: 1px solid #fff;
47
+ }
48
+
49
+ #navi a {
50
+ background: #69c;
51
+ color: #fff;
52
+ font-size: 12px;
53
+ font-weight: normal;
54
+ padding: 4px 15px;
55
+ text-decoration: none;
56
+ }
57
+
58
+ #navi a.active {
59
+ font-weight: bold;
60
+ background: #369;
61
+ }
62
+
63
+ #header-text {
64
+ background: #369;
65
+ margin-bottom: 10px;
66
+ }
67
+
68
+ #header-text h1 {
69
+ color: #fff;
70
+ padding: 5px 0px 0px 60px;
71
+ border-bottom: 1px solid #69c;
72
+ }
73
+
74
+ .right ul {
75
+ color:#336699;
76
+ list-style-type:square;
77
+ padding:0pt 2em;
78
+ }
79
+
80
+ .right h4 {
81
+ color: #369;
82
+ margin-bottom: 1em;
83
+ }
84
+
85
+ .right a {
86
+ text-decoration: none;
87
+ }
88
+
89
+ .about {
90
+ color: #666;
91
+ }
92
+
93
+ .article {
94
+ padding: 1em;
95
+ }
96
+
97
+ .article h2 {
98
+ margin-top:0px;
99
+ }
100
+
101
+ .article .date {
102
+ color: #666;
103
+ }
104
+
105
+ .article .tags a {
106
+ color: #69c;
107
+ text-decoration: none;
108
+ }
109
+
110
+ .comments {
111
+ margin-bottom: 2em;
112
+ }
113
+
114
+ .comments .comment {
115
+ margin-top: 2em;
116
+ border: 1px solid #ccc;
117
+ }
118
+
119
+ .comments .comment .top {
120
+ background: #F0F0F0;
121
+ color: #333;
122
+ padding: 3px 5px;
123
+ }
124
+
125
+ .comments .comment .top a {
126
+ text-decoration: none;
127
+ }
128
+
129
+ .comments .comment .text {
130
+ background: #F8F8F8;
131
+ padding: 3px 5px;
132
+ }
133
+
134
+ blockquote{
135
+ border-top: 3px double #69c;
136
+ border-bottom: 3px double #69c;
137
+ padding: 5px;
138
+ font-style: oblique;
139
+ margin-left: 5%;
140
+ margin-right: 5%;
141
+ }
@@ -0,0 +1,59 @@
1
+ /* --------------------------------------------------------------
2
+
3
+ typography.css
4
+ * Sets up some sensible default typography.
5
+
6
+ Based on work by:
7
+ * Nathan Borror [playgroundblues.com]
8
+ * Jeff Croft [jeffcroft.com]
9
+ * Christian Metts [mintchaos.com]
10
+ * Wilson Miner [wilsonminer.com]
11
+ * Richard Rutter [clagnut.com]
12
+
13
+ Read more about using a baseline here:
14
+ * alistapart.com/articles/settingtypeontheweb
15
+
16
+ */
17
+
18
+ /* This is where you set your desired font size. The line-heights
19
+ and vertical margins are automatically calculated from this.
20
+ The percentage is of 16px (0.75 * 16px = 12px). */
21
+
22
+ body {
23
+ font-size: 80%;
24
+ color: #222;
25
+ font-family: Arial, sans-serif;
26
+ }
27
+
28
+ code {
29
+ background: #f0f0f0;
30
+ }
31
+
32
+ h1,h2,h3,h4,h5,h6 {
33
+ color: #369;
34
+ font-family: Arial, sans-serif;
35
+ font-weight: bold;
36
+ }
37
+
38
+ a {
39
+ color: #369;
40
+ }
41
+
42
+ a:visited {
43
+ color: #369;
44
+ }
45
+
46
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
47
+ text-decoration: none;
48
+ }
49
+
50
+ h1 { font-size: 2em; line-height: 1; margin-top: 0.5em; margin-bottom: 0.5em; }
51
+ h2 { font-size: 1.5em; margin-top: 0.75em; margin-bottom: 0.75em; }
52
+ h3 { font-size: 1.3em; line-height: 1; margin-top: 1em; margin-bottom: 1em; }
53
+ h4 { font-size: 1.2em; line-height: 1.25; margin-top: 1.25em; margin-bottom: 1.25em; }
54
+ h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; }
55
+ h6 { font-size: 1em; font-weight: bold; }
56
+
57
+
58
+
59
+
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <rss version="2.0">
3
+ <channel>
4
+ <title><%= @category ? @blog_title + ' - ' + @category : @blog_title %></title>
5
+ <link><%= @blog_url %></link>
6
+ <description><%= @category ? 'Category ' + @category : @blog_description %></description>
7
+ <language><%= @blog_language %></language>
8
+ <copyright><%= @blog_author %></copyright>
9
+ <pubDate><%= rfc822 Time.now %></pubDate>
10
+ <% for post in @posts %>
11
+ <item>
12
+ <title><%= post.title %></title>
13
+ <description><%= strip_tags post.summary %></description>
14
+ <link><%= post.link %></link>
15
+ <author><%= @blog_author %></author>
16
+ <guid><%= post.link %></guid>
17
+ <pubDate><%= rfc822 post.date %></pubDate>
18
+ </item>
19
+ <% end %>
20
+ </channel>
21
+ </rss>
@@ -0,0 +1,54 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title><%= @blog_title %> - <%= @title %></title>
5
+ <meta http-equiv="Content-Language" content="English" />
6
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="<%= @root + (@category || 'index').downcase %>.rss" />
8
+ <%= stylesheet_link_tag :reset, :grid, :typography, :style, 'highlight/default' %>
9
+ <script>var Blog = { root: '<%= @root %>', guid: '<%= @guid %>' };</script>
10
+ </head>
11
+ <body>
12
+ <div class="container">
13
+
14
+ <div id="header" class="column span-20 last">
15
+ <h1><a href="<%= @root %>index.html"><%= @blog_title %></a></h1>
16
+ <h2><%= @blog_description %></h2>
17
+ </div>
18
+
19
+ <div id="navi" class="column span-20 last">
20
+ <%= navi_link 'Home', 'index' %>
21
+ <% for category in @categories %>
22
+ <%= navi_link category, 'categories/' + category.downcase %>
23
+ <% end %>
24
+ <%= navi_link 'About', 'about' %>
25
+ </div>
26
+
27
+ <div id="header-text" class="column span-20 last">
28
+ <h1><%= @header %></h1>
29
+ </div>
30
+
31
+ <div class="content column span-15">
32
+ <%= @content %>
33
+ </div>
34
+
35
+ <div class="right column span-5 last">
36
+ <h4>Subscribe</h4>
37
+ <h4>About</h4>
38
+ <h4>Archives</h4>
39
+ <ul>
40
+ <% for year, month in @months %>
41
+ <li><%= month_link year, month %></li>
42
+ <% end %>
43
+ </ul>
44
+ </div>
45
+ </div>
46
+
47
+ <%= javascript_tag 'jquery', 'jquery-form', 'template', 'prettyDate', 'highlight', 'comments', 'wmd' %>
48
+
49
+ <script type="text/javascript">
50
+ hljs.initHighlightingOnLoad('ruby', 'html', 'css', 'php', 'javascript', 'sql', 'lisp', 'xml', 'java');
51
+ </script>
52
+
53
+ </body>
54
+ </html>
@@ -0,0 +1,4 @@
1
+ <div class="article">
2
+ <h2><%= @title %></h2>
3
+ <%= @body %>
4
+ </div>
@@ -0,0 +1,57 @@
1
+ <div class="article">
2
+ <div class="date">
3
+ <%= date @date %>
4
+ </div>
5
+ <h2><%= @title %></h2>
6
+ <%= @body %>
7
+
8
+ <h3>Comments</h3>
9
+
10
+ <div class="comments-loading" style="display:none">
11
+ <%= image_tag 'loading.gif' %>
12
+ Loading Comments...
13
+ </div>
14
+
15
+ <div class="comments">
16
+ <div id="comments-template">
17
+ <div class="comment">
18
+ <div class="_ top">
19
+ <a class="_" href="{website}">{name}</a> said
20
+ <a class="_" title="{time}"></a>:
21
+ </div>
22
+ <div class="text"></div>
23
+ </div>
24
+ </div>
25
+ </div>
26
+
27
+ <hr/>
28
+
29
+ <div class="comment-form-loading" style="display:none">
30
+ <%= image_tag 'loading.gif' %>
31
+ Posting Comment...
32
+ </div>
33
+
34
+ <div class="comment-form">
35
+ <h4>Leave a comment</h4>
36
+ <form>
37
+ <input type="hidden" name="guid" value="<%= @guid %>"/>
38
+ <p>
39
+ <label>Name</label><br/>
40
+ <input type="text" name="name" size="40"/>
41
+ </p>
42
+ <p>
43
+ <label>Website</label><br/>
44
+ <input type="text" name="website" size="40"/>
45
+ </p>
46
+ <p>
47
+ <label>Comment</label><br/>
48
+ <textarea name="text" cols="60" rows="10"></textarea>
49
+ </p>
50
+ <p>
51
+ <input type="submit" value="Post comment"/>
52
+ </p>
53
+ </form>
54
+ </div>
55
+ </div>
56
+
57
+
@@ -0,0 +1,10 @@
1
+ <div class="articles">
2
+ <% for post in @posts %>
3
+ <div class="article">
4
+ <div class="date"><%= date post.date %></div>
5
+ <h2><%= post_link post %></h2>
6
+ <%= post.summary %>
7
+ </div>
8
+ <hr/>
9
+ <% end %>
10
+ </div>