diff --git a/app/assets/images/bg_1.jpg b/app/assets/images/bg_1.jpg new file mode 100644 index 000000000..07424f9b3 Binary files /dev/null and b/app/assets/images/bg_1.jpg differ diff --git a/app/assets/images/bg_2.jpg b/app/assets/images/bg_2.jpg new file mode 100644 index 000000000..668e35f59 Binary files /dev/null and b/app/assets/images/bg_2.jpg differ diff --git a/app/assets/images/bg_3.jpg b/app/assets/images/bg_3.jpg new file mode 100644 index 000000000..cab6f71fd Binary files /dev/null and b/app/assets/images/bg_3.jpg differ diff --git a/app/assets/images/dot.png b/app/assets/images/dot.png new file mode 100644 index 000000000..a0f12c84e Binary files /dev/null and b/app/assets/images/dot.png differ diff --git a/app/assets/images/facebook.png b/app/assets/images/facebook.png new file mode 100644 index 000000000..598bbaf42 Binary files /dev/null and b/app/assets/images/facebook.png differ diff --git a/app/assets/images/github.png b/app/assets/images/github.png new file mode 100644 index 000000000..5c08ccd5b Binary files /dev/null and b/app/assets/images/github.png differ diff --git a/app/assets/images/images_bg_big.jpg b/app/assets/images/images_bg_big.jpg new file mode 100644 index 000000000..6aa96f9f2 Binary files /dev/null and b/app/assets/images/images_bg_big.jpg differ diff --git a/app/assets/images/images_bg_big_small.jpg b/app/assets/images/images_bg_big_small.jpg new file mode 100644 index 000000000..f23359e8e Binary files /dev/null and b/app/assets/images/images_bg_big_small.jpg differ diff --git a/app/assets/images/logo.png b/app/assets/images/logo.png index 8b979098c..103e21b69 100644 Binary files a/app/assets/images/logo.png and b/app/assets/images/logo.png differ diff --git a/app/assets/images/pic1.jpg b/app/assets/images/pic1.jpg new file mode 100644 index 000000000..e697cc4b6 Binary files /dev/null and b/app/assets/images/pic1.jpg differ diff --git a/app/assets/images/pic2.jpg b/app/assets/images/pic2.jpg new file mode 100644 index 000000000..5c68cbbf4 Binary files /dev/null and b/app/assets/images/pic2.jpg differ diff --git a/app/assets/images/pic3.jpg b/app/assets/images/pic3.jpg new file mode 100644 index 000000000..c2c574494 Binary files /dev/null and b/app/assets/images/pic3.jpg differ diff --git a/app/assets/images/reevoo.jpg b/app/assets/images/reevoo.jpg index 7a1495d43..4ecd54179 100644 Binary files a/app/assets/images/reevoo.jpg and b/app/assets/images/reevoo.jpg differ diff --git a/app/assets/images/shutl.png b/app/assets/images/shutl.png index 8d0dd26c7..1baba6011 100644 Binary files a/app/assets/images/shutl.png and b/app/assets/images/shutl.png differ diff --git a/app/assets/images/twitter.png b/app/assets/images/twitter.png new file mode 100644 index 000000000..07976b9ea Binary files /dev/null and b/app/assets/images/twitter.png differ diff --git a/app/assets/images/unboxed.png b/app/assets/images/unboxed.png new file mode 100644 index 000000000..ec5c51594 Binary files /dev/null and b/app/assets/images/unboxed.png differ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 3192ec897..15aca45cd 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -10,4 +10,4 @@ * *= require_self *= require_tree . - */ + */ \ No newline at end of file diff --git a/app/assets/stylesheets/members.css.sass b/app/assets/stylesheets/members.css.sass new file mode 100644 index 000000000..5c17ecacb --- /dev/null +++ b/app/assets/stylesheets/members.css.sass @@ -0,0 +1,23 @@ +#member + + form + .checkbox + label + display: inline-block + padding-right: 15px + + .form-footer + margin-top: 50px + + ul.hint + margin: 20px 0 0 + padding: 0 + font-size: 0.7em + + li + padding-top: 5px + li + list-style-type: circle + + label.check_boxes + padding-bottom: 10px diff --git a/app/assets/stylesheets/partials/_colors.css.sass b/app/assets/stylesheets/partials/_colors.css.sass new file mode 100644 index 000000000..58ff79d9a --- /dev/null +++ b/app/assets/stylesheets/partials/_colors.css.sass @@ -0,0 +1,35 @@ +$main-stroke: #f2f2f4 +$navigation-gray: #fdfdfd +$navigation-gray-separators: #dddedd +$nav-block-border: #e5e2e0 +$gray-title-button: #f5f5f5 + +$become-member-grey: #5e5a6b +$become-member-white: #f1f1f3 +$become-member-drop-shadow-purple: #72629a +$become-member-inner-purple: #a6a4b8 + +$next-session-grey: #fbfbfb +$become-sponsor-grey: #fafafa +$become-sponsor-drop-shadow: #b0afc0 +$get-in-touch-purple: #b0afc0 +$become-sponsor-text: #8969a8 +$become-sponsor-border: #e2dded + +$navigation-links-purple: #613789 + +$title-side: #342552 +$our-mission-purple: #6f4a93 +$next-session-yellow: #fdcc38 +$next-course-green: #57ae3b +$code-of-conduct-purple: #ccc0d6 + +$dark-purple: #1f1430 +$titles-dark-purple: #4c4066 +$paragraph: #393349 +$bold-par-light-grey: #6f6c7c +$link-purple: #a26cd2 +$session-titles-dark-grey: #2d193c +$session-day-gray: #555555 +$sub-session-desc-grey: #6e6b6c +$dark-color: #0e001b diff --git a/app/assets/stylesheets/style.css.sass b/app/assets/stylesheets/style.css.sass index 1a095432f..0374c7ac8 100644 --- a/app/assets/stylesheets/style.css.sass +++ b/app/assets/stylesheets/style.css.sass @@ -1,18 +1,63 @@ +@import 'partials/colors' + body margin: 0 padding: 0 - font-family: proxima-nova, Helvetical, Arial, sans-serif - min-width: 360px + font-family: proxima-nova, Helvetica, Arial, sans-serif + font-size: 100% + background-color: #ebe6e2 + background: url("images_bg_big_small.jpg") no-repeat scroll 0 0 rgba(0, 0, 0, 0) + +ul + list-style: none + color: $navigation-links-purple + +.navbar + font-size: 19px + font-weight: 400 + letter-spacing: 0.02em + +.navigation + float: right + margin-top: 8px + +.navbar li + border-left: 1px solid $navigation-gray-separators + display: inline + padding: 10px 20px + +.navbar li:first-child + border: none + +.member-button + background-color: $become-member-grey + border-radius: 6px + padding: 10px 25px + margin-left: 15px + color: $become-member-white + box-shadow: 0 1px 1px rgba(114, 98, 154, 0.1) + a margin: 0 padding: 0 - border: 0 - font-size: 100% - font: inherit vertical-align: baseline text-decoration: none - color: #652f93 + color: $link-purple + +#left-image + display: block + float: left + width: 15% + +#right-image + display: inline + float: right + width: 15% + +#main-layout + width: 100% + .right-panel, .left-panel display: inline-block @@ -22,11 +67,10 @@ a padding-right: 30px .right-panel - margin-top: 45px + max-width: 403px vertical-align: top - min-width: 30% - background-color: #fff - text-align: right + width: 34% + margin-left: 30px .siteunder font-size: 18px @@ -35,9 +79,8 @@ a margin-left: 20px .logo - width: 180px - margin: auto - margin-top: -30px + width: 185px + float: left #top width: 100% @@ -45,16 +88,20 @@ a background-color: #2c173a border-bottom: 2px solid #b9b1bf +#nav-inside + min-width: 900px + margin: 0 auto + max-width: 1100px + #navlight - height: 40px - background-color: #f6f4f8 + height: 80px + background-color: $navigation-gray + border-bottom: 1px solid $nav-block-border width: 100% + padding-top: 10px -.form-footer - border-top: 1px solid #e4eae9 - margin-top: 20px - padding-top: 20px - margin-right: 200px +.member-button + display: inline .row margin-bottom: 20px @@ -67,73 +114,72 @@ a width: 25% .half + display: block + margin: 20px 20px 0 0 width: 45% .third width: 33% -footer - margin: 30px auto - text-align: center - - #container + background-color: #FFFFFF font-size: 1.4em - width: 80% - margin: 0 auto - min-height: 500px + margin: 0 auto 70px + max-width: 1100px + min-width: 900px + border-left: 8px solid rgba(242, 242, 244, 0.5) + border-bottom: 8px solid rgba(242, 242, 244, 0.5) + border-right: 8px solid rgba(242, 242, 244, 0.5) + -webkit-background-clip: padding-box + background-clip: padding-box + box-shadow: 1px 0px 0px rgba(177, 166, 204, 0.2) inset, -1px 0px 0px rgba(177, 166, 204, 0.2) inset + -webkit-box-shadow: 1px 0px 0px rgba(177, 166, 204, 0.2) inset, -1px 0px 0px rgba(177, 166, 204, 0.2) inset + -moz-box-shadow: 1px 0px 0px rgba(177, 166, 204, 0.2) inset, -1px 0px 0px rgba(177, 166, 204, 0.2) inset + padding-bottom: 70px + min-height: 450px - h1, h3, h2 - color: #2D183D - font-weight: 400 - - h2 - font-size: 1.6em input, textarea margin-right: 10px input[type="text"], input[type="email"], textarea + font-family: inherit width: 350px height: 35px margin-top: 10px padding: 5px 15px - border-radius: 5px - border: none - background-color: #e4eae9 + border-radius: 6px + border: 1px solid $nav-block-border + background-color: $next-session-grey font-size: 1em + color: $become-member-grey .btn, .button, input[type='submit'] - border: 1px solid #DDDDDD + background-color: $become-member-grey border-radius: 6px - box-shadow: 1px 1px 0 rgba(250, 250, 250, 0.5) inset, -1px -1px 2px rgba(250, 250, 250, 0.1) inset - font-size: 23px - display: block - font-weight: 400 - padding: 10px 45px - text-align: center - min-width: 100px - margin-bottom: 20px - + padding: 10px 25px + margin-left: 15px + box-shadow: 0 1px 1px rgba(114, 98, 154, 0.1) + font-size: 20px &:hover box-shadow: 1px 2px 2px #652f93 .button, input[type='submit'] - background-color: white text-decoration: none transition-duration: 0.2s - color: #652f93 + color: $become-member-white textarea - height: 100px - width: 750px + height: 107px + width: 805px .required abbr color: #F50000 + border-bottom: none label display: block @@ -143,10 +189,13 @@ footer font-weight: bold .lead - font-size: 20px + font-size: 18px + font-weight: 300 + line-height: 21px + color: $paragraph .messages - margin-top: 20px + margin-top: 0px .messages padding: 0 100px @@ -156,14 +205,14 @@ footer font-size: 0.9em background-color: #f6f4f8 - section#main - display: inline-block + section + padding-top: 20px .right text-align: right -.tutor +.tutor, .coach margin-top: 50px .avatar, .about display: inline-block @@ -178,9 +227,194 @@ footer .about max-width: 500px +#wall-of-fame + .coach + .about + min-width: 300px + max-width: 300px + line-height: 0.8em + + .name + font-size: 0.8em + + .about_you + font-size: 0.6em + + li + display: inline-block + width: 45% + @media(max-width: 900px) .left-panel, .right-panel width: 100% .right-panel text-align: center + +.session + background-color: $next-session-grey + border-left: 10px solid $next-session-yellow + +.mission + border-left: 10px solid $our-mission-purple + background-color: $gray-title-button + +#code-of-conduct + border-left: 10px solid $code-of-conduct-purple + background-color: $gray-title-button + +.course + border-left: 10px solid $next-course-green + background-color: $next-session-grey + +.titlebox + padding: 10px 20px + width: 83% + margin: 30px 0 30px + padding: 20px 40px + box-shadow: inset 0 0 1px rgba(177, 166, 204, 0.5) + -webkit-box-shadow: inset 0 0 1px rgba(177, 166, 204, 0.5) + -moz-box-shadow: inset 0 0 1px rgba(177, 166, 204, 0.5) + position: relative + + h2 + color: $titles-dark-purple + font-size: 34px + text-shadow: 0px 0px 2px rgba(250, 250, 250, 1) + margin: 0 + font-weight: 300 + + .dot + background: url("dot.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0) + height: 30px + position: absolute + right: 8px + top: 8px + width: 30px + + +.description + margin-left: 50px + width: 84% + padding-bottom: 30px + + .sub-block + margin-top: 10px + padding: 30px 0 + .member-button + margin-left: 0 + + .lead + a + border-bottom: 1px dotted $link-purple + + .move-top + padding-top: 10px + + .details-block + padding-top: 10px + border-bottom: 1px solid $nav-block-border + + a + border-bottom: 1px dotted $link-purple + + h3 + font-weight: 600 + font-size: 28px + margin: 0 + color: $title-side + + h5 + font-size: 16px + font-weight: 400 + letter-spacing: 0.03em + color: $sub-session-desc-grey + margin: 0 + + h6 + font-size: 15px + font-weight: 600 + color: $title-side + margin: 21px 0 26px + + +.social + margin: 10px 0 27px + border-bottom: 1px solid $navigation-gray-separators + padding-bottom: 16px + li + display: inline-block + margin-left: 43px + + +.right-block + border-bottom: 1px solid $navigation-gray-separators + padding: 0 0 24px 30px + width: 74% + + h4 + color: $title-side + margin: 0 + font-weight: 600 + font-size: 22px + + .sponsors + padding: 5px 0 0 0 + margin-bottom: 0 + margin-top: 0 + + li + margin-top: 20px + + .gallery + padding: 5px 0 0 0 + margin-bottom: 0 + + li + margin-top: 0px + +.become-a-sponsor + padding: 60px 0 60px 30px + border-bottom: 1px solid $navigation-gray-separators + margin-bottom: 29px + + .sponsor-button + background-color: $become-sponsor-grey + color: $become-sponsor-text + border: 1px solid $become-sponsor-border + border-radius: 6px + padding: 13px 42px + box-shadow: 0 1px 1px rgba(114, 98, 154, 0.4) + font-size: 20px + +footer + border-top: 1px solid $nav-block-border + background-color: $dark-purple + padding-top: 20px + margin-bottom: 0 + padding: 30px + + #footer-width + margin: 0 auto + max-width: 1100px + min-width: 900px + width: 100% + + .dot-footer + background: url("dot.png") no-repeat scroll 0 0 rgba(0, 0, 0, 0) + height: 30px + width: 30px + display: inline-block + + .footer-copy + color: $become-sponsor-drop-shadow + display: inline-block + margin-left: 20px + + a + color: $become-sponsor-drop-shadow + text-decoration: underline + + .right-float + float: right + margin: 15px diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb index b6b8a4fbf..c37d05d66 100644 --- a/app/controllers/dashboard_controller.rb +++ b/app/controllers/dashboard_controller.rb @@ -1,6 +1,8 @@ class DashboardController < ApplicationController def show - @sessions = Sessions.upcoming + @next_session = Sessions.next + @next_course = Course.next + @sponsors = Sponsor.latest end def code @@ -8,4 +10,23 @@ def code def about end + + def wall_of_fame + sessions_count = Sessions.count + @coaches = order_by_attendance(attendance_stats_by_coach).map do |member_id, attendances| + member = Member.find(member_id) + member.attendance = attendances + member + end + end + + private + + def attendance_stats_by_coach + SessionInvitation.to_coaches.attended.by_member.count(:member_id) + end + + def order_by_attendance member_stats + member_stats.sort_by { |member_id, attendance| attendance }.reverse + end end diff --git a/app/models/course.rb b/app/models/course.rb index 925985f5c..3c830450e 100644 --- a/app/models/course.rb +++ b/app/models/course.rb @@ -9,6 +9,7 @@ class Course < ActiveRecord::Base validates :title, presence: true scope :upcoming, -> { where("date_and_time >= ?", DateTime.now).order(:date_and_time) } + scope :next, -> { upcoming.first } scope :past, -> { where("date_and_time < ?", DateTime.now).order(:date_and_time) } def to_param diff --git a/app/models/invitation_manager.rb b/app/models/invitation_manager.rb index 1a5729a36..0dbb27633 100644 --- a/app/models/invitation_manager.rb +++ b/app/models/invitation_manager.rb @@ -2,7 +2,7 @@ class InvitationManager def self.send_session_emails session Member.students.each do |student| - SessionInvitation.create sessions: session, member: student + SessionInvitation.create sessions: session, member: student, role: "Student" end end diff --git a/app/models/member.rb b/app/models/member.rb index 3475270d4..b77bb2a32 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -1,5 +1,6 @@ class Member < ActiveRecord::Base has_and_belongs_to_many :roles + has_many :session_invitations validates :name, :surname, :email, :about_you, presence: true validates_uniqueness_of :email @@ -7,6 +8,7 @@ class Member < ActiveRecord::Base scope :students, -> { joins(:roles).where(:roles => { :name => 'Student' }) } scope :coaches, -> { joins(:roles).where(:roles => { :name => 'Coach' }) } + attr_accessor :attendance def full_name [name, surname].join " " @@ -16,6 +18,10 @@ def avatar size=100 "http://gravatar.com/avatar/#{md5_email}?s=#{size}" end + def attended_sessions + session_invitations.attended.map(&:sessions) + end + private def md5_email diff --git a/app/models/session_invitation.rb b/app/models/session_invitation.rb index 9a57e272d..1dadd19d3 100644 --- a/app/models/session_invitation.rb +++ b/app/models/session_invitation.rb @@ -5,16 +5,27 @@ class SessionInvitation < ActiveRecord::Base belongs_to :sessions validates :sessions, :member, presence: true - validates :member_id, uniqueness: { scope: [:sessions ] } + validates :member_id, uniqueness: { scope: [:sessions, :role ] } + validates_inclusion_of :role, in: [ "Student", "Coach" ], allow_nil: true + + scope :attended, -> { where(attended: true) } + scope :to_students, -> { where(role: "Student") } + scope :to_coaches, -> { where(role: "Coach") } + scope :by_member, -> { group(:member_id) } + def send_reminder - SessionInvitationMailer.remind_student(self.sessions, self.member, self).deliver if attending + if !role.eql?("Coach") + SessionInvitationMailer.remind_student(self.sessions, self.member, self).deliver if attending + end end private def email - SessionInvitationMailer.invite_student(self.sessions, self.member, self).deliver + if role.eql?("Student") + SessionInvitationMailer.invite_student(self.sessions, self.member, self).deliver + end end end diff --git a/app/models/sponsor.rb b/app/models/sponsor.rb index 48d35381b..cb6007caf 100644 --- a/app/models/sponsor.rb +++ b/app/models/sponsor.rb @@ -3,5 +3,7 @@ class Sponsor < ActiveRecord::Base has_many :sponsor_sessions has_many :sessions, through: :sponsor_sessions - validates :name, :description, :address, :avatar, presence: true -end \ No newline at end of file + validates :name, :address, :avatar, :website, presence: true + + scope :latest, -> { order("updated_at desc").limit(7) } +end diff --git a/app/views/courses/index.html.haml b/app/views/courses/index.html.haml index 36d30d3b8..dcf693480 100644 --- a/app/views/courses/index.html.haml +++ b/app/views/courses/index.html.haml @@ -1,17 +1,24 @@ -- if @courses.upcoming.any? - %h2 Upcoming courses - %ul - - @courses.upcoming.each do |course| - %li - =link_to course_url(course) do - = course.title - %small=l(course.date_and_time) +%section#courses + - if @courses.upcoming.any? + .titlebox.course + %h2 Upcoming courses + .dot + %ul + - @courses.upcoming.each do |course| + %li + =link_to course_url(course) do + = course.title + %br + %small=l(course.date_and_time, format: :website_format) -- if @courses.past.any? - %h2 Past courses - %ul - - @courses.past.each do |course| - %li - =link_to course_url(course) do - = course.title - %small=l(course.date_and_time) + - if @courses.past.any? + .titlebox.course + %h2 Past courses + .dot + %ul + - @courses.past.each do |course| + %li + =link_to course_url(course) do + = course.title + %br + %small=l(course.date_and_time, format: :website_format) diff --git a/app/views/courses/show.html.haml b/app/views/courses/show.html.haml index 37914cbf5..8256bc8a5 100644 --- a/app/views/courses/show.html.haml +++ b/app/views/courses/show.html.haml @@ -1,21 +1,33 @@ -%h1= @course.title +%section#courses + .titlebox.course + %h2 + = @course.title + %small= "#{l(@course.date_and_time, format: :website_format)}" + .dot -=l(@course.date_and_time) + .description + %h4= @course.short_description + = @course.description.html_safe + - if @course.url.present? + .right + =link_to "read more about the course", @course.url -%h3= @course.short_description + - if @course.seats > @course.attending_invitations.length + .sub-block + =link_to "Sign up to the course", new_members_path, class: 'member-button' + - else + .sub-block + %small + %em + This course is fully booked! If you would like to receive an invitation to other courses we will be running, you should #{link_to("sign up", new_members_path)}. -.description - = @course.description.html_safe - - if @course.url.present? - .right - =link_to "read more about the course", @course.url + .description + .tutor + .avatar + =link_to twitter_url_for(@course.tutor.twitter) do + =image_tag @course.tutor.avatar -.tutor - .avatar - =link_to twitter_url_for(@course.tutor.twitter) do - =image_tag @course.tutor.avatar - - .about - %strong= @course.tutor.full_name - =link_to "@#{@course.tutor.twitter}", twitter_url_for(@course.tutor.twitter) - %br= @course.tutor.about_you.html_safe + .about + %strong= @course.tutor.full_name + =link_to "@#{@course.tutor.twitter}", twitter_url_for(@course.tutor.twitter) + %br= @course.tutor.about_you.html_safe diff --git a/app/views/dashboard/code.html.haml b/app/views/dashboard/code.html.haml index 44cf6ca35..33c4a4952 100644 --- a/app/views/dashboard/code.html.haml +++ b/app/views/dashboard/code.html.haml @@ -1,28 +1,34 @@ -%h1 Code of conduct +%section#code + .titlebox#code-of-conduct + %h2 Code of conduct + .dot -%h3 The Quick Version -%p.lead - Our events are dedicated to providing a harassment-free experience for everyone, regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of our members or coaches in any form. Sexual language and imagery is not appropriate for any of our events, including talks, workshops, parties, Twitter and any other online media. Members violating these rules may be sanctioned or expelled from the event and any future events at the discretion of the organisers. + .description + .details-block + %h3 The Quick Version + %p.lead + Our events are dedicated to providing a harassment-free experience for everyone, regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of our members in any form. Sexual language and imagery is not appropriate for any of our events, including talks, workshops, parties, Twitter and any other online media. Members violating these rules may be sanctioned or expelled from the event and any future events at the discretion of the organisers. -%h3 The Long Version -%p.lead - Harassment includes offensive verbal comments related to gender, sexual orientation, disability, physical appearance, body size, race, religion, sexual images in public spaces, deliberate intimidation, stalking, following, harassing photography or recording, sustained disruption of talks or other events, inappropriate physical contact, and unwelcome sexual attention. + .details-block + %h3 The Long Version + %p.lead + Harassment includes offensive verbal comments related to gender, sexual orientation, disability, physical appearance, body size, race, religion, sexual images in public spaces, deliberate intimidation, stalking, following, harassing photography or recording, sustained disruption of talks or other events, inappropriate physical contact, and unwelcome sexual attention. -%p.lead - Participants asked to stop any harassing behavior are expected to comply immediately. + %p.lead + Participants asked to stop any harassing behavior are expected to comply immediately. -%p.lead - Sponsors are also subject to the anti-harassment policy. In particular, sponsors should not use sexualized images, activities, or other material. Staff (including volunteers) should not use sexualized clothing/uniforms/costumes, or otherwise create a sexualized environment. + %p.lead + Sponsors are also subject to the anti-harassment policy. In particular, sponsors should not use sexualized images, activities, or other material. Staff (including volunteers) should not use sexualized clothing/uniforms/costumes, or otherwise create a sexualized environment. -%p.lead - If a participant engages in harassing behavior, the organizers may take any action they deem appropriate, including warning the offender or expulsion. + %p.lead + If a participant engages in harassing behavior, the organizers may take any action they deem appropriate, including warning the offender or expulsion. -%p.lead - If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact one of the organisers or coaches immediately. + %p.lead + If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact one of the organisers immediately. -%p.lead - We expect participants to follow these rules at all Codebar events. + %p.lead + We expect participants to follow these rules at all codebar events. -%p.lead - If you have any questions or concerns about this code please contact - =mail_to "social@codebar.io", "Codebar", subject: "Regarding code of conduct" + %p.lead + If you have any questions or concerns about this code please + =mail_to "hello@codebar.io", "contact us", subject: "Regarding code of conduct" diff --git a/app/views/dashboard/show.html.haml b/app/views/dashboard/show.html.haml index 1504d1b05..338d9fca7 100644 --- a/app/views/dashboard/show.html.haml +++ b/app/views/dashboard/show.html.haml @@ -1,26 +1,101 @@ %section#main .left-panel - %h2 - Our Goal + .titlebox.mission + %h2 + Our mission + .dot - %p.lead - Making tech more diverse and welcoming by bringing people together and helping teach programming skills. We organize free sessions in HTML, CSS, Javascript and Ruby, targeted at different groups of people that are underrepresented in the tech industry. All these, with the help of our amazing coaches! + .description + %p.lead + Making tech more diverse and welcoming by bringing people together and helping teach programming skills. + %p.lead + We organise free sessions in HTML, CSS, Javascript, Ruby and offer guidance and advice on a variety of programming related topics. Our target is to help groups of people that are underrepresented in the tech industry. + %p.lead + All these, with the help of our + =link_to "amazing coaches", wall_of_fame_path + \. + %p.lead + %b + Before you continue, you should read our + =link_to "code of conduct", "#code-of-conduct" - %h3 - Code of conduct - %p.lead - Our events are dedicated to providing a harassment-free experience for everyone, regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of our members or coaches in any form. Sexual language and imagery is not appropriate for any of our events, including talks, workshops, parties, Twitter and any other online media. Members violating these rules may be sanctioned or expelled from the event and any future events at the discretion of the organisers. - = link_to "read the full version", code_of_conduct_path - .right-panel - =link_to "Become a member", new_members_path, class: 'btn' - =link_to "Courses", courses_path, class: 'btn' + - if @next_session.present? + .titlebox.session + %h2 + Next session + .dot + + .description + .details-block + %h3= @next_session.title + %h5= @next_session.description + %h6 + = "on #{l(@next_session.date_and_time, format: :website_format)}" + %p.lead.move-top + We run sessions weekly where we offer guided help in going through HTML/CSS, Javascript and Ruby tutorials - and not just that! There, you will also get the opportunity to meet other people interested in coding and pair with them. If you would like to attend as a student or help out as a coach you can do so by signing up. + .sub-block + =link_to "Sign up to the session", new_members_path, class: 'member-button' + + - if @next_course.present? + .titlebox.course + %h2 + Next course + .dot + + .description + .details-block + %h3= @next_course.title + %h5 + Course run by + %b=link_to @next_course.tutor.full_name, twitter_url_for(@next_course.tutor.twitter) + %h6= "on #{l(@next_course.date_and_time, format: :website_format)}" + %p.lead.move-top + = @next_course.short_description.html_safe + %small + =link_to "read more about the course", @next_course + .sub-block + =link_to "Sign up to the course", new_members_path, class: 'member-button' -/- if @sessions.any? -/ %br -/ %section -/ %h3 Sessions + .titlebox#code-of-conduct + %h2 + Code of conduct + .dot + + .description + %p.lead + Our events are dedicated to providing a harassment-free experience for everyone, regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion. + %p.lead + We do not tolerate harassment of our members in any form. Sexual language and imagery is not appropriate for any of our events, including talks, workshops, parties, Twitter and any other online media. Members violating these rules may be sanctioned or expelled from the event and any future events at the discretion of the organisers. + %br + %br + =link_to "Read the full version", code_of_conduct_path + + .right-panel + %ul.social + %li + =link_to image_tag("github.png", width: '33px'), "https://github.com/codebar" + %li + =link_to image_tag("twitter.png", width: '33px'), "https://twitter.com/by_codebar" + %li + =link_to image_tag("facebook.png", width: '33px'), "https://facebook.com/bycodebar" + .right-block + %h4 Sponsors + .right-block + %ul.sponsors + - @sponsors.each do |sponsor| + %li + = link_to image_tag(sponsor.avatar, height: '70px'), sponsor.website + .become-a-sponsor + =mail_to "hello@codebar.io", "Sponsor codebar.io", subject: "I would like to sponsor codebar", class: 'sponsor-button' -/ - @sessions.each do |session| -/ = session.title -/ %small.date= l(session.date_and_time) + .right-block + %h4 Gallery + .right-block + %ul.gallery + %li + =image_tag("pic1.jpg", height: '183px') + %li + =image_tag("pic2.jpg", height: '183px') + %li + =image_tag("pic3.jpg", height: '183px') diff --git a/app/views/dashboard/wall_of_fame.html.haml b/app/views/dashboard/wall_of_fame.html.haml new file mode 100644 index 000000000..4d7cea36a --- /dev/null +++ b/app/views/dashboard/wall_of_fame.html.haml @@ -0,0 +1,18 @@ +%section#wall-of-fame + .titlebox.mission + %h2 + Wall of Fame + .dot + %ul + - @coaches.each do |coach| + %li.coach + .avatar + =link_to twitter_url_for(coach.twitter) do + =image_tag coach.avatar(70) + .about + .name + - if coach.twitter.present? + =link_to coach.full_name, twitter_url_for(coach.twitter) + - else + =coach.full_name + %span.about_you=coach.about_you.html_safe diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index eed888359..3cd8a1f5b 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -11,19 +11,39 @@
- -