Adds carousel to splash view
This commit is contained in:
parent
b10b43ac7a
commit
760dd06d31
3 changed files with 31 additions and 0 deletions
|
|
@ -83,3 +83,12 @@ body {
|
|||
.top-submitter img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#gallery-carousel .item img{
|
||||
height: 700px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
width: 100%;
|
||||
background-size: cover;
|
||||
-webkit-background-size:cover;
|
||||
}
|
||||
|
|
|
|||
19
app/views/conference/_carousel.html.haml
Normal file
19
app/views/conference/_carousel.html.haml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
%div#gallery-carousel.carousel.slide{"data-ride" => "carousel"}
|
||||
/ Indicators
|
||||
%ol.carousel-indicators
|
||||
- @conference.photos.each_with_index do |p,i|
|
||||
%li{"data-slide-to" => "#{i}", "data-target" => "#gallery-carousel", class: i==0 ? "active": "" }
|
||||
/ Wrapper for slides
|
||||
.carousel-inner
|
||||
- @conference.photos.each_with_index do |p,i|
|
||||
%div{ class: i==0 ? "active item": "item" }
|
||||
= image_tag(p.picture(:original), class: 'img-responsive')
|
||||
- unless p.description.blank?
|
||||
%div.carousel-caption
|
||||
%p.text-center
|
||||
= p.description
|
||||
/ Controls
|
||||
%a.left.carousel-control{"data-slide" => "prev", href: "#gallery-carousel"}
|
||||
%span.glyphicon.glyphicon-chevron-left
|
||||
%a.right.carousel-control{"data-slide" => "next", href: "#gallery-carousel"}
|
||||
%span.glyphicon.glyphicon-chevron-right
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
= content_for :brand do
|
||||
= link_to @conference.title, conference_url(@conference.short_title), class: 'navbar-brand'
|
||||
- unless @conference.photos.blank?
|
||||
%div
|
||||
= render 'carousel'
|
||||
%div#program
|
||||
= render 'program'
|
||||
%div#registration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue