Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: publify/publify
base: master
...
head fork: djalkalai/typo
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 19 commits
  • 38 files changed
  • 0 commit comments
  • 1 contributor
Showing with 3,727 additions and 187 deletions.
  1. +5 −7 .gitignore
  2. +21 −16 Gemfile
  3. +162 −0 Gemfile.lock
  4. +2 −2 app/helpers/application_helper.rb
  5. +43 −4 app/helpers/theme_helper.rb
  6. +14 −4 app/views/articles/_article.html.erb
  7. +19 −46 app/views/articles/_comment_form.html.erb
  8. +4 −4 app/views/articles/_comment_list.html.erb
  9. +9 −6 app/views/articles/_trackback.html.erb
  10. +4 −8 app/views/articles/index.html.erb
  11. +35 −56 app/views/articles/read.html.erb
  12. +2 −3 app/views/articles/view_page.html.erb
  13. +13 −0 app/views/categories/_article.html.erb
  14. +13 −0 app/views/categories/index.html.erb
  15. +5 −0 app/views/categories/show.html.erb
  16. +10 −10 app/views/comments/_comment.html.erb
  17. +46 −0 app/views/layouts/default.html.erb
  18. +15 −0 app/views/tags/_article.html.erb
  19. +4 −0 app/views/tags/show.html.erb
  20. +9 −0 config/application.rb
  21. +14 −0 config/database.yml
  22. +9 −9 config/database.yml.sqlite
  23. 0  public/files/__fake_file__
  24. BIN  public/images/theme/bg1.jpg
  25. BIN  public/images/theme/bg2.jpg
  26. BIN  public/images/theme/glyphicons-halflings-white.png
  27. BIN  public/images/theme/glyphicons-halflings.png
  28. +27 −0 public/javascripts/ckeditor/config.bak
  29. +27 −0 public/javascripts/ckeditor/config.js
  30. +2,623 −0 public/stylesheets/theme/bootstrap.css
  31. +520 −0 public/stylesheets/theme/bootstrap.min.css
  32. +56 −0 public/stylesheets/theme/style.css
  33. +2 −2 spec/controllers/accounts_controller_spec.rb
  34. +3 −3 spec/controllers/admin/content_controller_spec.rb
  35. +3 −1 spec/controllers/backend_controller_spec.rb
  36. +1 −0  spec/controllers/categories_controller_spec.rb
  37. +6 −6 spec/models/article_spec.rb
  38. +1 −0  vendor/plugins/easy-ckeditor/lib/ckeditor_file_utils.rb
View
12 .gitignore
@@ -1,4 +1,3 @@
-config/database.yml
config/mail.yml
*.log
*~
@@ -9,17 +8,16 @@ db/schema.rb
.DS_Store
.rspec
installer/rails_installer.yml
-/public/files
-/public/images/theme
-/public/javascripts/ckeditor/config.js
-/public/javascripts/ckeditor/config.bak
+#/public/files
+#/public/images/theme
+#/public/javascripts/ckeditor/config.js
+#/public/javascripts/ckeditor/config.bak
/public/javascripts/all.js
/public/robots.txt
-/public/stylesheets/theme
+#/public/stylesheets/theme
/public/stylesheets/all.css
tmp/*
/coverage/
nbproject
public/cache/*
-Gemfile.lock
.rbenv-version
View
37 Gemfile
@@ -1,22 +1,26 @@
env = ENV["RAILS_ENV"] || 'development'
dbfile = File.expand_path("../config/database.yml", __FILE__)
-unless File.exists?(dbfile)
- raise "You need to configure config/database.yml first"
-else
- conf = YAML.load(File.read(dbfile))
- adapter = conf[env]['adapter']
- raise "You need define an adapter in your database.yml" if adapter == '' || adapter.nil?
- case adapter
- when 'sqlite3'
- gem 'sqlite3'
- when 'postgresql'
- gem 'pg'
- when 'mysql'
- gem 'sam-mysql-ruby'
- else
- raise "Don't know what gem to use for adapter #{adapter}"
- end
+#unless File.exists?(dbfile)
+# raise "You need to configure config/database.yml first"
+#else
+# conf = YAML.load(File.read(dbfile))
+# adapter = conf[env]['adapter']
+# raise "You need define an adapter in your database.yml" if adapter == '' || adapter.nil?
+# case adapter
+# when 'sqlite3'
+# gem 'sqlite3'
+# when 'postgresql'
+# gem 'pg'
+# when 'mysql'
+# gem 'sam-mysql-ruby'
+# else
+# raise "Don't know what gem to use for adapter #{adapter}"
+# end
+#end
+
+group :production do
+ gem 'pg'
end
source :rubygems
@@ -45,4 +49,5 @@ group :development, :test do
gem 'webrat'
gem 'rspec-rails', '>= 2.0.0.beta.20'
gem 'simplecov', :require => false
+ gem 'sqlite3'
end
View
162 Gemfile.lock
@@ -0,0 +1,162 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ RedCloth (4.2.9)
+ abstract (1.0.0)
+ actionmailer (3.0.10)
+ actionpack (= 3.0.10)
+ mail (~> 2.2.19)
+ actionpack (3.0.10)
+ activemodel (= 3.0.10)
+ activesupport (= 3.0.10)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.10)
+ activesupport (= 3.0.10)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activerecord (3.0.10)
+ activemodel (= 3.0.10)
+ activesupport (= 3.0.10)
+ arel (~> 2.0.10)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.10)
+ activemodel (= 3.0.10)
+ activesupport (= 3.0.10)
+ activesupport (3.0.10)
+ acts_as_list (0.1.5)
+ acts_as_tree_rails3 (0.1.0)
+ addressable (2.1.2)
+ archive-tar-minitar (0.5.2)
+ arel (2.0.10)
+ bluecloth (2.2.0)
+ builder (2.1.2)
+ coderay (0.9.8)
+ columnize (0.3.6)
+ diff-lcs (1.1.3)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ factory_girl (2.2.0)
+ activesupport
+ flickraw (0.9.5)
+ flickraw-cached (20110920)
+ flickraw (>= 0.9)
+ htmlentities (4.3.1)
+ i18n (0.5.0)
+ json (1.6.5)
+ kaminari (0.13.0)
+ actionpack (>= 3.0.0)
+ activesupport (>= 3.0.0)
+ railties (>= 3.0.0)
+ linecache19 (0.5.12)
+ ruby_core_source (>= 0.1.4)
+ mail (2.2.19)
+ activesupport (>= 2.3.6)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.17.2)
+ mini_magick (1.3.3)
+ subexec (~> 0.0.4)
+ multi_json (1.1.0)
+ nokogiri (1.5.0)
+ pg (0.13.2)
+ polyglot (0.3.3)
+ rack (1.2.5)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rails (3.0.10)
+ actionmailer (= 3.0.10)
+ actionpack (= 3.0.10)
+ activerecord (= 3.0.10)
+ activeresource (= 3.0.10)
+ activesupport (= 3.0.10)
+ bundler (~> 1.0)
+ railties (= 3.0.10)
+ railties (3.0.10)
+ actionpack (= 3.0.10)
+ activesupport (= 3.0.10)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.4)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ recaptcha (0.3.4)
+ require_relative (1.0.3)
+ rspec (2.8.0)
+ rspec-core (~> 2.8.0)
+ rspec-expectations (~> 2.8.0)
+ rspec-mocks (~> 2.8.0)
+ rspec-core (2.8.0)
+ rspec-expectations (2.8.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.8.0)
+ rspec-rails (2.8.1)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ railties (>= 3.0)
+ rspec (~> 2.8.0)
+ ruby-debug-base19 (0.11.25)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby_core_source (>= 0.1.4)
+ ruby-debug19 (0.11.6)
+ columnize (>= 0.3.1)
+ linecache19 (>= 0.5.11)
+ ruby-debug-base19 (>= 0.11.19)
+ ruby_core_source (0.1.5)
+ archive-tar-minitar (>= 0.5.2)
+ rubypants (0.2.0)
+ simplecov (0.6.1)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
+ sqlite3 (1.3.5)
+ subexec (0.0.4)
+ thor (0.14.6)
+ treetop (1.4.10)
+ polyglot
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.31)
+ uuidtools (2.1.2)
+ webrat (0.7.3)
+ nokogiri (>= 1.2.0)
+ rack (>= 1.0)
+ rack-test (>= 0.5.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ RedCloth (~> 4.2.8)
+ acts_as_list
+ acts_as_tree_rails3
+ addressable (~> 2.1.0)
+ bluecloth (>= 2.0.5)
+ coderay (~> 0.9)
+ factory_girl (= 2.2.0)
+ flickraw-cached
+ htmlentities
+ json
+ kaminari
+ mini_magick (= 1.3.3)
+ pg
+ rails (= 3.0.10)
+ rake (>= 0.9.2)
+ recaptcha
+ require_relative
+ rspec-rails (>= 2.0.0.beta.20)
+ ruby-debug19
+ rubypants (~> 0.2.0)
+ simplecov
+ sqlite3
+ uuidtools (~> 2.1.1)
+ webrat
View
4 app/helpers/application_helper.rb
@@ -171,8 +171,8 @@ def page_header
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="#{ url_for :controller => '/xml', :action => 'rsd' }" />
<link rel="alternate" type="application/atom+xml" title="Atom" href="#{ feed_atom }" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="#{ feed_rss }" />
- #{ javascript_include_tag 'cookies', 'prototype', 'effects', 'builder', 'typo', :cache => true }
- #{ stylesheet_link_tag 'coderay', 'user-styles', :cache => true }
+ #{ javascript_include_tag 'cookies', 'prototype', 'effects', 'builder', 'typo' }
+ #{ stylesheet_link_tag 'coderay', 'user-styles' }
#{ javascript_include_lang }
#{ javascript_tag "window._token = '#{form_authenticity_token}'"}
#{ page_header_includes.join("\n") }
View
47 app/helpers/theme_helper.rb
@@ -1,7 +1,46 @@
module ThemeHelper
- # adds per theme helpers if file exists. Ugly but at least it works.
- # Use : just add your methods in yourtheme/helpers/theme_helper.rb
- unless Blog.default.nil?
- require "#{Blog.default.current_theme.path}/helpers/theme_helper.rb" if File.exists? "#{Blog.default.current_theme.path}/helpers/theme_helper.rb"
+ # coding: utf-8
+ def render_active_page(page)
+ if controller.action_name == 'view_page'
+ return 'active' if params[:name].to_s == page
+ end
+ end
+
+ def render_active_home
+ if controller.controller_name == 'articles' and controller.action_name != 'view_page'
+ if controller.action_name = 'index'
+ return if params[:page]
+ return 'active'
+ end
+ end
+ end
+
+ def render_active_articles
+ return if controller.action_name == 'view_page'
+ if controller.controller_name == 'articles' and controller.action_name == 'index'
+ return unless params[:page]
+ end
+ return 'active'
+ end
+
+ def category_name(id)
+ category = Category.find_by_permalink(id)
+ category.name
+ end
+
+ def display_comments_counter(article)
+ link_to pluralize(article.published_comments.size,
+ _('%d comments', article.published_comments.size),
+ _('%d comment', article.published_comments.size),
+ _('%d comments', article.published_comments.size)), article.permalink_url
+ end
+
+ def show_pages_links
+ html = ''.html_safe
+ pages = Page.find(:all, :conditions => {:published => true})
+ pages.each do |page|
+ html << content_tag(:li, link_to_permalink(page, page.title, nil, render_active_page(page.name)))
+ end
+ html
end
end
View
18 app/views/articles/_article.html.erb
@@ -1,4 +1,14 @@
-<h2><%= link_to_permalink article,article.title %></h2>
-<p class="auth"><%= _("Posted by")%> <%= author_link(article) %>
-<%= display_date_and_time article.published_at %></p>
-<%= render 'articles/protected_article_content', { :article => article } %>
+<div id="article-<%= article.id %>">
+ <h2 class='page-header'><%= (controller.controller_name == 'redirect') ? article.title : link_to_permalink(article,article.title) %></h2>
+ <%= render 'articles/protected_article_content', { :article => article } %>
+
+ <div class='meta'>
+ <p>
+ <small><%= _("Published on") %>
+ <%= display_date_and_time(article.published_at) %>
+ <%= category_links(article, _("under")) unless article.categories.empty? %>.
+ <%= tag_links(article) unless article.tags.empty? %></small>
+ </p>
+ <p><small><%= display_comments_counter(article) %></small></p>
+ </div>
+</div>
View
65 app/views/articles/_comment_form.html.erb
@@ -1,51 +1,24 @@
-<%= form_remote_tag :url => @article.comment_url,
- :position=> :bottom,
- :update => {:success => 'commentList'},
- :loading => "loading()",
- :complete => "complete(request)",
- :failure => "failure(request)",
- :html => {:id=>"commentform",:class=>"commentform"} \
- do %>
+<%= form_tag @article.comment_url do %>
+<div id='commentform'>
+ <h3><%= _("Comment")%> <em><%=@article.title%></em></h3>
+ <div class='control-group'>
+ <%= text_field "comment", "author", :class => 'span4', :placeholder => _("Your name") %>
+ </div>
+ <div class='control-group'>
+ <%= text_field "comment", "email", :class => 'span4', :placeholder => _("Email address") %>
+ </div>
+ <div class='control-group'>
+ <%= text_field "comment", "url", :class => 'span4', :placeholder => _("Your website") %>
+ </div>
+ <div class='control-group'>
+ <%= text_area 'comment', 'body', :rows => 8, :class => 'span8' %>
+ </div>
-
-<div class="comment-box">
- <div id="errors"></div>
- <div id="preview" style="display: none"></div>
-
- <a name="respond"></a>
- <table cellpadding="4" cellspacing="0" class="frm-tbl">
- <tr>
- <td><p><label for="comment_author"><%= _("Your name")%></label></p></td>
- <td> <%= text_field "comment", "author", :size => 20 %> <small><%= link_to_function("(#{_('leave url/email')} &#187;)".html_safe, "Element.toggle('guest_url'); Element.toggle('guest_email')") %></small></td>
- </tr>
- <tr id="guest_url" style="display:none;">
- <td><p><label for="comment_url"><%= _("Your blog")%></label></p></td>
- <td> <%= text_field "comment", "url" %></td>
- </tr>
- <tr id="guest_email" style="display:none;">
- <td><p><label for="comment_email"><%= _("Your email")%></label></p></td>
- <td> <%= text_field "comment", "email" %></td>
- </tr>
- <tr>
- <td><p><label for="comment_body"><%= _("Your message")%></label></p></td>
- <td valign="top" colspan="2">
- <%= text_area "comment", "body" %>
- </td>
- </tr>
<% if this_blog.use_recaptcha %>
- <tr>
- <td><p>reCaptcha</p></td>
- <td><p><%= recaptcha_tags :ajax => true %></p></td>
- </tr>
+ <div class='control-group'><%= raw recaptcha_tags :ajax => true %></div>
<% end %>
- <tr>
- <td colspan="2" id="frm-btns">
- <span id="comment_loading" style="display:none;"><%= image_tag "spinner.gif" %></span>&nbsp;&nbsp;
- <%= markup_help_popup TextFilter.find_by_name(this_blog.comment_text_filter), _("Comment Markup Help") %>
- <a href="#" onclick="new Ajax.Updater('preview', '<%= @article.preview_comment_url %>', {asynchronous:true, evalScripts:true, parameters:Form.serialize('commentform'), onComplete:function(request){Element.show('preview')}}); return false;"><%= _("Preview comment")%></a>
- <input type="submit" name="submit" id="form-submit-button" value="submit" class="button" />
- </td>
- </tr>
- </table>
+ <div class='form-actions'>
+ <input type='submit' id='form-submit-button' class='btn btn-info' value="<%= _('comment') %>" />
+ </div>
</div>
<% end %>
View
8 app/views/articles/_comment_list.html.erb
@@ -1,7 +1,7 @@
-<ol id="commentList" class="comments">
+<ul id="commentList" class="unstyled">
<% if @article.published_comments.any? -%>
- <%= render @article.published_comments %>
+ <%= render @article.published_comments %>
<% else -%>
- <li class="dummy_comment" style="display:none"><%= _("No comments")%></li>
+ <li class="dummy_comment" style="display:none"><%= _("No comments")%></li>
<% end -%>
-</ol>
+</ul>
View
15 app/views/articles/_trackback.html.erb
@@ -1,6 +1,9 @@
-<li id="trackback-<%= trackback.id %>"<%= onhover_show_admin_tools(:trackback, trackback.id) %>>
- <a name="trackback-<%= trackback.id %>"></a>
- <%= _("From")%> <strong><%= trackback.blog_name %></strong><br />
- <a href="<%= trackback.url %>" rel="nofollow"><%=h trackback.title %></a><br/>
- <%= trackback.excerpt %>
-</li>
+<li d="trackback-<%= trackback.id %>">
+ <div class="author">
+ <a href="<%= trackback.url %>" rel="nofollow"><%= trackback.title %></a>
+ <abbr><% _("From") %> <cite><%= trackback.blog_name %></cite></abbr>
+ </div>
+ <div class="content">
+ <%= trackback.excerpt %>
+ </div>
+</li>
View
12 app/views/articles/index.html.erb
@@ -1,8 +1,4 @@
-<% for article in @articles -%>
- <div class="post">
- <%= render article %>
- <p class="meta"><%= article_links article %></p>
- </div>
-<% end -%>
-
-<%= paginate @articles, :next_label => "#{_("Next page")} &raquo;", :previous_label => "&laquo; #{_('Previous page')}" %>
+<%= render @articles %>
+<div class='paginate'>
+ <%= paginate(@articles)%>
+</div>
View
91 app/views/articles/read.html.erb
@@ -1,60 +1,39 @@
-<!--
-<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"
- xmlns:dc="http://purl.org/dc/elements/1.1/">
-<rdf:Description
- rdf:about=""
-<% if @article.allow_pings? -%>
- trackback:ping="<%= @article.trackback_url %>"
-<% end -%>
- dc:title="<%=h @article.title.gsub(/-+/, '-') %>"
- dc:identifier="<%= @article.permalink_url %>"
- dc:description="<%=h (html(@article).strip_html[0..255]).gsub(/-+/, '-') %>"
- dc:creator="<%= h @article.author %>"
- dc:date="<%= @article.updated_at.xmlschema %>" />
-</rdf:RDF>
--->
+<div class="article" id="article-<%= @article.id %>">
+ <h1 class='page-header'><%= link_to_permalink(@article,@article.title) %></h1>
+ <%= @article.html(:body) %>
+ <%= @article.html(:extended) %>
-<div class="post"<%= onhover_show_admin_tools(:article) %>>
- <%= link_to("edit", { :controller => "admin/content", :action => "edit", :id => @article.id },
- :class => "admintools", :style => "display: none", :id => "admin_article") %>
- <%= render @article %>
-</div>
-<p class="meta">
- <%= article_links @article %>
-</p>
-<% if @article.allow_comments? or @article.published_comments.size > 0 -%>
- <a name="comments"></a><h4 class="blueblk"><%= _('Comments') %></h4>
- <% unless @article.comments_closed? -%>
- <p class="postmetadata alt">
- <small><a href="#respond"><%= _("Leave a response")%></a></small>
- </p>
- <% end -%>
- <%= render "articles/comment_list" %>
-<% end -%>
+ <div class='meta'>
+ <p>
+ <small><%= _("Published on") %>
+ <%= display_date_and_time(@article.published_at) %>
+ <%= category_links(@article, _("under")) unless @article.categories.empty? %>.
+ <%= tag_links(@article) unless @article.tags.empty? %></small>
+ </p>
+ </div>
-<% if @article.allow_pings? -%>
- <a name="trackbacks"></a><h4 class="blueblk"><%= _("Trackbacks")%></h4>
- <p>
- <%= _("Use the following link to trackback from your own site")%>:<br/>
- <span class="light-bg"><%= @article.trackback_url %></span>
- </p>
- <%= content_tag(:ol,
- render("trackback", :collection => @article.published_trackbacks),
- :id => 'trackbackList', :class => 'trackback-list') unless @article.published_trackbacks.blank? %>
-<% end -%>
+ <% if @article.user.twitter and @article.user.show_twitter %>
+ <h2 id='twitter'>
+ <%= _("If you liked this article you can %s", link_to(_("add me to Twitter"), "http://twitter.com/#{@article.user.twitter}"))%>
+ </h2>
+ <% end %>
-<p class="postmetadata alt">
- <small>
- <a href="<%= @article.feed_url(:rss) %>" title="RSS Feed"><%= _("RSS feed for this post")%></a>
-<% if @article.allow_pings? -%>
- <a href="<%= @article.trackback_url %>" ><%= _("trackback uri")%></a>
-<% end -%>
- </small>
-</p>
+ <% if @article.allow_comments? or @article.published_comments.size > 0 -%>
+ <h3 class="feedback" id="commentaires">
+ <%= display_comments_counter(@article) %>
+ <a href="#commentform" ref="nofollow"> &raquo;</a>
+ </h3>
+ <%= render "articles/comment_list" %>
+ <% end -%>
-<% unless @article.comments_closed? -%>
- <%= render 'comment_form' %>
-<% else -%>
- <p><%= _("Comments are disabled")%></p>
-<% end -%>
+ <%= render 'articles/comment_form' if @article.allow_comments? %>
+
+ <% if @article.allow_pings? -%>
+ <h5 class="feedback" id="trackbacks"><%= _('Trackbacks for')%> <em><%= @article.title %></em></h5>
+ <% unless @article.published_trackbacks.blank? -%>
+ <ol id="trackbacks" class="trackbacks">
+ <%= render "trackback", :collection => @article.published_trackbacks %>
+ </ol>
+ <% end -%>
+ <% end -%>
+ </div>
View
5 app/views/articles/view_page.html.erb
@@ -1,3 +1,2 @@
-<div id="viewpage" >
- <%= html @page %>
-</div>
+<h1 class='page-header'><%= link_to_permalink(@page, @page.title) %></h1>
+<%= @page.html %>
View
13 app/views/categories/_article.html.erb
@@ -0,0 +1,13 @@
+<div id="article-<%= article.id %>">
+ <h2><%= link_to_permalink(article, article.title) %></h2>
+ <%= render 'articles/protected_article_content', { :article => article } %>
+
+ <div class='meta'>
+ <p>
+ <small><%= _("Published on") %>
+ <%= display_date_and_time(article.published_at) %>
+ <%= category_links(article, _("under")) unless article.categories.empty? %>.
+ <%= tag_links(article) unless article.tags.empty? %></small>
+ </p>
+ </div>
+</div>
View
13 app/views/categories/index.html.erb
@@ -0,0 +1,13 @@
+<div class='category-excerpt'>
+ <h1 class='page-header'>Categories</h1>
+ <% @categories.each do |cat| %>
+ <h2 class='page-header'><%= cat.display_name%></h2>
+ <% articles = cat.articles.slice(0, 9)%>
+ <ul>
+ <% articles.each do |article| %>
+ <li><%= link_to_permalink(article, article.title)%></li>
+ <% end %>
+ </ul>
+ <p> <%= _("Read all articles in %s", link_to_permalink(cat, cat.display_name)) %></p>
+ <% end%>
+</div>
View
5 app/views/categories/show.html.erb
@@ -0,0 +1,5 @@
+<h1 class='page-header'><%= link_to category_name(params[:id]), "#{this_blog.base_url}/category/#{params[:id]}" %></h1>
+<%= render :partial => 'article', :collection => @articles %>
+<div id='paginate'>
+ <%= paginate @articles, { :previous_label => _('Previous'), :next_label => _('Next') } %>
+</div>
View
20 app/views/comments/_comment.html.erb
@@ -1,12 +1,12 @@
-<li id="comment-<%= comment.id %>" <%= 'class="author_comment"' if comment.user %> <%= 'style="display:none"' if controller.request.xhr? %><%= onhover_show_admin_tools(:comment, comment.id) %>>
- <%= admin_tools_for comment %>
- <p>
- <a name="comment-<%= comment.id %>"></a>
+<li id="comment-<%= comment.id %>">
<%= avatar_tag(:email => comment.email, :url => comment.url) %>
- <cite><strong><%= link_to_unless(comment.url.blank?, h(comment.author), comment.url) %></strong> </cite> <%= _("said")%> <%= display_date_and_time comment.created_at %> later:<br />
- <%= comment.generate_html(:body) %>
- <% unless comment.published -%>
- <div class="spamwarning"><%= _("This comment has been flagged for moderator approval. It won't appear on this blog until the author approves it")%>.</div>
- <% end -%>
+ <h4>
+ <%= _("By") %> <%= (comment.url.blank?) ? h(comment.author) : link_to(h(comment.author), comment.url).nofollowify %>
+ <%= display_date_and_time comment.created_at %>
+ </h4>
+ <%= comment.html %>
+ <% unless comment.published -%>
+ <div class="spamwarning"><%= _("This comment has been flagged for moderator approval.") %></div>
+ <% end -%>
+ <hr />
</li>
-
View
46 app/views/layouts/default.html.erb
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
+<head profile="http://gmpg.org/xfn/11">
+ <title><%= h(page_title) %></title>
+ <%= stylesheet_link_tag "/stylesheets/theme/bootstrap.min.css", "/stylesheets/theme/style.css", :media => 'all' %>
+ <%= page_header %>
+</head>
+<body>
+ <div id='main'>
+ <div class='container'>
+ <% if controller.controller_name == 'articles' and controller.action_name.include? 'index' %>
+ <h1><%= link_to(this_blog.blog_name, this_blog.base_url) %></h1>
+ <% else %>
+ <p id='title'><%= link_to(this_blog.blog_name, this_blog.base_url) %></p>
+ <% end %>
+ <p class='subtitle'><%= this_blog.blog_subtitle %></p>
+ </div>
+ <div id='logo'></div>
+ <div class='navbar'>
+ <div class='navbar-inner'>
+ <div class='container'>
+ <ul class='nav'>
+ <%= content_tag(:li, link_to(_('Home'), this_blog.base_url, {:class => render_active_home}))%>
+ <%= content_tag(:li, link_to(_('Articles'), {:controller => 'categories'}, {:class => render_active_articles}))%>
+ <%= show_pages_links %>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ <div id='page' class='container'>
+ <div class='row'>
+ <div class='span8'>
+ <%= yield %>
+ </div>
+ <div id='sidebar' class='span4'>
+ <%= render_sidebars %>
+ </div>
+ </div>
+ </div>
+ <p style='text-align: center'><small>Powered by <a href='http://typosphere.org'>Typo</a> – Thème <a href='http://t37.net'>Frédéric de Villamil</a> | Photo <a href='http://www.flickr.com/photos/blmiers2/6167391543/sizes/l/in/photostream/'>L. Lemos</a></small></p>
+ </div>
+</div>
+</body>
+</html>
View
15 app/views/tags/_article.html.erb
@@ -0,0 +1,15 @@
+<div id="article-<%= article.id %>">
+ <h2 class='page-header'><%= link_to_permalink(article,article.title) %></h2>
+ <%= render 'articles/protected_article_content', { :article => article } %>
+ <div class='meta'>
+ <p>
+ <small><%= _("Published on") %>
+ <%= display_date_and_time(article.published_at) %>
+ <%= category_links(article, _("under")) unless article.categories.empty? %>.
+ <%= tag_links(article) unless article.tags.empty? %></small>
+ </p>
+ </div>
+ <div class='comments'>
+ <%= display_comments_counter(article) %>
+ </div>
+</div>
View
4 app/views/tags/show.html.erb
@@ -0,0 +1,4 @@
+<%= render :partial => 'article', :collection => @articles %>
+<div id='paginate'>
+<%= paginate @articles, { :previous_label => _('Previous'), :next_label => _('Next') } %>
+</div>
View
9 config/application.rb
@@ -90,4 +90,13 @@ def interpolate(locale, string, values = {})
ActionMailer::Base.delivery_method = :sendmail
end
end
+
+ if ::Rails.env.production?
+ # http://markcatley.tumblr.com/post/393941962/deploying-typo-to-heroku
+ require 'fileutils'
+
+ file_utils_no_write = ::FileUtils::NoWrite
+ Object.send :remove_const, :FileUtils
+ ::FileUtils = file_utils_no_write
+ end
end
View
14 config/database.yml
@@ -0,0 +1,14 @@
+development:
+ adapter: sqlite3
+ database: db/db_development
+ timeout: 5000
+
+test:
+ adapter: sqlite3
+ database: db/db_test
+ timeout: 5000
+
+production:
+ adapter: postgresql
+ database: db_production
+ timeout: 5000
View
18 config/database.yml.sqlite
@@ -1,14 +1,14 @@
development:
-adapter: sqlite3
-database: db/db_development
-timeout: 5000
+ adapter: sqlite3
+ database: db/db_development
+ timeout: 5000
test:
-adapter: sqlite3
-database: db/db_test
-timeout: 5000
+ adapter: sqlite3
+ database: db/db_test
+ timeout: 5000
production:
-adapter: sqlite3
-database: db/db_production
-timeout: 5000
+ adapter: sqlite3
+ database: db/db_production
+ timeout: 5000
View
0  public/files/__fake_file__
No changes.
View
BIN  public/images/theme/bg1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/theme/bg2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/theme/glyphicons-halflings-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  public/images/theme/glyphicons-halflings.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
27 public/javascripts/ckeditor/config.bak
@@ -0,0 +1,27 @@
+/*
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.editorConfig = function( config )
+{
+ config.PreserveSessionOnFileBrowser = true;
+ // Define changes to default configuration here. For example:
+ //config.language = '';
+ config.uiColor = '#E0ECFF';
+ config.toolbar = 'Basic';
+ config.entities_greek = false;
+ config.entities_latin = false;
+ config.entities_processNumerical = false;
+ config.toolbar_Basic =
+ [
+ ['Format', '-', 'Bold', 'Italic'],
+ ['NumberedList','BulletedList'],
+ ['Outdent', 'Indent'],
+ ['Image', 'Flash', '-', 'Link'],
+ ['Maximize'],
+ ['Table'],
+ ['PageBreak'],
+ ['Source']
+ ];
+}
View
27 public/javascripts/ckeditor/config.js
@@ -0,0 +1,27 @@
+/*
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.editorConfig = function( config )
+{
+ config.PreserveSessionOnFileBrowser = true;
+ // Define changes to default configuration here. For example:
+ //config.language = '';
+ config.uiColor = '#E0ECFF';
+ config.toolbar = 'Basic';
+ config.entities_greek = false;
+ config.entities_latin = false;
+ config.entities_processNumerical = false;
+ config.toolbar_Basic =
+ [
+ ['Format', '-', 'Bold', 'Italic'],
+ ['NumberedList','BulletedList'],
+ ['Outdent', 'Indent'],
+ ['Image', 'Flash', '-', 'Link'],
+ ['Maximize'],
+ ['Table'],
+ ['PageBreak'],
+ ['Source']
+ ];
+}
View
2,623 public/stylesheets/theme/bootstrap.css
@@ -0,0 +1,2623 @@
+/*!
+ * Bootstrap v2.0.0
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+nav,
+section {
+ display: block;
+}
+audio, canvas, video {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1;
+}
+audio:not([controls]) {
+ display: none;
+}
+html {
+ font-size: 100%;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+}
+a:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+a:hover, a:active {
+ outline: 0;
+}
+sub, sup {
+ position: relative;
+ font-size: 75%;
+ line-height: 0;
+ vertical-align: baseline;
+}
+sup {
+ top: -0.5em;
+}
+sub {
+ bottom: -0.25em;
+}
+img {
+ max-width: 100%;
+ height: auto;
+ border: 0;
+ -ms-interpolation-mode: bicubic;
+}
+button,
+input,
+select,
+textarea {
+ margin: 0;
+ font-size: 100%;
+ vertical-align: middle;
+}
+button, input {
+ *overflow: visible;
+ line-height: normal;
+}
+button::-moz-focus-inner, input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+button,
+input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ cursor: pointer;
+ -webkit-appearance: button;
+}
+input[type="search"] {
+ -webkit-appearance: textfield;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button {
+ -webkit-appearance: none;
+}
+textarea {
+ overflow: auto;
+ vertical-align: top;
+}
+body {
+ margin: 0;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 15px;
+ line-height: 24px;
+ color: #333333;
+ background-color: #ffffff;
+}
+a {
+ color: #0088cc;
+ text-decoration: none;
+}
+a:hover {
+ color: #005580;
+ text-decoration: underline;
+}
+.row {
+ margin-left: -20px;
+ *zoom: 1;
+}
+.row:before, .row:after {
+ display: table;
+ content: "";
+}
+.row:after {
+ clear: both;
+}
+[class*="span"] {
+ float: left;
+ margin-left: 20px;
+}
+.span1 {
+ width: 60px;
+}
+.span2 {
+ width: 140px;
+}
+.span3 {
+ width: 220px;
+}
+.span4 {
+ width: 300px;
+}
+.span5 {
+ width: 380px;
+}
+.span6 {
+ width: 460px;
+}
+.span7 {
+ width: 540px;
+}
+.span8 {
+ width: 620px;
+}
+.span9 {
+ width: 700px;
+}
+.span10 {
+ width: 780px;
+}
+.span11 {
+ width: 860px;
+}
+.span12, .container {
+ width: 940px;
+}
+.offset1 {
+ margin-left: 100px;
+}
+.offset2 {
+ margin-left: 180px;
+}
+.offset3 {
+ margin-left: 260px;
+}
+.offset4 {
+ margin-left: 340px;
+}
+.offset5 {
+ margin-left: 420px;
+}
+.offset6 {
+ margin-left: 500px;
+}
+.offset7 {
+ margin-left: 580px;
+}
+.offset8 {
+ margin-left: 660px;
+}
+.offset9 {
+ margin-left: 740px;
+}
+.offset10 {
+ margin-left: 820px;
+}
+.offset11 {
+ margin-left: 900px;
+}
+.row-fluid {
+ width: 100%;
+ *zoom: 1;
+}
+.row-fluid:before, .row-fluid:after {
+ display: table;
+ content: "";
+}
+.row-fluid:after {
+ clear: both;
+}
+.row-fluid > [class*="span"] {
+ float: left;
+ margin-left: 2.127659574%;
+}
+.row-fluid > [class*="span"]:first-child {
+ margin-left: 0;
+}
+.row-fluid .span1 {
+ width: 6.382978723%;
+}
+.row-fluid .span2 {
+ width: 14.89361702%;
+}
+.row-fluid .span3 {
+ width: 23.404255317%;
+}
+.row-fluid .span4 {
+ width: 31.914893614%;
+}
+.row-fluid .span5 {
+ width: 40.425531911%;
+}
+.row-fluid .span6 {
+ width: 48.93617020799999%;
+}
+.row-fluid .span7 {
+ width: 57.446808505%;
+}
+.row-fluid .span8 {
+ width: 65.95744680199999%;
+}
+.row-fluid .span9 {
+ width: 74.468085099%;
+}
+.row-fluid .span10 {
+ width: 82.97872339599999%;
+}
+.row-fluid .span11 {
+ width: 91.489361693%;
+}
+.row-fluid .span12 {
+ width: 99.99999998999999%;
+}
+.container {
+ width: 940px;
+ margin-left: auto;
+ margin-right: auto;
+ *zoom: 1;
+}
+.container:before, .container:after {
+ display: table;
+ content: "";
+}
+.container:after {
+ clear: both;
+}
+.container-fluid {
+ padding-left: 20px;
+ padding-right: 20px;
+ *zoom: 1;
+}
+.container-fluid:before, .container-fluid:after {
+ display: table;
+ content: "";
+}
+.container-fluid:after {
+ clear: both;
+}
+p {
+ margin: 0 0 12px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 15px;
+ line-height: 24px;
+}
+p small {
+ font-size: 13px;
+ color: #999999;
+}
+.lead {
+ margin-bottom: 24px;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 36px;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin: 0;
+ font-weight: bold;
+ color: #333333;
+ text-rendering: optimizelegibility;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+ font-weight: normal;
+ color: #999999;
+}
+h1 {
+ font-size: 30px;
+ line-height: 48px;
+}
+h1 small {
+ font-size: 18px;
+}
+h2 {
+ font-size: 24px;
+ line-height: 48px;
+}
+h2 small {
+ font-size: 18px;
+}
+h3 {
+ line-height: 36px;
+ font-size: 18px;
+}
+h3 small {
+ font-size: 14px;
+}
+h4, h5, h6 {
+ line-height: 24px;
+}
+h4 {
+ font-size: 14px;
+}
+h4 small {
+ font-size: 12px;
+}
+h5 {
+ font-size: 12px;
+}
+h6 {
+ font-size: 11px;
+ color: #999999;
+ text-transform: uppercase;
+}
+.page-header {
+ padding-bottom: 23px;
+ margin: 24px 0;
+ border-bottom: 1px solid #eeeeee;
+}
+.page-header h1 {
+ line-height: 1;
+}
+ul, ol {
+ padding: 0;
+ margin: 0 0 12px 25px;
+}
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+ margin-bottom: 0;
+}
+ul {
+ list-style: disc;
+}
+ol {
+ list-style: decimal;
+}
+li {
+ line-height: 24px;
+}
+ul.unstyled {
+ margin-left: 0;
+ list-style: none;
+}
+dl {
+ margin-bottom: 24px;
+}
+dt, dd {
+ line-height: 24px;
+}
+dt {
+ font-weight: bold;
+}
+dd {
+ margin-left: 12px;
+}
+hr {
+ margin: 24px 0;
+ border: 0;
+ border-top: 1px solid #e5e5e5;
+ border-bottom: 1px solid #ffffff;
+}
+strong {
+ font-weight: bold;
+}
+em {
+ font-style: italic;
+}
+.muted {
+ color: #999999;
+}
+abbr {
+ font-size: 90%;
+ text-transform: uppercase;
+ border-bottom: 1px dotted #ddd;
+ cursor: help;
+}
+blockquote {
+ padding: 0 0 0 15px;
+ margin: 0 0 24px;
+ border-left: 5px solid #eeeeee;
+}
+blockquote p {
+ margin-bottom: 0;
+ font-size: 16px;
+ font-weight: 300;
+ line-height: 30px;
+}
+blockquote small {
+ display: block;
+ line-height: 24px;
+ color: #999999;
+}
+blockquote small:before {
+ content: '\2014 \00A0';
+}
+blockquote.pull-right {
+ float: right;
+ padding-left: 0;
+ padding-right: 15px;
+ border-left: 0;
+ border-right: 5px solid #eeeeee;
+}
+blockquote.pull-right p, blockquote.pull-right small {
+ text-align: right;
+}
+q:before,
+q:after,
+blockquote:before,
+blockquote:after {
+ content: "";
+}
+address {
+ display: block;
+ margin-bottom: 24px;
+ line-height: 24px;
+ font-style: normal;
+}
+small {
+ font-size: 100%;
+}
+cite {
+ font-style: normal;
+}
+code, pre {
+ padding: 0 3px 2px;
+ font-family: Menlo, Monaco, "Courier New", monospace;
+ font-size: 14px;
+ color: #333333;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+code {
+ padding: 3px 4px;
+ color: #d14;
+ background-color: #f7f7f9;
+ border: 1px solid #e1e1e8;
+}
+pre {
+ display: block;
+ padding: 11.5px;
+ margin: 0 0 12px;
+ font-size: 12px;
+ line-height: 24px;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, 0.15);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ white-space: pre;
+ white-space: pre-wrap;
+ word-break: break-all;
+}
+pre.prettyprint {
+ margin-bottom: 24px;
+}
+pre code {
+ padding: 0;
+ background-color: transparent;
+}
+.label {
+ padding: 1px 3px 2px;
+ font-size: 11.25px;
+ font-weight: bold;
+ color: #ffffff;
+ text-transform: uppercase;
+ background-color: #999999;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+.label-important {
+ background-color: #b94a48;
+}
+.label-warning {
+ background-color: #f89406;
+}
+.label-success {
+ background-color: #468847;
+}
+.label-info {
+ background-color: #3a87ad;
+}
+table {
+ max-width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+.table {
+ width: 100%;
+ margin-bottom: 24px;
+}
+.table th, .table td {
+ padding: 8px;
+ line-height: 24px;
+ text-align: left;
+ border-top: 1px solid #ddd;
+}
+.table th {
+ font-weight: bold;
+ vertical-align: bottom;
+}
+.table td {
+ vertical-align: top;
+}
+.table thead:first-child tr th, .table thead:first-child tr td {
+ border-top: 0;
+}
+.table tbody + tbody {
+ border-top: 2px solid #ddd;
+}
+.table-condensed th, .table-condensed td {
+ padding: 4px 5px;
+}
+.table-bordered {
+ border: 1px solid #ddd;
+ border-collapse: separate;
+ *border-collapse: collapsed;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.table-bordered th + th,
+.table-bordered td + td,
+.table-bordered th + td,
+.table-bordered td + th {
+ border-left: 1px solid #ddd;
+}
+.table-bordered thead:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child th, .table-bordered tbody:first-child tr:first-child td {
+ border-top: 0;
+}
+.table-bordered thead:first-child tr:first-child th:first-child, .table-bordered tbody:first-child tr:first-child td:first-child {
+ -webkit-border-radius: 4px 0 0 0;
+ -moz-border-radius: 4px 0 0 0;
+ border-radius: 4px 0 0 0;
+}
+.table-bordered thead:first-child tr:first-child th:last-child, .table-bordered tbody:first-child tr:first-child td:last-child {
+ -webkit-border-radius: 0 4px 0 0;
+ -moz-border-radius: 0 4px 0 0;
+ border-radius: 0 4px 0 0;
+}
+.table-bordered thead:last-child tr:last-child th:first-child, .table-bordered tbody:last-child tr:last-child td:first-child {
+ -webkit-border-radius: 0 0 0 4px;
+ -moz-border-radius: 0 0 0 4px;
+ border-radius: 0 0 0 4px;
+}
+.table-bordered thead:last-child tr:last-child th:last-child, .table-bordered tbody:last-child tr:last-child td:last-child {
+ -webkit-border-radius: 0 0 4px 0;
+ -moz-border-radius: 0 0 4px 0;
+ border-radius: 0 0 4px 0;
+}
+.table-striped tbody tr:nth-child(odd) td, .table-striped tbody tr:nth-child(odd) th {
+ background-color: #f9f9f9;
+}
+table .span1 {
+ float: none;
+ width: 44px;
+ margin-left: 0;
+}
+table .span2 {
+ float: none;
+ width: 124px;
+ margin-left: 0;
+}
+table .span3 {
+ float: none;
+ width: 204px;
+ margin-left: 0;
+}
+table .span4 {
+ float: none;
+ width: 284px;
+ margin-left: 0;
+}
+table .span5 {
+ float: none;
+ width: 364px;
+ margin-left: 0;
+}
+table .span6 {
+ float: none;
+ width: 444px;
+ margin-left: 0;
+}
+table .span7 {
+ float: none;
+ width: 524px;
+ margin-left: 0;
+}
+table .span8 {
+ float: none;
+ width: 604px;
+ margin-left: 0;
+}
+table .span9 {
+ float: none;
+ width: 684px;
+ margin-left: 0;
+}
+table .span10 {
+ float: none;
+ width: 764px;
+ margin-left: 0;
+}
+table .span11 {
+ float: none;
+ width: 844px;
+ margin-left: 0;
+}
+table .span12 {
+ float: none;
+ width: 924px;
+ margin-left: 0;
+}
+form {
+ margin: 0 0 24px;
+}
+fieldset {
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 36px;
+ font-size: 22.5px;
+ line-height: 48px;
+ color: #333333;
+ border: 0;
+ border-bottom: 1px solid #eee;
+}
+label,
+input,
+button,
+select,
+textarea {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 15px;
+ font-weight: normal;
+ line-height: 24px;
+}
+label {
+ display: block;
+ margin-bottom: 5px;
+ color: #333333;
+}
+input,
+textarea,
+select,
+.uneditable-input {
+ display: inline-block;
+ width: 210px;
+ height: 24px;
+ padding: 4px;
+ margin-bottom: 9px;
+ font-size: 15px;
+ line-height: 24px;
+ color: #555555;
+ border: 1px solid #ccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+.uneditable-textarea {
+ width: auto;
+ height: auto;
+}
+label input, label textarea, label select {
+ display: block;
+}
+input[type="image"], input[type="checkbox"], input[type="radio"] {
+ width: auto;
+ height: auto;
+ padding: 0;
+ margin: 3px 0;
+ *margin-top: 0;
+ /* IE7 */
+
+ line-height: normal;
+ border: 0;
+ cursor: pointer;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+input[type="file"] {
+ padding: initial;
+ line-height: initial;
+ border: initial;
+ background-color: #ffffff;
+ background-color: initial;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+input[type="button"], input[type="reset"], input[type="submit"] {
+ width: auto;
+ height: auto;
+}
+select, input[type="file"] {
+ height: 28px;
+ /* In IE7, the height of the select element cannot be changed by height, only font-size */
+
+ *margin-top: 4px;
+ /* For IE7, add top margin to align select with labels */
+
+ line-height: 28px;
+}
+select {
+ width: 220px;
+ background-color: #ffffff;
+}
+select[multiple], select[size] {
+ height: auto;
+}
+input[type="image"] {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+textarea {
+ height: auto;
+}
+input[type="hidden"] {
+ display: none;
+}
+.radio, .checkbox {
+ padding-left: 18px;
+}
+.radio input[type="radio"], .checkbox input[type="checkbox"] {
+ float: left;
+ margin-left: -18px;
+}
+.controls > .radio:first-child, .controls > .checkbox:first-child {
+ padding-top: 5px;
+}
+.radio.inline, .checkbox.inline {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+.radio.inline + .radio.inline, .checkbox.inline + .checkbox.inline {
+ margin-left: 10px;
+}
+.controls > .radio.inline:first-child, .controls > .checkbox.inline:first-child {
+ padding-top: 0;
+}
+input, textarea {
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+ -webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+ transition: border linear 0.2s, box-shadow linear 0.2s;
+}
+input:focus, textarea:focus {
+ border-color: rgba(82, 168, 236, 0.8);
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ outline: 0;
+ outline: thin dotted \9;
+ /* IE6-8 */
+
+}
+input[type="file"]:focus, input[type="checkbox"]:focus, select:focus {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.input-mini {
+ width: 60px;
+}
+.input-small {
+ width: 90px;
+}
+.input-medium {
+ width: 150px;
+}
+.input-large {
+ width: 210px;
+}
+.input-xlarge {
+ width: 270px;
+}
+.input-xxlarge {
+ width: 530px;
+}
+input[class*="span"],
+select[class*="span"],
+textarea[class*="span"],
+.uneditable-input {
+ float: none;
+ margin-left: 0;
+}
+input.span1, textarea.span1, .uneditable-input.span1 {
+ width: 50px;
+}
+input.span2, textarea.span2, .uneditable-input.span2 {
+ width: 130px;
+}
+input.span3, textarea.span3, .uneditable-input.span3 {
+ width: 210px;
+}
+input.span4, textarea.span4, .uneditable-input.span4 {
+ width: 290px;
+}
+input.span5, textarea.span5, .uneditable-input.span5 {
+ width: 370px;
+}
+input.span6, textarea.span6, .uneditable-input.span6 {
+ width: 450px;
+}
+input.span7, textarea.span7, .uneditable-input.span7 {
+ width: 530px;
+}
+input.span8, textarea.span8, .uneditable-input.span8 {
+ width: 610px;
+}
+input.span9, textarea.span9, .uneditable-input.span9 {
+ width: 690px;
+}
+input.span10, textarea.span10, .uneditable-input.span10 {
+ width: 770px;
+}
+input.span11, textarea.span11, .uneditable-input.span11 {
+ width: 850px;
+}
+input.span12, textarea.span12, .uneditable-input.span12 {
+ width: 930px;
+}
+input[disabled],
+select[disabled],
+textarea[disabled],
+input[readonly],
+select[readonly],
+textarea[readonly] {
+ background-color: #f5f5f5;
+ border-color: #ddd;
+ cursor: not-allowed;
+}
+.control-group.warning > label, .control-group.warning .help-block, .control-group.warning .help-inline {
+ color: #c09853;
+}
+.control-group.warning input, .control-group.warning select, .control-group.warning textarea {
+ color: #c09853;
+ border-color: #c09853;
+}
+.control-group.warning input:focus, .control-group.warning select:focus, .control-group.warning textarea:focus {
+ border-color: #a47e3c;
+ -webkit-box-shadow: 0 0 6px #dbc59e;
+ -moz-box-shadow: 0 0 6px #dbc59e;
+ box-shadow: 0 0 6px #dbc59e;
+}
+.control-group.warning .input-prepend .add-on, .control-group.warning .input-append .add-on {
+ color: #c09853;
+ background-color: #fcf8e3;
+ border-color: #c09853;
+}
+.control-group.error > label, .control-group.error .help-block, .control-group.error .help-inline {
+ color: #b94a48;
+}
+.control-group.error input, .control-group.error select, .control-group.error textarea {
+ color: #b94a48;
+ border-color: #b94a48;
+}
+.control-group.error input:focus, .control-group.error select:focus, .control-group.error textarea:focus {
+ border-color: #953b39;
+ -webkit-box-shadow: 0 0 6px #d59392;
+ -moz-box-shadow: 0 0 6px #d59392;
+ box-shadow: 0 0 6px #d59392;
+}
+.control-group.error .input-prepend .add-on, .control-group.error .input-append .add-on {
+ color: #b94a48;
+ background-color: #f2dede;
+ border-color: #b94a48;
+}
+.control-group.success > label, .control-group.success .help-block, .control-group.success .help-inline {
+ color: #468847;