Updated style and layout
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<svg>
|
||||
<defs>
|
||||
<g id="rainbow">
|
||||
<rect x="0%" y="0" width="<%= (100/5) %>%" height="100%" class="colour-2"/>
|
||||
<rect x="<%= (100/5)*1 %>%" y="0" width="<%= (100/5) %>%" height="100%" class="colour-5"/>
|
||||
<rect x="<%= (100/5)*2 %>%" y="0" width="<%= (100/5) %>%" height="100%" class="colour-4"/>
|
||||
<rect x="<%= (100/5)*3 %>%" y="0" width="<%= (100/5) %>%" height="100%" class="colour-3"/>
|
||||
<rect x="<%= (100/5)*4 %>%" y="0" width="<%= (100/5) %>%" height="100%" class="colour-1"/>
|
||||
</g>
|
||||
<image x="0" y="0" width="100%" height="100%" xlink:href="<%= @conference.cover_url %>" id="banner-image" preserveAspectRatio="xMidYMid slice"/>
|
||||
|
||||
<filter id="f1" x="0" y="0" width="1" height="1">
|
||||
<feImage xlink:href="#rainbow" result="rainbow"/>
|
||||
<feImage xlink:href="#banner-image" result="banner-image"/>
|
||||
<feBlend mode="multiply" in="rainbow" in2="banner-image" />
|
||||
</filter>
|
||||
</defs>
|
||||
|
||||
<rect width="100%" height="100%" filter="url(#f1)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1019 B |
@@ -1,67 +1,68 @@
|
||||
- banner_image @conference.cover_url, id: @conference.cover_attribution_id, name: @conference.cover_attribution_name, user_id: @conference.cover_attribution_user_id, src: @conference.cover_attribution_src
|
||||
- small_banner = (params['controller'] == 'conferences' && params['action'] != 'show')
|
||||
- if small_banner
|
||||
- body_class('small-banner')
|
||||
- page_style (params['controller'] == 'conferences' ? 'article' : 'emphasize-banner')
|
||||
-#- small_banner = (params['controller'] == 'conferences' && params['action'] != 'show')
|
||||
-#- if small_banner
|
||||
-# - body_class('small-banner')
|
||||
-#- page_style (params['controller'] == 'conferences' ? 'article' : 'emphasize-banner')
|
||||
|
||||
- content_for :banner do
|
||||
.row
|
||||
- if !small_banner
|
||||
.columns.small-12.banner
|
||||
%figure
|
||||
%img{src: @conference.poster.full.url}
|
||||
.columns.medium-7.align-bottom
|
||||
- title = @conference.conference_type.slug == 'bikebike' ? 'Bike!Bike! '+@conference.start_date.year.to_s : @conference.title
|
||||
%div
|
||||
%h1
|
||||
- if params['controller'] == 'conferences' && params['action'] == 'show'
|
||||
= title
|
||||
- else
|
||||
%a{href: @conference.url}=title
|
||||
%h2
|
||||
- location = @conference.organizations.first.locations.first
|
||||
= location.city + ', ' + (location.territory ? Carmen::Country.coded(location.country).subregions.coded(location.territory).name : location.country)
|
||||
%em
|
||||
= (l @conference.start_date, format: :date) + ' - ' + (l @conference.end_date, format: :date)
|
||||
- if params['controller'] != 'conferences'
|
||||
- info = nil
|
||||
- if @conference.registration_open
|
||||
- if @conference.registration_info
|
||||
- info = @conference.registration_info
|
||||
- elsif @conference.end_date < Time.now
|
||||
- if @conference.preregistration_info
|
||||
- info = @conference.postregistration_info
|
||||
- elsif @conference.preregistration_info
|
||||
- info = @conference.preregistration_info
|
||||
- if info
|
||||
= info.html_safe
|
||||
- else
|
||||
%p= ActionView::Base.full_sanitizer.sanitize(@conference.info).gsub(/^(.{300,350}\.)(.*)$/m, '\1...')
|
||||
.columns.medium-5.centered.align-bottom.buttons
|
||||
%div
|
||||
- if params['controller'] != 'conferences'
|
||||
%a.button.more{href: @conference.url}
|
||||
=_'conference.More_Info'
|
||||
- if @conference.registration_open && !small_banner
|
||||
%a.button#register-now.register-now{href: @conference.url(:register)}
|
||||
=_'conference.Register_Now'
|
||||
#register-dlg
|
||||
= form_tag (@conference.url + '/register/').gsub(/\/\/+/, '/'), :method => :post do
|
||||
= hidden_field_tag :step, 'register'
|
||||
= email_field_tag :email
|
||||
= form_actions :register
|
||||
- if !small_banner && @conference.registration_open
|
||||
- content_for :dom_ready do
|
||||
:plain
|
||||
$('a.register-now').click(function(e) {
|
||||
e.preventDefault();
|
||||
if ($('#register-dlg').hasClass('open')) {
|
||||
$('#register-dlg form').submit();
|
||||
}
|
||||
$('#register-dlg').toggleClass('open');
|
||||
});
|
||||
$('#register-dlg').click(function(e) {
|
||||
if ($(e.target).attr('id') == 'register-dlg') {
|
||||
$('#register-dlg').toggleClass('open');
|
||||
}
|
||||
});
|
||||
#header-title{style: capable_of(:svg) ? nil : "background-image: url(#{@conference.cover_url})"}
|
||||
- if capable_of(:svg)
|
||||
= render 'conferences/banner_image.svg'
|
||||
.title
|
||||
%h2.background="#{@conference.start_date.year.to_s}!"
|
||||
.details
|
||||
%h3.primary=location(@conference.organizations.first.locations.first)
|
||||
.secondary
|
||||
= date_span(@conference.start_date.to_date, @conference.end_date.to_date)
|
||||
%figure
|
||||
%img{src: @conference.poster.full.url}
|
||||
-# =columns({medium: 7}) do
|
||||
-# - title = @conference.conference_type.slug == 'bikebike' ? 'Bike!Bike! '+@conference.start_date.year.to_s : @conference.title
|
||||
-# %div
|
||||
-# %h1
|
||||
-# - if params['controller'] == 'conferences' && params['action'] == 'show'
|
||||
-# = title
|
||||
-# - else
|
||||
-# %a{href: @conference.url}=title
|
||||
-# %em
|
||||
-# - if params['controller'] != 'conferences'
|
||||
-# - info = nil
|
||||
-# - if @conference.registration_open
|
||||
-# - if @conference.registration_info
|
||||
-# - info = @conference.registration_info
|
||||
-# - elsif @conference.end_date < Time.now
|
||||
-# - if @conference.preregistration_info
|
||||
-# - info = @conference.postregistration_info
|
||||
-# - elsif @conference.preregistration_info
|
||||
-# - info = @conference.preregistration_info
|
||||
-# - if info
|
||||
-# = info.html_safe
|
||||
-# - else
|
||||
-# %p= ActionView::Base.full_sanitizer.sanitize(@conference.info).gsub(/^(.{300,350}\.)(.*)$/m, '\1...')
|
||||
=#columns({medium: 5}) do
|
||||
-# %div
|
||||
-# - if params['controller'] != 'conferences'
|
||||
-# %a.button.more{href: @conference.url}
|
||||
-# =_'conference.More_Info'
|
||||
-# - if @conference.registration_open && !small_banner
|
||||
-# %a.button#register-now.register-now{href: @conference.url(:register)}
|
||||
-# =_'conference.Register_Now'
|
||||
-# #register-dlg
|
||||
-# = form_tag (@conference.url + '/register/').gsub(/\/\/+/, '/'), :method => :post do
|
||||
-# = hidden_field_tag :step, 'register'
|
||||
-# = email_field_tag :email
|
||||
-# = form_actions :register
|
||||
-# - if !small_banner && @conference.registration_open
|
||||
-# - content_for :dom_ready do
|
||||
-# :plain
|
||||
-# $('a.register-now').click(function(e) {
|
||||
-# e.preventDefault();
|
||||
-# if ($('#register-dlg').hasClass('open')) {
|
||||
-# $('#register-dlg form').submit();
|
||||
-# }
|
||||
-# $('#register-dlg').toggleClass('open');
|
||||
-# });
|
||||
-# $('#register-dlg').click(function(e) {
|
||||
-# if ($(e.target).attr('id') == 'register-dlg') {
|
||||
-# $('#register-dlg').toggleClass('open');
|
||||
-# }
|
||||
-# });
|
||||
Reference in New Issue
Block a user