Redesign splashpage program section & split out partials
This commit is contained in:
parent
494a1b32a4
commit
8f43da79b5
4 changed files with 73 additions and 70 deletions
|
|
@ -1,20 +1,17 @@
|
||||||
- cache [@conference.confirmed_booths, '#splash#booths'] do
|
.row
|
||||||
%section#booths
|
.col-md-12.text-center
|
||||||
.container
|
%h2 Booths
|
||||||
.row
|
.row.row-centered
|
||||||
.col-md-12.text-center
|
- @conference.confirmed_booths.each do |booth|
|
||||||
%h2 Booths
|
.col-md-2.col-sm-2.col-centered.col-top.booth
|
||||||
.row.row-centered
|
%a.thumbnail{ href: '#',
|
||||||
- @conference.confirmed_booths.each do |booth|
|
data: { toggle: 'modal', target: "#modal-booth-#{booth.id}" } }
|
||||||
.col-md-2.col-sm-2.col-centered.col-top
|
- if booth.picture?
|
||||||
%a.thumbnail{ href: '#',
|
= image_tag get_logo(booth),
|
||||||
data: { toggle: 'modal', target: "#modal-booth-#{booth.id}" } }
|
class: ['img-responsive', 'img-rounded'],
|
||||||
- if booth.picture?
|
title: booth.title
|
||||||
= image_tag get_logo(booth),
|
- else
|
||||||
class: ['img-responsive', 'img-rounded'],
|
.caption
|
||||||
title: booth.title
|
%h3.text-center= booth.title
|
||||||
- else
|
- content_for :modals do
|
||||||
.caption
|
= render 'modal_description', object: booth
|
||||||
%h3.text-center= booth.title
|
|
||||||
- content_for :modals do
|
|
||||||
= render 'modal_description', object: booth
|
|
||||||
|
|
|
||||||
18
app/views/conferences/_highlights.haml
Normal file
18
app/views/conferences/_highlights.haml
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
%h3.text-center
|
||||||
|
Program Highlights
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
.row.row-centered
|
||||||
|
- @conference.highlighted_events.each do |event|
|
||||||
|
- speaker = event.speakers_ordered.first
|
||||||
|
.col-md-3.col-sm-3.col-centered.col-top.highlights
|
||||||
|
= link_to conference_program_proposal_path(@conference.short_title, event),
|
||||||
|
class: 'thumbnail' do
|
||||||
|
= image_tag speaker.gravatar_url(size: 300),
|
||||||
|
class: ['img-responsive', 'img-circle'],
|
||||||
|
title: speaker.name
|
||||||
|
.caption
|
||||||
|
%h3.text-center= speaker.name
|
||||||
|
%h4.text-center= event.title
|
||||||
|
|
@ -3,58 +3,29 @@
|
||||||
%a.smoothscroll{ href: '#program' } Program
|
%a.smoothscroll{ href: '#program' } Program
|
||||||
|
|
||||||
- cache [@confererence, @conference.confirmed_tracks,
|
- cache [@confererence, @conference.confirmed_tracks,
|
||||||
@conference.confirmed_booths,'#splash#schedule'] do
|
@conference.confirmed_booths,'#splash#program'] do
|
||||||
%section#program
|
%section#program
|
||||||
.container
|
.container
|
||||||
.row
|
|
||||||
.col-md-12
|
|
||||||
%h2.text-center
|
|
||||||
Program
|
|
||||||
%p.lead.text-center
|
|
||||||
%span.notranslate
|
|
||||||
= @conference.title
|
|
||||||
has the most awesome program ever!
|
|
||||||
- if @conference.splashpage.include_tracks && @conference.confirmed_tracks.any?
|
|
||||||
See rock-star speakers cover the topics of
|
|
||||||
- @conference.confirmed_tracks.each_slice(3) do |slice|
|
|
||||||
.row.row-centered
|
|
||||||
- slice.each do |track|
|
|
||||||
.col-md-4.col-sm-4.col-centered.col-top.track
|
|
||||||
%h4.text-center
|
|
||||||
= track.name
|
|
||||||
= markdown(track.description)
|
|
||||||
- if track.start_date
|
|
||||||
%br
|
|
||||||
From: #{track.start_date.strftime('%A, %B %-d. %Y')}
|
|
||||||
- if track.end_date
|
|
||||||
%br
|
|
||||||
To: #{track.end_date.strftime('%A, %B %-d. %Y')}
|
|
||||||
- if track.room
|
|
||||||
%br
|
|
||||||
In: #{track.room.name}
|
|
||||||
|
|
||||||
- if @conference.program.try(:schedule_public?)
|
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
%p.cta-button.text-center
|
%p.lead.text-center
|
||||||
= link_to(conference_schedule_path(@conference.short_title), class: 'btn btn-default btn-lg') do
|
%span.notranslate
|
||||||
Full Schedule
|
= @conference.title
|
||||||
|
has the most awesome program ever!
|
||||||
|
|
||||||
%h3.text-center
|
- if @conference.highlighted_events.any?
|
||||||
Don't miss out!
|
= render 'highlights'
|
||||||
%br
|
|
||||||
- if @conference.highlighted_events.any?
|
|
||||||
.row
|
|
||||||
.col-md-12
|
|
||||||
- @conference.highlighted_events.each_slice(2) do |slice|
|
|
||||||
.row.row-centered
|
|
||||||
- slice.each do |event|
|
|
||||||
.col-md-6.col-centered.col-top.highlights
|
|
||||||
%p.text-center
|
|
||||||
%b= event.title
|
|
||||||
%h5.text-center
|
|
||||||
= markdown truncate(event.abstract, length: 500, separator: ' ')
|
|
||||||
= link_to "Read More", conference_program_proposal_path(@conference.short_title, event)
|
|
||||||
|
|
||||||
- if @conference.splashpage.include_booths && @conference.confirmed_booths.any?
|
- if @conference.splashpage.include_tracks && @conference.confirmed_tracks.any?
|
||||||
= render 'booths'
|
= render 'tracks'
|
||||||
|
|
||||||
|
- if @conference.splashpage.include_booths && @conference.confirmed_booths.any?
|
||||||
|
= render 'booths'
|
||||||
|
|
||||||
|
- if @conference.program.try(:schedule_public?)
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
%p.cta-button.text-center
|
||||||
|
= link_to(conference_schedule_path(@conference.short_title),
|
||||||
|
class: 'btn btn-success btn-lg') do
|
||||||
|
Full Schedule
|
||||||
|
|
|
||||||
17
app/views/conferences/_tracks.haml
Normal file
17
app/views/conferences/_tracks.haml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
.row
|
||||||
|
.col-md-12
|
||||||
|
%h3.text-center
|
||||||
|
Tracks
|
||||||
|
.row.row-centered
|
||||||
|
- @conference.confirmed_tracks.to_a.sort_by!(&:name).each do |track|
|
||||||
|
.col-md-3.col-sm-3.col-centered.col-top.track
|
||||||
|
.thumbnail
|
||||||
|
.caption
|
||||||
|
%h3.text-center
|
||||||
|
= track.name
|
||||||
|
%p.text-center
|
||||||
|
- if track.start_date && track.end_date
|
||||||
|
= date_string(track.start_date, track.end_date)
|
||||||
|
- if track.room
|
||||||
|
In #{track.room.name}
|
||||||
|
= markdown truncate(track.description, length: 200, separator: ' ')
|
||||||
Loading…
Add table
Add a link
Reference in a new issue