Increased size of modal, added description as caption to photos
This commit is contained in:
parent
bea55454b2
commit
3bf54f991a
7 changed files with 22 additions and 8 deletions
|
|
@ -145,7 +145,17 @@ a:after {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#gallery{
|
#gallery{
|
||||||
min-height: 500px;
|
min-height: 600px;
|
||||||
|
.item{
|
||||||
|
img {
|
||||||
|
height: 600px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center center;
|
||||||
|
width: 100%;
|
||||||
|
background-size: cover;
|
||||||
|
-webkit-background-size:cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
.modal-body{
|
.modal-body{
|
||||||
i{
|
i{
|
||||||
margin-top: 35%;
|
margin-top: 35%;
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ class ConferenceController < ApplicationController
|
||||||
not_found unless @conference.make_conference_public?
|
not_found unless @conference.make_conference_public?
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_gallery_photos
|
def gallery_photos
|
||||||
@photos = Conference.find(params[:id].to_i).photos
|
@photos = Conference.find_by_short_title(params[:id]).photos
|
||||||
render "photos", formats: [:js]
|
render "photos", formats: [:js]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ class Photo < ActiveRecord::Base
|
||||||
belongs_to :conference
|
belongs_to :conference
|
||||||
validates_presence_of :picture
|
validates_presence_of :picture
|
||||||
has_attached_file :picture,
|
has_attached_file :picture,
|
||||||
styles: { thumb: "100x100>", large: "300x300>", banner: "500x300>" }
|
styles: { thumb: "100x100>", large: "300x300>", banner: "600x300>" }
|
||||||
|
|
||||||
validates_attachment_content_type :picture,
|
validates_attachment_content_type :picture,
|
||||||
content_type: [/jpg/, /jpeg/, /png/, /gif/],
|
content_type: [/jpg/, /jpeg/, /png/, /gif/],
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
%div{ class: "modal fade", id: "gallery", tabindex: "-1", role: "dialog", "aria-labelledby" => "myModalLabel", "aria-hidden"=> "true" }
|
%div{ class: "modal fade", id: "gallery", tabindex: "-1", role: "dialog", "aria-labelledby" => "myLargeModalLabel", "aria-hidden"=> "true" }
|
||||||
%div{ class: "modal-dialog" }
|
%div{ class: "modal-dialog modal-lg" }
|
||||||
%div{ class: "modal-content" }
|
%div{ class: "modal-content" }
|
||||||
%div{ class: "modal-body" }
|
%div{ class: "modal-body" }
|
||||||
%div{ id: "carousel-example-generic", class: "carousel slide", "data-ride" => "carousel" }
|
%div{ id: "carousel-example-generic", class: "carousel slide", "data-ride" => "carousel" }
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
- photos.each_with_index do |photo,index|
|
- photos.each_with_index do |photo,index|
|
||||||
%div.item{ class: (index==0? 'active' : '') }
|
%div.item{ class: (index==0? 'active' : '') }
|
||||||
= image_tag(photo.picture(:banner))
|
= image_tag(photo.picture(:banner))
|
||||||
|
- unless photo.description.blank?
|
||||||
|
%div.carousel-caption
|
||||||
|
%p.lead
|
||||||
|
= photo.description
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
.col-md-12.lead
|
.col-md-12.lead
|
||||||
%p= @conference.description
|
%p= @conference.description
|
||||||
-unless @conference.photos.blank?
|
-unless @conference.photos.blank?
|
||||||
= link_to 'Gallery', fetch_gallery_photos_conference_path(@conference.id), class: 'btn btn-primary btn-lg', id: 'gallery-btn', remote: true
|
= link_to 'Gallery', gallery_photos_conference_path(@conference.short_title), class: 'btn btn-primary btn-lg', id: 'gallery-btn', remote: true
|
||||||
= render 'gallery'
|
= render 'gallery'
|
||||||
- if @conference.include_program_in_splash?
|
- if @conference.include_program_in_splash?
|
||||||
%section{ id: 'program' }
|
%section{ id: 'program' }
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ Osem::Application.routes.draw do
|
||||||
get "/register" => "conference_registration#register"
|
get "/register" => "conference_registration#register"
|
||||||
patch "/register" => "conference_registration#update"
|
patch "/register" => "conference_registration#update"
|
||||||
delete "/register" => "conference_registration#unregister"
|
delete "/register" => "conference_registration#unregister"
|
||||||
get "fetch_gallery_photos"
|
get "gallery_photos"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue