Skip to content

Commit

Permalink
placeholder commit msg
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Schubert committed Jun 25, 2013
1 parent e85258e commit b0a216b
Show file tree
Hide file tree
Showing 34 changed files with 711 additions and 170 deletions.
10 changes: 8 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'mysql2'

gem 'devise'

gem 'rails_admin'

group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'

gem 'turbolinks'

gem 'jquery-rails'
gem 'bootstrap-sass'
end
Expand All @@ -16,6 +22,6 @@ group :development, :test do
gem 'rspec-rails', '~> 2.13.2'
gem 'capybara', '~> 2.1.0'

gem 'fuubar', '1.1.1'
gem 'rspec-instafail', '0.2.4'
gem 'fuubar', '~> 1.1.1'
gem 'rspec-instafail', '~> 0.2.4'
end
49 changes: 47 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ GEM
i18n (= 0.6.1)
multi_json (~> 1.0)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.3.1.3)
sass (~> 3.2)
builder (3.0.4)
Expand All @@ -45,32 +46,52 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.6.2)
devise (2.2.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
diff-lcs (1.2.4)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
font-awesome-rails (3.1.1.3)
railties (>= 3.2, < 5.0)
fuubar (1.1.1)
rspec (~> 2.0)
rspec-instafail (~> 0.2.0)
ruby-progressbar (~> 1.0)
haml (4.0.3)
tilt
hike (1.2.3)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (3.0.1)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (3.0.1)
jquery-rails
railties (>= 3.1.0)
json (1.8.0)
kaminari (0.14.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.23)
multi_json (1.7.6)
mysql2 (0.3.11)
nested_form (0.3.2)
nokogiri (1.5.10)
orm_adapter (0.4.0)
polyglot (0.3.3)
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-pjax (0.7.0)
nokogiri (~> 1.5)
rack (~> 1.3)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
Expand All @@ -83,6 +104,21 @@ GEM
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13)
rails_admin (0.4.9)
bootstrap-sass (~> 2.2)
builder (~> 3.0)
coffee-rails (>= 3.1, < 5)
font-awesome-rails (~> 3.0)
haml (~> 4.0)
jquery-rails (>= 2.1, < 4)
jquery-ui-rails (~> 3.0)
kaminari (~> 0.14)
nested_form (~> 0.3)
rack-pjax (~> 0.6)
rails (~> 3.1)
remotipart (~> 1.0)
safe_yaml (~> 0.6)
sass-rails (~> 3.1)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
Expand All @@ -93,6 +129,7 @@ GEM
rake (10.0.4)
rdoc (3.12.2)
json (~> 1.4)
remotipart (1.0.5)
rspec (2.13.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
Expand All @@ -110,6 +147,7 @@ GEM
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
ruby-progressbar (1.1.0)
safe_yaml (0.9.3)
sass (3.2.9)
sass-rails (3.2.6)
railties (~> 3.2.0)
Expand All @@ -125,10 +163,14 @@ GEM
treetop (1.4.14)
polyglot
polyglot (>= 0.3.1)
turbolinks (1.2.0)
coffee-rails
tzinfo (0.3.37)
uglifier (2.1.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
warden (1.2.1)
rack (>= 1.0)
xpath (2.0.0)
nokogiri (~> 1.3)

Expand All @@ -139,11 +181,14 @@ DEPENDENCIES
bootstrap-sass
capybara (~> 2.1.0)
coffee-rails (~> 3.2.1)
fuubar (= 1.1.1)
devise
fuubar (~> 1.1.1)
jquery-rails
mysql2
rails (= 3.2.13)
rspec-instafail (= 0.2.4)
rails_admin
rspec-instafail (~> 0.2.4)
rspec-rails (~> 2.13.2)
sass-rails (~> 3.2.3)
turbolinks
uglifier (>= 1.0.3)
Binary file added app/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed app/assets/images/rails.png
Binary file not shown.
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
//
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
*/

@import "bootstrap";
@import "bootstrap-responsive";
63 changes: 63 additions & 0 deletions app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
html, body {
height: 100%;
}

#wrap {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -60px;
}

#pusher {
height: 60px;
}

footer {
height: 40px;
background-color: #f5f5f5;
padding: 20px 20px 0;

p {
color: #666;
}
}

.navbar-fixed-top {
#mainnav {
margin-top: 20px;
}

.brand {
padding: 5px 20px;

#header-logo {
height: 70px;
}
}

.btn {
margin-left: 10px;
}
}

#main-container {
padding-top: 90px;
}

@media (max-width: 767px) {
.navbar-fixed-top {
position: static;
}

#main-container {
padding-top: 0;
}

footer {
margin-left: -20px;
margin-right: -20px;
padding-left: 40px;
padding-right: 40px;
}
}
6 changes: 6 additions & 0 deletions app/controllers/blog_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class BlogController < ApplicationController
respond_to :html

def index
end
end
14 changes: 6 additions & 8 deletions app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
class PagesController < ApplicationController
respond_to :html

def show
params[:id] ||= 'home'
@page = Page.find_by_url params[:id]
def index
end

def about
end

if @page
respond_with @page
else
not_found
end
def get_involved
end
end
7 changes: 7 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
module ApplicationHelper
def page_title(title, suffix = t(:title))
if title.blank? or title =~ /home/i
return suffix
else
return "#{title} - #{suffix}"
end
end
end
3 changes: 3 additions & 0 deletions app/models/blogpost.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Blogpost < ActiveRecord::Base
attr_accessible :title, :published, :content
end
7 changes: 0 additions & 7 deletions app/models/page.rb

This file was deleted.

6 changes: 6 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class User < ActiveRecord::Base
devise :database_authenticatable, :recoverable,
:rememberable, :trackable, :validatable

attr_accessible :email, :password, :password_confirmation, :remember_me
end
9 changes: 9 additions & 0 deletions app/views/blog/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<%- content_for :page_title do %>
<%= t('pages.blog.menu_title') %>
<% end %>

<div class="page-header">
<h1><%= t('pages.blog.headline') %> <small><%= t('pages.blog.subline') %></small></h1>
</div>

Ohai, blog!
42 changes: 37 additions & 5 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,14 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<title>DiasporaProjectSite</title>
<%= stylesheet_link_tag "application", :media => "all" %>
<%= javascript_include_tag "application" %>
<title><%= page_title yield(:page_title) %></title>

<meta charset="utf-8">
<meta name="shortcut icon" href="/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<%= stylesheet_link_tag 'application', :media => 'all' %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tags %>
</head>
<body>
<div id="wrap">
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<%= link_to root_url(:subdomain => false), :class => 'brand' do %>
<%= image_tag 'logo.png', :alt=> t('title'), :title => t('title'), :id => 'header-logo' %>
<% end %>
<div id="mainnav" class="pull-right">
<ul class="nav">
<li><%= link_to t('pages.about.menu_title'), about_url(:subdomain => false) %></li>
<li><%= link_to t('pages.get_involved.menu_title'), get_involved_url(:subdomain => false) %></li>
<li><%= link_to t('pages.blog.menu_title'), blog_index_url(:subdomain => 'blog') %></li>
<li><a href="#contact">Wiki</a></li>
<li><a href="#contact">Planet</a></li>
</ul>
<a href="#" class="btn btn-success">Host yourself</a>
<a href="#" class="btn btn-success">Join Diaspora*</a>
</div>
</div>
</div>
</div>
<div id="main-container" class="container-fluid">
<%= yield %>

<%= yield %>

<div id="pusher"></div>
</div>
</div>
<footer>
<p><%= t('meta.footer.copyleft') %></p>
</footer>
</body>
</html>
9 changes: 9 additions & 0 deletions app/views/pages/about.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<%- content_for :page_title do %>
<%= t('pages.about.menu_title') %>
<% end %>

<div class="page-header">
<h1><%= t('pages.about.headline') %></h1>
</div>

<p><%= t('pages.home.welcome_paragraph') %></p>
9 changes: 9 additions & 0 deletions app/views/pages/get_involved.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<%- content_for :page_title do %>
<%= t('pages.get_involved.menu_title') %>
<% end %>

<div class="page-header">
<h1><%= t('pages.get_involved.headline') %></h1>
</div>

<p><%= t('pages.home.welcome_paragraph') %></p>
5 changes: 5 additions & 0 deletions app/views/pages/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<div class="page-header">
<h1><%= t('pages.home.headline') %></h1>
</div>

<p><%= t('pages.home.welcome_paragraph') %></p>
2 changes: 0 additions & 2 deletions app/views/pages/show.html.erb

This file was deleted.

Loading

0 comments on commit b0a216b

Please sign in to comment.