From 6b1db5c2b202383bd22d40909a68df8cbcb20b36 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 20 Mar 2017 03:36:29 +0100 Subject: Add landing strip --- app/assets/stylesheets/application.scss | 18 ++++++++++++++++++ app/views/accounts/show.html.haml | 3 +++ app/views/shared/_landing_strip.html.haml | 2 ++ app/views/stream_entries/show.html.haml | 3 +++ 4 files changed, 26 insertions(+) create mode 100644 app/views/shared/_landing_strip.html.haml (limited to 'app') diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index c590f7038..ba16d4a21 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -285,6 +285,24 @@ button:focus { } } +.landing-strip { + background: rgba(darken($color1, 7%), 0.8); + color: $color3; + font-weight: 400; + padding: 14px; + border-radius: 4px; + margin-bottom: 20px; + + strong, a { + font-weight: 500; + } + + a { + color: inherit; + text-decoration: underline; + } +} + @import 'forms'; @import 'accounts'; @import 'stream_entries'; diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml index c194ce33d..e1ad2d905 100644 --- a/app/views/accounts/show.html.haml +++ b/app/views/accounts/show.html.haml @@ -14,6 +14,9 @@ %meta{ property: 'og:image:height', content: '120' }/ %meta{ property: 'twitter:card', content: 'summary' }/ +- if !user_signed_in? && !Rails.configuration.x.single_user_mode + = render partial: 'shared/landing_strip', locals: { account: @account } + .h-feed %data.p-name{ value: "#{@account.username} on #{Rails.configuration.x.local_domain}" }/ diff --git a/app/views/shared/_landing_strip.html.haml b/app/views/shared/_landing_strip.html.haml new file mode 100644 index 000000000..bb081e544 --- /dev/null +++ b/app/views/shared/_landing_strip.html.haml @@ -0,0 +1,2 @@ +.landing-strip + = t('landing_strip_html', name: display_name(account), domain: Rails.configuration.x.local_domain, sign_up_path: new_user_registration_path) diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml index 6bad45705..7a1afdd96 100644 --- a/app/views/stream_entries/show.html.haml +++ b/app/views/stream_entries/show.html.haml @@ -20,5 +20,8 @@ %meta{ property: 'twitter:card', content: 'summary' }/ +- if !user_signed_in? && !Rails.configuration.x.single_user_mode + = render partial: 'shared/landing_strip', locals: { account: @stream_entry.account } + .activity-stream.activity-stream-headless = render partial: @type, locals: { @type.to_sym => @stream_entry.activity, include_threads: true } -- cgit