From 0d0ed4db28d56425830f4eb2c9859ba96b21619b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Pankowiak?= Date: Fri, 4 Jul 2014 18:06:49 +0200 Subject: [PATCH] Port Getting Started page to Bootstrap --- .../stylesheets/getting-started.css.scss | 33 ++++++++++ app/assets/stylesheets/new-templates.css.scss | 3 + app/controllers/users_controller.rb | 4 +- app/views/photos/_new_profile_photo.haml | 3 +- app/views/users/getting_started.haml | 63 ++++++++++--------- 5 files changed, 71 insertions(+), 35 deletions(-) create mode 100644 app/assets/stylesheets/getting-started.css.scss diff --git a/app/assets/stylesheets/getting-started.css.scss b/app/assets/stylesheets/getting-started.css.scss new file mode 100644 index 000000000..a12820484 --- /dev/null +++ b/app/assets/stylesheets/getting-started.css.scss @@ -0,0 +1,33 @@ +#hello-there { + .avatar { + width: 50px; + height: 50px; + } + + .awesome { + text-align: center; + } + + .hero-unit { + margin: 58px 42px; + padding: 40px 80px; + } + + h2 { + margin-top: 80px; + } + + p, form { + margin-left: 30px; + } + + ul.as-selections { + width: 100%; + + li.as-original { + input { + margin-bottom: 15px; + } + } + } +} diff --git a/app/assets/stylesheets/new-templates.css.scss b/app/assets/stylesheets/new-templates.css.scss index 1fb110ba3..1292f4e9b 100644 --- a/app/assets/stylesheets/new-templates.css.scss +++ b/app/assets/stylesheets/new-templates.css.scss @@ -45,3 +45,6 @@ /* help */ @import 'help'; + +/* getting started */ +@import 'getting-started' diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b893621c5..0e4490717 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -5,6 +5,8 @@ class UsersController < ApplicationController before_filter :authenticate_user!, :except => [:new, :create, :public, :user_photo] + use_bootstrap_for :getting_started + respond_to :html def edit @@ -117,8 +119,6 @@ class UsersController < ApplicationController @person = @user.person @profile = @user.profile - @css_framework = :bootstrap - @include_application_css = true #Hack for multiple CSS frameworks and having two main styles respond_to do |format| format.mobile { render "users/getting_started" } format.all { render "users/getting_started", layout: "with_header_with_footer" } diff --git a/app/views/photos/_new_profile_photo.haml b/app/views/photos/_new_profile_photo.haml index b6d1acb3a..97021b167 100644 --- a/app/views/photos/_new_profile_photo.haml +++ b/app/views/photos/_new_profile_photo.haml @@ -60,7 +60,7 @@ #profile_photo_upload = owner_image_tag(:thumb_medium) - #file-upload.button + #file-upload.btn =t('.upload') = image_tag('mobile-spinner.gif', :class => 'hidden', :style => "z-index:-1", :id => 'file-upload-spinner') @@ -69,4 +69,3 @@ #fileInfo #publisher_photo_upload - diff --git a/app/views/users/getting_started.haml b/app/views/users/getting_started.haml index a1e24b752..828cce11d 100644 --- a/app/views/users/getting_started.haml +++ b/app/views/users/getting_started.haml @@ -5,42 +5,43 @@ - content_for :head do = javascript_include_tag :profile -%section#hello-there - .hero-unit - %h1.center - = t('.well_hello_there') - %h3.center - = t(".community_welcome") +.container + .row + %section#hello-there.span12 + .hero-unit + %h1.text-center + = t('.well_hello_there') + %h3.text-center + = t(".community_welcome") - = invited_by_message - - %h2 - = t(".who_are_you") + = invited_by_message - - if AppConfig.configured_services.include? :facebook - %p - != t('.connect_to_facebook', :link => link_to(t('.connect_to_facebook_link'), "auth/facebook?callback_url=#{getting_started_url}")) + %h2 + = t(".who_are_you") - = form_tag profile_path, :method => :put, :remote => true, :id => 'edit_profile' do - %fieldset - = label_tag 'profile[first_name]', t('profiles.edit.your_name') - = text_field_tag 'profile[first_name]', current_user.first_name - = image_tag 'ajax-loader.gif', :id => "gs-name-form-spinner", :class => "hidden" - = label_tag :your_photo, t('profiles.edit.your_photo') - = render 'photos/new_profile_photo', :aspect => :getting_started, :person => current_user.person + - if AppConfig.configured_services.include? :facebook + %p + != t('.connect_to_facebook', :link => link_to(t('.connect_to_facebook_link'), "auth/facebook?callback_url=#{getting_started_url}")) - %h2 - = t('.what_are_you_in_to') + = form_tag profile_path, :method => :put, :remote => true, :id => 'edit_profile' do + %fieldset + = label_tag 'profile[first_name]', t('profiles.edit.your_name') + = text_field_tag 'profile[first_name]', current_user.first_name + = image_tag 'ajax-loader.gif', :id => "gs-name-form-spinner", :class => "hidden" + = label_tag :your_photo, t('profiles.edit.your_photo') + = render 'photos/new_profile_photo', :aspect => :getting_started, :person => current_user.person - %p - = t('.hashtag_explanation') + %h2 + = t('.what_are_you_in_to') - = form_tag(tag_followings_path, :method => 'get', :class => "tag_input search_form") do - %fieldset - = label_tag 'follow_tags', t('.hashtag_suggestions') - #tags_list - = text_field_tag 'follow_tags', nil, :class => "nostrap" + %p + = t('.hashtag_explanation') - .awesome - = link_to "#{t('.awesome_take_me_to_diaspora')} »", stream_path, :id => "awesome_button", :class => "button creation" + = form_tag(tag_followings_path, :method => 'get', :class => "tag_input search_form") do + %fieldset + = label_tag 'follow_tags', t('.hashtag_suggestions') + #tags_list + = text_field_tag 'follow_tags', nil, :class => "nostrap" + .awesome + = link_to "#{t('.awesome_take_me_to_diaspora')} »", stream_path, :id => "awesome_button", :class => "btn creation"