From 847fdb0de9087a8bdb9bba9ac2fe43baf8541ad0 Mon Sep 17 00:00:00 2001 From: Flaburgan Date: Mon, 21 Mar 2016 15:24:03 +0100 Subject: [PATCH] split left column --- app/assets/stylesheets/navbar_left.scss | 11 +- app/assets/stylesheets/stream.scss | 2 +- app/views/aspects/_aspect_stream.haml | 7 +- app/views/streams/main_stream.html.haml | 176 ++++++++++++------------ 4 files changed, 103 insertions(+), 93 deletions(-) diff --git a/app/assets/stylesheets/navbar_left.scss b/app/assets/stylesheets/navbar_left.scss index 51adb58ea..df6df71ee 100644 --- a/app/assets/stylesheets/navbar_left.scss +++ b/app/assets/stylesheets/navbar_left.scss @@ -1,5 +1,6 @@ .left-navbar { padding: 0; + padding-bottom: 10px; a { text-decoration: none; @@ -101,8 +102,14 @@ } .info-bar { - border-top: 1px solid $border-grey; - padding: 0 20px; + margin-top: 20px; + padding: 10px 20px 0; + + .info-links { + border-top: 1px solid $border-grey; + margin-top: 10px; + padding: 5px; + } .section { margin-top: 10px; diff --git a/app/assets/stylesheets/stream.scss b/app/assets/stylesheets/stream.scss index f6000eb96..622e4272b 100644 --- a/app/assets/stylesheets/stream.scss +++ b/app/assets/stylesheets/stream.scss @@ -17,7 +17,7 @@ } } -@media(max-width: $screen-xs) { +@media(max-width: $screen-xs-max) { .main-stream-publisher .publisher { margin-left: 0; diff --git a/app/views/aspects/_aspect_stream.haml b/app/views/aspects/_aspect_stream.haml index abee4ac83..7aa104d13 100644 --- a/app/views/aspects/_aspect_stream.haml +++ b/app/views/aspects/_aspect_stream.haml @@ -11,8 +11,11 @@ = owner_image_link = render "publisher/publisher", publisher_aspects_for(stream) -.stream#main_stream{:title => popover_with_close_html("3. #{t('.stay_updated')}"), - "data-content" => t(".stay_updated_explanation")} +- if current_user.getting_started? + .stream#main_stream{:title => popover_with_close_html("3. #{t('.stay_updated')}"), + "data-content" => t(".stay_updated_explanation")} +- else + .stream#main_stream #paginate %span.loader.hidden diff --git a/app/views/streams/main_stream.html.haml b/app/views/streams/main_stream.html.haml index 51fdc5c06..25c4155c5 100644 --- a/app/views/streams/main_stream.html.haml +++ b/app/views/streams/main_stream.html.haml @@ -38,118 +38,118 @@ %li{data: {stream: "public"}} = link_to t("streams.public.title"), public_stream_path, rel: "backbone", class: "hoverable" - .info-bar.hidden-xs - - if AppConfig.settings.invitations.open? - .section.collapsed - .title - %h5.title-header - .entypo-triangle-right - .entypo-triangle-down - = t("shared.invitations.invite_your_friends") - .content - = render "shared/invitations" - + .sidebar.info-bar.hidden-xs + - if AppConfig.settings.invitations.open? .section.collapsed .title %h5.title-header .entypo-triangle-right .entypo-triangle-down - = t("aspects.index.new_here.title") + = t("shared.invitations.invite_your_friends") .content - != t("aspects.index.new_here.follow", - link: link_to("#" + t("shared.publisher.new_user_prefill.newhere"), - tag_path(name: t("shared.publisher.new_user_prefill.newhere")))) - %br - = link_to(t("aspects.index.new_here.learn_more"), - "http://wiki.diasporafoundation.org/Welcoming_Committee") + = render "shared/invitations" + .section.collapsed + .title + %h5.title-header + .entypo-triangle-right + .entypo-triangle-down + = t("aspects.index.new_here.title") + .content + != t("aspects.index.new_here.follow", + link: link_to("#" + t("shared.publisher.new_user_prefill.newhere"), + tag_path(name: t("shared.publisher.new_user_prefill.newhere")))) + %br + = link_to(t("aspects.index.new_here.learn_more"), + "http://wiki.diasporafoundation.org/Welcoming_Committee") + + .section.collapsed + .title + %h5.title-header + .entypo-triangle-right + .entypo-triangle-down + = t("aspects.index.help.need_help") + .content + %p + = t("aspects.index.help.here_to_help") + %p + = t("aspects.index.help.do_you") + %ul + %li + != t("aspects.index.help.have_a_question", + link: link_to("#" + t("aspects.index.help.tag_question"), + tag_path(name: t("aspects.index.help.tag_question")))) + %li + != t("aspects.index.help.find_a_bug", + link: link_to("#" + t("aspects.index.help.tag_bug"), + tag_path(name: t("aspects.index.help.tag_bug")))) + %li + != t("aspects.index.help.feature_suggestion", + link: link_to("#" + t("aspects.index.help.tag_feature"), + tag_path(name: t("aspects.index.help.tag_feature")))) + %p + != t("aspects.index.help.tutorials_and_wiki", + faq: link_to(t("_help"), help_path), + tutorial: link_to(t("aspects.index.help.tutorial_link_text"), + "https://diasporafoundation.org/tutorials", target: "_blank"), + wiki: link_to("Wiki", "http://wiki.diasporafoundation.org", + target: "_blank"), + target: "_blank") + + - unless AppConfig.configured_services.blank? || all_services_connected? .section.collapsed .title %h5.title-header .entypo-triangle-right .entypo-triangle-down - = t("aspects.index.help.need_help") + = t("aspects.index.services.heading") .content - %p - = t("aspects.index.help.here_to_help") - %p - = t("aspects.index.help.do_you") - %ul - %li - != t("aspects.index.help.have_a_question", - link: link_to("#" + t("aspects.index.help.tag_question"), - tag_path(name: t("aspects.index.help.tag_question")))) - %li - != t("aspects.index.help.find_a_bug", - link: link_to("#" + t("aspects.index.help.tag_bug"), - tag_path(name: t("aspects.index.help.tag_bug")))) - %li - != t("aspects.index.help.feature_suggestion", - link: link_to("#" + t("aspects.index.help.tag_feature"), - tag_path(name: t("aspects.index.help.tag_feature")))) - %p - != t("aspects.index.help.tutorials_and_wiki", - faq: link_to(t("_help"), help_path), - tutorial: link_to(t("aspects.index.help.tutorial_link_text"), - "https://diasporafoundation.org/tutorials", target: "_blank"), - wiki: link_to("Wiki", "http://wiki.diasporafoundation.org", - target: "_blank"), - target: "_blank") + %div + = t("aspects.index.services.content") - - unless AppConfig.configured_services.blank? || all_services_connected? - .section.collapsed - .title - %h5.title-header - .entypo-triangle-right - .entypo-triangle-down - = t("aspects.index.services.heading") - .content - %div - = t("aspects.index.services.content") + .right-service-icons + - AppConfig.configured_services.each do |service| + - if AppConfig.show_service?(service, current_user) + - unless current_user.services.any? {|x| x.provider == service } + = link_to(content_tag(:div, nil, + class: "social-media-logos-#{service.to_s.downcase}-24x24", + title: service.to_s.titleize), "/auth/#{service}") - .right-service-icons - - AppConfig.configured_services.each do |service| - - if AppConfig.show_service?(service, current_user) - - unless current_user.services.any? {|x| x.provider == service } - = link_to(content_tag(:div, nil, - class: "social-media-logos-#{service.to_s.downcase}-24x24", - title: service.to_s.titleize), "/auth/#{service}") + .section.collapsed + .title + %h5.title-header + .entypo-triangle-right + .entypo-triangle-down + = t("bookmarklet.heading") + .content + != t("bookmarklet.explanation", link: link_to(t("bookmarklet.post_something"), bookmarklet_code)) + - if AppConfig.settings.paypal_donations.enable? || AppConfig.bitcoin_donation_address .section.collapsed .title %h5.title-header .entypo-triangle-right .entypo-triangle-down - = t("bookmarklet.heading") + = t("aspects.index.donate") .content - != t("bookmarklet.explanation", link: link_to(t("bookmarklet.post_something"), bookmarklet_code)) + %p + = t("aspects.index.keep_pod_running", pod: AppConfig.pod_uri.host) + = render "shared/donatepod" - - if AppConfig.settings.paypal_donations.enable? || AppConfig.bitcoin_donation_address - .section.collapsed - .title - %h5.title-header - .entypo-triangle-right - .entypo-triangle-down - = t("aspects.index.donate") - .content - %p - = t("aspects.index.keep_pod_running", pod: AppConfig.pod_uri.host) - = render "shared/donatepod" + - if AppConfig.admins.podmin_email.present? + .section.collapsed + .title + %h5.title-header + .entypo-triangle-right + .entypo-triangle-down + = t("aspects.index.help.any_problem") + .content + %p + = t("aspects.index.help.contact_podmin") + %p + = link_to t("aspects.index.help.mail_podmin"), "mailto:#{AppConfig.admins.podmin_email}" - - if AppConfig.admins.podmin_email.present? - .section.collapsed - .title - %h5.title-header - .entypo-triangle-right - .entypo-triangle-down - = t("aspects.index.help.any_problem") - .content - %p - = t("aspects.index.help.contact_podmin") - %p - = link_to t("aspects.index.help.mail_podmin"), "mailto:#{AppConfig.admins.podmin_email}" - - .info-bar + .info-links .content %ul = render "shared/links"