Redesign & move splashpage header into a partial
... this allows conferences/show to consistently just show layout.
This commit is contained in:
parent
f4b869c129
commit
3cdef86d64
2 changed files with 33 additions and 25 deletions
32
app/views/conferences/_header.haml
Normal file
32
app/views/conferences/_header.haml
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
- cache [@conference, @conference.venue, '#splash#header'] do
|
||||||
|
#banner
|
||||||
|
.container
|
||||||
|
.row
|
||||||
|
.col-md-8.col-md-offset-2#header
|
||||||
|
.row
|
||||||
|
.col-md-4
|
||||||
|
= image_tag(@conference.picture_url, class: 'img-responsive img-center', id: 'splash-logo') if @conference.picture?
|
||||||
|
.col-md-8
|
||||||
|
%h1
|
||||||
|
= @conference.title
|
||||||
|
%h3
|
||||||
|
- if @conference.start_date && @conference.end_date
|
||||||
|
%span.date.text-nowrap
|
||||||
|
= date_string(@conference.start_date, @conference.end_date)
|
||||||
|
- if @conference.venue
|
||||||
|
%span.venue.text-nowrap
|
||||||
|
- if @conference.venue.website
|
||||||
|
= sanitize link_to(@conference.venue.name, @conference.venue.website)
|
||||||
|
- else
|
||||||
|
= @conference.venue.city
|
||||||
|
- if @conference.venue.country_name != 'US'
|
||||||
|
•
|
||||||
|
= @conference.venue.country_name
|
||||||
|
|
||||||
|
- unless @conference.description.blank?
|
||||||
|
%section#about
|
||||||
|
.container
|
||||||
|
.row
|
||||||
|
.col-md-8.col-md-offset-2
|
||||||
|
%h3.text-center
|
||||||
|
= markdown(@conference.description)
|
||||||
|
|
@ -11,31 +11,7 @@
|
||||||
= @conference.title
|
= @conference.title
|
||||||
|
|
||||||
#splash
|
#splash
|
||||||
- cache [@conference, @conference.venue, '#splash#header'] do
|
= render 'header'
|
||||||
#banner
|
|
||||||
.container
|
|
||||||
.row
|
|
||||||
.col-md-8.col-md-offset-2#header
|
|
||||||
.row
|
|
||||||
.col-md-4
|
|
||||||
= image_tag(@conference.picture_url, class: 'img-responsive img-center', id: 'splash-logo') if @conference.picture?
|
|
||||||
.col-md-8
|
|
||||||
%h1
|
|
||||||
= @conference.title
|
|
||||||
%p.lead
|
|
||||||
- if @conference.venue
|
|
||||||
= "#{@conference.venue.city} / #{@conference.venue.country_name}"
|
|
||||||
- if @conference.start_date && @conference.end_date
|
|
||||||
%br
|
|
||||||
= date_string(@conference.start_date, @conference.end_date)
|
|
||||||
|
|
||||||
- unless @conference.description.blank?
|
|
||||||
%section#about
|
|
||||||
.container
|
|
||||||
.row
|
|
||||||
.col-md-8.col-md-offset-2
|
|
||||||
%h3.text-center
|
|
||||||
= markdown(@conference.description)
|
|
||||||
|
|
||||||
- if @conference.splashpage.include_registrations && @conference.registration_open?
|
- if @conference.splashpage.include_registrations && @conference.registration_open?
|
||||||
= render 'registration'
|
= render 'registration'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue