Use fragment caching on the splashpage
This commit is contained in:
parent
7f2346650f
commit
f4b869c129
11 changed files with 335 additions and 317 deletions
|
|
@ -2,7 +2,9 @@
|
||||||
%li
|
%li
|
||||||
%a.smoothscroll{ href: '#booths' } Booths
|
%a.smoothscroll{ href: '#booths' } Booths
|
||||||
|
|
||||||
.container
|
- cache [@conference.confirmed_booths, '#splash#booths'] do
|
||||||
|
%section#booths
|
||||||
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-center
|
.col-md-12.text-center
|
||||||
%h2 Booths
|
%h2 Booths
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@
|
||||||
%li
|
%li
|
||||||
%a.smoothscroll{ href: '#callforpapers' } Call For Papers
|
%a.smoothscroll{ href: '#callforpapers' } Call For Papers
|
||||||
|
|
||||||
.container
|
- cache [@conference, @conference.call_for_events, @conference.confirmed_tracks,
|
||||||
|
'#splash#callforpapers'] do
|
||||||
|
%section#callforpapers
|
||||||
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-center
|
.col-md-12.text-center
|
||||||
%h2
|
%h2
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
%li
|
%li
|
||||||
%a.smoothscroll{ href: '#callfortracks' } Call For Tracks
|
%a.smoothscroll{ href: '#callfortracks' } Call For Tracks
|
||||||
|
|
||||||
.container
|
- cache [@conference, @conference.call_for_tracks, '#splash#callfortracks'] do
|
||||||
|
%section#callfortracks
|
||||||
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-center
|
.col-md-12.text-center
|
||||||
%h2
|
%h2
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,11 @@
|
||||||
%li
|
%li
|
||||||
%a.smoothscroll{ href: '#lodging' } Lodging
|
%a.smoothscroll{ href: '#lodging' } Lodging
|
||||||
|
|
||||||
.container
|
- cache [@conference.venue, @conference.lodgings, '#splash#lodging'] do
|
||||||
|
%section#lodging
|
||||||
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-center
|
.col-md-12.text-centers
|
||||||
%h2
|
%h2
|
||||||
Where to stay
|
Where to stay
|
||||||
- if @conference.venue
|
- if @conference.venue
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
%li
|
%li
|
||||||
%a.smoothscroll{ href: '#registration' } Registration
|
%a.smoothscroll{ href: '#registration' } Registration
|
||||||
|
|
||||||
.container
|
- cache [@conference.registration_period, @conference.tickets, '#splash#registration'] do
|
||||||
|
%section#registration
|
||||||
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-center
|
.col-md-12.text-center
|
||||||
%h1 Registration
|
%h1 Registration
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
=link_to('#program', class: 'smoothscroll') do
|
=link_to('#program', class: 'smoothscroll') do
|
||||||
Program
|
Program
|
||||||
|
|
||||||
.container
|
- cache [@confererence, @conference.confirmed_tracks, '#splash#program'] do
|
||||||
|
%section#program
|
||||||
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
%h2.text-center
|
%h2.text-center
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
.container
|
- cache [@conference.contact, '#splash#social'] do
|
||||||
|
%section#social-media
|
||||||
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-center
|
.col-md-12.text-center
|
||||||
- unless @conference.contact.facebook.blank?
|
- unless @conference.contact.facebook.blank?
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,10 @@
|
||||||
%li
|
%li
|
||||||
%a.smoothscroll{ href: '#sponsors' } Sponsors
|
%a.smoothscroll{ href: '#sponsors' } Sponsors
|
||||||
|
|
||||||
.container
|
- cache [@conference, @conference.sponsors, @conference.sponsorship_levels,
|
||||||
|
@conference.try(:call_for_sponsors), '#splash#sponsors'] do
|
||||||
|
%section#sponsors
|
||||||
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-center
|
.col-md-12.text-center
|
||||||
%h2 Sponsors
|
%h2 Sponsors
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
.container
|
= content_for :splash_nav do
|
||||||
|
%li
|
||||||
|
%a.smoothscroll{ href: '#tickets' } Tickets
|
||||||
|
|
||||||
|
- cache [@conference, @conference.tickets, '#splash#tickets'] do
|
||||||
|
%section#tickets
|
||||||
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-center
|
.col-md-12.text-center
|
||||||
%h2
|
%h2
|
||||||
|
|
@ -22,4 +28,3 @@
|
||||||
= link_to(conference_tickets_path(@conference.short_title), class: 'btn btn-success') do
|
= link_to(conference_tickets_path(@conference.short_title), class: 'btn btn-success') do
|
||||||
Get Ticket
|
Get Ticket
|
||||||
= humanized_money_with_symbol ticket.price
|
= humanized_money_with_symbol ticket.price
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
= content_for :splash_nav do
|
= content_for :splash_nav do
|
||||||
%li
|
%li
|
||||||
%a.smoothscroll{ href: '#venue' } Venue
|
%a.smoothscroll{ href: '#venue' } Venue
|
||||||
-if @conference.venue.location?
|
|
||||||
|
- cache [@conference.venue, @conference.venue.commercial, '#splash#venue'] do
|
||||||
|
%section#venue
|
||||||
|
-if @conference.venue.location?
|
||||||
= render '/conferences/venue_map'
|
= render '/conferences/venue_map'
|
||||||
-else
|
-else
|
||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-6
|
.col-md-6
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
= @conference.title
|
= @conference.title
|
||||||
|
|
||||||
#splash
|
#splash
|
||||||
|
- cache [@conference, @conference.venue, '#splash#header'] do
|
||||||
#banner
|
#banner
|
||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
|
|
@ -37,49 +38,40 @@
|
||||||
= markdown(@conference.description)
|
= markdown(@conference.description)
|
||||||
|
|
||||||
- if @conference.splashpage.include_registrations && @conference.registration_open?
|
- if @conference.splashpage.include_registrations && @conference.registration_open?
|
||||||
%section#registration
|
|
||||||
= render 'registration'
|
= render 'registration'
|
||||||
|
|
||||||
- if @conference.splashpage.include_program
|
- if @conference.splashpage.include_program
|
||||||
%section#program
|
|
||||||
= render 'schedule_splashpage'
|
= render 'schedule_splashpage'
|
||||||
|
|
||||||
- if @conference.splashpage.include_cfp && @conference.call_for_events.try(:open?)
|
- if @conference.splashpage.include_cfp && @conference.call_for_events.try(:open?)
|
||||||
%section#callforpapers
|
|
||||||
= render 'call_for_paper'
|
= render 'call_for_paper'
|
||||||
|
|
||||||
- if @conference.splashpage.include_cfp && @conference.call_for_tracks.try(:open?)
|
- if @conference.splashpage.include_cfp && @conference.call_for_tracks.try(:open?)
|
||||||
%section#callfortracks
|
|
||||||
= render 'call_for_tracks'
|
= render 'call_for_tracks'
|
||||||
|
|
||||||
- if @conference.splashpage.include_venue && @conference.venue
|
- if @conference.splashpage.include_venue && @conference.venue
|
||||||
%section#venue
|
|
||||||
= render 'venue'
|
= render 'venue'
|
||||||
|
|
||||||
- if @conference.splashpage.include_lodgings && @conference.lodgings.any?
|
- if @conference.splashpage.include_lodgings && @conference.lodgings.any?
|
||||||
%section#lodging
|
|
||||||
= render 'lodging'
|
= render 'lodging'
|
||||||
|
|
||||||
- if @conference.splashpage.include_tickets && @conference.tickets.any? && @conference.pending?
|
- if @conference.splashpage.include_tickets && @conference.tickets.any? && @conference.pending?
|
||||||
%section#tickets
|
|
||||||
= render 'tickets'
|
= render 'tickets'
|
||||||
|
|
||||||
- if @conference.splashpage.include_booths && @conference.confirmed_booths.any?
|
- if @conference.splashpage.include_booths && @conference.confirmed_booths.any?
|
||||||
%section#booths
|
|
||||||
= render 'booths'
|
= render 'booths'
|
||||||
|
|
||||||
- if @conference.splashpage.include_sponsors && @conference.sponsors.any?
|
- if @conference.splashpage.include_sponsors && @conference.sponsors.any?
|
||||||
%section#sponsors
|
|
||||||
= render 'sponsors'
|
= render 'sponsors'
|
||||||
|
|
||||||
- if @conference.splashpage.include_social_media && @conference.contact.has_social_media?
|
- if @conference.splashpage.include_social_media && @conference.contact.has_social_media?
|
||||||
%section#social-media
|
|
||||||
= render 'social_media'
|
= render 'social_media'
|
||||||
|
|
||||||
// grmbl
|
// grmbl
|
||||||
= render 'footer'
|
= render 'footer'
|
||||||
|
|
||||||
- content_for :script_head do
|
- cache [@conference.color, '#splash#inlinejs'] do
|
||||||
|
- content_for :script_head do
|
||||||
:javascript
|
:javascript
|
||||||
var triangle_tcs = tinycolor("#{h(@conference.color)}").monochromatic();
|
var triangle_tcs = tinycolor("#{h(@conference.color)}").monochromatic();
|
||||||
var triangle_colors = triangle_tcs.map(function(t) { return t.toHexString(); });
|
var triangle_colors = triangle_tcs.map(function(t) { return t.toHexString(); });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue