changeset 1342:041b794f2a31 cannam

Restore news to home page, tweak formatting
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 21 Jun 2013 11:12:59 +0100
parents 077b8890835a
children 9dbf79aee6da
files app/views/welcome/index.html.erb public/themes/soundsoftware/stylesheets/application.css
diffstat 2 files changed, 28 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/app/views/welcome/index.html.erb	Thu Jun 20 13:14:02 2013 +0100
+++ b/app/views/welcome/index.html.erb	Fri Jun 21 11:12:59 2013 +0100
@@ -5,10 +5,18 @@
   </div>
 <% end %>
 
+<div id="welcomepagenews">
+  <% if @site_news.any? %>
+    <div class="news box">
+       <h3><%=l(:label_news_site_latest)%></h3>
+	<%= render :partial => 'news/news', :locals => { :project => @site_project }, :collection => @site_news %>
+	<%= link_to l(:label_news_more), { :controller => 'news', :project_id => @site_project.identifier, :action => 'index' } %>
+    </div>
+  <% end %>
+</div>
+
 <div id="welcomepage">
-
 <%= textilizable Setting.welcome_text %>
-
 </div>
   
 <% content_for :header_tags do %>
--- a/public/themes/soundsoftware/stylesheets/application.css	Thu Jun 20 13:14:02 2013 +0100
+++ b/public/themes/soundsoftware/stylesheets/application.css	Fri Jun 21 11:12:59 2013 +0100
@@ -178,7 +178,7 @@
 
 #welcomepage {
     width: 80%;
-    margin-left: 10%;
+    margin-left: 71px;
     margin-top: 10px;
 }
 #welcomepage blockquote {
@@ -187,15 +187,30 @@
     padding-left: 0;
     margin-left: 0;
 }
+#welcomepage h2 {
+    font-size: 2em;
+    margin-bottom: 0.8em;
+}
 #welcomepage p, #welcomepage li {
-    font-size: 1.2em;
+    font-size: 1.25em;
     color: #3e442c;
 }
 #welcomepage p {
     margin-left: 2em;
-    margin-top: 0.7em;
+    margin-top: 1em;
     margin-bottom: 0.7em;
 }
+#welcomepage a {
+    white-space: nowrap;
+}
+#welcomepagenews {
+    float: right;
+    width: 27%;
+    margin-right: 3%;
+    margin-top: 2.5em;
+    margin-left: 2em;
+    margin-bottom: 2em;
+}
 
 div.flash.newsalert {
   float: right;