更新css,增加个人主页公共部分的动态效果

This commit is contained in:
sw 2015-08-19 14:43:12 +08:00
parent 752fe93d72
commit d8da74a0d4
6 changed files with 161 additions and 63 deletions

View File

@ -1,6 +1,6 @@
<div class="navHomepage">
<div class="navHomepageLogo fl">
<%=link_to image_tag("../images/logo.png",weight:"51px", height: "45px",class: "mt3"), user_activities_path(User.current.id)%>
<%=link_to image_tag("../images/logo.png",width:"51px", height: "45px",class: "mt3"), user_activities_path(User.current.id)%>
</div>
<div class="fl">
<ul>

View File

@ -21,14 +21,15 @@
</a>
<% end %>
</div>
<div class="msgserver">
<div class="mt5">
<a target="hiddentab" href="http://wpa.qq.com/msgrd?v=1&uin=1554253403&site=qq&menu=yes" style="color: #15BCCF;">
<%= l(:label_technical_support) %>白&nbsp;&nbsp;&nbsp;羽</a>
<iframe name="hiddentab" style="display: none"></iframe>
</div>
</div>
<div class="side_bottom"></div>
</div>
</div>
<div class="show_btn"><span>在线客服</span></div>
<div class="show_btn">
<span>在线客服</span>
</div>
</div>

View File

@ -10,26 +10,10 @@
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'new_public', 'user_leftside', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "bootstrap"%>
<%= javascript_include_tag "bootstrap","user"%>
<%= heads_for_theme %>
<%= call_hook :view_layouts_base_html_head %>
<%= yield :header_tags -%>
<script type="text/javascript">
$(document).ready(function(){
$(".newsType").mouseover(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
});
$(".newsType").mouseout(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
});
$(".resourcesSelected").mouseover(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
});
$(".resourcesSelected").mouseout(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
});
});
</script>
</head>
<body>
@ -45,50 +29,112 @@
<div class="homepageContent">
<div class="homepageLeft">
<div class="homepagePortraitContainer">
<div class="homepagePortraitImage"> <img src="images/homepageImage.jpg" width="208" height="208" alt="Image" />
<div><a href="javascript:void(0);" class="homepageFollow"></a></div>
<div><a href="javascript:void(0);" class="homepageEditProfile c_white">编辑资料</a></div>
<div class="homepagePortraitImage">
<%= image_tag(url_to_avatar(User.current),width:"208", height: "208") %>
<% if User.current.logged?%>
<% if User.current == @user%>
<div>
<%#= link_to "编辑资料", my_account_path, :class => "homepageEditProfile c_white"%>
<div class="homepageEditProfile"><a href="javascript:void(0);" class="homepageEditProfileIcon"></a></div>
</div>
<% else %>
<div>
<a href="javascript:void(0);" class="homepageFollow"></a>
<%if(@user.watched_by?(User.current))%>
<%= link_to "",watch_path(:object_type=> 'user',:object_id=>@user.id,:target_id=>@user.id),:class => "homepageFollow", :method => "delete",:remote => "true", :title => "取消关注"%>
<% else %>
<%= link_to "",watch_path(:object_type=> 'user',:object_id=>@user.id,:target_id=>@user.id),:class => "homepageFollow", :method => "post",:remote => "true", :title => "添加关注"%>
<% end %>
</div>
<% end %>
<% end%>
</div>
<div>
<div class="homepageImageName">jacknudt</div>
<div class="homepageImageName">
<%= @user.login %>
</div>
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
<span class="<%= @user.user_extensions.gender==1?'icon_female':'icon_male' %> fl mt3 ml5"></span>
<% end %>
<div class="homepageImageSex"></div>
<div class="cl"></div>
</div>
<div>
<div class="homepageSignature">
<p>这位童鞋很懒,什么也没有留下~!&nbsp;<a href="javascript:void(0);"><img src="images/signature_edit.png" width="12" height="12" /></a></p>
<p>这位童鞋很懒,什么也没有留下~&nbsp;
<a href="javascript:void(0);">
<img src="../images/signature_edit.png" width="12" height="12" />
</a>
</p>
</div>
</div>
<div>
<div class="homepageImageBlock">
<div><a href="javascript:void(0);" class="homepageImageNumber">85</a></div>
<div>
<a href="javascript:void(0);" class="homepageImageNumber">85</a>
</div>
<div class="homepageImageText">关注</div>
</div>
<div class="homepageVerDiv"></div>
<div class="homepageImageBlock">
<div><a href="javascript:void(0);" class="homepageImageNumber">24</a></div>
<div>
<a href="javascript:void(0);" class="homepageImageNumber">24</a>
</div>
<div class="homepageImageText">粉丝</div>
</div>
<div class="homepageVerDiv"></div>
<div class="homepageImageBlock">
<div><a href="javascript:void(0);" class="homepageImageNumber">91</a></div>
<div>
<a href="javascript:void(0);" class="homepageImageNumber">91</a>
</div>
<div class="homepageImageText">积分</div>
</div>
<div class="cl"></div>
</div>
</div>
<div class="homepageLeftMenuContainer">
<div class="homepageLeftMenuBlock"><a href="javascript:void(0);" class="homepageMenuText">动态</a></div>
<div class="homepageLeftMenuBlock"><a href="javascript:void(0);" class="homepageMenuText">课程</a><a href="javascript:void(0);" class="homepageMenuSetting"><img src="../images/menu_setting.png" width="14" height="14" /></a></div>
<div class="homepageLeftMenuBlock"><a href="javascript:void(0);" class="homepageMenuText">项目</a><a href="javascript:void(0);" class="homepageMenuSetting"><img src="../images/menu_setting.png" width="14" height="14" /></a></div>
<div class="homepageLeftMenuBlock"><a href="javascript:void(0);" class="homepageMenuText">留言</a></div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">动态</a>
</div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">课程</a>
<a href="javascript:void(0);" class="homepageMenuSetting">
<img src="../images/menu_setting.png" width="14" height="14" />
</a>
</div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">项目</a>
<a href="javascript:void(0);" class="homepageMenuSetting">
<img src="../images/menu_setting.png" width="14" height="14" />
</a>
</div>
<div class="homepageLeftMenuBlock">
<a href="javascript:void(0);" class="homepageMenuText">留言</a>
</div>
</div>
<div class="homepageLeftLabelContainer">
<div class="project_Label_New"> <span class="homepageLabelText">标签</span>
<div class="tag_h ml10" > <span class="re_tag f_l "> <a href="javascript:void(0);" class="pt5">分布计算</a> <span class="del"> <a href="javascript:void(0);" data-remote="true">x</a> </span> </span> <span class="re_tag f_l" > <a href="javascript:void(0);">2014春季学期</a> <span class="del"> <a href="3" data-remote="true">x</a> </span> </span> <a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();">+ 添加标签</a> <span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
<div class="project_Label_New">
<span class="homepageLabelText">标签</span>
<div class="tag_h ml10" >
<span class="re_tag f_l ">
<a href="javascript:void(0);" class="pt5">分布计算</a>
<span class="del">
<a href="javascript:void(0);" data-remote="true">x</a>
</span>
</span>
<span class="re_tag f_l" >
<a href="javascript:void(0);">2014春季学期</a>
<span class="del">
<a href="3" data-remote="true">x</a>
</span>
</span>
<a href="javascript:void(0)" class="yellowBtn f_l" onclick="$('#add_tag01').slideToggle();">+ 添加标签</a>
<span id="add_tag01" style="display:none; vertical-align: middle;" class="ml10 f_l">
<input type="text" name="" size="20" class="isTxt w90 f_l" maxlength="100" />
<input type="button" class="submit f_l" onclick="addTag();" />
</span> </div>
</span>
</div>
<div class="cl"></div>
</div>
</div>
@ -97,6 +143,7 @@
<%= yield %>
</div>
</div>
<%= render :partial => 'layouts/new_feedback' %>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -258,4 +258,19 @@ $(function(){
init_list_more_div(params)
});
});
$(function(){
$(".newsType").mouseover(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
});
$(".newsType").mouseout(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
});
$(".resourcesSelected").mouseover(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px -25px no-repeat"});
});
$(".resourcesSelected").mouseout(function(){
$(".resourcesIcon").css({background:"url(images/resource_icon_list.png) 0px 0px no-repeat"});
});
});
//个人动态 end

View File

@ -289,9 +289,9 @@ a:hover.search_btn{ background: #0fa9bb;}
.resourcesBanner {width:730px; height:40px; background-color:#eaeaea; margin-bottom:10px;}
.bannerName {background:#64bdd9; color:#ffffff; height:40px; line-height:40px; width:90px; text-align:center; font-weight:normal; vertical-align:middle; font-size: 16px; float:left;}
.resourcesSelect {width:30px; height:34px; float:right; position:relative; margin-top:-6px;}
.resourcesSelected {width:25px; height:20px;}
.resourcesIcon {margin-top:15px; display:block; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat; width:25px; height:20px;}
.resourcesIcon:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;}
.resourcesSelected {width:25px; height:20px; position:relative; background:url(images/resource_icon_list.png) 0px 0px no-repeat;}
.resourcesSelected:hover { background:url(images/resource_icon_list.png) 0px -25px no-repeat;}
.resourcesIcon {margin-top:15px; display:block; width:25px; height:20px;}
.resourcesType {width:50px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:35px; padding:5px 10px; left:-30px; font-size:12px; color:#888888; display:none;}
a.resourcesGrey {font-size:12px; color:#888888;}
a.resourcesGrey:hover {font-size:12px; color:#15bccf;}
@ -336,19 +336,19 @@ a.resourcesBlack:hover {font-size:12px; color:#000000;}
box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
}
.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.5;
color:#616060;
white-space: nowrap;
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.5;
color:#616060;
white-space: nowrap;
}
.dropdown-menu > li > a:hover{
color: #ffffff;
text-decoration: none;
background-color: #64bdd9;
outline:none;
color: #ffffff;
text-decoration: none;
background-color: #64bdd9;
outline:none;
}
/*发送资源弹窗*/
@ -403,26 +403,37 @@ a.homepageSearchIcon:hover {background:url(../images/nav_icon.png) -49px 3px no-
.homepageLeft {width:240px; float:left; margin-right:10px; margin-bottom:10px;}
.homepageRight {width:750px; float:left; margin-top:15px; margin-bottom:10px;}
.homepagePortraitContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:15px; padding-bottom:15px;}
.homepagePortraitImage {width:208px; height:208px; margin:15px 16px 14px 16px; position:relative;}
.homepagePortraitImage {width:206px; height:206px; padding:2px; margin:15px 16px 14px 16px; position:relative; border:1px solid #cbcbcb;}
.homepagePortraitImage:hover {border:1px solid #15bccf;}
.homepageFollow {background:url(../images/homepage_icon.png) -10px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
.homepageEditProfile {background:url(../images/homepage_icon.png) -10px -35px no-repeat; width:55px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:4px; padding-left:25px; font-size:12px;}
.homepageFollowCancel {background:url(../images/homepage_icon.png) -178px -8px no-repeat; width:20px; height:20px; position:absolute; right:9px; top:9px;}
.homepageEditProfile {width:20px; height:20px; border-radius:2px; background-color:#888888; position:absolute; right:9px; bottom:9px; font-size:12px; filter:alpha(opacity=50); -moz-opacity:0.5; opacity: 0.5;}
.homepageEditProfileIcon {background:url(../images/homepage_icon.png) -11px -35px no-repeat; width:20px; height:20px; display:block;}
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:20px; float:left;}
.homepageImageSex {float:left; top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
.homepageSignature {font-size:12px; color:#888888; margin-left:15px; margin-top:10px; margin-bottom:12px; width:208px;}
.homepageImageBlock {margin:0 26px; float:left; text-align:center; display:inline-block;}
.homepageImageBlock {margin:0 auto; width:78px; float:left; text-align:center; display:inline-block;}
.homepageImageNumber {font-size:12px; color:#484848;}
a.homepageImageNumber:hover {color:#15bccf;}
.homepageImageText {width:26px; font-size:12px; color:#888888;}
.homepageImageText {font-size:12px; color:#888888;}
.homepageVerDiv {height:28px; vertical-align:middle; width:1px; float:left; display:inline-block; background-color:#d1d1d1; margin-top:3px;}
.homepageLeftMenuContainer {width:238px; border:1px solid #dddddd; border-bottom:none; background-color:#ffffff; margin-top:10px;}
.homepageLeftMenuBlock {border-bottom:1px solid #dddddd; height:50px; line-height:50px; vertical-align:middle;}
.homepageLeftMenuCourses {font-size:14px; border-bottom:1px solid #dddddd;}
.homepageLeftMenuCoursesLine {padding-left:25px; height:38px; line-height:38px; vertical-align:middle;}
.homepageLeftMenuCoursesLine:hover {background-color:#b3e0ee;}
a.coursesLineGrey {color:#484848; display:block;}
a.coursesLineGrey:hover {color:#ffffff;}
.homepageLeftMenuMore {height:18px;}
.homepageLeftMenuMore:hover {background-color:#b3e0ee;}
.homepageLeftMenuMoreIcon {background:url(../images/homepage_icon.png) -74px -240px no-repeat; display:block; height:18px;}
.homepageMenuSetting {display:inline-block; margin-left:155px;}
a.homepageMenuText {color:#484848; font-size:16px; margin-left:20px;}
.homepageLeftLabelContainer {width:238px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px;}
.homepageLabelText {color:#484848; font-size:16px; margin-left:10px; margin-bottom:12px; display:block;}
.homepageRightBanner {width:720px; height:34px; margin:0px auto; border-bottom:1px solid #e9e9e9;}
.NewsBannerName {font-size:16px; color:#4b4b4b; display:block; background:url(../images/homepage_icon.png) -18px -230px no-repeat; width:150px; float:left; padding-left:15px; margin-top:4px;}
.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:35px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;}
.newsType {width:60px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-40px; font-size:12px; color:#888888; display:none; line-height:2; z-index:9999;}
.homepageRightBlock {}
.homepageNewsList {width:710px; height:49px; line-height:49px; vertical-align:middle; border-bottom:1px dashed #eaeaea; margin-left:10px;}
.homepageNewsPortrait {width:40px; display:block; margin-top:7px;}
@ -434,14 +445,24 @@ a.homepageWhite {color:#ffffff;}
a.homepageWhite:hover {color:#a1ebff}
a.newsGrey {color:#4b4b4b;}
a.newsGrey:hover {color:#000000;}
a.replyGrey {color:#888888;}
a.replyGrey:hover {color:#000000;}
a.replyGrey {color:#888888; display:block;}
a.replyGrey:hover {color:#4b4b4b;}
a.newsBlue {color:#15bccf;}
a.newsBlue:hover {color:#0781b4;}
a.menuGrey {color:#808080;}
a.menuGrey:hover {color:#fe7d68;}
/*个人主页右部分*/
.homepagePostType {width:180px; background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:5px 10px; left:-170px; font-size:12px; color:#4b4b4b; line-height:2; z-index:9999; display:none;}
.homepagePostTypeHomework {width:100px;}
.homepagePostTypeProject {width:80px;}
a.homepagePostTypeAssignment {background:url(../images/homepage_icon.png) -93px -318px no-repeat; padding-left:23px;}
a.homepagePostTypeNotice {background:url(../images/homepage_icon.png) -87px -280px no-repeat; padding-left:23px;}
a.homepagePostTypeForum {background:url(../images/homepage_icon.png) -10px -310px no-repeat; padding-left:23px;}
a.homepagePostTypeQuiz {background:url(../images/homepage_icon.png) -90px -124px no-repeat; padding-left:23px;}
a.homepagePostTypeQuestion {background:url(../images/homepage_icon.png) -10px -273px no-repeat; padding-left:23px;}
a.postTypeGrey {color:#888888;}
a.postTypeGrey:hover {color:#15bccf;}
.homepagePostBrief {width:710px; margin:20px auto 0px auto; position:relative;}
.homepagePostPortrait {float:left; width:90px;}
.homepagePostDes {float:left; width:600px; margin-left:20px;}
@ -449,9 +470,10 @@ a.menuGrey:hover {color:#fe7d68;}
.homepagePostTitle {font-size:14px; color:#484848; margin-bottom:15px;}
.homepagePostSubmitContainer {height:30px; margin-bottom:15px;}
.homepagePostSubmit {font-size:14px; color:#888888; width:80px; height:30px; text-align:center; vertical-align:middle; line-height:30px; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px;}
.homepagePostIntro {font-size:12px; color:#888888; margin-bottom:15px;}
.homepagePostSubmit:hover {background-color:#d8d8d8;}
.homepagePostIntro {font-size:12px; color:#888888;}
.homepagePostDeadline {font-size:12px; color:#888888; float:left; height:30px; line-height:30px; vertical-align:middle;}
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1;}
.homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:15px;}
.homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;}
.borderBottomNone {border-bottom:none !important;}
.homepagePostReplyBannerCount{width:255px; display:inline-block; margin-left:20px;}
@ -461,19 +483,32 @@ a.menuGrey:hover {color:#fe7d68;}
.homepagePostReplyInput {width:663px; height:45px; max-width:663px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:20px auto 10px auto;}
.homepagePostReplyEmotion {background:url(../images/homepage_icon.png) -90px -88px no-repeat; width:70px; height:24px; float:left; padding-left:30px;}
.homepagePostReplySubmit {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#ffffff; background-color:#15bccf;}
.homepagePostReplySubmit:hover {background-color:#329cbd;}
a.postReplySubmit {color:#ffffff; display:block;}
.homepagePostReplyCancel {float:right; width:45px; height:24px; text-align:center; line-height:24px; vertical-align:middle; font-size:12px; color:#888888; background-color:#cecece; margin-left:8px;}
.homepagePostReplyCancel:hover {background-color:#717171;}
a.postReplyCancel {color:#888888; display:block;}
a.postReplyCancel:hover {color:#ffffff;}
.homepagePostReplyInputContainer2 {width:595px; margin:0px auto;}
.homepagePostReplyInput2 {width:588px; height:45px; max-width:588px; max-height:45px; border:1px solid #d9d9d9; outline:none; margin:0px auto 10px auto;}
.homepagePostReplyContainer {border-bottom:1px solid #e3e3e3; width:670px; margin:0px auto; margin-top:15px; min-height:65px;}
.homepagePostSetting {position:absolute; background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px; right:0px; top:0px;}
.homepagePostSetting {position:absolute; width:20px; height:20px; right:0px; top:0px;}
.homepagePostSettingIcon {background:url(../images/homepage_icon.png) -93px -5px no-repeat; width:20px; height:20px;}
.homepagePostSettiongText {width:85px; line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:-68px; top:20px; padding:5px 0px; display:none;}
.homepagePostSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
a.postOptionLink {color:#616060; display:block; width:55px; padding:0px 15px;}
a.postOptionLink:hover {color:#ffffff; background-color:#15bccf;}
.homepagePostReplyPortrait {float:left; width:60px;}
.homepagePostReplyDes {float:left; width:595px; margin-left:15px;}
.homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:12px;}
.homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;}
.homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}
.homepagePostAssignTo {float:left; font-size:14px; color:#15bccf; height:30px; line-height:30px; vertical-align:middle;}
.homepagePostFileAtt {height:18px; line-height:18px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:12px; color:#888888;}
.homepagePostImageAtt {height:18px; line-height:18px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:12px; color:#888888;}
.homepagePostFileAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -85px -150px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;}
.homepagePostImageAtt {height:22px; line-height:22px; vertical-align:middle; background:url(../images/homepage_icon.png) -86px -195px no-repeat; padding-left:35px; font-size:14px; margin-right:25px;}
.postAttSize {color:#888888; font-size:12px;}
a.postGrey {color:#484848;}
a.postGrey:hover {color:#000000;}