Skip to content
Browse files

reverted the featured git stuff

  • Loading branch information...
1 parent 3e131d0 commit a8902de0654460b680f9c194e22b5c448b9b2959 @schacon schacon committed Jul 28, 2008
View
1 app/controllers/page_controller.rb
@@ -3,7 +3,6 @@ class PageController < ApplicationController
caches_page :index, :about, :development, :documentation, :download, :tools
def index
- @featured = Repository.featured
end
def about
View
40 app/models/repository.rb
@@ -1,40 +0,0 @@
-require "open-uri"
-
-class Repository
-
- attr_accessor :user, :repo, :description
-
- def initialize(data)
- @user = data[:user]
- @repo = data[:repo]
- @description = data[:description]
- end
-
- def url_for_user
- "http://github.com/#{self.user}"
- end
-
- def url_for_project
- "http://github.com/#{self.user}/#{self.repo}/tree"
- end
-
-end
-
-class << Repository
-
- def featured
- data = {}
- data[:user] = (dom/".featured/.site/.meta/.user/a").inner_html
- data[:repo] = (dom/".featured/.site/.meta/.repo/a").inner_html
- data[:description] = (dom/".featured/.site/.blurb").inner_html
-
- object = Repository.new(data)
- object
- end
-
- def dom
- @dom ||= Hpricot(open("http://github.com"))
- @dom
- end
-
-end
View
44 app/views/page/index.html.erb
@@ -48,46 +48,36 @@
<%= render :partial => 'shared/download' %>
</div>
- <div class="span-21" id="featured-git">
- <h2 class="section-start">Featured Git-Powered Project</h2>
- </div>
-
- <div class="span-9" id="featured-git-name">
- <h3><%= link_to @featured.repo, @featured.url_for_project %></h3>
- <h4>By <%= link_to @featured.user, @featured.url_for_user %></h4>
- </div>
-
- <div class="span-12 last" id="featured-git-description">
- <%= @featured.description %>
- <p id="featured-git-github">Featured Git project powered by <a href="http://github.com">Github</a>.</p>
- </div>
-
<div class="span-21">
<h2 class="section-start">Git Quick Start</h2>
</div>
<div class="span-9">
<div class="example">
<h3>Cloning and Creating a Patch</h3>
- <pre>$ git clone git://github.com/git/hello-world.git
- $ cd hello-world
- $ (edit files)
- $ git add (files)
- $ git commit -m 'Explain what I changed'
- $ git format-patch origin/master
- </pre>
+
+<pre>$ git clone git://github.com/git/hello-world.git
+$ cd hello-world
+$ (edit files)
+$ git add (files)
+$ git commit -m 'Explain what I changed'
+$ git format-patch origin/master
+</pre>
+
</div>
</div>
<div class="span-6">
<div class="example">
<h3>Creating and Commiting</h3>
- <pre>$ cd (project-directory)
- $ git init
- $ (add some files)
- $ git add .
- $ git commit -m 'Initial commit'
- </pre>
+
+<pre>$ cd (project-directory)
+$ git init
+$ (add some files)
+$ git add .
+$ git commit -m 'Initial commit'
+</pre>
+
</div>
</div>
View
2 config/environment.rb
@@ -34,8 +34,6 @@
# Add additional load paths for your own custom dirs
# config.load_paths += %W( #{RAILS_ROOT}/extras )
- config.gem "hpricot", :source => "http://code.whytheluckystiff.net"
-
# Force all environments to use the same logger level
# (by default production uses :info, the others :debug)
# config.log_level = :debug
View
8 public/stylesheets/style.css
@@ -59,11 +59,3 @@ table.data-table tr td { vertical-align: top;}
table.data-table tr td h3 { background: #B5463F; color: #fff; padding: 5px; }
table#authors tr td { font-size: 120%; }
-
-#featured-git-name {text-align: right;}
-#featured-git-name h3 {margin-bottom: 0;}
-#featured-git-name h3 a { font-size: 140%; text-decoration: none; font-weight: bold}
-#featured-git-name h4 {font-weight: bold; text-transform: uppercase; color: #B5463F;}
-#featured-git-name h4 a {color: #B5463F;}
-
-#featured-git-description span {font-weight: bold;}

0 comments on commit a8902de

Please sign in to comment.
Something went wrong with that request. Please try again.