Browse Source

Changed paragraph font to Queulat and started work on the schedule maker

development
Godwin 8 years ago
parent
commit
fe0c9bbfa6
  1. BIN
      app/assets/fonts/queulat.eot
  2. BIN
      app/assets/fonts/queulat.otf
  3. 6007
      app/assets/fonts/queulat.svg
  4. BIN
      app/assets/fonts/queulat.ttf
  5. BIN
      app/assets/fonts/queulat.woff
  6. BIN
      app/assets/fonts/queulat.woff2
  7. 89
      app/assets/stylesheets/_application.scss
  8. 8
      app/assets/stylesheets/bumbleberry-settings.json
  9. 40
      app/controllers/conferences_controller.rb
  10. 61
      app/helpers/application_helper.rb
  11. 6
      app/views/application/about.html.haml
  12. 2
      app/views/conferences/admin/_meals.html.haml
  13. 17
      app/views/conferences/admin/_schedule.html.haml
  14. 12
      app/views/conferences/register.html.haml
  15. 11
      app/views/workshops/show.html.haml
  16. 2
      config/initializers/assets.rb
  17. 12
      config/locales/en.yml
  18. 1
      config/routes.rb
  19. 5
      db/migrate/20160630233219_add_workshop_blocks_to_conferences.rb
  20. 3
      db/schema.rb
  21. 19279
      vendor/assets/javascripts/html2canvas.js

BIN
app/assets/fonts/queulat.eot

Binary file not shown.

BIN
app/assets/fonts/queulat.otf

Binary file not shown.

6007
app/assets/fonts/queulat.svg

File diff suppressed because it is too large

After

Width:  |  Height:  |  Size: 292 KiB

BIN
app/assets/fonts/queulat.ttf

Binary file not shown.

BIN
app/assets/fonts/queulat.woff

Binary file not shown.

BIN
app/assets/fonts/queulat.woff2

Binary file not shown.

89
app/assets/stylesheets/_application.scss

@ -13,7 +13,7 @@ body {
padding-bottom: 20vw;
}
h1, h2, h3, h4, h5, label, button, .button, dt, th, nav.sub-menu {
h1, h2, h3, h4, h5, label, button, .button, dt, th, .table-th, nav.sub-menu {
@include font-family(secondary);
font-weight: normal;
}
@ -23,6 +23,10 @@ h2 {
font-size: 6vw;
}
h3 {
font-size: 4.5vw;
}
h3.subtitle {
font-size: 1.5em;
}
@ -70,32 +74,53 @@ a {
position: absolute !important;
}
table {
table, .table {
margin-bottom: 2em;
margin-left: 1em;
// background-color: #F8F8F8;
// width: 100%;
// @include default-box-shadow(top, 2, true);
th, td {
th, td, .table-th, .table-td {
text-align: left;
padding: 0.25em 0.5em;
border: 0.1em solid #EEE;
border: 0.1rem solid #EEE;
&:first-child {
&.center {
text-align: center;
}
&.big {
font-size: 1.5em;
}
/*&:first-child {
padding-left: 1em;
}
&:last-child {
padding-right: 1em;
}
}*/
}
th {
th, .table-th {
background-color: #F8F8F8;
}
}
.table {
display: table;
border-collapse: collapse;
}
.table-tr {
display: table-row;
}
.table-th, .table-td {
display: table-cell;
}
button,
.button {
@include button;
@ -451,6 +476,12 @@ input {
margin-bottom: 3em;
position: relative;
@include default-box-shadow(top);
td &,
.table-td & {
@include _(box-shadow, none);
margin: 0;
}
label {
display: block;
@ -572,6 +603,14 @@ input {
display: inline-block;
}
.check-box-field.small {
font-size: 0.75em;
&.small label {
font-size: 1.125em;
}
}
.radio-button-field {
label {
width: 7em;
@ -655,16 +694,27 @@ form {
}
}
#main .columns th.form {
#main .columns th.form,
#main .columns .table-th.form {
display: none;
}
#main .columns td.form {
#main .columns td.form,
#main .columns .table-td.form {
border: 0;
form {
margin: 0;
}
button {
display: block;
width: 100%;
+ button {
margin-top: 0.5em;
}
}
}
fieldset {
@ -1306,6 +1356,14 @@ ul.warnings li,
}
}
#admin-schedule {
.workshop-blocks {
td, th {
vertical-align: top;
}
}
}
#main {
position: relative;
background-color: $white;
@ -2672,6 +2730,11 @@ html[data-lingua-franca-example="html"] {
border: 0.1rem solid #CCC;
cursor: pointer;
@include default-box-shadow(top, 1.5, false);
td &,
.table-td & {
@include _(box-shadow, none);
}
}
}
@ -2779,8 +2842,12 @@ html[data-ontop] {
font-size: 2.25em;
}
h3 {
font-size: 1.4em;
}
p {
font-size: 1.333em;
font-size: 1.25em;
}
form {
@ -3089,7 +3156,7 @@ html[data-ontop] {
figure {
float: left;
width: 33%;
margin: 0 1.5em 1.5em -1.5em;
margin: 0 1.5em 1em -1.5em;
}
}
}

8
app/assets/stylesheets/bumbleberry-settings.json

@ -63,10 +63,10 @@
"font-loading-method": "http2",
"fonts": {
"primary": {
"name": "SourceSansPro-Regular",
"location": "SourceSansPro-Regular",
"svg_id": "source_sans_proregular",
"ttf_type": "otf",
"name": "queulat",
"location": "queulat",
"svg_id": "queulat",
"ttf_type": "ttf",
"fallback": ["Helvetica Neue", "Helvetica", "Arial", "Lucida Grande", "sans-serif"]
},
"secondary": {

40
app/controllers/conferences_controller.rb

@ -809,6 +809,10 @@ class ConferencesController < ApplicationController
@day = nil
@time = nil
@length = 1.5
when :meals
@meals = Hash[@this_conference.meals.map{ |k, v| [k.to_i, v] }].sort.to_h
when :schedule
get_scheule_data
end
when :done
@amount = ((@registration.registration_fees_paid || 0) * 100).to_i.to_s.gsub(/^(.*)(\d\d)$/, '\1.\2')
@ -816,6 +820,30 @@ class ConferencesController < ApplicationController
end
def get_scheule_data
@meals = Hash[@this_conference.meals.map{ |k, v| [k.to_i, v] }].sort.to_h
@events = Event.where(:conference_id => @this_conference.id).order(start_time: :asc)
@workshops = Workshop.where(:conference_id => @this_conference.id).order(start_time: :asc)
@locations = {}
@workshop_blocks = @this_conference.workshop_blocks || []
@workshop_blocks << {
'time' => nil,
'length' => 1.0,
'days' => []
}
@workshops.each do |workshop|
if workshop.location_id
@locations[workshop.location_id] ||= workshop.location
end
end
@block_days = []
day = @this_conference.start_date
while day <= @this_conference.end_date
@block_days << day.wday
day += 1.day
end
end
def get_housing_data
@hosts = {}
@guests = {}
@ -1063,6 +1091,18 @@ class ConferencesController < ApplicationController
return redirect_to administration_step_path(@this_conference.slug, :events)
end
when 'schedule'
case params[:button]
when 'save_block'
@this_conference.workshop_blocks ||= []
@this_conference.workshop_blocks[params[:workshop_block].to_i] = {
'time' => params[:time],
'length' => params[:time_span],
'days' => params[:days].keys
}
@this_conference.save
return redirect_to administration_step_path(@this_conference.slug, :schedule)
end
end
do_404
end

61
app/helpers/application_helper.rb

@ -1077,6 +1077,26 @@ module ApplicationHelper
checkboxes(name, [true], value, label_key, options)
end
def unique_id(id)
id = id.to_s.gsub('[', '_').gsub(']', '')
@_ids ||= {}
@_ids[id] ||= 0
new_id = id
if @_ids[id] > 0
#puts " ====== #{id} - #{@_ids[id]} : #{@_ids[id] + 1} ====== "
new_id += "--#{@_ids[id]}"
end
puts " ====== #{id} = #{@_ids[id]} ====== "
@_ids[id] += 1
puts " ====== #{id} = #{@_ids[id]} ====== "
return new_id
end
def checkboxes(name, boxes, values, label_key, options = {})
html = ''
@ -1084,42 +1104,54 @@ module ApplicationHelper
description_id = nil
if options[:heading].present?
label_id ||= "#{name.to_s}-label"
label_id ||= unique_id("#{name.to_s}-label")
html += content_tag(:h3, _(options[:heading], :t), id: label_id)
end
if options[:help].present?
description_id ||= "#{name.to_s}-desc"
description_id ||= unique_id("#{name.to_s}-desc")
html += content_tag(:div, _(options[:help], :s, 2), class: 'input-field-help', id: description_id)
end
boxes_html = ''
is_single = !values.is_a?(Array)
values = values.present? ? values.map(&:to_s) : [] unless is_single
boxes = boxes.map(&:to_s)
unless boxes.length > 0 && boxes.first.is_a?(Integer)
values = values.present? ? values.map(&:to_s) : [] unless is_single
boxes = boxes.map(&:to_s)
end
boxes.each do | box |
checked = (is_single ? values.present? : values.include?(box))
values -= [box] if checked && !is_single
id = nil
if options[:radiobuttons].present?
id = "#{name.to_s}_#{box}"
boxes_html += radio_button_tag(name, box, checked)
id = unique_id("#{name.to_s}_#{box}")
boxes_html += radio_button_tag(name, box, checked, id: id)
else
_name = (is_single ? name : "#{name.to_s}[#{box}]")
id = unique_id(_name)
boxes_html += check_box_tag(_name, 1, checked, data: { toggles: options[:toggles] }.compact, id: id)
end
if is_single
label = _(label_key.to_s)
elsif box.is_a?(Integer)
label = I18n.t(label_key.to_s)[box]
else
id = (is_single ? name : "#{name.to_s}[#{box}]")
boxes_html += check_box_tag(id, 1, checked, data: { toggles: options[:toggles] }.compact)
label = _("#{label_key.to_s}.#{box}")
end
boxes_html += label_tag(id, _(is_single ? label_key.to_s : "#{label_key.to_s}.#{box}"))
boxes_html += label_tag(id, label)
end
if options[:other].present? && !is_single
id = nil
if options[:radiobuttons].present?
id = "#{name.to_s}_other"
boxes_html += radio_button_tag(name, :other, values.present?)
id = unique_id("#{name.to_s}_other")
boxes_html += radio_button_tag(name, :other, values.present?, id: id)
else
id = "#{name.to_s}[other]"
boxes_html += check_box_tag(id, 1, values.present?)
_name = "#{name.to_s}[other]"
id = unique_id(_name)
boxes_html += check_box_tag(_name, 1, values.present?, id: id)
end
boxes_html += label_tag id,
content_tag(:div,
@ -1132,7 +1164,8 @@ module ApplicationHelper
'check-box-field',
'input-field',
options[:vertical] ? 'vertical' : nil,
options[:inline] ? 'inline' : nil
options[:inline] ? 'inline' : nil,
options[:small] ? 'small' : nil
]).html_safe,
aria: {
labeledby: label_id,

6
app/views/application/about.html.haml

@ -5,8 +5,9 @@
%h2=_'articles.about_bikebike.headings.What_is_BikeBike', :t
%p=_'articles.about_bikebike.paragraphs.What_is_BikeBike', :p
= columns(medium: 12) do
= columns(medium: 12, class: 'featured-image-container') do
%h3=_'articles.about_bikebike.headings.bicycle_project', :t
%figure{style: "background-image: url(#{image_path('columbus_people.jpg')})"}
%p=_'articles.about_bikebike.paragraphs.bicycle_project_paragraph', :p
%ul
- [:non_profit, :no_money, :education, :volunteer_run, :export_bikes, :low_cost, :recycle_parts].each do |term|
@ -14,9 +15,8 @@
= columns(medium: 12) do
%h3=_'articles.about_bikebike.headings.Who_is_Invited', :t
%p=_'articles.about_bikebike.paragraphs.Who_is_Invited', :p
= columns(medium: 12, class: 'featured-image-container') do
= columns(medium: 12) do
%h3=_'articles.about_bikebike.headings.Types_of_Workshops', :t
%figure{style: "background-image: url(#{image_path('columbus_people.jpg')})"}
%p=_'articles.about_bikebike.paragraphs.Types_of_Workshops', :p
= columns(medium: 12) do
%h3=_'articles.about_bikebike.headings.Amenities', :t

2
app/views/conferences/admin/_meals.html.haml

@ -7,7 +7,7 @@
%th=_'forms.labels.generic.day'
%th=_'forms.labels.generic.time'
%th.form
- Hash[@this_conference.meals.map{ |k, v| [k.to_i, v] }].sort.to_h.each do | time, meal |
- @meals.each do | time, meal |
%tr
%th
=_!(meal['title'] || '')

17
app/views/conferences/admin/_schedule.html.haml

@ -0,0 +1,17 @@
.table.workshop-blocks
.table-tr
.table-th=_'forms.labels.generic.block_number'
.table-th=_'forms.labels.generic.time'
.table-th=_'forms.labels.generic.length'
.table-th=_'forms.labels.generic.days'
.table-th.form
- @workshop_blocks.each_with_index do | info, block |
= form_tag administration_update_path(@this_conference.slug, :schedule), class: 'table-tr' do
.table-th.center.big=(block + 1)
.table-td=time_select info['time'], small: true, label: false
.table-td=length_select info['length'], {small: true, label: false}, 0.5, 2
.table-td=checkboxes :days, @block_days, info['days'].map(&:to_i), 'date.day_names', vertical: true, small: true
.table-td.form
= hidden_field_tag :workshop_block, block
= button_tag :delete_block, value: :delete_block, class: [:small, :delete] if block == @workshop_blocks.length - 2
= button_tag (info['time'].present? ? :update_block : :add_block), value: :save_block, class: [:small, :add]

12
app/views/conferences/register.html.haml

@ -1,16 +1,6 @@
= render :partial => 'page_header', :locals => {:page_key => 'Conference_Registration'}
= registration_step_menu
-#- if (steps = current_registration_steps(@registration))
-# = row id: 'registration-steps', class: 'flow-steps' do
-# = columns do
-# %ul
-# - current_registration_steps.each do | step |
-# - text = _"articles.conference_registration.headings.#{step[:name].to_s}"
-# %li{class: [step[:enabled] ? :enabled : nil, @register_template == step[:name] ? :current : nil]}
-# - if step[:enabled]
-# .step= link_to text, register_step_path(@this_conference.slug, step[:name])
-# - else
-# .step= text
- if @warnings.present?
= row class: 'warnings', tag: :ul do
- @warnings.each do | warning |

11
app/views/workshops/show.html.haml

@ -1,15 +1,6 @@
= render 'conferences/page_header', :page_key => 'Conference_Registration'
= row id: 'registration-steps', class: 'flow-steps' do
= columns do
%ul
- current_registration_steps.each do | step |
- text = _"articles.conference_registration.headings.#{step[:name].to_s}"
%li{class: [step[:enabled] ? :enabled : nil, :workshops == step[:name] ? :current : nil]}
- if step[:enabled]
.step= link_to text, register_step_path(@this_conference.slug, step[:name])
- else
.step= text
= registration_step_menu
%article
= render 'workshops/show', :workshop => @workshop, :translations_available_for_editing => @translations_available_for_editing, :preview => false

2
config/initializers/assets.rb

@ -8,4 +8,4 @@ Rails.application.config.assets.version = '1.0'
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
Rails.application.config.assets.precompile += %w( user-mailer.css map.js pen.js editor.js markdown.js main.js housing.js favicon.ico )
Rails.application.config.assets.precompile += %w( user-mailer.css map.js pen.js editor.js markdown.js html2canvas.js main.js housing.js favicon.ico )

12
config/locales/en.yml

@ -5478,17 +5478,7 @@ en:
Total_Registrations: Total Registrations
about_bikebike:
paragraphs:
bicycle_project_paragraph: 'Bike!Bike! 2015: An international reunion meant
to be a swap-meet for experiences and ideas about community bike projects.
From collectives that use the bicycle as an excuse to change society, economy
and the environment. Non-profit groups that have a community bike shops,
cooperatives and other projects that promote the use of the bicycle and
that come together to turn their communities into a place where riding is
easier, more inclusive, safer and more fun. The list below uses the criteria
found in the old Bicycle Organization Organization Project for what constitutes
a community bike shop. The bike project need not meet all these criteria.
Rather, it is a general list of qualities which are common among many bicycle
projects.'
bicycle_project_paragraph: 'From collectives that use the bicycle as an excuse to change society, economy and the environment. Non-profit groups that have a community bike shops, cooperatives and other projects that promote the use of the bicycle and that come together to turn their communities into a place where riding is easier, more inclusive, safer and more fun. The list below uses the criteria found in the old Bicycle Organization Organization Project for what constitutes a community bike shop. The bike project need not meet all these criteria. Rather, it is a general list of qualities which are common among many bicycle projects.'
Who_is_Invited: You don’t have to be an expert or belong to a huge group,
you just need to be willing to share what you know about organization, mechanics,
social impact, inequality alternatives, better access to bicycles or knowledge

1
config/routes.rb

@ -52,6 +52,7 @@ BikeBike::Application.routes.draw do
get '/oauth/:provider' => 'oauths#oauth', :as => :auth_at_provider
post '/translator-request' => 'application#translator_request', :as => :translator_request
# patch '/capture_view' => 'application#capture_view'
post '/js_error' => 'application#js_error'
get '/error_403' => 'application#do_403'
get '/error_404' => 'application#error_404'

5
db/migrate/20160630233219_add_workshop_blocks_to_conferences.rb

@ -0,0 +1,5 @@
class AddWorkshopBlocksToConferences < ActiveRecord::Migration
def change
add_column :conferences, :workshop_blocks, :json
end
end

3
db/schema.rb

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160622011811) do
ActiveRecord::Schema.define(version: 20160630233219) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -127,6 +127,7 @@ ActiveRecord::Schema.define(version: 20160622011811) do
t.string "day_parts"
t.string "registration_status"
t.json "meals"
t.json "workshop_blocks"
end
create_table "delayed_jobs", force: :cascade do |t|

19279
vendor/assets/javascripts/html2canvas.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save