Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

new branding

  • Loading branch information...
commit 01125d03a0a8176a5808cf9fb8a50188a2de06d4 1 parent 2aacb9c
@orta orta authored
View
3  .gitmodules
@@ -1,3 +1,6 @@
[submodule "spec/fixtures/master_repo"]
path = spec/fixtures/master_repo
url = https://github.com/CocoaPods/Specs.git
+[submodule "shared"]
+ path = shared
+ url = https://github.com/CocoaPods/shared_resources.git
View
3  Gemfile
@@ -11,10 +11,11 @@ gem 'mime-types', '< 2.0' # Ruby 1.8.7
gem 'sinatra'
gem 'sinatra-cache'
-gem 'haml'
gem 'twitter'
gem 'exceptio-ruby'
+gem 'slim'
+
group :development do
gem 'thin'
gem 'sinatra-contrib'
View
8 Gemfile.lock
@@ -42,8 +42,6 @@ GEM
dotenv (>= 0.7)
thor (>= 0.13.6)
fuzzy_match (2.0.4)
- haml (4.0.4)
- tilt
http (0.5.0)
http_parser.rb
http_parser.rb (0.5.3)
@@ -104,6 +102,10 @@ GEM
tilt (~> 1.3)
sinatra-outputbuffer (0.1.0)
sinatra (>= 1.0.a)
+ slim (2.0.2)
+ temple (~> 0.6.6)
+ tilt (>= 1.3.3, < 2.1)
+ temple (0.6.7)
term-ansicolor (1.2.2)
tins (~> 0.8)
thin (1.6.1)
@@ -140,7 +142,6 @@ DEPENDENCIES
coveralls
exceptio-ruby
foreman
- haml
json
mime-types (< 2.0)
mocha
@@ -153,5 +154,6 @@ DEPENDENCIES
sinatra
sinatra-cache
sinatra-contrib
+ slim
thin
twitter
View
12 app.rb
@@ -1,10 +1,10 @@
require 'sinatra'
require 'sinatra/cache'
-require 'haml'
require 'json'
require 'exceptio-ruby'
require 'colored'
require 'cocoapods-core'
+require 'slim'
APP_ROOT = Pathname.new(File.expand_path('../', __FILE__))
$:.unshift((APP_ROOT + 'lib').to_s)
@@ -27,7 +27,6 @@ class CocoaPodsNotifierApp < Sinatra::Application
#
configure do
set :root, APP_ROOT.to_s
- set :haml, :format => :html5
register Sinatra::Cache
set :cache_output_dir, File.join(APP_ROOT, 'public')
@@ -98,8 +97,10 @@ def self.update
@new_pods = RSS.new(pods, @creation_dates).pods_for_feed
@pods_tweets = {}
@new_pods.each { |pod| @pods_tweets[pod.name] = TwitterNotifier.new.status_for_pod(pod) }
- haml :index
-
+
+ slim :index
+
+
rescue Exception => e
puts "[!] get / failed: #{e}".red
puts e.backtrace.join("\n")
@@ -134,9 +135,6 @@ def self.update
status 500
end
end
-
- #-------------------------------------------------------------------------#
-
end
end
1  shared
@@ -0,0 +1 @@
+Subproject commit 64c5e13e8e2ac8da6ee60d3e0d4e81fd09974899
View
29 views/index.haml
@@ -1,29 +0,0 @@
-!!! 5
-%html
- %head
- %link(rel="stylesheet" href="css/bootstrap.min.css")
- %body
- .container
- .hero-unit
- %h1 CocoaPods Feeds
- %p
- This is the home of the rss feed for the new pods.
- Subscribe and never miss a pod again!
- %p
- %a.btn.btn-warning.btn-large{:href => url('/new-pods.rss')} Get the Feed
- %a.btn.btn-large{:href => 'http://cocoapods.org/'} CocoaPods.org
- .alert.alert-success
- Counting #{@pods_count} pods.
- %table.table.table-striped.table-bordered
- %thead
- %tr
- %th="Name"
- %th="Date"
- %th="Tweet Preview"
- %tbody
- - @new_pods.each do |pod|
- %tr
- %td= pod.name
- %td= @creation_dates[pod.name].strftime("%Y/%m/%d")
- %td
- =@pods_tweets[pod.name]
View
45 views/index.slim
@@ -0,0 +1,45 @@
+ruby:
+ header = Slim::Template.new('shared/includes/header.slim').render(nil)
+
+
+html
+ head
+ link rel="stylesheet" href="http://guides.cocoapods.org/stylesheets/app.css"
+
+ css:
+ .headline h2 {
+ margin-top:55px;
+ font-weight:normal;
+ font-size:32px;
+ }
+
+ body
+ == header
+ section.container
+ .row
+ header.col-md-12.headline.index
+ h1 CocoaPods Feeds
+
+ <div class="horizontal-divider"><div class="arrow-down"></div><div class="enclosed-arrow-down"></div></div>
+
+ h2 #{@pods_count} CocoaPods
+
+ div.guide#content-wrapper
+ section.container
+ .row
+
+ p.text-center This is the home of feed new CocoaPods. Subscribe via <a href="/new-pods.rss">RSS</a> or follow <a href='http://twitter.com/CocoaPodsFeed'>@CocoaPodsFeed</a> and never miss a pod again!
+
+ table.table.table-striped.table-bordered
+ thead
+ tr
+ th="Name"
+ th="Date"
+ th="Tweet Preview"
+ tbody
+ - @new_pods.each do |pod|
+ tr
+ td= pod.name
+ td= @creation_dates[pod.name].strftime("%Y/%m/%d")
+ td
+ =@pods_tweets[pod.name]
Please sign in to comment.
Something went wrong with that request. Please try again.