monologue 0.1.3 → 0.2.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/README.md +29 -21
  2. data/app/assets/javascripts/monologue/blog/twitter.js.coffee +32 -0
  3. data/app/assets/stylesheets/monologue/blog/application.css +3 -3
  4. data/app/assets/stylesheets/monologue/blog/monologue.css +150 -7
  5. data/app/controllers/monologue/admin/cache_controller.rb +27 -0
  6. data/app/controllers/monologue/admin/posts_controller.rb +28 -12
  7. data/app/controllers/monologue/admin/sessions_controller.rb +2 -2
  8. data/app/controllers/monologue/admin/users_controller.rb +13 -0
  9. data/app/controllers/monologue/application_controller.rb +22 -6
  10. data/app/controllers/monologue/posts_controller.rb +7 -7
  11. data/app/controllers/monologue/tags_controller.rb +12 -0
  12. data/app/helpers/monologue/application_helper.rb +76 -0
  13. data/app/helpers/monologue/tags_helper.rb +5 -0
  14. data/app/models/monologue/post.rb +43 -29
  15. data/app/models/monologue/posts_revision.rb +50 -52
  16. data/app/models/monologue/tag.rb +16 -0
  17. data/app/models/monologue/tagging.rb +4 -0
  18. data/app/models/monologue/user.rb +1 -0
  19. data/app/sweepers/monologue/posts_sweeper.rb +20 -4
  20. data/app/sweepers/monologue/total_sweeper.rb +5 -0
  21. data/app/views/layouts/monologue/admin/_nav_bar.html.erb +17 -6
  22. data/app/views/layouts/monologue/application.html.erb +15 -20
  23. data/app/views/layouts/monologue/application/_disqus.html.erb +18 -0
  24. data/app/views/layouts/monologue/application/_disqus_embed.html.erb +17 -0
  25. data/app/views/layouts/monologue/application/_fb_open_graph.html.erb +4 -1
  26. data/app/views/layouts/monologue/application/_gauge_analytics.html.erb +15 -0
  27. data/app/views/layouts/monologue/application/_google_analytics.html.erb +1 -1
  28. data/app/views/layouts/monologue/application/_head.html.erb +3 -2
  29. data/app/views/layouts/monologue/application/_sidebar.html.erb +5 -0
  30. data/app/views/layouts/monologue/application/_social_icons.html.erb +5 -0
  31. data/app/views/layouts/monologue/application/_twitter_cards.html.erb +7 -0
  32. data/app/views/monologue/admin/cache/_config.html.erb +18 -0
  33. data/app/views/monologue/admin/cache/how_to_enable.html.erb +6 -0
  34. data/app/views/monologue/admin/cache/show.html.erb +26 -0
  35. data/app/views/monologue/admin/posts/_form.html.erb +3 -2
  36. data/app/views/monologue/admin/posts/edit.html.erb +1 -1
  37. data/app/views/monologue/admin/posts/index.html.erb +1 -1
  38. data/app/views/monologue/admin/users/edit.html.erb +9 -0
  39. data/app/views/monologue/posts/_post.html.erb +14 -0
  40. data/app/views/monologue/posts/_revision_header.html.erb +9 -0
  41. data/app/views/monologue/posts/_social_sharing.html.erb +45 -36
  42. data/app/views/monologue/posts/index.html.erb +4 -17
  43. data/app/views/monologue/posts/show.html.erb +11 -24
  44. data/app/views/monologue/sidebar/_categories.html.erb +7 -0
  45. data/app/views/monologue/sidebar/_latest_posts.html.erb +7 -0
  46. data/app/views/monologue/sidebar/_latest_tweets.html.erb +8 -0
  47. data/app/views/monologue/sidebar/_tag_cloud.html.erb +5 -0
  48. data/app/views/monologue/tags/_tag.html.erb +1 -0
  49. data/app/views/monologue/tags/show.html.erb +4 -0
  50. data/config/locales/en.yml +54 -10
  51. data/config/locales/fr.yml +55 -11
  52. data/config/routes.rb +8 -2
  53. data/db/migrate/20120514164158_create_monologue_tags.rb +8 -0
  54. data/db/migrate/20120514194459_join_posts_and_tags.rb +7 -0
  55. data/db/migrate/20120604010152_rename_post_tags_table.rb +5 -0
  56. data/db/migrate/20120612013442_create_taggings.rb +11 -0
  57. data/db/migrate/20120612015727_delete_join_posts_tags.rb +11 -0
  58. data/db/migrate/20120612020023_add_index_to_tag_name.rb +5 -0
  59. data/deprecations.rb +10 -0
  60. data/lib/monologue.rb +20 -1
  61. data/lib/monologue/engine.rb +12 -1
  62. data/lib/monologue/version.rb +1 -1
  63. data/lib/tasks/monologue_cache.rake +26 -0
  64. data/vendor/assets/fonts/monologue/foundation_icons/social_foundicons.eot +0 -0
  65. data/vendor/assets/fonts/monologue/foundation_icons/social_foundicons.svg +15 -0
  66. data/vendor/assets/fonts/monologue/foundation_icons/social_foundicons.ttf +0 -0
  67. data/vendor/assets/fonts/monologue/foundation_icons/social_foundicons.woff +0 -0
  68. data/vendor/assets/javascripts/monologue/bootstrap/bootstrap.min.js +6 -1
  69. data/vendor/assets/stylesheets/monologue/bootstrap/bootstrap-responsive.min.css +9 -3
  70. data/vendor/assets/stylesheets/monologue/bootstrap/bootstrap.min.css +9 -610
  71. data/vendor/assets/stylesheets/monologue/foundation_icons/social_foundicons.css.erb +148 -0
  72. metadata +109 -10
  73. data/app/helpers/monologue/admin/admin_helper.rb +0 -4
  74. data/app/helpers/monologue/posts_helper.rb +0 -4
  75. data/app/helpers/monologue/sessions_helper.rb +0 -6
  76. data/lib/tasks/monologue_tasks.rake +0 -4
@@ -0,0 +1,5 @@
1
+ class Monologue::TotalSweeper
2
+ def self.wipe_all
3
+ FileUtils.rm_rf(Dir.glob("#{ActionController::Base.page_cache_directory}/*")) if ActionController::Base.perform_caching && Monologue::PageCache.enabled && Monologue::PageCache.wipe_enabled && (ActionController::Base.page_cache_directory != Rails.public_path)
4
+ end
5
+ end
@@ -1,8 +1,8 @@
1
1
  <div class="navbar">
2
2
  <div class="navbar-inner">
3
- <div class="container">
3
+ <div class="container" data-monologue="nav-bar">
4
4
  <%= link_to "Monologue", admin_path, :class => "brand" %>
5
- <ul class="nav pull-left">
5
+ <ul class="nav pull-left" data-monologue="nav-bar-left">
6
6
 
7
7
  <li class="<%= request.fullpath === new_admin_post_path ? "active":"" %>">
8
8
  <%= link_to t(".add_a_monologue"), new_admin_post_path%>
@@ -11,12 +11,23 @@
11
11
  <%= link_to t(".list_monologues"), admin_posts_path %>
12
12
  </li>
13
13
  <li class="<%= request.fullpath === admin_comments_path ? "active":"" %>">
14
- <%= link_to t(".comments"), admin_comments_path %></a>
14
+ <%= link_to t(".comments"), admin_comments_path %>
15
15
  </li>
16
16
  </ul>
17
- <ul class="nav pull-right">
18
- <li><a href="#"><%=t(".logged_in_as")%> <%= current_user.email %>.</a></li>
19
- <li><%= link_to t(".log_out"), admin_logout_path %></li>
17
+ <ul class="nav pull-right" data-monologue="nav-bar-right">
18
+ <% if ActionController::Base.perform_caching %>
19
+ <li class="<%= request.fullpath === admin_cache_path ? "active":"" %>">
20
+ <%= link_to t(".cache"), admin_cache_path %>
21
+ </li>
22
+ <% end %>
23
+ <li id="fat-menu" class="dropdown">
24
+ <a href="#" id="settings" data-toggle="dropdown"><%= t(".settings") %> <b class="caret"></b></a>
25
+ <ul class="dropdown-menu" role="menu" aria-labelledby="settings">
26
+ <li><%= link_to t(".edit_user_info"), edit_admin_user_path(current_user)%></li>
27
+ </ul>
28
+ </li>
29
+ <li><%= link_to t(".log_out"), admin_logout_path %></li>
30
+
20
31
  </ul>
21
32
 
22
33
  </div>
@@ -4,39 +4,34 @@
4
4
  <!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
5
5
  <!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
6
6
  <head>
7
- <%= render "layouts/monologue/application/head" %>
7
+ <%= render 'layouts/monologue/application/head' %>
8
8
  </head>
9
9
  <body>
10
10
  <div class="container">
11
11
  <header class="main-header sixteen columns clearfix">
12
+ <%= rss_icon %>
12
13
  <h1><a href="<%= root_path %>"><%=Monologue.site_name%></a></h1>
13
14
  <h2><%=Monologue.site_subtitle%></h2>
15
+ <%= render :partial => "layouts/monologue/application/social_icons" %>
14
16
  </header>
15
17
 
16
- <div class="content sixteen columns">
18
+ <div class="content twelve columns">
19
+ <% flash.each do |name, msg| %>
20
+ <div class="flash-notice">
21
+ <%= msg %>
22
+ </div>
23
+ <% end %>
24
+
17
25
  <%= yield %>
18
- </div>
26
+ </div>
27
+
28
+ <%= render 'layouts/monologue/application/sidebar' %>
19
29
  </div>
20
30
  <footer>
21
31
  <%= yield :footer %>
22
32
  </footer>
23
33
 
24
- <script type="text/javascript">
25
- /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
26
- var disqus_shortname = '<%= Monologue.disqus_shortname%>'; // required: replace example with your forum shortname
27
-
28
- <% if Rails.env.development? %>
29
- var disqus_developer = 1; // developer mode is on
30
- <% end %>
31
-
32
-
33
- /* * * DON'T EDIT BELOW THIS LINE * * */
34
- (function () {
35
- var s = document.createElement('script'); s.async = true;
36
- s.type = 'text/javascript';
37
- s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
38
- (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
39
- }());
40
- </script>
34
+ <%= render 'layouts/monologue/application/disqus' %>
35
+ <%= render 'layouts/monologue/application/gauge_analytics' %>
41
36
  </body>
42
37
  </html>
@@ -0,0 +1,18 @@
1
+ <script type="text/javascript">
2
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
3
+ var disqus_shortname = '<%= Monologue.disqus_shortname%>'; // required: replace example with your forum shortname
4
+
5
+ <% if Rails.env.development? %>
6
+ var disqus_developer = 1; // developer mode is on
7
+ <% end %>
8
+
9
+
10
+ /* * * DON'T EDIT BELOW THIS LINE * * */
11
+ (function () {
12
+ var s = document.createElement('script'); s.async = true;
13
+ s.type = 'text/javascript';
14
+ s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
15
+ (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
16
+ }());
17
+ </script>
18
+
@@ -0,0 +1,17 @@
1
+ <script type="text/javascript">
2
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
3
+ var disqus_shortname = '<%= Monologue.disqus_shortname%>'; // required: replace example with your forum shortname
4
+
5
+ <% if Rails.env.development? %>
6
+ var disqus_developer = 1; // developer mode is on
7
+ <% end %>
8
+
9
+ /* * * DON'T EDIT BELOW THIS LINE * * */
10
+ (function () {
11
+ var dsq = document.createElement('script');
12
+ dsq.type = 'text/javascript';
13
+ dsq.async = true;
14
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
15
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
16
+ })();
17
+ </script>
@@ -1,4 +1,7 @@
1
1
  <meta property="og:title" content="<%= monologue_accurate_title %>"/>
2
2
  <meta property="og:type" content="<%= controller.action_name == "show" ? "article" : "blog" %>"/>
3
3
  <meta property="og:url" content="http://<%= request.host_with_port %><%= request.path.gsub("//","/") %>"/>
4
- <meta property="og:site_name" content="<%= Monologue.site_name %>"/>
4
+ <meta property="og:site_name" content="<%= Monologue.site_name %>"/>
5
+ <% if Monologue.facebook_logo%>
6
+ <meta property="og:image" content="<%= absolute_image_url(image_path(Monologue.facebook_logo)) %>" />
7
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <% unless Monologue.gauge_analytics_site_id.nil? %>
2
+ <script type="text/javascript">
3
+ var _gauges = _gauges || [];
4
+ (function() {
5
+ var t = document.createElement('script');
6
+ t.type = 'text/javascript';
7
+ t.async = true;
8
+ t.id = 'gauges-tracker';
9
+ t.setAttribute('data-site-id', '<%= Monologue.gauge_analytics_site_id %>');
10
+ t.src = '//secure.gaug.es/track.js';
11
+ var s = document.getElementsByTagName('script')[0];
12
+ s.parentNode.insertBefore(t, s);
13
+ })();
14
+ </script>
15
+ <% end %>
@@ -1,4 +1,4 @@
1
- <% if defined? Monologue.google_analytics_id %>
1
+ <% unless Monologue.google_analytics_id.nil? %>
2
2
  <script type="text/javascript">
3
3
 
4
4
  var _gaq = _gaq || [];
@@ -2,8 +2,9 @@
2
2
  <meta charset="utf-8" />
3
3
  <%= render "layouts/monologue/application/meta_description" %>
4
4
  <%= render "layouts/monologue/application/fb_open_graph" %>
5
+ <%= render "layouts/monologue/application/twitter_cards" %>
5
6
  <meta name="keyword" content="<%=Monologue.meta_keyword%>">
6
-
7
+
7
8
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
8
9
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
9
10
 
@@ -14,5 +15,5 @@
14
15
  ================================================== -->
15
16
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
16
17
 
17
- <link href="/feed" rel="alternate" title="RSS" type="application/rss+xml" >
18
+ <%= rss_head_link %>
18
19
  <%= render "layouts/monologue/application/google_analytics" %>
@@ -0,0 +1,5 @@
1
+ <aside class="sidebar four columns">
2
+ <% Monologue.sidebar.each do |ext| %>
3
+ <%= render :partial => "monologue/sidebar/#{ext}" %>
4
+ <% end %>
5
+ </aside>
@@ -0,0 +1,5 @@
1
+ <%= facebook_icon %>
2
+ <%= googleplus_icon %>
3
+ <%= linkedin_icon %>
4
+ <%= twitter_icon %>
5
+ <%= github_icon %>
@@ -0,0 +1,7 @@
1
+ <meta name="twitter:card" content="summary">
2
+ <% if Monologue.twitter_username %>
3
+ <meta name="twitter:site" content="<%= Monologue.twitter_username %>">
4
+ <% end %>
5
+ <meta name="twitter:url" content="http://<%= request.host_with_port %><%= request.path.gsub("//","/") %>">
6
+ <meta name="twitter:title" content="<%= monologue_accurate_title %>">
7
+ <meta name="twitter:description" content="<%= content_for?(:meta_description) ? yield(:meta_description) : Monologue.meta_description %>">
@@ -0,0 +1,18 @@
1
+ <h1>Current config</h1>
2
+ <p>Want to know more about those configs? See here: <%= link_to "Configure Monologue's cache (english only)", "https://github.com/jipiboily/monologue/wiki/Configure-Monologue's-cache", :target => "_blank" %></p>
3
+
4
+ <div class="alert alert-<%= ActionController::Base.perform_caching ? "success" : "error" %>">
5
+ ActionController::Base.perform_caching = <%= ActionController::Base.perform_caching %>
6
+ </div>
7
+
8
+ <div class="alert alert-<%= ActionController::Base.page_cache_directory != Rails.public_path ? "success" : "error" %>">
9
+ ActionController::Base.page_cache_directory = <%= ActionController::Base.page_cache_directory %>
10
+ </div>
11
+
12
+ <div class="alert alert-<%= Monologue::PageCache.enabled ? "success" : "error" %>">
13
+ Monologue::PageCache.enabled = <%= Monologue::PageCache.enabled %>
14
+ </div>
15
+
16
+ <div class="alert alert-<%= Monologue::PageCache.wipe_enabled ? "success" : "error" %>">
17
+ Monologue::PageCache.wipe_enabled = <%= Monologue::PageCache.wipe_enabled %>
18
+ </div>
@@ -0,0 +1,6 @@
1
+ <div class="alert alert-block">
2
+ <h4><%= t(".warning") %></h4>
3
+ <%= t(".explanations") %>
4
+ </div>
5
+
6
+ <%= render "config" %>
@@ -0,0 +1,26 @@
1
+ <h1><%= t(".title") %></h1>
2
+
3
+ <p><%= t(".description") %></p>
4
+
5
+ <hr>
6
+
7
+ <h2><%= t(".delete") %></h2>
8
+ <%= link_to t(".delete"), admin_cache_path, :data => {:confirm => t(".confirm")}, :method => :delete, :class => "btn btn-large btn-danger" %>
9
+
10
+ <hr>
11
+
12
+ <h2><%= t(".files_in_cache") %></h2>
13
+ <% if @files.any? %>
14
+ <ul>
15
+ <% @files.each do |file| %>
16
+ <% next if File.directory?(file) %>
17
+ <li><%= file.gsub(ActionController::Base.page_cache_directory,"") %></li>
18
+ <% end %>
19
+ </ul>
20
+ <% else %>
21
+ <p><%= t(".no_files_are_cached") %></p>
22
+ <% end %>
23
+
24
+ <hr>
25
+
26
+ <%= render "config" %>
@@ -2,11 +2,12 @@
2
2
  <%= post.fields_for @revision do |revision| %>
3
3
  <%= revision.text_field :title, :label => t(".title"), :class => "span6" %>
4
4
  <%= revision.text_area :content, :label => t(".content"), :class => "span12 ckeditor" %>
5
- <%= revision.text_field :url, :label => raw("#{t(".url.before_generated_url")} '#{DateTime.now.year}/#{t(".url.generated_title")}'#{t(".url.after_generated_url")}. #{t(".url.do_not_add_mount_point")} <i>'#{monologue.root_path}'.</i>") %>
5
+ <%= revision.text_field :url, :label => raw(sprintf(t(".url.caption"), "#{DateTime.now.year}/#{t(".url.generated_title")}",monologue.root_path)) %>
6
6
  <%= revision.text_field :published_at, :label => t(".published_at"), :data => {:datepicker => "datepicker"}, :value => revision.object.published_at.nil? ? "" : revision.object.published_at.strftime("%Y-%m-%d") %>
7
7
  <% end %>
8
- <%= post.check_box :published, :label => t(".published") %>
9
8
 
9
+ <%= post.text_field :tag_list, :label => raw(t(".tags")), :value => tag_list_for(post.object.tags)%>
10
+ <%= post.check_box :published, :label => t(".published") %>
10
11
  <%= post.submit t(".save"), :class => "btn btn-large btn-primary" %> <a href="<%= @revision.full_url %>" target="_blank" class="btn btn-large"><%= t(".preview") %></a>
11
12
 
12
13
  <script>
@@ -1,4 +1,4 @@
1
- <h1><%= t(".header") %> "<%= @post.posts_revisions.last.title %>"</h1>
1
+ <h1><%= t(".header") %> "<%= @post.active_revision.title %>"</h1>
2
2
  <%= monologue_admin_form_for ["admin", @post], :method => :put do |post| %>
3
3
  <%= render :partial => 'form', :locals => {:post => post} %>
4
4
  <% end %>
@@ -13,7 +13,7 @@
13
13
  <td><%= link_to post.posts_revisions.last.title, edit_admin_post_path(post) %></td>
14
14
  <td><span class="label label-<%= post.published ? "success" : "important" %>"><%= post.published ? t(".published") : t(".not_published") %></span></td>
15
15
  <td><%= link_to t(".edit"), edit_admin_post_path(post), :class => "btn btn-small" %></td>
16
- <td><%= link_to t(".delete"), ["admin", post], :confirm => 'Are you sure?', :method => :delete, :class => "btn btn-small btn-danger" %></td>
16
+ <td><%= link_to t(".delete"), ["admin", post],:data => {:confirm => 'Are you sure?'}, :method => :delete, :class => "btn btn-small btn-danger" %></td>
17
17
  </tr>
18
18
  <% end %>
19
19
  </tbody>
@@ -0,0 +1,9 @@
1
+ <h1><%= t(".header") %></h1>
2
+ <%= monologue_admin_form_for ["admin", @user], :method => :put do |user| %>
3
+ <%= user.error_messages %>
4
+ <%= user.text_field :name, :label => t(".name"), :class => "span6" %>
5
+ <%= user.text_field :email, :label => t(".email"), :class => "span6" %>
6
+ <%= user.password_field :password, :label => t(".password"), :class => "span6" %>
7
+ <%= user.password_field :password_confirmation, :label => t(".password_confirmation"), :class => "span6" %>
8
+ <%= user.submit t(".save"), :class => "btn btn-large btn-primary" %>
9
+ <% end %>
@@ -0,0 +1,14 @@
1
+ <% revision = post.active_revision %>
2
+ <section>
3
+ <%= render :partial => 'monologue/posts/revision_header', :locals => {:revision=>revision} %>
4
+
5
+ <div id="content" data-monologue="content">
6
+ <%= truncate_html(revision.content, :length => 1000, :omission => '...') %>
7
+ </div>
8
+
9
+ <div id="tags" data-monologue="tags">
10
+ <%= render post.tags %>
11
+ </div>
12
+ <%= link_to t(".readmore"), revision.full_url, :class => "button" %>
13
+ </section>
14
+
@@ -0,0 +1,9 @@
1
+ <header class="revision-header">
2
+ <h1><%= link_to revision.title, revision.full_url %></h1>
3
+ <div class="posted">
4
+ <time datetime="<%= revision.published_at %>">
5
+ <%= I18n.localize(revision.published_at.to_date, :format => :long) %>
6
+ </time>
7
+ &nbsp;&nbsp;|&nbsp;&nbsp;<%= revision.user.name %>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<%= revision.full_url + "#disqus_thread" %>"></a>
8
+ </div>
9
+ </header>
@@ -1,42 +1,51 @@
1
- <footer class="monologue-social-sharing well">
2
- <h2><%= t(".tagline") %></h2>
3
- <!-- FACEBOOK LIKE -->
4
-
5
- <div id="fb-root"></div>
6
- <script>(function(d, s, id) {
7
- var js, fjs = d.getElementsByTagName(s)[0];
8
- if (d.getElementById(id)) return;
9
- js = d.createElement(s); js.id = id;
10
- js.src = "//connect.facebook.net/<%= Monologue.facebook_like_locale || "en_US" %>/all.js#xfbml=1&appId=288133081204194";
11
- fjs.parentNode.insertBefore(js, fjs);
12
- }(document, 'script', 'facebook-jssdk'));</script>
13
- <div class="fb-like" data-layout="box_count" data-show-faces="true" data-font="verdana"></div>
14
- <!-- /FACEBOOK LIKE -->
15
-
16
- <!-- TWITTER -->
17
- <a href="https://twitter.com/share" class="twitter-share-button"
18
- data-lang="<%= Monologue.twitter_locale || "en" %>"
19
- data-url="http://<%= request.host_with_port %><%= request.path.gsub("//","/") %>"
20
- data-via="<%=Monologue.twitter_username%>"
21
- data-text="<%=@revision.title%>"
22
- data-count="vertical">Tweet</a>
1
+ <footer class="monologue-social-sharing" data-monologue="monologue-social-sharing">
2
+ <h1><%= t(".tagline") %></h1>
3
+ <div id="social-share">
4
+ <div id="google-plus">
5
+ <!-- GOOGLE +1 -->
6
+ <!-- Placez cette balise là où vous souhaitez positionner le bouton +1. -->
7
+ <g:plusone size="medium"></g:plusone>
23
8
 
24
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
9
+ <!-- Placez cet appel d'affichage à l'endroit approprié. -->
10
+ <script type="text/javascript">
11
+ window.___gcfg = {lang: '<%=Monologue.google_plusone_locale || "en" %>'};
12
+
13
+ (function() {
14
+ var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
15
+ po.src = 'https://apis.google.com/js/plusone.js';
16
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
17
+ })();
18
+ </script>
19
+ <!-- /GOOGLE +1 -->
20
+ </div>
21
+ <div id="twitter">
22
+ <!-- TWITTER -->
23
+ <a href="https://twitter.com/share" class="twitter-share-button"
24
+ data-lang="<%= Monologue.twitter_locale || "en" %>"
25
+ data-url="http://<%= request.host_with_port %><%= request.path.gsub("//","/") %>"
26
+ data-via="<%=Monologue.twitter_username%>"
27
+ data-text="<%=@revision.title%>"
28
+ data-count="horizontal">Tweet</a>
29
+
30
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
25
31
  <!-- /TWITTER -->
32
+ </div>
33
+
26
34
 
27
- <!-- GOOGLE +1 -->
28
- <!-- Placez cette balise là où vous souhaitez positionner le bouton +1. -->
29
- <g:plusone size="tall"></g:plusone>
35
+ <div id="facebook">
36
+ <!-- FACEBOOK LIKE -->
37
+ <div id="fb-root"></div>
38
+ <script>(function(d, s, id) {
39
+ var js, fjs = d.getElementsByTagName(s)[0];
40
+ if (d.getElementById(id)) return;
41
+ js = d.createElement(s); js.id = id;
42
+ js.src = "//connect.facebook.net/<%= Monologue.facebook_like_locale || "en_US" %>/all.js#xfbml=1&appId=288133081204194";
43
+ fjs.parentNode.insertBefore(js, fjs);
44
+ }(document, 'script', 'facebook-jssdk'));</script>
45
+ <div class="fb-like" data-send="false" data-width="450" data-show-faces="false"></div>
46
+ <!-- /FACEBOOK LIKE -->
47
+ </div>
30
48
 
31
- <!-- Placez cet appel d'affichage à l'endroit approprié. -->
32
- <script type="text/javascript">
33
- window.___gcfg = {lang: '<%=Monologue.google_plusone_locale || "en" %>'};
34
49
 
35
- (function() {
36
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
37
- po.src = 'https://apis.google.com/js/plusone.js';
38
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
39
- })();
40
- </script>
41
- <!-- /GOOGLE +1 -->
50
+ </div>
42
51
  </footer>
@@ -1,18 +1,5 @@
1
- <% @posts.each do |post| %>
2
- <% revision = post.posts_revisions.first %>
3
-
4
- <section>
5
- <header>
6
- <h1><%= link_to revision.title, revision.full_url %></h1>
7
- <time datetime="<%= revision.published_at %>">
8
- <%= revision.published_at.to_date.to_formatted_s(:long_ordinal) %>
9
- </time>&nbsp;&nbsp;|&nbsp;&nbsp;<%= revision.user.name %>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="<%= revision.full_url + "#disqus_thread" %>"></a>
10
- </header>
11
-
12
- <p><%= raw truncate(strip_tags(revision.content), :length => 1000) %></p>
13
-
14
- <%= link_to t(".readmore"), revision.full_url, :class => "btn alignleft" %>
15
- </section>
16
- <% end %>
1
+ <%= render @posts %>
17
2
 
18
- <%= render "pagination" %>
3
+ <% if @page %>
4
+ <%= render :partial => "pagination" %>
5
+ <% end %>