Move sponsor modal to a generic partial & redesign.
... use for booths also.
This commit is contained in:
parent
b2e1eb5fa9
commit
20e2b4b76b
5 changed files with 58 additions and 52 deletions
|
|
@ -6,34 +6,24 @@
|
|||
@conference.try(:call_for_sponsors), '#splash#sponsors'] do
|
||||
%section#sponsors
|
||||
.container
|
||||
.row
|
||||
.col-md-12.text-center
|
||||
%h2 Sponsors
|
||||
- @conference.sponsorship_levels.each do |sponsorship_level|
|
||||
-if sponsorship_level.sponsors.any?
|
||||
- sponsorship_level.sponsors.each_slice(3) do |slice|
|
||||
.row.row-centered
|
||||
- slice.each do |sponsor|
|
||||
.col-md-4.col-sm-4.col-centered.col-top
|
||||
%a{ href: '#', data: { toggle: 'modal', target: "#modal_#{sponsor.id}" } }
|
||||
= image_tag get_logo(sponsor), class: "img-responsive img-sponsor img-sponsor-#{sponsorship_level.position}"
|
||||
.row.text-center
|
||||
%h3
|
||||
= sponsorship_level.title
|
||||
= 'Sponsor'.pluralize(sponsorship_level.sponsors.length)
|
||||
.row.row-centered
|
||||
- sponsorship_level.sponsors.each do |sponsor|
|
||||
.col-md-4.col-sm-4.col-centered.col-top
|
||||
%a{ href: '#',
|
||||
data: { toggle: 'modal', target: "#modal-sponsor-#{sponsor.id}" } }
|
||||
= image_tag get_logo(sponsor),
|
||||
class: ['img-responsive', 'img-sponsor',
|
||||
"img-sponsor-#{sponsorship_level.position}"],
|
||||
title: sponsor.name
|
||||
- content_for :modals do
|
||||
= render 'modal_description', object: sponsor
|
||||
|
||||
.modal.fade{ id: "modal_#{sponsor.id}" }
|
||||
.modal-dialog
|
||||
.modal-content
|
||||
.modal-header
|
||||
%button.close{ data: { dismiss: 'modal' } }
|
||||
x
|
||||
.modal-title
|
||||
= sponsor.name
|
||||
.modal-body.text-center
|
||||
.logo
|
||||
= link_to sponsor.website_url, target: '_blank' do
|
||||
= image_tag get_logo(sponsor), class: "img-responsive img-sponsor img-sponsor-#{sponsorship_level.position}"
|
||||
.description
|
||||
= sponsor.description
|
||||
.modal-footer
|
||||
= link_to nil, "#{sponsor.website_url}", target: '_blank'
|
||||
- if @conference.call_for_sponsors.try(:open?)
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue