From df605f0f8ba795a10cf67095429bfeb7c362b7c9 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 5 Aug 2017 04:24:58 +0200 Subject: Add "signed in as" header to some pages (#4523) --- app/views/authorize_follows/show.html.haml | 9 ++++----- app/views/layouts/modal.html.haml | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 app/views/layouts/modal.html.haml (limited to 'app/views') diff --git a/app/views/authorize_follows/show.html.haml b/app/views/authorize_follows/show.html.haml index 3b60df058..f7a8f72d2 100644 --- a/app/views/authorize_follows/show.html.haml +++ b/app/views/authorize_follows/show.html.haml @@ -3,10 +3,9 @@ .form-container .follow-prompt - %h2= t('authorize_follow.prompt_html', self: current_account.username) - = render 'card', account: @account - = form_tag authorize_follow_path, method: :post, class: 'simple_form' do - = hidden_field_tag :acct, @account.acct - = button_tag t('authorize_follow.follow'), type: :submit + - unless current_account.following?(@account) + = form_tag authorize_follow_path, method: :post, class: 'simple_form' do + = hidden_field_tag :acct, @account.acct + = button_tag t('authorize_follow.follow'), type: :submit diff --git a/app/views/layouts/modal.html.haml b/app/views/layouts/modal.html.haml new file mode 100644 index 000000000..a819e098d --- /dev/null +++ b/app/views/layouts/modal.html.haml @@ -0,0 +1,16 @@ +- content_for :header_tags do + = javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous' + +- content_for :content do + - if user_signed_in? + .account-header + .avatar= image_tag current_account.avatar.url(:original) + .name + = t 'users.signed_in_as' + %span.username @#{current_account.local_username_and_domain} + = link_to destroy_user_session_path, method: :delete, class: 'logout-link icon-button' do + = fa_icon 'sign-out' + + .container= yield + += render template: 'layouts/application' -- cgit From a3e53bd442752f210db2025f2dfc45e7599354c2 Mon Sep 17 00:00:00 2001 From: Lynx Kotoura Date: Tue, 8 Aug 2017 03:33:06 +0900 Subject: Adjust tags and accounts page (#4534) * Adjust tag and accounts page * Remove units from 0px paddings --- app/javascript/styles/accounts.scss | 4 ++-- app/javascript/styles/compact_header.scss | 8 +++++++- app/javascript/styles/containers.scss | 2 +- app/views/tags/show.html.haml | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/javascript/styles/accounts.scss b/app/javascript/styles/accounts.scss index 99eb5ebea..66da75828 100644 --- a/app/javascript/styles/accounts.scss +++ b/app/javascript/styles/accounts.scss @@ -9,7 +9,7 @@ overflow: hidden; position: relative; - @media screen and (max-width: 700px) { + @media screen and (max-width: 740px) { border-radius: 0; box-shadow: none; } @@ -272,7 +272,7 @@ display: flex; flex-wrap: wrap; - @media screen and (max-width: 700px) { + @media screen and (max-width: 740px) { border-radius: 0; box-shadow: none; } diff --git a/app/javascript/styles/compact_header.scss b/app/javascript/styles/compact_header.scss index 27a67135f..cf12fcfec 100644 --- a/app/javascript/styles/compact_header.scss +++ b/app/javascript/styles/compact_header.scss @@ -3,9 +3,15 @@ font-size: 24px; line-height: 28px; color: $ui-primary-color; - overflow: hidden; font-weight: 500; margin-bottom: 20px; + padding: 0 10px; + overflow-wrap: break-word; + + @media screen and (max-width: 740px) { + text-align: center; + padding: 20px 10px 0; + } a { color: inherit; diff --git a/app/javascript/styles/containers.scss b/app/javascript/styles/containers.scss index d366a46ec..536f4e5a1 100644 --- a/app/javascript/styles/containers.scss +++ b/app/javascript/styles/containers.scss @@ -3,7 +3,7 @@ margin: 0 auto; margin-top: 40px; - @media screen and (max-width: 700px) { + @media screen and (max-width: 740px) { width: 100%; margin: 0; } diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml index 15bf714c2..8cd2f1825 100644 --- a/app/views/tags/show.html.haml +++ b/app/views/tags/show.html.haml @@ -4,6 +4,7 @@ .compact-header %h1< = link_to site_title, root_path + %br %small ##{@tag.name} - if @statuses.empty? -- cgit