首页轮播

This commit is contained in:
stormand 2016-11-02 00:58:21 +08:00
parent c9d1cd6764
commit bd40e23e1b
2 changed files with 29 additions and 32 deletions

View File

@ -2,6 +2,7 @@ class HomesController < ApplicationController
def index def index
@course=Course.all @course=Course.all
@course1=Course.find_by_id(1)
end end
end end

View File

@ -1,40 +1,36 @@
<div class="container"> <div class="container">
<div class="row">
<div class="col-md-8" style="background-color: #18BC9C;padding-bottom: 10px;padding-top: 10px"> <div id="myCarousel" class="carousel slide">
<div style="font-size: 50px; padding-left: 50px"> <ol class="carousel-indicators">
<%= image_tag "profile.png" %> <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
Learning RoR! <li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- 轮播Carousel项目 -->
<div class="carousel-inner">
<div class="item active">
<%= link_to detail_course_path(@course1) do %>
<%= image_tag "profile.png" %><% end %>
</div>
<div class="item">
<img src="/wp-content/uploads/2014/07/slide2.png" alt="Second slide">
</div>
<div class="item">
<img src="/wp-content/uploads/2014/07/slide3.png" alt="Third slide">
</div> </div>
</div> </div>
<!-- 轮播Carousel导航 -->
<div class="col-md-4"> <a class="carousel-control left" href="#myCarousel"
<h1>在线选课系统样本</h1> data-slide="prev">&lsaquo;
<p>这个样本系统是基于国科大研究生课程(高级软件工程)开发的项目,目的是帮助入门者学习RoR(Ruby on Rails),这是适合新学者的入手的第一个项目</p> </a>
<p>入门者可以在这个样本系统上增加更多的功能:</p> <a class="carousel-control right" href="#myCarousel"
<ul> data-slide="next">&rsaquo;
</a>
<li class="text-danger">
处理选课冲突、控制选课人数
</li>
<li class="text-danger">
统计选课学分,增加选课的开放、关闭功能
</li>
<li class="text-danger">
自定义管理员后台
</li>
<li class="text-danger">
基于OAuth的授权登陆
</li>
<li class="text-danger">
Excel格式的数据导入
</li>
</ul>
</div>
</div> </div>
<hr> <hr>
<div class="col-sm-10"> <div class="col-sm-10">