首页登录等功能

This commit is contained in:
huang 2017-01-20 15:26:20 +08:00
parent b913164bf1
commit 4c0b40fd88
15 changed files with 255 additions and 55 deletions

View File

@ -42,7 +42,7 @@ class AccountController < ApplicationController
redirect_to user_path(User.current)
end
else
render :layout => 'login'
render :layout => 'login_bigdata'
end
else
authenticate_user

View File

@ -1,6 +1,3 @@
<%= stylesheet_link_tag 'css/common'%>
<%= stylesheet_link_tag 'css/public'%>
<script type="text/javascript">
$(document).ready(function(){
$(".homepageSearchIcon").click(function(){
@ -129,18 +126,18 @@
});
</script>
<div class="new_login" id = "loginInBox">
<div class="new_login">
<div class="new_login_con">
<div class="new_login_txt fl">
<h3> 欢迎加入Trustie创新实践社区</h3>
<p>在这里您的创新意识和创新潜力将得到充分发挥目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。</p>
</div>
<div class="new_login_box fr mr45 mt100">
<% if @message %>
<div class="new_login_box fr ">
<% if @message == "成功" %>
<p class="f14 mb5" style=" color:#fff;"><i class="icon-ok mr5"></i><%= h @message %></p>
<% end %>
<h2 class="new_login_h2">登录
<a href="<%= register_url_without_domain %>" class="fr mt5">立即注册</a><div class="cl"></div>
<a href="<%= register_url_without_domain %>" class="fr mt5" style="color:#fff;">立即注册</a><div class="cl"></div>
</h2>
<div class="new_login_form">
<%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %>
@ -149,16 +146,15 @@
<li class="new_loggin_users">
<%= text_field_tag 'username', params[:username], :tabindex => '1', :class=>'new_loggin_input',:placeholder=>'请输入邮箱地址或登录名', :onkeypress => "user_name_keypress(event);"%>
</li>
<li class="new_login_lock">
<li class="new_loggin_li new_login_lock">
<%= password_field_tag 'password', nil, :tabindex => '2', :class => 'new_loggin_input' , :placeholder => '请输入登录密码', :onkeypress => "user_name_keypress(event);"%>
<p class="new_login_error"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></p>
</li>
<li>
<% if Setting.autologin? %>
<label><%= check_box_tag 'autologin', 1, true, :tabindex => 4, :class => "new_login_check" %><%= l(:label_stay_logged_in) %></label>
<% end %>
<a href="<%= lost_password_path %>" class="fr">
<a href="<%= lost_password_path %>" class="fr" style="color:#fff;">
<% if Setting.lost_password? %>忘记密码<% end %>
</a>
<div class="cl"></div>
@ -167,55 +163,93 @@
</ul>
<% end %>
</div>
</div>
<div class="cl"></div>
</div>
</div>
<%# 注册 %>
<div class="new_register" id = "signUpBox">
<div class="new_register_con">
<div class="new_login_txt fl new_register_left">
<h3> 欢迎加入Trustie创新实践社区</h3>
<p>在这里您的创新意识和创新潜力将得到充分发挥目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。</p>
<div class="new-container">
<div class="new-container-inner clearfix">
<div class="inner-img fl "><img src="/images/bigdata/banner01.png" width="750" alt="高校教育大数据服务平台"></div>
<div class="inner-txt fr mt30 ">
<h3 class="inner-txt-h3">教为不教,学为创造</h3>
<p class="inner-txt-p mb10">引入最流行的分布式版本控制系统Git支持一体化教学实践
建立标准化的互联网教学实践流程</p>
<p class="inner-txt-p">
激发教学兴趣与创新热情,让学习生活更美好
</p>
<ul class="guanzhu-box">
<li>
<a href="javascript:void(0);" class="new-bigbtn new-bigbtn-green">关注</a>
<ul class="guanzhu-img-box">
<li><img src="/images/bigdata/trustie_QR.jpg" width="120" height="120" alt="高校教育大数据服务平台" class="img-guanzhu" ></li>
</ul>
</li>
</ul>
</div>
<div class="new_login_box fr mr45 mt50">
<h2 class="new_login_h2">注册<a href="<%= signin_url_without_domain %>" class="fr mt5">已有账号 请登录</a><div class="cl"></div></h2>
<div class="new_login_form">
<%= form_for :user, :url => register_path,:method=>'post', :html => {:id=>'main_reg_form'} do |f| %>
<%= error_messages_for 'user' %>
<ul>
<li class="new_register_li">
<%= f.text_field :mail, :size => 25, :class => 'new_register_input' , :placeholder => "请输入邮箱地址"%>
<p class="new_login_error" id="mail_req" style="display: none" >请输入正确的邮箱</p>
</li>
<li class="new_register_li">
<%= f.password_field :password, :size => 25, :placeholder => "请输入密码", :class => 'new_register_input' %>
<p class="new_login_error" id="passwd_req" style="display: none">请输入6-16位密码区分大小写不能使用空格</p>
</li>
<li class="new_register_li">
<%= f.password_field :password_confirmation, :size => 25, :placeholder => "请再次输入密码", :class=> 'new_register_input' %>
<p class="new_login_error" id="confirm_req" style="display: none">两次密码不一致!</p>
</li>
<li class="new_register_li mb8">
<%= f.text_field :login, :size => 25, :placeholder => "请输入用户登录名", :class => 'new_register_input'%>
</li>
<li class="mb8">
<p class="new_login_error" id="login_req" style="display: none">只能使用英文字母和数字必须以字母开头长度不少于4个字符、不超过15个字符</p>
</li>
<li>
<label><input type="checkbox" checked id="read_and_confirm" onchange="changeRegisterBtn(this);" class=" new_login_check">我已阅读并接受<a href="<%= agreement_path %>" >Trustie服务协议条款</a></label>
</li>
<li>
<div class="new_login_submit" id="loginUpButton">
<a href="javascript:void(0);" id="regist_btn" onclick="register();" class ="db" style="text-decoration: none;">注册</a>
</div>
</ul>
<% end %>
</div>
</div>
<div class="cl"></div>
</div>
</div>
<div class="new-container back-color-grey">
<div class="new-container-inner clearfix ">
<div class="inner-txt fl mt30 ">
<h3 class="inner-txt-h3">丰富的协同与评测工具</h3>
<p class="inner-txt-p mb10">群体化的交流与分享机制,让在线教学与课堂互动无缝融合</p>
<p class="inner-txt-p mb10">
强大的在线编程自动评判系统,引导学生主动发现与解决问题,提高
学生的学习主动性
</p>
<p class="inner-txt-p mb10">
让每一个参与者的获得感和荣誉感天天向上
</p>
<a href="javascript:void(0);" class="new-bigbtn new-bigbtn-green">开课</a>
</div>
<div class="inner-img fr "><img src="/images/bigdata/banner03.png" width="750" alt="高校教育大数据服务平台"></div>
</div>
</div>
<div class="new-container">
<div class="new-container-inner clearfix">
<div class="inner-img fl "><img src="/images/bigdata/banner04.png" width="750" alt="高校教育大数据服务平台"></div>
<div class="inner-txt fr mt30 ">
<h3 class="inner-txt-h3">便捷复用教学资源套件</h3>
<p class="inner-txt-p mb10">新型的系列化课程资源单元,支持高质量教学方案的体系化复用,
能够极大加快课程体系建设,让教师便捷复用顶尖高校的教学过程及资源。</p>
<p class="inner-txt-p">
覆盖整个课程教学周期
</p>
<p class="inner-txt-p">
即插即用,自动发布
</p>
<%= link_to "资源库", user_resource_user_path(User.current, :type => 1), :class => "new-bigbtn new-bigbtn-green", :target => "_blank" %>
</div>
</div>
</div>
<div class="new-container back-color-grey">
<div class="new-container-inner clearfix ">
<div class="inner-txt fl mt30 ">
<h3 class="inner-txt-h3">精准推荐开发课程</h3>
<p class="inner-txt-p mb10">我们将互联网的大规模高品质教学资源,精准推荐给不同专业的师生群体,
拓展学生的学习视野和学习兴趣。</p>
<a href="http://ossean.trustie.net/" class="new-bigbtn new-bigbtn-green" target="_blank">开源检索</a>
</div>
<div class="inner-img fr "><img src="/images/bigdata/banner05.png" width="750" alt="高校教育大数据服务平台"></div>
</div>
</div>
<div class="new-container">
<div class="new-container-inner clearfix">
<div class="inner-img fl "><img src="/images/bigdata/banner06.png" width="750" alt="高校教育大数据服务平台"></div>
<div class="inner-txt fr mt30 ">
<h3 class="inner-txt-h3">实时大数据分析报告</h3>
<p class="inner-txt-p mb10">采集和分析教学活动的全生命期数据,为教育者、学习者、管理者提供
宏观态势和微观度量报告,实现数据驱动的高校教学改革</p>
<p class="inner-txt-p">
以接近全息的方式记录教学和实践历史,支持各种深度数据分析,能够极大
提升教学评估的效率、降低教学评估的代价
</p>
<a href="javascript:void(0);" class="new-bigbtn new-bigbtn-green">分析报告</a>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,10 @@
<footer class="footer">
<div class="footer_con">
<ul class="clearfix footer_con-inner">
<li><a href="<%= agreement_path %>" class="fl" target="_blank">服务协议</a></li>
<li><%= link_to l(:label_surpport_group), "#{Setting.protocol}://#{Setting.host_name}/forums/1/memos/1168", :class => "fl", :target=>"_blank" %></li>
<li><a href="<%= forums_path %>" class="fl" target="_blank" style="border:none;"><%= l(:label_forums)%></a></li>
</ul>
<p class="footer_con-p">Copyright 2007~2016, All Rights Reserved湘ICP备09019772</p>
</div>
</footer>

View File

@ -0,0 +1,45 @@
<div class="header_con">
<div class="fl clearfix new-logo">
<%= link_to image_tag("../images/bigdata/new-logo.png",width:"51px", height: "45px", alt:"高校教育大数据服务平台", class:"fl "), signin_path %>
<p class="fl ml10 ">高校教育大数据服务平台</p>
</div>
<a href="<%= register_url_without_domain %>" class="fr new-btn mt10">注册</a>
<a href="<%= signin_url_without_domain %>" class="fr new-btn new-btn-green mr5 mt10">登录</a>
<div id="navHomepageSearch">
<% name = name%>
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" id="navHomepageSearchInput" class="new-search fr mr10" placeholder="请输入关键词进行搜索" onkeypress="search_in_header_I(event,$(this));"/>
<input type="hidden" name="search_type" id="type" value="all"/>
<input type="text" style="display: none;"/>
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="search_in_header($(this));"></a>
<% end %>
</div>
<%= link_to "问吧", forums_path, :class =>"fr new-nav-a mr10", :target => "_blank" %>
</div>
<script>
//搜索相关
$("#navHomepageSearch").mouseover(function(){
$("#navHomepageSearchType").show();
}).mouseout(function(){
$("#navHomepageSearchType").hide();
});
function search(doc){
$(doc).parent().submit();
}
function search_in_header(obj){
var name = $.trim($('#navHomepageSearchInput').val());
if (name != "" && name.length != 0) {
obj.parent().submit();
}
}
function search_in_header_I(e,obj){
var name = $.trim($('#navHomepageSearchInput').val());
if (e.keyCode == '13' && name != "" && name.length != 0) {
obj.parent().submit();
}
}
</script>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title><%= h html_title %></title>
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'css/login' %>
<%#= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= javascript_include_tag "bootstrap" %>
</head>
<body>
<header class="header">
<%= render :partial => 'layouts/bigdata_header' %>
</header>
<%= yield %>
<%= render :partial => 'layouts/bigdata_footer' %>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

View File

@ -0,0 +1,89 @@
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.9; background:#fff;}
div,img,tr,td,table{ border:0;}
table,tr,td{border:0;cellspacing:0; cellpadding:0;}
ol,ul,li{ list-style-type:none}
a:link,a:visited{color:#333;text-decoration:none;}
a:hover,a:active{color:#026434;}
/* 公共 */
.clear:after {content:".";height:0;visibility:hidden;display:block;clear:both;}
.fl{ float:left;}
.fr{ float:right;}
.cl{ clear:both; overflow:hidden;}
.mt5{ margin-top:5px;}
.mt10{ margin-top:10px;}
.mt20{ margin-top:20px;}
.mt30{ margin-top:30px;}
.mb5{ margin-bottom:5px;}
.mb10{ margin-bottom:10px;}
.ml5{ margin-left:5px;}
.ml10{ margin-left:10px;}
.ml15{ margin-left:15px;}
.ml30{margin-left: 30px;}
.ml50{margin-left: 50px;}
.mr5{ margin-right:5px;}
.mr10{ margin-right:15px;}
.mr15{ margin-right:10px;}
.mr45{ margin-right:45px;}
.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
.clearfix{clear:both;zoom:1}
a.new-btn{display: inline-block;border:none; padding:0 10px;color: #666;background: #e1e1e1; text-align:center;font-size: 12px; height: 30px;border-radius: 3px; line-height: 30px;}
a.new-btn:hover{background: #c3c3c3; color: #333;}
a.new-btn-green{background: #60b25e; color: #fff;}
a.new-btn-green:hover{background: #51a74f; color: #fff;}
a.new-bigbtn{display: inline-block;border:none; padding:2px 30px;color: #666;background: #e1e1e1; text-align:center;font-size: 14px; height: 30px;line-height: 30px; border-radius: 3px;}
a:hover.new-bigbtn{background: #c3c3c3; color: #333;}
a.new-bigbtn-green{background: #60b25e; color: #fff;}
a.new-bigbtn-green:hover{background: #51a74f; color: #fff;}
/* 头部 */
.header{ width:100%; height:51px;background:#fff; }
.header_con{ width:1200px; height:50px; margin:0 auto; }
.new-logo img{ width: 45px; height: 45px; margin-top:3px;}
.new-logo p{ font-size: 18px; color:#333; line-height: 50px; }
a.new-nav-a{ display: block; font-size: 14px; line-height: 50px;}
input.new-search{border-radius:3px; width:200px; height:30px; margin-top: 10px; padding:0 5px; border-style: none;box-shadow: 0px 1px 2px #ccc inset,0px 1px 0px #eee; border: solid 1px #ccc;}
/* 登录注册 */
.new_login{ width:100%; height:450px;background:url(/images/bigdata/slider-bg-1.jpg) 0 0 no-repeat;}
.new_login_con{ width:1200px; height:450px; margin:0 auto; }
.new_login_box{background:#FFF;width:265px; padding:20px 15px; border-radius:5px; background-color: rgba(255,255,255,0.3); margin-top:50px;}
.new_login_h2{ font-size:18px; color:#fff; border-bottom:1px solid #fff; font-weight:normal; padding-bottom:5px; margin-bottom:30px;}
.new_login_h2 a{font-size:12px; color:#fff;background:url(/images/bigdata/icons_login.png) 0 -69px no-repeat; padding-left:10px;}
input.new_register_input{ -webkit-box-shadow: 0 0 0px 1000px white inset; margin-left:5px; width:250px; height:45px; border:none;outline: none;}
input.new_loggin_input{ -webkit-box-shadow: 0 0 0px 1000px white inset; outline: none;width:205px; height:45px; border:none; margin-left:50px;}
.new_loggin_users{width:265px;height:45px;border-radius:5px; border:none; background:#fff url(/images/login/icons_login.png) 8px 9px no-repeat;}
.new_login_lock{background:#fff url(/images/login/icons_login.png) 8px -28px no-repeat; width:265px; height:45px; border-radius:5px; border:none;}
.new_register_li{background:#fff; width:265px; height:45px; border-radius:5px; border:none;}
.new_login_form ul li{ margin-bottom:20px;}
.new_login_error{ color:#c00202;}
.new_login_submit_disable{ width:265px; height:40px; line-height: 40px; background:#ccc; color:#fff; font-size:14px; border-radius:5px; border:none; text-align:center; cursor:pointer; vertical-align: middle;}
.new_login_submit{ width:265px; height:40px; line-height: 40px; background:#60b25e; color:#fff; font-size:14px; border-radius:5px; border:none; text-align:center; cursor:pointer; vertical-align: middle;}
.new_login_submit:hover{background: #51a74f;}
.new_login_check{ width:15px; height:15px; border:1px solid #fff; border-style:none; margin-right:5px; vertical-align: -2px;}
.new_login_form label{ color:#fff;}
.new_login_form a{ color:#fff; text-decoration:underline;}
.new_register{ width:100%; height:579px; background-color:#3c95d7;}
.new_register_con{width:1000px; height:580px; margin:0 auto; background:url(/images/bigdata/bg_register.jpg) 0 0 no-repeat;}
.new_login_txt{width:450px; height:140px; padding:30px 12px 0; color:#fff; margin:100px 0 0 100px;}
.new_login_txt h3{ font-size:24px; text-align:center; margin-bottom:20px;}
.new_login_txt p{ line-height:2.0; font-size: 16px;}
.new_register_left{ margin-top:250px;}
.new_login_tishi{ color: #fff; }
/* 展示内容 */
.new-container{ width: 100%;}
.new-container-inner{width:1200px; margin:0 auto; padding:100px 0;}
.inner-txt{ width:300px;}
.inner-txt-h3{ font-size: 18px; color: #333; margin-bottom:20px;}
.inner-txt-p{font-size: 14px; color: #666; margin-bottom:20px;}
.back-color-grey{ background:#eee;}
.guanzhu-box{ position: relative;}
.img-guanzhu{ position: absolute; top:0; left: 0;}
.guanzhu-img-box{ display: none;}
.guanzhu-box li:hover ul{display:block; }
/* 底部 */
.footer{width:100%; height:100px; background-color:#626262; }
.footer_con{ width:1200px; height:100px; margin:0 auto; text-align: center; padding:20px 0; }
.footer_con-inner{ width: 300px; margin:0px auto;}
.footer_con-inner li{ }
.footer_con-inner li a{ font-size: 14px; color: #fff;display: block;padding:0 15px; border-right: solid 1px #fff;}
.footer_con-inner li a:hover{text-decoration: underline;}
.footer_con-p{ color: #fff; margin-top:10px;}