Integrate the splash page into the general layout

* Cleanup the CSS
* Fix more views then you have fingers and toes
* Introduce position(weight) for sponsor levels
* Fix bootstrap/datatable integration
This commit is contained in:
Henne Vogelsang 2014-11-14 11:58:36 +01:00
parent 7acd16f923
commit f2cdea4f1a
56 changed files with 1191 additions and 1266 deletions

View file

@ -2,41 +2,36 @@
%li
%a.smoothscroll{ href: '#callforpapers' } Call For Papers
%div.container#callforpapers.text-center
%div.row
%div.col-md-12
.container
.row
.col-md-12.text-center
%h1
Call For Papers
- if !@conference.call_for_papers.description.blank?
.lead
= markdown(@conference.call_for_papers.description)
= markdown(@conference.call_for_papers.description)
.row
.col-md-12.text-center
.lead
= link_to "Submit Your Proposals Today", conference_proposal_index_path(@conference.short_title), class: 'btn btn-info', target: '_blank'
- if !@conference.call_for_papers.start_date.blank? && !@conference.call_for_papers.end_date.blank?
.lead Proposals will be accepted between
#cfp-date
%p
Proposals will be accepted between
%p#cfp-date
= date_string(@conference.call_for_papers.start_date, @conference.call_for_papers.end_date)
- if @conference.cfp_open?
- if @conference.call_for_papers.end_date.to_time < Time.now
.lead Today is the last day. Hurry Up!
- else
.row
.col-md-8.col-md-offset-3
%div.col-md-2.timer-box
%h2#days
.lead Days
%div.col-md-2.timer-box
%h2#hours
.lead Hours
%div.col-md-2.timer-box
%h2#minutes
.lead Minutes
%div.col-md-2.timer-box
%h2#seconds
.lead Seconds
.row
.lead
= link_to "Submit Your Proposals Today", conference_proposal_index_path(@conference.short_title), class: 'btn btn-info', target: '_blank'
-else
%h3 Call for Papers is currently closed!
.row
.col-md-8.col-md-offset-3.text-center
%div.col-md-2.timer-box
%h2#days
.lead Days
%div.col-md-2.timer-box
%h2#hours
.lead Hours
%div.col-md-2.timer-box
%h2#minutes
.lead Minutes
%div.col-md-2.timer-box
%h2#seconds
.lead Seconds
:javascript
$( document ).ready(function(){

View file

@ -1,11 +0,0 @@
%div.row.text-center
%div.col-md-12
%h3 Keynote Speakers
- @keynote_speakers.each do |k|
%div{ class: (@keynote_speakers.count.to_i <= 2 ? "col-md-#{12/@keynote_speakers.count.to_i}" : "col-md-4") }
= image_tag(k.gravatar_url(size: '80'), class: 'img-circle') unless k.gravatar_url.blank?
%h4
= k.name
-unless k.biography.blank?
%p
= k.biography

View file

@ -2,25 +2,19 @@
%li
%a.smoothscroll{ href: '#location' } Location
%div.banner-disp{ style: ("background-image: url(#{@conference.venue.photo})" unless @conference.venue.photo.blank?), class:('with-background' unless @conference.venue.photo.blank?) }
%div.container.text-center
.div.row.col-md-12
.container
.row
.col-md-12.text-center
- unless @conference.venue.name.blank?
%h1
%strong #{ @conference.venue.name }
- unless @conference.venue.address.blank?
%h2
%strong #{ @conference.venue.address }
= link_to("http://maps.google.com/maps?q=#{@conference.venue.address}") do
%h2
#{ @conference.venue.address }
- unless @conference.venue.description.blank?
.lead
= markdown(@conference.venue.description)
%ul.location-links
- unless @conference.venue.address.blank?
%li
%b
= link_to 'View in Google Maps', "http://maps.google.com/maps?q=#{@conference.venue.address}", target: '_blank'
- unless @conference.venue.website.blank?
%li
%b
= link_to 'Visit Venue Website', @conference.venue.website, target: '_blank'
- unless @conference.venue.website.blank?
%p.lead
= link_to(@conference.venue.website, @conference.venue.website)

View file

@ -1,10 +1,10 @@
%div.container.text-center
%h2 Lodging
-unless @conference.splashpage.lodging_description.blank?
.lead
= markdown(@conference.splashpage.lodging_description)
%div.row.text-center
.container
.row
.col-md-12.text-center
%h2 Accommodation Deals
%p.lead
We have prepared affordable accommodation deals for your visit.
.row
- @conference.venue.lodgings.each do |r|
%div{ class: (@conference.venue.lodgings.count.to_i <= 2 ? "col-md-#{12/@conference.venue.lodgings.count.to_i}" : "col-md-4") }
.div.thumbnail

View file

@ -1,22 +1,36 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#program' } Program
=link_to('#program', class: 'smoothscroll') do
Program
%div.container.text-center
%div.row
%div.col-md-12
.container
.row
.col-md-12.text-center
%h1 Program
- if @conference.call_for_papers and @conference.call_for_papers.schedule_public
%span You can check out our
%span
= link_to 'Schedule', conference_schedule_path(@conference.short_title), target: '_blank'
- else
%span The schedule is not ready yet. Stay tuned!
- unless @keynote_speakers.blank?
= render 'keynote_speakers'
-unless @conference.tracks.blank?
- if @conference.splashpage.include_tracks
= render 'tracks'
- if @conference.splashpage and @conference.splashpage.include_tracks
.row
.col-md-12
- @conference.tracks.each do |t|
.tracks{ class: (@conference.tracks.count.to_i <= 2 ? "col-md-#{12/@conference.tracks.count.to_i}" : "col-md-4") }
%h4.text-center
= t.name
%p
= markdown(t.description)
- if @conference.call_for_papers and @conference.call_for_papers.schedule_public
.row
.col-md-12
%p.text-center
Check out our
= link_to 'Schedule', conference_schedule_path(@conference.short_title)
- if !@keynote_speakers.blank?
%div.row.text-center
%div.col-md-12
%h3 Keynote Speakers
- @keynote_speakers.each do |k|
%div{ class: (@keynote_speakers.count.to_i <= 2 ? "col-md-#{12/@keynote_speakers.count.to_i}" : "col-md-4") }
= image_tag(k.gravatar_url(size: '80'), class: 'img-circle') unless k.gravatar_url.blank?
%h4
= k.name
-unless k.biography.blank?
%p
= k.biography

View file

@ -1,22 +1,16 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#registration' } Registration
%div.container.text-center
%div.row
%h1 Registration
- if !@conference.splashpage.registration_description.blank?
.lead
= markdown(@conference.splashpage.registration_description)
- if @conference.registration_dates_given?
-if @conference.registration_period.end_date >= Date.today
%h4 Registration period #{ date_string(@conference.registration_period.start_date, @conference.registration_period.end_date) }
-else
%h4 Registration is Closed, it was from #{ date_string(@conference.registration_period.start_date, @conference.registration_period.end_date) }
- if @conference.registration_open?
- if current_user && @conference.user_registered?(current_user)
= link_to "Modify Registration for #{@conference.short_title}", edit_conference_conference_registrations_path(@conference.short_title), class: "btn btn-success btn-lg", target: '_blank'
- else
= link_to "Register for #{@conference.short_title}", new_conference_conference_registrations_path(@conference.short_title), class: "btn btn-success btn-lg", target: '_blank'
- if @conference.tickets.any?
- if @conference.splashpage.include_tickets
= render 'tickets'
.container
.row
.col-md-12.text-center
%h1 Registration
%p.lead
Going to
= @conference.short_title
is free of charge. We only ask you to
= link_to "register yourself", new_conference_conference_registrations_path(@conference.short_title)
until
= @conference.registration_period.end_date

View file

@ -1,24 +0,0 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#sponsors' } Sponsors
%div.container#sponsors.text-center
%div.row
%div.col-md-12
%h2 Sponsors
-if !@conference.splashpage.sponsor_description.blank?
.lead
= markdown(@conference.splashpage.sponsor_description)
-if @conference.contact && @conference.contact.sponsor_email.present?
%h3= mail_to "#{ @conference.contact.sponsor_email }", 'Become a Sponsor'
- if !@conference.sponsorship_levels.blank?
- @conference.sponsorship_levels.each do |l|
- if !l.sponsors.blank?
%div.row.text-center
%h4 #{l.title}
- l.sponsors.each_with_index do |r,index|
%div.text-center{ class: (l.sponsors.count.to_i <= 2 ? "col-md-#{12/l.sponsors.count.to_i}" : "col-md-4") }
- if !r.logo.blank?
= link_to image_tag(r.logo(:large), alt: "#{r.name} Logo", title: "#{r.description}"), "http://#{r.website_url}"
- unless index == 0
- if index%2 == 0
%div.clearfix.visible-md.visible-lg

View file

@ -0,0 +1,33 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#sponsors' } Sponsors
.container
.row
.col-md-12
%h2 Sponsors
%p.lead
whom without,
= @conference.short_title
wouldn't be possible!
- @conference.sponsorship_levels.each do |sponsorship_level|
-if sponsorship_level.sponsors.any?
.row
.col-md-12.text-center
%h3
= sponsorship_level.title
- sponsorship_level.sponsors.each_slice(3) do |slice|
.row
- slice.each do |sponsor|
.col-md-4
= link_to("http://#{sponsor.website_url}", class: 'thumbnail') do
= image_tag(sponsor.logo(:large), alt: "#{sponsor.name} Logo", title: "#{sponsor.description}")
-if @conference.contact and !@conference.contact.sponsor_email.blank?
.row
.col-md-12
%p.text-muted.text-center
%small
Want to sponsor #{@conference.short_title}?
= link_to("mailto: #{@conference.contact.sponsor_email}?subject=#{@conference.short_title}%20Sponsorship") do
Please contact us!

View file

@ -1,15 +1,21 @@
%div.row
%h3 Tickets
-if @conference.splashpage.ticket_description.present?
.lead
= markdown(@conference.splashpage.ticket_description)
- @conference.tickets.each do |s|
%div.col-md-6
.container
.row
.col-md-12.text-center
%h1
Support
=@conference.short_title
%p.lead
To support our event you can purchase tickets
.row
- @conference.tickets.each do |ticket|
%div{ class: (@conference.tickets.count <= 2 ? "col-md-#{12/@conference.tickets.count}" : "col-md-4") }
- if ticket.title.present?
%h4 #{ ticket.title }
%h4.text-center
=ticket.title
- if ticket.description.present?
.lead
= markdown(ticket.description)
%div.btn-group
= link_to "Buy Ticket", conference_tickets_path(@conference.short_title), class: 'btn btn-success'
= button_tag "#{humanized_money_with_symbol ticket.price}", class: 'btn btn-success'
= markdown(ticket.description)
.text-center
.btn-group
= link_to(conference_tickets_path(@conference.short_title), class: 'btn btn-success') do
Buy Ticket
= "#{humanized_money_with_symbol ticket.price}"

View file

@ -1,9 +0,0 @@
%div.row.text-center
%div.col-md-12
%h2 Tracks
- @conference.tracks.each do |t|
%div.tracks{ class: (@conference.tracks.count.to_i <= 2 ? "col-md-#{12/@conference.tracks.count.to_i}" : "col-md-4") }
%h4
= t.name
%p
= markdown(t.description)

View file

@ -1,60 +1,51 @@
= content_for :splash do
#splash
- if @conference.splashpage
.splash
- if @conference.splashpage.include_banner?
%section{ id: 'splash-banner' }
%div.banner-disp{ style: ("background-image: url(#{@conference.splashpage.banner_photo})" unless @conference.splashpage.banner_photo.blank?), class:('with-background' unless @conference.splashpage.banner_photo.blank?) }
%div.container.text-center.banner-text
.row
%h1
= @conference.title
- if @conference.splashpage.include_banner?
#splash-banner{ style: ("background-image: url(#{@conference.splashpage.banner_photo})" unless @conference.splashpage.banner_photo.blank?) }
.container
.row
.col-md-12.text-center
%h1= @conference.title
- if @conference.start_date && @conference.end_date
.row
%h3
= date_string(@conference.start_date, @conference.end_date)
%h3= date_string(@conference.start_date, @conference.end_date)
- unless @conference.splashpage.banner_description.blank?
.row-fluid
.col-md-12.lead
.lead
= markdown(@conference.splashpage.banner_description)
%p.lead
= markdown(@conference.splashpage.banner_description)
-unless @conference.photos.blank?
= link_to 'Gallery', gallery_photos_conference_path(@conference.short_title), class: 'btn btn-primary btn-lg', id: 'gallery-btn', remote: true
= render 'gallery'
- if @conference.splashpage.include_program
%section{ id: 'program' }
.pad
= render 'program'
- if @conference.splashpage.include_registrations
%section{ id: 'registration' }
.pad
= render 'registration'
-unless @conference.call_for_papers.blank?
- if @conference.call_for_papers.include_cfp_in_splash?
%section{ id:'callforpapers' }
.pad
= render 'call_for_papers'
-unless @conference.venue.blank?
- if @conference.splashpage.include_venue
%section{ id: 'location' }
.pad
= render 'location'
- unless @conference.venue.lodgings.empty?
- if @conference.splashpage.include_lodgings
= render 'lodging'
- if @conference.splashpage.include_sponsors
%section{ id: 'sponsors' }
.pad
= render 'sponsor'
- if @conference.splashpage.include_social_media
%section{ id: 'social-media' }
.pad
= render 'social_media'
= render 'footer'
- if @conference.splashpage.include_program
%section#program
= render 'program'
- if @conference.cfp_open? and @conference.call_for_papers.include_cfp_in_splash?
%section#callforpapers
= render 'call_for_papers'
- if @conference.venue and @conference.splashpage.include_venue
#location{ style: ("background-image: url(#{@conference.venue.photo})" unless @conference.venue.photo.blank?) }
= render 'location'
- if @conference.registration_open? and @conference.splashpage.include_registrations
%section#registration
= render 'registration'
- if @conference.tickets.any? and @conference.splashpage.include_tickets
%section#tickets
= render 'tickets'
- if @conference.venue.lodgings.any? and @conference.splashpage.include_lodgings
%section#lodging
= render 'lodging'
- if @conference.sponsors.any? and @conference.splashpage.include_sponsors
%section#sponsors
= render 'sponsors'
- if @conference.splashpage.include_social_media
%section#social-media
= render 'social_media'
// grmbl
= render 'footer'