Another round of splash design

* Add map to splash
* Reverse venue<->conference relation
* Split venue address into fields
* Don't go through venue for lodgings anymore
This commit is contained in:
Henne Vogelsang 2014-11-20 14:57:03 +01:00
parent 30e8ab856c
commit cb227a0afc
55 changed files with 717 additions and 548 deletions

View file

@ -12,7 +12,8 @@
%dt
Description
%dd
= markdown(@conference.description)
- unless @conference.description.blank?
= markdown(@conference.description)
%dt
Date
%dd

View file

@ -1,8 +1,8 @@
= f.input :name
= f.input :description, :input_html => {:rows => 2, data: { provide: "markdown-editable" } }, hint: markdown_hint("Write about the hotel/place, of what they are offering, about types of rooms, prices and address.")
= image_tag f.object.photo(:thumb) if !f.object.photo.blank?
= f.input :photo
= f.input :website_link
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }
= link_to 'Back', admin_conference_lodgings_path(@conference.short_title)
= semantic_form_for(@lodging, :url => (@lodging.new_record? ? admin_conference_lodgings_path : admin_conference_lodging_path(@conference.short_title, @lodging))) do |f|
= f.input :name
= f.input :website_link
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint
- unless @lodging.photo.blank?
= image_tag @lodging.photo(:thumb)
= f.input :photo
= f.action :submit, as: :button, button_html: { class: 'btn btn-primary' }

View file

@ -1,6 +0,0 @@
%h1
Edit Lodging
.row
.col-md-8
= semantic_form_for(@lodging, :url => admin_conference_lodging_path(@conference.short_title, @lodging)) do |f|
= render partial: 'form', locals: { f: f }

View file

@ -1,5 +1,5 @@
%h1 Lodgings
- if @venue.lodgings.any?
- if @conference.lodgings.any?
.row
.col-md-12
%table.table
@ -9,7 +9,7 @@
%th Edit
%th Delete
%tbody
- @venue.lodgings.each_with_index do |lodging, index|
- @conference.lodgings.each_with_index do |lodging, index|
%tr
%td
= index + 1

View file

@ -1,6 +0,0 @@
%h1
New Lodging
.row
.col-md-8
= semantic_form_for(@lodging, :url => admin_conference_lodgings_path(@conference.short_title, @lodging)) do |f|
= render partial: 'form', locals: { f: f }

View file

@ -1,8 +1,7 @@
= semantic_form_for(@venue, url: admin_conference_venue_path(@conference.short_title)) do |f|
= f.input :name, input_html: { rows: 1 }
= f.input :address, input_html: { rows: 1 }
= f.input :website
= f.inputs :name, :website
= f.input :description, input_html: { rows: 5, cols: 20, data: { provide: 'markdown-editable' } }, hint: markdown_hint
= f.inputs :street, :postalcode, :city, :country, :longitude, :latitude
- unless @venue.photo.blank?
= image_tag @venue.photo(:thumb)
= f.input :photo

View file

@ -1,38 +0,0 @@
.row{'style'=>'padding-top: 15px;'}
.col-md-6
%dl.dl-horizontal
%dt
Name
%dd
= @venue.name
%dt
Address
%dd
= @venue.address
%dt
Website
%dd
= @venue.website
%dt
Description
%dd
- unless @venue.description.blank?
= markdown(@venue.description)
.row.row-flex.row-flex-wrap
.col-md-4
.thumbnail.flex-col
%h3.text-center
Venue Logo
- if @venue.photo
= image_tag(@venue.photo(:large), class: 'img-responsive')
.caption.flex-grow
.caption
%p
%dl.dl-horizontal
%dt
Filename
%dd
= @venue.photo_file_name
-else
%h4.text-center
Not set!

View file

@ -1,16 +0,0 @@
.row
.col-md-12
%ul.nav.nav-tabs{'role'=>'tablist'}
%li.active
%a{'href'=> '#show', 'role'=>'tab', 'data-toggle'=>'tab'}
Show
%li
%a{'href'=> '#edit', 'role'=>'tab', 'data-toggle'=>'tab'}
Edit
.row
.col-md-8
.tab-content
.tab-pane.active#show
= render partial: 'show'
.tab-pane#edit
= render partial: 'form'

View file

@ -0,0 +1,25 @@
-if @venue
.row
.col-md-6
=image_tag(@conference.venue.photo, class: 'img-responsive img-rounded') unless @conference.venue.photo.blank?
.col-md-6
%address
%strong
= @venue.name
%br
= @venue.street
%br
= "#{@venue.postalcode}, #{@venue.city}"
%br
= @venue.country_name
.row
.col-md-12
= link_to(edit_admin_conference_venue_path(@conference.short_title), class: 'btn btn-primary') do
Edit Venue
= link_to(admin_conference_venue_path(@conference.short_title), method: 'delete', class: 'btn btn-danger') do
Delete Venue
-else
.row
.col-md-12
= link_to(new_admin_conference_venue_path(@conference.short_title), class: 'btn btn-success') do
Create Venue

View file

@ -5,55 +5,35 @@
.container
.row
.col-md-12.text-center
%h1
Call For Papers
- if !@conference.call_for_papers.description.blank?
= markdown(@conference.call_for_papers.description)
%h2
Call for Papers
%p.lead
We are ready to accept your proposals for sessions!
.row
.col-md-6.col-md-offset-3
%p
- if @conference.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
= @conference.call_for_papers.start_date.strftime('%A, %B %-d. %Y')
and closes
%em
= @conference.call_for_papers.end_date.strftime('%A, %B %-d. %Y.')
That means you have only
- days = (@conference.call_for_papers.end_date - Date.today).to_i
%b
= pluralize(days, 'days')
left!
Remember
= @conference.short_title
will only be as good as the sessions you present. Submit early, submit often!
.row
.col-md-12.text-center
.lead
= link_to "Submit Your Proposals Today", conference_proposal_index_path(@conference.short_title), class: 'btn btn-info', target: '_blank'
- if !@conference.call_for_papers.start_date.blank? && !@conference.call_for_papers.end_date.blank?
%p
Proposals will be accepted between
%p#cfp-date
= date_string(@conference.call_for_papers.start_date, @conference.call_for_papers.end_date)
.row
.col-md-8.col-md-offset-3.text-center
%div.col-md-2.timer-box
%h2#days
.lead Days
%div.col-md-2.timer-box
%h2#hours
.lead Hours
%div.col-md-2.timer-box
%h2#minutes
.lead Minutes
%div.col-md-2.timer-box
%h2#seconds
.lead Seconds
:javascript
$( document ).ready(function(){
var target_date = new Date("#{@conference.call_for_papers.end_date}").getTime();
if(target_date > new Date().getTime())
var days, hours, minutes, seconds;
setInterval(function () {
var current_date = new Date().getTime();
var seconds_left = (target_date - current_date) / 1000;
days = parseInt(seconds_left / 86400);
seconds_left = seconds_left % 86400;
hours = parseInt(seconds_left / 3600);
seconds_left = seconds_left % 3600;
minutes = parseInt(seconds_left / 60);
seconds = parseInt(seconds_left % 60);
$('#days').text(days);
$('#hours').text(hours);
$('#minutes').text(minutes);
$('#seconds').text(seconds);
}, 1000);
});
%p.cta-button
= link_to "Submit your paper now", conference_proposal_index_path(@conference.short_title), class: 'btn btn-success btn-lg text-center'

View file

@ -10,14 +10,6 @@
%small
%b
= date_string(conference.start_date, conference.end_date)
- if conference.venue.name and conference.venue.website and conference.venue.address
%p
%small<
= link_to conference.venue.name, conference.venue.website
,&nbsp;
\#{link_to conference.venue.address, "http://maps.google.com/maps?q=#{conference.venue.address}"}
- if conference.venue.description
= simple_format(conference.venue.description, class: 'lead')
.col-md-2
.btn-group-vertical
- if current_user.nil? || !current_user.subscribed?(conference)

View file

@ -1,5 +1,5 @@
%div.scroll-top-wrapper
= link_to "#splash-banner", class: "smoothscroll" do
= link_to "#banner", class: "smoothscroll" do
%i.fa.fa-2x.fa-arrow-circle-up
:javascript

View file

@ -1,20 +0,0 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#location' } Location
.container
.row
.col-md-12.text-center
- unless @conference.venue.name.blank?
%h1
%strong #{ @conference.venue.name }
- unless @conference.venue.address.blank?
= link_to("http://maps.google.com/maps?q=#{@conference.venue.address}") do
%h2
#{ @conference.venue.address }
- unless @conference.venue.description.blank?
.lead
= markdown(@conference.venue.description)
- unless @conference.venue.website.blank?
%p.lead
= link_to(@conference.venue.website, @conference.venue.website)

View file

@ -4,16 +4,23 @@
%h2 Accommodation Deals
%p.lead
We have prepared affordable accommodation deals for your visit.
.row
- @conference.venue.lodgings.each do |r|
%div{ class: (@conference.venue.lodgings.count.to_i <= 2 ? "col-md-#{12/@conference.venue.lodgings.count.to_i}" : "col-md-4") }
.div.thumbnail
-unless r.photo.blank?
= image_tag r.photo(:large), class: 'img-responsive'
-unless r.name.blank?
%h4.text-center #{ r.name }
-unless r.description.blank?
.lead.text-left #{ markdown(r.description) }
- unless r.website_link.blank?
.text-center
= link_to 'Go to Website', r.website_link
- @conference.lodgings.each_slice(3) do |slice|
.row.row-centered
- slice.each do |lodging|
.col-md-4.ticket.col-centered.col-top
.thumbnail
- if lodging.photo.blank?
%p.text-center
%i.fa.fa-home.fa-5x
- else
-if lodging.website_link.present?
= link_to(lodging.website_link, class: 'thumbnail') do
= image_tag lodging.photo(:large), class: 'img-responsive img-lodging'
- else
= image_tag lodging.photo(:large), class: 'img-responsive img-lodging'
.caption
%h3.text-center
= lodging.name
-if lodging.description.present?
= markdown(lodging.description)

View file

@ -1,36 +1,34 @@
= content_for :splash_nav do
%li
=link_to('#program', class: 'smoothscroll') do
Program
.container
.row
.col-md-12.text-center
%h1 Program
- if @conference.splashpage and @conference.splashpage.include_tracks
.row
.col-md-12
- @conference.tracks.each do |t|
.tracks{ class: (@conference.tracks.count.to_i <= 2 ? "col-md-#{12/@conference.tracks.count.to_i}" : "col-md-4") }
%h4.text-center
= t.name
%p
= markdown(t.description)
- if @conference.call_for_papers and @conference.call_for_papers.schedule_public
.row
.col-md-12
%p.text-center
Check out our
= link_to 'Schedule', conference_schedule_path(@conference.short_title)
- if !@keynote_speakers.blank?
%div.row.text-center
%div.col-md-12
%h3 Keynote Speakers
- @keynote_speakers.each do |k|
%div{ class: (@keynote_speakers.count.to_i <= 2 ? "col-md-#{12/@keynote_speakers.count.to_i}" : "col-md-4") }
= image_tag(k.gravatar_url(size: '80'), class: 'img-circle') unless k.gravatar_url.blank?
%h4
= k.name
-unless k.biography.blank?
%p
= k.biography
.col-md-12
%h2.text-center
Program
%p.lead.text-center
= @conference.short_title
has the most awesome program ever!
- if @conference.splashpage and @conference.splashpage.include_tracks
See rock-star speakers cover the topics of
- if @conference.splashpage and @conference.splashpage.include_tracks
- @conference.tracks.each_slice(3) do |slice|
.row.row-centered
- slice.each do |track|
.col-md-4.col-centered.col-top.track
%h4.text-center
= track.name
= markdown(track.description)
- if @conference.call_for_papers and @conference.call_for_papers.schedule_public
.row
.col-md-12
%p.cta-button.text-center
= link_to(conference_schedule_path(@conference.short_title), class: 'btn btn-default btn-lg') do
Full Schedule
- #FIXME: Display keynotes https://github.com/openSUSE/osem/issues/544
- #FIXME: Display schedule highlights https://github.com/openSUSE/osem/issues/545
= content_for :splash_nav do
%li
=link_to('#program', class: 'smoothscroll') do
Program

View file

@ -9,8 +9,11 @@
%p.lead
Going to
= @conference.short_title
is free of charge. We only ask you to
= link_to "register yourself", new_conference_conference_registrations_path(@conference.short_title)
until
= @conference.registration_period.end_date
is free of charge.
%p
We only ask you to register yourself until
= @conference.registration_period.end_date.strftime('%A, %B %-d. %Y')
so we can plan for the right amount of people.
%p.cta-button
= link_to(new_conference_conference_registrations_path(@conference.short_title), class: 'btn btn-lg btn-success') do
Register Now

View file

@ -2,21 +2,18 @@
%li
%a.smoothscroll{ href: '#social-media' } Social Media
%div.container#social-media.text-center
%div.row
- unless @conference.contact.facebook.blank?
%div.col-md-3
.container
.row
.col-md-12.text-center
- unless @conference.contact.facebook.blank?
= link_to "#{ @conference.contact.facebook }" do
%i.fa.fa-facebook-square.fa-4x
- unless @conference.contact.twitter.blank?
%div.col-md-3
- unless @conference.contact.twitter.blank?
= link_to "#{ @conference.contact.twitter }" do
%i.fa.fa-twitter.fa-4x
- unless @conference.contact.instagram.blank?
%div.col-md-3
- unless @conference.contact.instagram.blank?
= link_to "#{ @conference.contact.instagram }" do
%i.fa.fa-instagram.fa-4x
- unless @conference.contact.googleplus.blank?
%div.col-md-3
- unless @conference.contact.googleplus.blank?
= link_to "#{ @conference.contact.googleplus }" do
%i.fa.fa-google-plus-square.fa-4x

View file

@ -12,16 +12,21 @@
wouldn't be possible!
- @conference.sponsorship_levels.each do |sponsorship_level|
-if sponsorship_level.sponsors.any?
.row
.col-md-12.text-center
%h3
= sponsorship_level.title
- sponsorship_level.sponsors.each_slice(3) do |slice|
.row
.row.row-centered
- slice.each do |sponsor|
.col-md-4
= link_to("http://#{sponsor.website_url}", class: 'thumbnail') do
= image_tag(sponsor.logo(:large), alt: "#{sponsor.name} Logo", title: "#{sponsor.description}")
.col-md-4.col-centered.col-top
.thumbnail
- if sponsor.logo.blank?
%h3.text-center
= link_to(sponsor.website_url, title: "#{sponsor.name}") do
= sponsor.name
- else
= link_to(sponsor.website_url, class: 'thumbnail') do
= image_tag sponsor.logo, class: "img-responsive img-sponsor img-sponsor-#{sponsorship_level.position}", title: "#{sponsor.name}"
.caption
-if sponsor.description.present?
= markdown(sponsor.description)
-if @conference.contact and !@conference.contact.sponsor_email.blank?
.row
.col-md-12

View file

@ -1,21 +1,25 @@
.container
.row
.col-md-12.text-center
%h1
%h2
Support
=@conference.short_title
%p.lead
To support our event you can purchase tickets
.row
- @conference.tickets.each do |ticket|
%div{ class: (@conference.tickets.count <= 2 ? "col-md-#{12/@conference.tickets.count}" : "col-md-4") }
- if ticket.title.present?
%h4.text-center
=ticket.title
- if ticket.description.present?
= markdown(ticket.description)
.text-center
.btn-group
= link_to(conference_tickets_path(@conference.short_title), class: 'btn btn-success') do
Buy Ticket
= "#{humanized_money_with_symbol ticket.price}"
To support our event you can purchase these tickets
- @conference.tickets.each_slice(4) do |slice|
.row.row-centered
- slice.each do |ticket|
.col-md-3.col-centered.col-top
.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
Buy Ticket
= humanized_money_with_symbol ticket.price

View file

@ -0,0 +1,43 @@
= content_for :splash_nav do
%li
%a.smoothscroll{ href: '#venue' } Venue
-if !@conference.venue.latitude.blank? and !@conference.venue.longitude.blank?
#map{style: "height: 500px;" }
- popup = "<h3>#{@conference.venue.name}</h3><br>#{@conference.venue.street}<br>#{@conference.venue.postalcode}, #{@conference.venue.city}<br>#{@conference.venue.country_name}"
- content_for(:script_body) do
:javascript
// create a map in the "map" div, set the view to a given place and zoom
var map = L.map('map', {scrollWheelZoom: false}).setView([#{@conference.venue.longitude}, #{@conference.venue.latitude}], 11);
// add an OpenStreetMap tile layer
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
maxZoom: 18
}).addTo(map);
// add a marker in the given location, attach some popup content to it and open the popup
L.marker([#{@conference.venue.longitude}, #{@conference.venue.latitude}]).addTo(map)
.bindPopup("#{popup}")
.openPopup();
-else
.container
.row
.col-md-12
%h2.text-center
= "#{@conference.venue.city} / #{@conference.venue.country_name}"
.col-md-6
.thumbnail
=image_tag(@conference.venue.photo, class: 'img-responsive img-rounded') unless @conference.venue.photo.blank?
.caption
- unless @conference.venue.description.blank?
= markdown(@conference.venue.description)
.col-md-6
%address
%h1
= @conference.venue.name
= @conference.venue.street
%br
= "#{@conference.venue.postalcode}, #{@conference.venue.city}"
%br
= @conference.venue.country_name
- if @conference.venue.website
%br
=link_to @conference.venue.website, @conference.venue.website

View file

@ -1,9 +1,9 @@
#splash
- if @conference.splashpage
#splash-banner
#banner
.container
.row
.col-md-8.col-md-offset-2#splash-header
.col-md-8.col-md-offset-2#header
.row
.col-md-4
= image_tag(@conference.logo(:original), class: 'img-responsive', id: 'splash-logo') if @conference.logo?
@ -11,7 +11,10 @@
%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?
@ -22,38 +25,38 @@
%h3.text-center
= markdown(@conference.description)
- if @conference.splashpage.include_program
%section#program
= render 'program'
- if @conference.cfp_open? and @conference.call_for_papers.include_cfp_in_splash?
%section#callforpapers
= render 'call_for_papers'
- if @conference.venue and @conference.splashpage.include_venue
#location{ style: ("background-image: url(#{@conference.venue.photo})" unless @conference.venue.photo.blank?) }
= render 'location'
- if @conference.registration_open? and @conference.splashpage.include_registrations
%section#registration
= render 'registration'
- if @conference.splashpage.include_program
%section#program
= render 'program'
- if @conference.cfp_open? and @conference.call_for_papers.include_cfp_in_splash?
%section#callforpapers
= render 'call_for_papers'
- if @conference.venue and @conference.splashpage.include_venue
%section#venue
= render 'venue'
- if @conference.lodgings.any? and @conference.splashpage.include_lodgings
%section#lodging
= render 'lodging'
- if @conference.tickets.any? and @conference.splashpage.include_tickets
%section#tickets
= render 'tickets'
- if @conference.venue.lodgings.any? and @conference.splashpage.include_lodgings
%section#lodging
= render 'lodging'
- if @conference.sponsors.any? and @conference.splashpage.include_sponsors
%section#sponsors
= render 'sponsors'
- if @conference.splashpage.include_social_media
%section#social-media
= render 'social_media'
// grmbl
= render 'footer'
@ -61,3 +64,10 @@
:javascript
var triangle_tcs = tinycolor("#{@conference.color}").monochromatic();
var triangle_colors = triangle_tcs.map(function(t) { return t.toHexString(); });
$(function () {
$(document).ready(function() {
var t = new Trianglify({cellsize: 100, x_gradient: triangle_colors });
var pattern = t.generate(document.body.clientWidth, ($( "#banner" ).height() + 200 ));
$('#banner').css('background-image', pattern.dataUrl);
});
});

View file

@ -8,7 +8,7 @@
= date_string(@conference.start_date, @conference.end_date)
.row
.col-md-6
- if @conference.venue.name and @conference.venue.website and @conference.venue.address
- if @conference.venue.name and @conference.venue.website and @conference.venue.street
%p
%small
at

View file

@ -45,16 +45,16 @@
- if can? :update, @conference
%li{:class=> active_nav_li(edit_admin_conference_splashpage_path(@conference.short_title))}
= link_to 'Splashpage', edit_admin_conference_splashpage_path(@conference.short_title)
- if can? :index, @conference.venue
%li{:class=> "#{active_nav_li(edit_admin_conference_venue_path(@conference.short_title))}"}
= link_to(edit_admin_conference_venue_path(@conference.short_title)) do
- if can? :index, Venue.new(conference_id: @conference.id)
%li{:class=> "#{active_nav_li(admin_conference_venue_path(@conference.short_title))}"}
= link_to(admin_conference_venue_path(@conference.short_title)) do
%span.fa.fa-road
Venue
%ul
- if can? :update, @conference.rooms.build
%li{:class=> active_nav_li(admin_conference_rooms_path(@conference.short_title))}
= link_to 'Rooms', admin_conference_rooms_path(@conference.short_title)
- if can? :update, @conference.venue.lodgings.build
- if can? :update, @conference.lodgings.build
%li{ class: active_nav_li(admin_conference_lodgings_path(@conference.short_title)) }
= link_to 'Lodgings', admin_conference_lodgings_path(@conference.short_title)
%li

View file

@ -41,4 +41,5 @@
You can run, copy, distribute, study, change and improve it.
The source code and the developers are on
=link_to "github.", "https://github.com/openSUSE/osem"
= content_for(:script_body)
= piwik_tracking_tag