mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Splash view for banner component
This commit is contained in:
parent
524f22835d
commit
cc8299294d
4 changed files with 33 additions and 11 deletions
|
|
@ -92,22 +92,27 @@ body {
|
|||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
#venue-banner-disp{
|
||||
.banner-disp{
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
width: 100%;
|
||||
background-size: cover;
|
||||
-webkit-background-size:cover;
|
||||
}
|
||||
#venue-banner-disp.with-background{
|
||||
.banner-disp.with-location-background{
|
||||
min-height: 500px;
|
||||
}
|
||||
|
||||
#venue-banner-disp li{
|
||||
.banner-disp.with-splash-banner{
|
||||
min-height: 700px;
|
||||
}
|
||||
.location-links li{
|
||||
display: inline-block;
|
||||
margin-right: 2em;
|
||||
}
|
||||
|
||||
.banner-text{
|
||||
padding-top: 10%;
|
||||
color: #fff;
|
||||
}
|
||||
.pad{
|
||||
padding-top: 35px;
|
||||
padding-bottom: 35px;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
%a{ href: '#location' } Location
|
||||
|
||||
|
||||
%div#venue-banner-disp{ style: ("background-image: url(#{@conference.venue.photo})" unless @conference.venue.photo.blank?), class:('with-background' unless @conference.venue.photo.blank?) }
|
||||
%div.banner-disp{ style: ("background-image: url(#{@conference.venue.photo})" unless @conference.venue.photo.blank?), class:('with-location-background' unless @conference.venue.photo.blank?) }
|
||||
%div.container.text-center
|
||||
.div.row.col-md-12
|
||||
- unless @conference.venue.name.blank?
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
- unless @conference.venue.description.blank?
|
||||
%p
|
||||
%strong #{ @conference.venue.description }
|
||||
%ul
|
||||
%ul.location-links
|
||||
- unless @conference.venue.address.blank?
|
||||
%li
|
||||
%b
|
||||
|
|
|
|||
|
|
@ -1,8 +1,20 @@
|
|||
= content_for :brand do
|
||||
= link_to @conference.title, conference_url(@conference.short_title), class: 'navbar-brand'
|
||||
= content_for :splash do
|
||||
- unless @conference.description.blank?
|
||||
%p= @conference.description
|
||||
- if @conference.include_banner_in_splash?
|
||||
%section{ id: 'splash-banner' }
|
||||
%div.banner-disp{ style: ("background-image: url(#{@conference.banner_photo})" unless @conference.banner_photo.blank?), class:('with-splash-banner' unless @conference.banner_photo.blank?) }
|
||||
%div.container.text-center.banner-text
|
||||
.row.col-md-12
|
||||
%h1
|
||||
= @conference.title
|
||||
- if @conference.start_date && @conference.end_date
|
||||
%h3
|
||||
= conference_date_string(@conference)
|
||||
|
||||
- unless @conference.description.blank?
|
||||
.row-fluid.col-md-12.lead
|
||||
%p= @conference.description
|
||||
|
||||
- if @conference.include_program_in_splash?
|
||||
%section{ id: 'program' }
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ describe 'conference/show.html.haml' do
|
|||
include_sponsors_in_splash: true,
|
||||
include_social_media_in_splash: true,
|
||||
include_tracks_in_splash: true,
|
||||
include_tickets_in_splash: true)
|
||||
include_tickets_in_splash: true,
|
||||
include_banner_in_splash: true)
|
||||
@conference.call_for_papers = create(:call_for_papers, conference: @conference,
|
||||
include_cfp_in_splash: true)
|
||||
@conference.sponsorship_levels << create(:sponsorship_level, conference: @conference)
|
||||
|
|
@ -30,8 +31,12 @@ describe 'conference/show.html.haml' do
|
|||
render
|
||||
end
|
||||
|
||||
it 'renders program partial' do
|
||||
it 'renders banner component' do
|
||||
expect(view.content_for(:splash)).to include("#{@conference.description}")
|
||||
expect(view.content_for(:splash)).to include("#{@conference.title}")
|
||||
end
|
||||
|
||||
it 'renders program partial' do
|
||||
expect(view).to render_template(partial: 'conference/_program')
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue