Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

text column works

  • Loading branch information...
commit b38725528d24c3d9ea9ec74eeb4d94f52bf7f9f9 1 parent e54b353
mrb authored
View
3  .gitmodules
@@ -4,3 +4,6 @@
[submodule "vendor/flickr"]
path = vendor/flickr
url = git://github.com/ctagg/flickr.git
+[submodule "vendor/static_model"]
+ path = vendor/static_model
+ url = git://github.com/quirkey/static_model.git
View
10 data/text.yml
@@ -1,5 +1,7 @@
---
-- title: Link #1
- body: http://www.google.com
-- title: Link #2
- body: http://www.nytimes.com
+- title: News 12/5/08
+ body: Not too much news today! Not too much news today! Not too much news today! Not too much news today!
+ posted_at: Fri Dec 05 15:32:10 -0500 2008
+- title: News 12/4/08
+ body: Not too much news today!
+ posted_at: Fri Dec 04 12:21:30 -0500 2008
View
5 lib/columnlog/apps/gist.rb
@@ -5,12 +5,11 @@ class Gist < Base
@@gist_url = 'http://gist.github.com/%s.txt'
def post(content)
- content = content.is_a?(Post) ? content.body : content
- app.post(content)
end
def get(how_many = nil)
- doc = Nokogiri::HTML.parse(open("http://gist.github.com/mrb"))
+ super
+ doc = Nokogiri::HTML(open("http://gist.github.com/mrb"))
doc.css('div.file').collect{|x| to_post(x.to_html) }
end
View
8 lib/columnlog/apps/text.rb
@@ -10,21 +10,23 @@ class Text < Base
# app.post(content)
# end
- def get(how_many = 10)
+ def get(how_many = nil)
super
out = app.collect {|i| to_post(i) }
out.first(how_many)
end
def app
- Columnlog::SimpleText.set_data_file settings.data_file
+ data_root = File.join(Columnlog.root, 'data/')
+ Columnlog::SimpleText.set_data_file data_root+settings.data_file
Columnlog::SimpleText.all
end
protected
def to_post(item, other = {})
Post.new({:title =>item.title,
- :body => item.body})
+ :body => item.body,
+ :posted_at => item.posted_at})
end
end
View
1  lib/columnlog/errors.rb
@@ -3,6 +3,5 @@ module Errors
class Error < Exception; end
class UnauthorizedApp < Error; end
-
end
end
1  sinatra
@@ -0,0 +1 @@
+Subproject commit c08fbaf424caec5f20fca78e5e3bb4a997be8acc
View
165 themes/default/public/stylesheets/default.css
@@ -1,13 +1,158 @@
-body { font: 75% "Helvetica", arial, Verdana, sans-serif; background: #FFB03B; }
-h1 { margin: 0; color: #8E2800; }
-h2 { margin-bottom: 0;}
-a { color: #468966; }
-#page { margin: 1em auto; width: 1024px; border: 0.75em solid #B64926; background: white; padding: 2em; }
-.post { border-bottom: 0.4em double #FFB03B; padding-bottom: 1em;}
-.post .subtitle { padding-bottom: 1em; font-size: 83.333%; display: block;}
-#header, #footer { width: 1024px; margin: 0 auto}
-#header h3 { font-size: 220%; margin: 0.5em 0 0 0; font-family: "Georgia";}
-#header h3 a { color: #FFF0A5; text-decoration: none; text-transform: uppercase; letter-spacing: 0.3em; text-shadow: #B64926 0.04em 0.04em;}
+/******************************************************
+ * theme(quirkey).css *
+\*****************************************************/
+
+body {
+ margin: 0px;
+ background: #2D2F3D;
+ font-family: Helvetica, Arial, sans-serif;
+ color: #FFF;
+ font-size: 14px;
+}
+a:link, a:visited {
+ color:#B6D7F0;
+ text-decoration:none;
+}
+a:hover {
+ color:#ECE2E8;
+}
+
+#header {
+ font-family: Georgia, Times, serif;
+ border-bottom: 10px solid #222833;
+}
+#header h1 {
+ font-weight:normal;
+ font-size: 50px;
+ margin: -5px 0px 0px 10px;
+ height: 45px;
+}
+#header h1 a {
+ color: #F5F0E2;
+}
+#footer {
+ width: 100%;
+ text-align:right;
+ font-size: 11px;
+ margin: 20px 0px;
+}
+#footer p {
+ padding: 0px 10px;
+}
+#main {
+ width: 100%;
+ height: auto;
+ background: #111 ;
+ overflow: auto;
+}
+#columns {
+/* white-space: nowrap;*/
+ width: auto;
+ margin-left: 200px;
+}
+.column {
+ width: 350px;
+ margin: 0px;
+/* margin-bottom: 30000px;*/
+ border-top: 1px solid #13171E;
+ border-right: 2px solid #666;
+ float:left;
+ height: 480px;
+}
+.post {
+ padding: 10px;
+ line-height: 170%;
+ border-bottom: 1px solid #666;
+}
+.post h3 {
+ font-size: 16px;
+ line-height: 140%;
+ padding: 0px;
+ margin: 0px;
+ color:#B6B6B6;
+}
+.post .meta_info {
+ font-size: 11px;
+ color: #9E9E9E;
+}
+
+.clear {
+ font-size: 1px;
+ line-height: 0px;
+ clear:both;
+}
+.column h2 {
+ padding: 0px 10px;
+ margin: 0px;
+ font-size: 40px;
+ height: 30px;
+/* text-shadow: #333 2px 2px 5px;*/
+}
+.column_twitter {
+ background:#0C2A47;
+}
+.column_twitter h2 {
+ background: #B6D7F0;
+ display:block;
+}
+.column_twitter h2 a:link, .column_twitter h2 a:visited {
+ color: #0C2A47;
+}
+.column_twitter .post_body {
+ font-size: 20px;
+ font-family: Georgia, Times, serif;
+}
+.column_rss {
+ background:#22455E;
+}
+.column_rss h2 {
+ background: #B6D7F0;
+ display:block;
+}
+.column_rss h2 a:link, .column_rss h2 a:visited {
+ color: #22455E;
+}
+.column_tumblr {
+ background: #13323A;
+}
+.column_tumblr h2 {
+ background: #B6D7F0;
+ display:block;
+}
+.column_tumblr h2 a:link, .column_tumblr h2 a:visited {
+ color: #13323A;
+}
+.column_last_fm {
+ background: #51373D;
+}
+.column_last_fm h2 {
+ background: #B6D7F0;
+ display:block;
+}
+.column_last_fm h2 a:link, .column_last_fm h2 a:visited {
+ color: #51373D;
+}
+.column_flickr {
+ background: #141B22;
+}
+.column_flickr h2 {
+ background: #B6D7F0;
+ display:block;
+}
+.column_flickr h2 a:link, .column_flickr h2 a:visited {
+ color: #141B22;
+}
+.column_flickr img {
+ float:left;
+ margin: 0px 10px 10px 0px;
+}
+.home_description {
+ width: 200px;
+}
+/*
+Flash Stuff
+*/
+
#flash { position: fixed; top: 0px; left: 0px; width: 100%; z-index: 1000; background-color: #569; color: white; border-bottom: 1px solid #555; }
#flash, #flash * { cursor: pointer; }
#flash .yui-b { padding: 5px 0; }
View
8 themes/default/views/index.erb
@@ -1,14 +1,14 @@
-<% columns = Columnlog::Column.all.reject {|c| c.updated_at.nil? } %>
+<% columns = Columnlog::Column.all %>
<div id="columns">
-<% columns.sort_by {|c| c.updated_at }.reverse.each do |column| %>
+<% columns.each do |column| %>
<div class="column column_<%= column.app_type.underscore %>" id="column_<%= column.name %>" style="width: <%= 99.4 / columns.length %>%;">
<h2><%= link_to column.title, column.url %></h2>
<div class="posts">
<% column.get.each do |post| %>
<div class="post">
- <% if post.title %><h3><%= link_to post.title, post.url %></h3><% end %>
+ <% if post.title %><h3><%= post.title %></h3><% end %>
<% if post.body %><div class="post_body"><%= post.body %></div><% end %>
- <div class="meta_info"><%= post.posted_at.strftime("%B, %e %Y at %I:%M%p") %><% if post.author %> by <%= post.author %><% end %><% if post.url %>&nbsp;<%= link_to "&raquo;", post.url %><% end %></div>
+ <div class="meta_info"><% if post.posted_at %><i><%= post.posted_at.strftime("%B, %e %Y at %I:%M%p") %></i><% end %><% if post.author %> by <%= post.author %><% end %><% if post.url %>&nbsp;<%= link_to "&raquo;", post.url %><% end %></div>
<div class="clear"></div>
</div>
<% end %>
1  vendor/static_model
@@ -0,0 +1 @@
+Subproject commit 3b65961eadfa3e530eacd112af4f727c609d121c
Please sign in to comment.
Something went wrong with that request. Please try again.