Redesign splashpage program section & split out partials
This commit is contained in:
parent
eb6980c31b
commit
c31e2ac583
3 changed files with 53 additions and 47 deletions
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
|
||||||
|
|
@ -4,56 +4,27 @@
|
||||||
|
|
||||||
- cache [@confererence, @conference.confirmed_tracks, '#splash#schedule'] do
|
- cache [@confererence, @conference.confirmed_tracks, '#splash#schedule'] do
|
||||||
%section#schedule
|
%section#schedule
|
||||||
.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?
|
- if @conference.splashpage.include_tracks && @conference.confirmed_tracks.any?
|
||||||
.row
|
= render 'tracks'
|
||||||
.col-md-12
|
|
||||||
- @conference.highlighted_events.each_slice(2) do |slice|
|
- if @conference.program.try(:schedule_public?)
|
||||||
.row.row-centered
|
.row
|
||||||
- slice.each do |event|
|
.col-md-12
|
||||||
.col-md-6.col-centered.col-top.highlights
|
%p.cta-button.text-center
|
||||||
%p.text-center
|
= link_to(conference_schedule_path(@conference.short_title),
|
||||||
%b= event.title
|
class: 'btn btn-success btn-lg') do
|
||||||
%h5.text-center
|
Full Schedule
|
||||||
= 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_booths && @conference.confirmed_booths.any?
|
||||||
= render 'booths'
|
= render 'booths'
|
||||||
|
|
|
||||||
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