From aee1f58607d7d2c9653e077d2588b1f41db6867e Mon Sep 17 00:00:00 2001 From: James Mason Date: Tue, 21 Nov 2017 18:31:14 -0800 Subject: [PATCH] Consistent design and code cleanup of splashpage elements. * get rid of unnecessary slice() * center up small groups of elements * consistent text use FIXME: extract out strings * consistent date strings * simplified views for easier theming --- app/views/conferences/_booths.html.haml | 34 +++++++++------- .../conferences/_call_for_paper.html.haml | 11 +---- .../conferences/_call_for_tracks.html.haml | 3 +- app/views/conferences/_lodging.html.haml | 10 +++-- app/views/conferences/_program.html.haml | 40 ------------------- app/views/conferences/_registration.html.haml | 9 +++-- app/views/conferences/_tickets.html.haml | 33 +++++++-------- 7 files changed, 48 insertions(+), 92 deletions(-) delete mode 100644 app/views/conferences/_program.html.haml diff --git a/app/views/conferences/_booths.html.haml b/app/views/conferences/_booths.html.haml index 5bff5a70..cc48fead 100644 --- a/app/views/conferences/_booths.html.haml +++ b/app/views/conferences/_booths.html.haml @@ -4,19 +4,23 @@ .row .col-md-12.text-center %h2 Booths - - @conference.confirmed_booths.each_slice(3).with_index do |slice, index_for_row| - .row.row-centered - - slice.each.with_index do |booth, index_for_column| - .col-md-4.col-sm-4.col-xs-10.col-centered.col-top - .thumbnail - - if booth.logo_link - = link_to booth.website_url, class: 'thumbnail' do - = image_tag booth.picture.large.url - .caption - %h3.text-center + .row.row-centered + - @conference.confirmed_booths.each do |booth| + .col-md-4.col-sm-4.col-centered.col-top + .thumbnail.text-center + - if booth.picture? + = link_to booth.website_url, + class: 'thumbnail', target: '_blank' do + = image_tag booth.picture.large.url, alt: booth.title, + class: 'img-rounded' + .caption + %h3.text-center + - if booth.logo_link + = link_to booth.title, booth.website_url, target: '_blank' + -else = booth.title - %p.text-center.text-muted - = link_to "#show_description_#{index_for_row}_#{index_for_column}", "data-toggle"=>"collapse" do - learn more - .collapse{ id: "show_description_#{index_for_row}_#{index_for_column}" } - = markdown(booth.description) + = link_to '', "#booth-detail-#{booth.id}", + data: {toggle: 'collapse'}, class: 'caret', + title: 'more info' + .collapse{ id: "booth-detail-#{booth.id}" } + = markdown(booth.description) diff --git a/app/views/conferences/_call_for_paper.html.haml b/app/views/conferences/_call_for_paper.html.haml index d173356c..09203e75 100644 --- a/app/views/conferences/_call_for_paper.html.haml +++ b/app/views/conferences/_call_for_paper.html.haml @@ -4,7 +4,7 @@ %h2 Call for Papers %p.lead - We are ready to accept your proposals for sessions! + We are now accepting proposals for sessions! %p - if @conference.event_types.any? You can submit proposals for @@ -24,14 +24,7 @@ You have = pluralize(@conference.call_for_events.remaining_days, 'day') left! - Remember - %span.notranslate - = @conference.title - will only be as good as the sessions you present. - Submit early, submit often! - - else - The submission period is closed. %p.cta-button - = link_to "Submit your paper now", + = link_to "Submit your proposal now", conference_program_proposals_path(@conference.short_title), class: 'btn btn-success btn-lg text-center' diff --git a/app/views/conferences/_call_for_tracks.html.haml b/app/views/conferences/_call_for_tracks.html.haml index d1851a12..092c2740 100644 --- a/app/views/conferences/_call_for_tracks.html.haml +++ b/app/views/conferences/_call_for_tracks.html.haml @@ -3,8 +3,9 @@ %h2 Call for Tracks %p.lead - We are ready to accept requests for tracks! + We are now accepting custom track requests! %p + Would you like to host a mini-summit, sub-conference, or hack space? The submission period for track requests is open %em.notranslate = "#{date_string(@conference.call_for_tracks.start_date, diff --git a/app/views/conferences/_lodging.html.haml b/app/views/conferences/_lodging.html.haml index 006978d3..4859b8f5 100644 --- a/app/views/conferences/_lodging.html.haml +++ b/app/views/conferences/_lodging.html.haml @@ -6,14 +6,14 @@ %section#lodging .container .row - .col-md-12.text-centers + .col-md-12.text-center %h2 Where to stay - if @conference.venue in = @conference.venue.city %p.lead - We recommend these affordable lodging accommodations for your visit. + We recommend the following accommodations for your visit. .row.row-centered - @conference.lodgings.each do |lodging| @@ -22,9 +22,11 @@ - if lodging.picture? -if lodging.website_link.present? = link_to(lodging.website_link, class: 'thumbnail') do - = image_tag lodging.picture.large.url, class: 'img-responsive img-lodging' + = image_tag lodging.picture.large.url, + class: 'img-responsive img-lodging' - else - = image_tag lodging.picture.large.url, class: 'img-responsive img-lodging' + = image_tag lodging.picture.large.url, + class: 'img-responsive img-lodging' - else %p.text-center -if lodging.website_link.present? diff --git a/app/views/conferences/_program.html.haml b/app/views/conferences/_program.html.haml deleted file mode 100644 index f07816a4..00000000 --- a/app/views/conferences/_program.html.haml +++ /dev/null @@ -1,40 +0,0 @@ -= content_for :splash_nav do - %li - %a.smoothscroll{ href: '#callforpapers' } Call For Papers - -.container - .row - .col-md-12.text-center - %h2 - Call for Papers - %p.lead - We are ready to accept your proposals for sessions! - .row - .col-md-6.col-md-offset-3.col-sm-10.col-sm-offset-1 - %p - - if @conference.program.event_types.any? - You can submit proposals for - = "#{event_types(@conference)}." - - if @conference.tracks.any? - Proposals should fit in one of the - = "#{pluralize(@conference.tracks.count, 'track')}:" - = "#{tracks(@conference)}." - The submission period has begun - %em - = @program.cfp.start_date.strftime('%A, %B %-d. %Y') - and closes - %em - = @program.cfp.end_date.strftime('%A, %B %-d. %Y.') - - if @conference.cfp_open? - That means you have only - %b= pluralize(@program.cfp.remaining_days, 'day') - left! - Remember - = @conference.short_title - will only be as good as the sessions you present. Submit early, submit often! - - else - The submission period is closed. - .row - .col-md-12.text-center - %p.cta-button - = link_to "Submit your paper now", conference_proposals_path(@conference.short_title), class: 'btn btn-success btn-lg text-center' diff --git a/app/views/conferences/_registration.html.haml b/app/views/conferences/_registration.html.haml index 9db1f280..b9b27f08 100644 --- a/app/views/conferences/_registration.html.haml +++ b/app/views/conferences/_registration.html.haml @@ -19,14 +19,15 @@ = @conference.short_title is free of charge. %p - We only ask you to register yourself until - = @conference.registration_period.end_date.strftime('%A, %B %-d. %Y') + We only ask you to register yourself before + = date_string(@conference.registration_period.end_date) so we can plan for the right amount of people. %p.cta-button - else %p The registration period ends on - = @conference.registration_period.end_date.strftime('%A, %B %-d. %Y') + = date_string(@conference.registration_period.end_date) %p.cta-button - = link_to(new_conference_conference_registration_path(@conference.short_title), class: 'btn btn-lg btn-success') do + = link_to(new_conference_conference_registration_path(@conference.short_title), + class: 'btn btn-lg btn-success') do Register Now diff --git a/app/views/conferences/_tickets.html.haml b/app/views/conferences/_tickets.html.haml index d06218ce..6f612a6a 100644 --- a/app/views/conferences/_tickets.html.haml +++ b/app/views/conferences/_tickets.html.haml @@ -9,22 +9,17 @@ .col-md-12.text-center %h2 Support - =@conference.short_title - %p.lead - To support our event you can get these tickets - - @conference.tickets.each_slice(4) do |slice| - .row.row-centered - - slice.each do |ticket| - .col-md-3.col-centered.col-top.col-sm-3 - .thumbnail - %p.text-center - %i.fa.fa-ticket.fa-5x - .caption - %h3.text-center - = ticket.title - -if ticket.description.present? - = markdown(ticket.description) - %p.text-center - = link_to(conference_tickets_path(@conference.short_title), class: 'btn btn-success') do - Get Ticket - = humanized_money_with_symbol ticket.price + =@conference.title + .row.row-centered + - @conference.tickets.each do |ticket| + .col-md-3.col-sm-3.col-centered.col-top + %h3.text-center + = ticket.title + %h3.text-center + %i.fa.fa-ticket.fa-3x + = markdown(ticket.description) + %p.text-center + = link_to conference_tickets_path(@conference.short_title), + class: 'btn btn-success' do + Get Ticket + = humanized_money_with_symbol ticket.price