Commits

shiningray  committed 96c6f68

add title to article

  • Participants
  • Parent commits 2c31c7f

Comments (0)

Files changed (4)

File stylesheets/style_web.css

 .sign .verifi-success, .sign .verifi-failed {display:inline-block; vertical-align:middle; height:20px; width:20px; margin:0 4px 0 0;}
 .sign .verifi-success {background:url(img/web_icon.png) no-repeat -200px 0;}
 .sign .verifi-failed {background:url(img/web_icon.png) no-repeat -220px 0;}
+
+
+.article .entry-title {font-weight: bold;font-size: 20px;}

File views/articles/_article.html.erb

 url = article_url(article)
 group = @group || article.group -%>
 <div class="block untagged article" id="qiushi_tag_<%= id %>">
+  <% unless article.title.blank? %>
+  <div class="entry-title">
+    <h2><%=h article.title %></h2>
+  </div>
+  <% end %>
   <div class="author">
     <% unless article.anonymous? %>
     <%= image_tag article.user.avatar.url(:thumb) %>
     <%= link_to article.user.login, article.user %>
     <% end %>
   </div>
-  <p class="content entry-content" id="BSHARE_TEXT" title="<%= article.created_at.strftime('%Y-%m-%d')%>">
-    <%= format_content article, group -%>
-  </p>
+
   <% if article.picture.file? %>
     <div class="thumb">
       <%# if article.picture.content_type =~ /gif/i %>
       <%# end %>
     </div>
   <% end %>
+  <p class="content entry-content" id="BSHARE_TEXT" title="<%= article.created_at.strftime('%Y-%m-%d')%>">
+    <%= format_content article, group -%>
+  </p>  
   <% unless article.tag_line.blank? %>
     <div class="tags"><span class="bti"></span><%= show_tags(article) %></div>
   <% end %>    

File views/articles/new.html.erb

       <% end %>
     </div>
   <% end %>
-
+<% content_for :javascripts do %>
   <script type="text/javascript">
     $('#qiushi_text').focus( function(){
       var e = $(this);
       }
     });
   </script>
+<% end %>
 </div>
 <div class="shadow"></div>

File views/layouts/application.html.erb

       <% end %>
     </title>
     <%= theme_stylesheet_link_tag 'style_web', 'jquery.fancybox-1.3.4.css' %>
-    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
+    
     <style>
       .article .share {
         float: left;
         </form>
       </div>
     </div>
+    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
     <!--[if IE]><script src="http://www.qiushibaike.com/static/js/other_libs/excanvas/excanvas.compiled.js" type="text/javascript" charset="utf-8"></script><![endif]-->
     <%= theme_javascript_include_tag %w(jquery.bgiframe.min.js lightbox_me fancybox
               cookie cursor base64 poshytip
               lib2nd vote_history vote floorlink comment
-              ajaxlogin
-              app), :cache => current_theme %>
+              ajaxlogin app) %>
     <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" type="text/javascript"></script>
     <% if @group 
       j = @group.as_json(:only => [:id, :name, :description])
       var currentGroup=window.currentGroup=<%= j.to_json %>;
     </script>
     <% end %>
+    <%= yield :javascripts %>
   </body>
 </html>