<%= image_tag '/images/transparent.png', size: "75x75" %>
-
+
-
<%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_contest) %> , <%= l(:label_welcome_trustie_contest_description) %>
diff --git a/app/views/welcome/course.html.erb b/app/views/welcome/course.html.erb
index eef2401f8..8b1a9d9ee 100644
--- a/app/views/welcome/course.html.erb
+++ b/app/views/welcome/course.html.erb
@@ -5,8 +5,22 @@
$(function(){
$("#main").find("a").attr("target", "_blank");
+ setCss();
});
+ //设置div居中
+ function setCss()
+ {
+ var mainBar = $('#main-content-bar')[0];
+ var topHeight = mainBar.offsetHeight;
+ var welcomeLeft = $('#welcome_left')[0];
+ var leftHeight = welcomeLeft.offsetHeight;
+ var searchbar = $('#search-bar')[0];
+ var searchHeight = searchbar.offsetHeight;
+ welcomeLeft.style.marginTop = (topHeight - leftHeight)/2 + "px";
+ searchbar.style.marginTop = (topHeight - searchHeight)/2 + "px";
+ //alert((topHeight - leftHeight)/2 );
+ }
// 给主页用户弹新页面
$(document).ready(function($) {
$("#loggedas").find("a").attr("target", "_blank");
@@ -19,13 +33,12 @@
<%= image_tag '/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" %>
微信扫码
+
<%= image_tag(@logoLink, size:'75x75') %>
-
-
+
+
<% if params[:school_id].nil? and User.current.user_extensions.school.nil? %>
<% else%>
<% if params[:school_id] == "0" %>
@@ -48,7 +61,7 @@
<% end %>
<% end %>
-
+
-
<%= render :partial => "search_project", :locals => {:project_type => Project::ProjectType_course}%>
diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb
index 0a69b1f78..bb2d6cd36 100644
--- a/app/views/welcome/index.html.erb
+++ b/app/views/welcome/index.html.erb
@@ -4,8 +4,21 @@
$(function(){
$("#main").find("a").attr("target", "_blank");
+ setCss();
});
-
+ //设置div居中
+ function setCss()
+ {
+ var mainBar = $('#main-content-bar')[0];
+ var topHeight = mainBar.offsetHeight;
+ var welcomeLeft = $('#welcome_left')[0];
+ var leftHeight = welcomeLeft.offsetHeight;
+ var searchbar = $('#search-bar')[0];
+ var searchHeight = searchbar.offsetHeight;
+ welcomeLeft.style.marginTop = (topHeight - leftHeight)/2 + "px";
+ searchbar.style.marginTop = (topHeight - searchHeight)/2 + "px";
+ //alert((topHeight - leftHeight)/2 );
+ }
// 给主页用户弹新页面
$(document).ready(function($) {
$("#loggedas").find("a").attr("target", "_blank");
@@ -18,14 +31,14 @@
<%= link_to image_tag('/images/qrweixin.jpg', size: '150x150', alt: 'trustie', class: "weixin" ), home_path %>
微信扫码
+
<%= image_tag '/images/transparent.png', size: "75x75" %>
-
+
<%= l(:label_welcome_trustie) %><%= l(:label_welcome_trustie_project) %> , <%= l(:label_welcome_trustie_project_description) %>
-
+
<%= render :partial => "search_project", :locals => {:project_type => 0}%>
diff --git a/public/stylesheets/welcome.css b/public/stylesheets/welcome.css
index f7756e5b8..4393c1dbc 100644
--- a/public/stylesheets/welcome.css
+++ b/public/stylesheets/welcome.css
@@ -312,11 +312,11 @@ a.attachments_list_color {
}
.main-content-bar{
margin: 0;
- margin-top: 35px;
+ margin-top: 12px;
padding: 0;
- margin-bottom: 35px;
- width: 100%;
- height: auto;
+ margin-bottom: 2px;
+ width: 100%;
+ height: 78;
}
.weixin-content{