Permalink
Browse files

using 1.9.2 syntax, using template inheritance

  • Loading branch information...
1 parent 9dcec3b commit c459e33c2348fcf14f670bbf338be4cffcfb104f @evansagge committed Sep 19, 2011
View
@@ -5,7 +5,7 @@ gem "rails", "~> 3.1"
gem "hashie"
# DB
-gem 'mongoid', '~> 2.0'
+gem 'mongoid', '~> 2.2'
gem 'bson_ext', '~> 1.3'
# DB Addons
View
@@ -230,7 +230,7 @@ DEPENDENCIES
hashie
jquery-rails
kaminari
- mongoid (~> 2.0)
+ mongoid (~> 2.2)
mongoid_slug
mongoid_taggable
nokogiri
@@ -25,5 +25,9 @@ def session_meta_tag
<meta name="session-key-value" content="#{Rack::Utils.escape_html(cookies[session_key])}"/>
}.html_safe
end
+
+ def tags_with_weight
+ Post.tags_with_weight
+ end
end
@@ -1,11 +0,0 @@
-module DisqusHelper
-
- def comments_count
- render 'shared/disqus/comments_count'
- end
-
- def disqus_thread(options)
- render 'shared/disqus/thread', :options => options
- end
-
-end
@@ -1,4 +1,4 @@
-ul#menu
+ul id='menu'
li = link_to "Dashboard", :admin
li = link_to "Posts", :admin_posts
li = link_to "Uploads", :admin_uploads
@@ -1,4 +1,4 @@
-#disqus_thread
+div id='disqus_thread'
javascript:
var disqus_shortname = "iamevan";
var disqus_developer = #{Rails.env.development? ? 1 : 0};
@@ -0,0 +1,3 @@
+| Copyright &copy; 2011 Evan Sagge
+br
+| This site is running on Ruby on Rails 3.1, and Mongoid 2.2.
@@ -0,0 +1,4 @@
+h1
+ | I.Am.Evan
+h4
+ | Ruby programmer. Web developer. Adventurer. Daydreamer.
@@ -0,0 +1,2 @@
+div id='breadcrumbs'
+ = breadcrumb separator: " &raquo; ", autoroot: true, show_root_alone: true, link_last: true
@@ -0,0 +1,27 @@
+div id='about' class='box'
+ p
+ | I'm Evan Sagge, a Ruby developer specializing on Ruby on Rails and Rack-based frameworks.
+ I'm currently working on #{link_to 'Infinite.ly', 'http://infinite.ly', target: '_blank'} and other smaller projects.
+ And this website is my sandbox for various experimentations with web programming.
+
+ p
+ | I'm still trying to decide what else to write about myself, but for now you can know more about me from:
+
+ ul
+ li = link_to 'Infinite.ly', 'http://evan.infinite.ly', target: '_blank'
+ li = link_to 'Twitter', 'http://twitter.com/evansagge', target: '_blank'
+ li = link_to 'Facebook', 'http://facebook.com/evan.sagge', target: '_blank'
+ li = link_to 'Github', 'http://github.com/evansagge', target: '_blank'
+
+div id='projects' class='box'
+ h4 Current Projects
+ ul
+ li = link_to "Infinite.ly", "http://infinite.ly", target: '_blank'
+ li = link_to "flickr_oauth", "http://rubygems.org/gems/flickr_oauth", target: '_blank'
+ li = link_to "mongoid-rspec", "http://rubygems.org/gems/mongoid-rspec", target: '_blank'
+
+div id='tags' class='box'
+ h4 Tags
+ ul
+ - tags_with_weight.each do |tag, count|
+ li = link_to "#{tag} (#{count.to_i})", tagged_posts_url(tag)
@@ -13,20 +13,18 @@ html
javascript:
var session_key = '#{session_key}'
var session_key_value = '#{Rack::Utils.escape_html(cookies[session_key])}'
- = csrf_meta_tag
+ = csrf_meta_tags
- body.admin
- #container
- #header
- h1 Sandbox Admin
- #navigation
- = render 'shared/admin/navigation'
- hr.spacer
- #content
+ body class='admin'
+ div id='container'
+ div id='navigation'
+ = render 'navigation'
+ hr class='spacer'
+ div id='content'
== yield
- #sidebar
+ div id='sidebar'
= render 'sidebar'
- hr.spacer
- hr.ruler
- #footer
- = render 'shared/footer'
+ hr class='spacer'
+ hr class='ruler'
+ div id='footer'
+ = render 'footer'
@@ -10,19 +10,17 @@ html
== yield :stylesheet
= javascript_include_tag 'application', :debug => Rails.env.development?
== yield :javascript
- = csrf_meta_tag
+ = csrf_meta_tags
- body.application
- #container
- / #header
- / = render 'shared/header'
- #navigation
- = render 'shared/navigation'
- hr.spacer
- #content
+ body class='application'
+ div id='container'
+ div id='navigation'
+ = render 'navigation'
+ hr class='spacer'
+ div id='content'
= yield
- #sidebar
- = render 'shared/sidebar'
- hr.ruler
- #footer
- = render 'shared/footer'
+ div id='sidebar'
+ = render 'sidebar'
+ hr class='spacer'
+ div id='footer'
+ = render 'footer'
@@ -9,5 +9,5 @@ html
= stylesheet_link_tag 'preview', :debug => Rails.env.development?
== yield :stylesheet
- body.application
+ body class='application'
== yield
@@ -1,8 +1,8 @@
-.post[id="#{dom_id post}"]
- h2.title = link_to post.title, post
- .timestamp #{post.created_at.to_date.to_formatted_s(:rfc822)}
- .content
+div class='post' id=dom_id(post)
+ h2 class='title' = link_to post.title, post
+ div class='timestamp' = post.created_at.to_date.to_formatted_s(:rfc822)
+ div class='content'
== md post.content
- .footer.clearfix
- .tags == tags_links(post)
- .comments = link_to 'comments', post_url(post, :anchor => "disqus_thread"), :'data-disqus-identifier' => dom_id(post)
+ div class='footer clearfix'
+ div class='tags' == tags_links(post)
+ div class='comments' = link_to 'comments', post_url(post, anchor: "disqus_thread"), :'data-disqus-identifier' => dom_id(post)
@@ -1,6 +1,6 @@
-= comments_count
+= render 'comments_count'
-#posts
+div id='posts'
= render @posts
= paginate @posts
@@ -1,3 +1,3 @@
= render @post
-= comments_count
-= disqus_thread :identifier => dom_id(@post), :url => post_url(@post), :title => @post.title
+= render 'comments_count'
+= render 'comments_thread', options: { identifier: dom_id(@post), url: post_url(@post), title: @post.title }
@@ -1,3 +0,0 @@
-| Copyright &copy; 2011 Evan Sagge
-br
-| This site is running on Ruby on Rails 3.1rc5, and Mongoid 2.x.
@@ -1,2 +0,0 @@
-h1 I.Am.Evan
-h4 Ruby programmer. Web developer. Adventurer. Daydreamer.
@@ -1,2 +0,0 @@
-#breadcrumbs
- = breadcrumb :separator => " &raquo; ", :autoroot => true, :show_root_alone => true, :link_last => true
@@ -1,26 +0,0 @@
-#about.box
- p
- | I'm Evan Sagge, a Ruby developer specializing on Ruby on Rails and Rack-based frameworks.
- I'm currently working on #{link_to 'Infinite.ly', 'http://infinite.ly', :target => '_blank'} and other smaller projects.
- And this website is my sandbox for various experimentations with web programming.
-
- p I'm still trying to decide what else to write about myself, but for now you can know more about me from:
-
- ul
- li = link_to 'Infinite.ly', 'http://evan.infinite.ly', :target => '_blank'
- li = link_to 'Twitter', 'http://twitter.com/evansagge', :target => '_blank'
- li = link_to 'Facebook', 'http://facebook.com/evan.sagge', :target => '_blank'
- li = link_to 'Github', 'http://github.com/evansagge', :target => '_blank'
-
-#projects.box
- h4 Current Projects
- ul
- li = link_to "Infinite.ly", "http://infinite.ly", :target => '_blank'
- li = link_to "flickr_oauth", "http://rubygems.org/gems/flickr_oauth", :target => '_blank'
- li = link_to "mongoid-rspec", "http://rubygems.org/gems/mongoid-rspec", :target => '_blank'
-
-#tags.box
- h4 Tags
- ul
- - Post.tags_with_weight.each do |tag, count|
- li = link_to "#{tag} (#{count.to_i})", tagged_posts_url(tag)

0 comments on commit c459e33

Please sign in to comment.