静态页面的修改

This commit is contained in:
chenglong 2017-04-21 20:06:54 +08:00
parent 046f73d2c6
commit 8e2cce8fd2
6 changed files with 83 additions and 69 deletions

View File

@ -25,12 +25,12 @@
<div class="fens clearfix">
<% @user_watchlist.each do |user| %>
<dl class="list fl">
<dt><%= link_to image_tag(url_to_avatar(user), width: "56", height: "56", :alt => "头像"), user_path(user), :target => '_blank' %></dt>
<dt><%= link_to image_tag(url_to_avatar(user), :width => "56", :height => "56", :class => "touxiang", :alt => "头像"), user_path(user), :target => '_blank', :class => "" %></dt>
<dd class="mb10"><%= link_to user.show_name, user_path(user), :target => '_blank' %></dd>
</dl>
<% end %>
<% if @user_watchlist_count > 12 %>
<%= link_to '查看更多', user_watchlist_user_path(@user), :target => '_blank', :class => 'color-grey' %>
<%= link_to '查看更多', user_watchlist_user_path(@user), :target => '_blank', :class => 'color-grey many' %>
<% end %>
</div>
<% end %>
@ -49,12 +49,12 @@
<div class="fens clearfix">
<% @user_fanlist.each do |user| %>
<dl class="list fl">
<dt><%= link_to image_tag(url_to_avatar(user), width: "56", height: "56", :alt => "头像"), user_path(user), :target => '_blank' %></dt>
<dt><%= link_to image_tag(url_to_avatar(user), :width => "56", :height => "56", :class => "touxiang", :alt => "头像"), user_path(user), :target => '_blank', :class => "" %></dt>
<dd class="mb10"><%= link_to user.show_name, user_path(user), :target => '_blank' %></dd>
</dl>
<% end %>
<% if @user_fanlist_count > 12 %>
<%= link_to '查看更多', user_fanslist_user_path(@user), :target => '_blank', :class => 'color-grey' %>
<%= link_to '查看更多', user_fanslist_user_path(@user), :target => '_blank', :class => 'color-grey many' %>
<% end %>
</div>
<% end %>

View File

@ -5,15 +5,19 @@
<div class="photo fl">
<%= image_tag(url_to_avatar(@user), :class => "person", :alt => "头像") %>
<% if current_user %>
<div class="changephoto font-14">更换头像</div>
<div class="changephoto font-14"><div class="subchange">更换头像</div></div>
<% end %>
</div>
<div class="-task-con-data fl">
<div class="top cl">
<div class="top-left fl">
<p class="p1 mt20 mb20 font-16">
<p class="p1 font-16 ">
<span><%= @user.login %></span>
<i class="fa fa-venus" aria-hidden="true"></i>
<% if @user.user_extensions && @user.user_extensions.gender && @user.user_extensions.gender == 1 %>
<i class="pl20 fa fa-venus color-orange" aria-hidden="true"></i>
<% else %>
<i class="pl20 fa fa-mars color-blue" aria-hidden="true"></i>
<% end %>
</p>
<p class="p2 font-16">
@ -41,7 +45,7 @@
<% end %>
</p>
</div>
<div class="top-right fr font-16 mt15 mr10">
<div class="top-right fr font-16 mr10">
<% if current_user %>
<div class="mynew">
<p>
@ -60,13 +64,13 @@
</a>
<a class="<%= @user.mail.blank? ? 'color-grey' : 'color-green' %>" href="<%= security_settings_path %>">
<i class="fa fa-envelope-o pr10" aria-hidden="true"></i>
<i class="fa fa-envelope-o" aria-hidden="true"></i>
</a>
</p>
</div>
<% else %>
<div class="itnew">
<p class="p2 font-14 color-grey">
<p class="p2 font-14 color-grey mt10 mb10">
<i class="fa fa-eye" aria-hidden="true"></i>
<span><%= @user.visits.to_i %></span> 次访问
</p>
@ -75,7 +79,7 @@
<% if(@user.watched_by?(User.current)) %>
<%= link_to "已关注",
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id),
:class => "fl font-14 user_watch",
:class => "fl font-14 user_watch ml30",
:id => "cancel_watch",
:method => "delete",
:remote => "true",
@ -83,7 +87,7 @@
<% else %>
<%= link_to "添加关注",
watch_path(:object_type => 'user', :object_id => @user.id, :target_id => @user.id),
:class => "fl font-14 user_watch",
:class => "fl font-14 user_watch ml30",
:method => "post",
:remote => "true",
:title => "添加关注" %>
@ -101,9 +105,9 @@
<div class="bot">
<% if current_user %>
<input type="hidden" id="current_user_id" value="<%= @user.id %>">
<input type="text" class="font-14 task-hide" id="user_breif_introduction" placeholder="一句话介绍一下自己吧~" value="<%= @user.user_extensions.brief_introduction %>"/>
<input type="text" class="font-14 task-hide color-grey" id="user_breif_introduction" placeholder="一句话介绍一下自己吧~" value="<%= @user.user_extensions.brief_introduction %>"/>
<% else %>
<p class="font-14 task-hide" title="<%= @user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没留下~" : @user.user_extensions.brief_introduction %>">
<p class="font-14 task-hide color-grey" title="<%= @user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没留下~" : @user.user_extensions.brief_introduction %>">
<%= @user.user_extensions.brief_introduction.blank? ? "这家伙很懒,什么都没留下~" : @user.user_extensions.brief_introduction %>
</p>
<% end %>
@ -150,13 +154,16 @@
<div class="pr10 color-blue play">
<i class="fa fa-sort-down zhuan mr5" aria-hidden="true"></i>开始
</div>
<ul class="list">
<li><%= link_to '创建课程', new_syllabus_path(:host => Setting.host_course), :target => "_blank" %></li>
<li><%= link_to '创建班级', new_course_path(:host => Setting.host_course), :target => "_blank" %></li>
<li><%= link_to "加入班级", join_private_courses_courses_path, :remote => true, :method => "post" %></li>
<li><%= link_to "发现实训", '', :target => "_blank" %></li>
<li><%= link_to '发起求助', new_forum_memo_path(:forum_id => Forum.first.id, :forum_index => true), :target => "_blank" %></li>
</ul>
<div class="list">
<ul>
<li><%= link_to '创建课程', new_syllabus_path(:host => Setting.host_course), :target => "_blank" %></li>
<li><%= link_to '创建班级', new_course_path(:host => Setting.host_course), :target => "_blank" %></li>
<li><%= link_to "加入班级", join_private_courses_courses_path, :remote => true, :method => "post" %></li>
<li><%= link_to "发现实训", '', :target => "_blank" %></li>
<li><%= link_to '发起求助', new_forum_memo_path(:forum_id => Forum.first.id, :forum_index => true), :target => "_blank" %></li>
</ul>
</div>
</div>
<% if @courses_count == 0 && @shixuns_count == 0 %>
<div class="kong">
@ -165,7 +172,7 @@
</p>
<div class="p2 font-14 color-grey">
<img src="../images/edu_user/logo1.jpg"/>
<img src="../images/edu_user/edu-nodata.png"/>
<p>显示你常用的课堂社区、实训社区列表</p>
@ -188,10 +195,10 @@
<div class="lesson ml10 mr10" id="my_courses_list">
<% @courses.each do |course| %>
<p>
<a href="<%= course_path(course) %>" target="_blank" class="font-16"><i class="fa fa-dot-circle-o color-grey" aria-hidden="true"></i>&nbsp;&nbsp;<%= course.name %></a>
<a href="<%= course_path(course) %>" target="_blank" class="font-16 first"><i class="fa fa-circle qian" aria-hidden="true"></i>&nbsp;&nbsp;<%= course.name %></a>
<span class="font-14 hasmargin">课程:<a href="<%= syllabus_path(course.syllabus) %>" target="_blank"><%= course.syllabus.title %></a></span>
<span class="font-14 haspadding">更新时间:<%= format_time course.updatetime %></span>
<span class="font-14">分享<i class="fa fa-weixin font-14" aria-hidden="true"></i></span>
<span class="font-14 last">分享&nbsp;&nbsp;<i class="fa fa-weixin font-14 color-green" aria-hidden="true"></i></span>
</p>
<% end %>
<% if @courses_count > 8 %>
@ -202,9 +209,9 @@
<div class="train ml10 mr10 none" id="my_shixuns_list">
<% @shixuns.each do |shixun| %>
<p>
<span class="font-16"><i class="fa fa-dot-circle-o color-grey" aria-hidden="true"></i>&nbsp;&nbsp;胡莎莎/Helloword:java实训入门</span>
<span class="font-16 first"><i class="fa fa-circle qian" aria-hidden="true"></i>&nbsp;&nbsp;胡莎莎/Helloword:java实训入门</span>
<span class="hasmargin font-14">已解锁第<i>2</i>关/共<i>8</i>关</span>
<span class="font-14">上次离开时间2017-02-09 15:21</span>
<span class="font-14 last">上次离开时间2017-02-09 15:21</span>
</p>
<% end %>
@ -226,9 +233,9 @@
<i class="fa fa-qrcode" aria-hidden="true"></i>
</div>
<div class="consult" tooltips="在线咨询">
<a target="_blank" class="color_white" href="http://shang.qq.com/wpa/qunwpa?idkey=064e805dac955b8aea158c4b0dd3f033b8841bcee175fd619613f0e4ac4d8151"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
<a target="_blank" class="color_white" href="http://shang.qq.com/wpa/qunwpa?idkey=064e805dac955b8aea158c4b0dd3f033b8841bcee175fd619613f0e4ac4d8151"><i class="fa fa-qq" aria-hidden="true"></i></a>
</div>
<div class="gotop" tooltips="返回顶部">
<i class="fa fa-arrow-up" aria-hidden="true"></i>
</div>
</div>
</div>

View File

@ -1,6 +1,6 @@
class ResourceBankMigration < ActiveRecord::Migration
def up
#add_column :attachments, :resource_bank_id, :integer
add_column :attachments, :resource_bank_id, :integer
count =Attachment.where(:container_type => 'Course').count / 30 + 2
transaction do

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -3,30 +3,21 @@
*/
//-------------------浮动“开始”出现增加课程列表----------------//
$(function(){
$(".-task-con-int .passageway .hint ").mouseenter(function(){
$(".-task-con-int .passageway .hint ").mouseenter(function() {
$(".-task-con-int .passageway .hint .list").show();
$(".-task-con-int .passageway .hint .list").css({
opacity:0,
}).stop().animate({
opacity:1
},1000);
});
$(".-task-con-int .passageway .hint .list li").hover(function(e){
$(e.target).css({
background:"#e6e6e6"
})
},function(e){
$(e.target).css({
background:"#fff"
})
$(".-task-con-int .passageway .hint .list li").hover(function (e) {
$(e.target).css({
background: "#e6e6e6"
});
}, function (e) {
$(e.target).css({
background: "#fff"
});
});
});
$(".-task-con-int .passageway .hint").mouseleave(function(){
$(".-task-con-int .passageway .hint .list").hide();
$(".-task-con-int .passageway .hint .list").css({
opacity:1,
}).stop().animate({
opacity:0
},1000);
});
});

View File

@ -2,24 +2,27 @@
.-task-con{width:1200px;margin:20px auto;}
/*个人信息*/
.-task-con-per{width:100%;background:#fff;}
.-task-con-per .photo{width:150px;position:relative;margin:1%;}
.-task-con-per .photo .person{width:150px;height:150px;}
.-task-con-per .photo .changephoto{width:100%;text-align:center;line-height:38px;color:#fff;background:black;opacity:0.4;filter: alpha(opacity=40);position:absolute;bottom:0;left:0;cursor: pointer;}
.-task-con-data{width:85%;}
.-task-con-per .photo{width:9%;position:relative;margin:1%;}
.-task-con-per .photo .person{width:100%;height:100px;}
.-task-con-per .photo .changephoto{width:100%;position:absolute;bottom:0;left:0;cursor: pointer;}
.-task-con-per .photo .changephoto .subchange{width:100%;text-align:center;line-height:26px;color:#fff;background:black;opacity:0.4;filter: alpha(opacity=40);}
.-task-con-data{width:89%;}
.-task-con-data .top{width:100%;}
.-task-con-data .top .top-left{width:46%;}
.-task-con-data .top .top-left .p1{margin:5px 0;}
.-task-con-data .top .top-right{width:20%;text-align: right;}
.-task-con-data .top .top-right .mynew{display:block;width:100%;}
.-task-con-data .top .top-right .mynew p a{color:#5789c8;}
.-task-con-data .top .top-right .mynew .p2{line-height:50px;color:#ccc;}
.-task-con-data .top .top-right .mynew .p2{color:#ccc;}
.-task-con-data .top .top-right .mynew p .fa{position:relative;}
.-task-con-data .top .top-right .mynew p .fa .fa-check,.fa-close{position:absolute;left:8px;bottom:0;display:none;}
.-task-con-data .bot{width:100%;}
.-task-con-data .top .top-right .itnew .p2{padding:20px 0 10px 0}
.-task-con-data .top .top-right .itnew .sub a{border:1px solid #eee;display:inline-block;padding:2px 10px;text-align:center;width: 57px;}
/*.-task-con-data .top .top-right .itnew .p2{}*/
.-task-con-data .top .top-right .itnew .sub a{border:1px solid #e5e5e5;display:inline-block;padding:2px 10px;text-align:center;width: 57px;border-radius:5px;}
.-task-con-data .top .top-right .itnew .sub a:hover{background:#f0f0f0;}
.-task-con-data .top .top-right .itnew .sub{width:100%;}
.-task-con-data .bot input{width:100%;height:60px;line-height:60px;border:none;outline:none;background:#fff;}
.-task-con-data .bot p{width: 100%; height: 45px; padding-top: 33px; background: #fff;}
.-task-con-data .bot input{width:100%;height:40px;line-height:40px;border:none;outline:none;background:#fff;}
.-task-con-data .bot p{width: 100%; height: 25px; background: #fff;}
/*-----------------博客------------------------*/
.-task-con-int .blog,.favour{width:100%;margin-top:15px;background:#fff;}
.-task-con-int .blog .p1{width:100%;height:40px;background:#f2f2f2;line-height:40px;text-indent:10px;}
@ -27,7 +30,7 @@
.-task-con-int .blog .p2{line-height:90px;text-align:center;}
.-task-con-int .blog .p2:hover .changecolor{color:#29bd8b;}
.-task-con-int .blog .p3{height:90px;position:relative;}
.-task-con-int .blog .p3 .check{position:absolute;right:10px;top:-27px;}
.-task-con-int .blog .p3 .check{position:absolute;right:10px;top:-30px;}
.-task-con-int .blog .p3 .blognew{width:32%;}
.-task-con-int .blog .p3 .hasborder{border-left:1px solid #eee;}
.-task-con-int .blog .p3 .blognew .font-14{height:60px;display:flex;align-items: center;color:#333;}
@ -39,23 +42,26 @@
.-task-con-int .favour .p1 .span1{background:#fefefe;}
.-task-con-int .favour .p2{line-height:90px;text-align:center;}
.-task-con-int .favour .p2:hover .changecolor{color:#29bd8b;}
/*.-task-con-int .favour .fens{position:relative;}*/
/*.-task-con-int .favour .fens a{position:absolute;right:10px;top:10px;}*/
.-task-con-int .favour .fens .list{width:100px;text-align:center;}
.-task-con-int .favour .fens .list dt{margin:20px;}
.-task-con-int .favour .fens{position:relative;}
.-task-con-int .favour .fens .many{position:absolute;right:10px;top:2px;}
.-task-con-int .favour .fens .list{width:100px;text-align:center;padding-top:5px;}
.-task-con-int .favour .fens .list dt{margin:20px;margin-bottom:5px;}
.-task-con-int .favour .fens .touxiang{border-radius:28px;overflow:hidden;}
/*-----------------------入口------------------------*/
.-task-con-int .passageway{width:100%;background:#fff;position:relative;}
.-task-con-int .passageway .hint{position:absolute;top:0;right:0;width:80px;text-align:center;}
.-task-con-int .passageway .hint .play{display:block;line-height:40px;}
.-task-con-int .passageway .hint .list{-webkit-box-shadow: 0 0 3px #999; -moz-box-shadow: 0 0 3px #999; box-shadow: 0 0 3px #999;cursor:pointer;display:none;opacity:0;}
.-task-con-int .passageway .hint .list li{border-radius:2px; padding-top:1px;}
/*.-task-con-int .passageway .hint .list{cursor:pointer;display:none;}*/
/*.-task-con-int .passageway .hint .list li{border-radius:2px; padding-top:1px;z-index:100;}*/
.-task-con-int .passageway .kong .p1{background:#f2f2f2;line-height:40px;}
.-task-con-int .passageway .kong .p1 span{text-indent:10px;}
.-task-con-int .passageway .kong .p2{width:100%;position:relative;}
.-task-con-int .passageway .kong .p2 img{ padding:100px 0 30px 500px;}
.-task-con-int .passageway .kong .p2 p{text-align:center;width:100%;line-height:30px;}
.-task-con-int .passageway .hint .list{width:80px;text-align:center;-webkit-box-shadow: 0 0 3px #999; -moz-box-shadow: 0 0 3px #999; box-shadow: 0 0 3px #999;cursor:pointer; }
.-task-con-int .passageway .hint .list{ cursor:pointer;display:none;background:#000; }
.-task-con-int .passageway .hint .list ul{width:80px;text-align:center;-webkit-box-shadow: 0 0 3px #999; -moz-box-shadow: 0 0 3px #999; box-shadow: 0 0 3px #999;background:#fff;}
.-task-con-int .passageway .hint .list li{border-radius:2px; padding-top:1px;}
.-task-con-int .passageway .hascon i{font-style:normal;}
.-task-con-int .passageway .hascon .title{background:#f2f2f2;line-height:40px;}
@ -63,9 +69,19 @@
.-task-con-int .passageway .hascon .title span i{font-size:12px;font-style:normal;padding:0 5px;border-radius:8px;background:#ddd;line-height:14px;}
.-task-con-int .passageway .hascon .lesson p{height:70px;line-height:70px;border-bottom:1px dotted #eee;}
.-task-con-int .passageway .hascon .train p{height:70px;line-height:70px;border-bottom:1px dotted #eee;}
.-task-con-int .passageway .hascon .lesson p .hasmargin{margin: 0 4.2% 0 21.7%;}
.-task-con-int .passageway .hascon .lesson p .haspadding{margin: 0 8.3%;}
.-task-con-int .passageway .hascon .train p .hasmargin{margin: 0 12.5% 0 25%;}
.-task-con-int .passageway .hascon .lesson p .first{width:25%;display:inline-block;}
.-task-con-int .passageway .hascon .lesson p .qian{color:#ddd;}
.-task-con-int .passageway .hascon .train p .qian{color:#ddd;}
.-task-con-int .passageway .hascon .lesson p .hasmargin{width:16.7%;display:inline-block;margin:0 10%;color:#888;}
.-task-con-int .passageway .hascon .lesson p .haspadding{width:16.7%;display:inline-block;margin-right:12%;color:#888;}
.-task-con-int .passageway .hascon .lesson p .last{width:8.33%;display:inline-block;color:#888;}
.-task-con-int .passageway .hascon .train p .first{width:25%;display:inline-block;}
.-task-con-int .passageway .hascon .train p .hasmargin{width:16.7%;margin: 0 16.7%;color:#888;}
.-task-con-int .passageway .hascon .train p .last{width:25%;display:inline-block;color:#888;}
.-task-con-int .passageway .hascon .lesson p:hover a{color:#51a74f;}
.-task-con-int .passageway .hascon .lesson p:hover .qian{color:#51a74f;}
.-task-con-int .passageway .hascon .train p:hover a{color:#51a74f;}
.-task-con-int .passageway .hascon .train p:hover .qian{color:#51a74f;}
.-task-con-int .passageway .hascon .expand{display:block;;height:70px;line-height:70px;text-align:center;;border-bottom:1px dotted #eee;}
/*--------------------------------------箭头动画效果-----------------------------------*/
.-task-con-int .passageway .hint .zhuan{