shinmun 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/README.md +127 -62
- data/Rakefile +23 -11
- data/bin/shinmun +6 -1
- data/lib/shinmun/admin_controller.rb +161 -0
- data/lib/shinmun/aggregations/delicious.rb +57 -0
- data/lib/shinmun/aggregations/flickr.rb +81 -0
- data/lib/shinmun/blog.rb +319 -0
- data/lib/shinmun/cache.rb +59 -0
- data/lib/shinmun/comment.rb +44 -0
- data/lib/shinmun/controller.rb +135 -0
- data/lib/shinmun/helpers.rb +116 -0
- data/lib/shinmun/post.rb +166 -0
- data/lib/shinmun/template.rb +39 -0
- data/lib/shinmun.rb +14 -411
- metadata +15 -81
- data/example/posts/2008/9/example.md +0 -19
- data/example/posts/blog.yml +0 -10
- data/example/posts/uuid.state +0 -3
- data/example/public/controllers/comments.php +0 -56
- data/example/public/images/loading.gif +0 -0
- data/example/public/javascripts/comments.js +0 -60
- data/example/public/javascripts/highlight.js +0 -505
- data/example/public/javascripts/images/bg-fill.png +0 -0
- data/example/public/javascripts/images/bg.png +0 -0
- data/example/public/javascripts/images/blockquote.png +0 -0
- data/example/public/javascripts/images/bold.png +0 -0
- data/example/public/javascripts/images/code.png +0 -0
- data/example/public/javascripts/images/h1.png +0 -0
- data/example/public/javascripts/images/hr.png +0 -0
- data/example/public/javascripts/images/img.png +0 -0
- data/example/public/javascripts/images/italic.png +0 -0
- data/example/public/javascripts/images/link.png +0 -0
- data/example/public/javascripts/images/ol.png +0 -0
- data/example/public/javascripts/images/redo.png +0 -0
- data/example/public/javascripts/images/separator.png +0 -0
- data/example/public/javascripts/images/ul.png +0 -0
- data/example/public/javascripts/images/undo.png +0 -0
- data/example/public/javascripts/images/wmd-on.png +0 -0
- data/example/public/javascripts/images/wmd.png +0 -0
- data/example/public/javascripts/jquery-form.js +0 -869
- data/example/public/javascripts/jquery.js +0 -3383
- data/example/public/javascripts/languages/1c.js +0 -82
- data/example/public/javascripts/languages/axapta.js +0 -52
- data/example/public/javascripts/languages/bash.js +0 -80
- data/example/public/javascripts/languages/diff.js +0 -64
- data/example/public/javascripts/languages/dos.js +0 -33
- data/example/public/javascripts/languages/dynamic.js +0 -460
- data/example/public/javascripts/languages/ini.js +0 -36
- data/example/public/javascripts/languages/javascript.js +0 -38
- data/example/public/javascripts/languages/lisp.js +0 -86
- data/example/public/javascripts/languages/mel.js +0 -50
- data/example/public/javascripts/languages/profile.js +0 -50
- data/example/public/javascripts/languages/renderman.js +0 -71
- data/example/public/javascripts/languages/smalltalk.js +0 -53
- data/example/public/javascripts/languages/sql.js +0 -50
- data/example/public/javascripts/languages/static.js +0 -175
- data/example/public/javascripts/languages/vbscript.js +0 -25
- data/example/public/javascripts/languages/www.js +0 -245
- data/example/public/javascripts/prettyDate.js +0 -36
- data/example/public/javascripts/showdown.js +0 -421
- data/example/public/javascripts/template.js +0 -165
- data/example/public/javascripts/wmd-base.js +0 -1799
- data/example/public/javascripts/wmd-plus.js +0 -311
- data/example/public/javascripts/wmd.js +0 -73
- data/example/public/stylesheets/grid.css +0 -243
- data/example/public/stylesheets/grid.png +0 -0
- data/example/public/stylesheets/highlight/ascetic.css +0 -38
- data/example/public/stylesheets/highlight/dark.css +0 -96
- data/example/public/stylesheets/highlight/default.css +0 -91
- data/example/public/stylesheets/highlight/far.css +0 -95
- data/example/public/stylesheets/highlight/idea.css +0 -75
- data/example/public/stylesheets/highlight/sunburst.css +0 -112
- data/example/public/stylesheets/highlight/zenburn.css +0 -108
- data/example/public/stylesheets/print.css +0 -76
- data/example/public/stylesheets/reset.css +0 -45
- data/example/public/stylesheets/style.css +0 -141
- data/example/public/stylesheets/typography.css +0 -59
- data/example/templates/feed.rxml +0 -21
- data/example/templates/layout.rhtml +0 -54
- data/example/templates/page.rhtml +0 -4
- data/example/templates/post.rhtml +0 -57
- data/example/templates/posts.rhtml +0 -10
@@ -1,141 +0,0 @@
|
|
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
|
-
}
|
@@ -1,59 +0,0 @@
|
|
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
|
-
|
data/example/templates/feed.rxml
DELETED
@@ -1,21 +0,0 @@
|
|
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>
|
@@ -1,54 +0,0 @@
|
|
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>
|
@@ -1,57 +0,0 @@
|
|
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
|
-
|