if user_signed_in?
if account.id == current_user.account_id
link_to settings_profile_url, class: 'button logo-button' do
- safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('settings.edit_profile')])
+ safe_join([svg_logo, t('settings.edit_profile')])
end
elsif current_account.following?(account) || current_account.requested?(account)
link_to account_unfollow_path(account), class: 'button logo-button button--destructive', data: { method: :post } do
- safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.unfollow')])
+ safe_join([svg_logo, t('accounts.unfollow')])
end
elsif !(account.memorial? || account.moved?)
link_to account_follow_path(account), class: "button logo-button#{account.blocking?(current_account) ? ' disabled' : ''}", data: { method: :post } do
- safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.follow')])
+ safe_join([svg_logo, t('accounts.follow')])
end
end
elsif !(account.memorial? || account.moved?)
link_to account_remote_follow_path(account), class: 'button logo-button modal-button', target: '_new' do
- safe_join([render(file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')), t('accounts.follow')])
+ safe_join([svg_logo, t('accounts.follow')])
end
end
end
+ def svg_logo
+ content_tag(:svg, tag(:use, 'xlink:href' => '#mastodon-svg-logo'), 'viewBox' => '0 0 216.4144 232.00976')
+ end
+
def account_badge(account, all: false)
if account.bot?
content_tag(:div, content_tag(:div, t('accounts.roles.bot'), class: 'account-role bot'), class: 'roles')
height: auto;
vertical-align: middle;
margin-right: 5px;
-
- path:first-child {
- fill: $primary-text-color;
- }
-
- path:last-child {
- fill: $ui-highlight-color;
- }
+ fill: $primary-text-color;
}
&:active,
&:focus,
&:hover {
background: lighten($ui-highlight-color, 10%);
-
- svg path:last-child {
- fill: lighten($ui-highlight-color, 10%);
- }
}
&:disabled,
&.disabled {
- svg path:last-child {
- fill: $ui-primary-color;
- }
-
&:active,
&:focus,
&:hover {
background: $ui-primary-color;
-
- svg path:last-child {
- fill: $ui-primary-color;
- }
}
}
&:focus,
&:hover {
background: $error-red;
-
- svg path:last-child {
- fill: $error-red;
- }
}
}
%li= link_to t('about.api'), 'https://docs.joinmastodon.org/api/guidelines/'
.column-2
%h4= link_to t('about.what_is_mastodon'), 'https://joinmastodon.org/'
-
- = link_to root_url, class: 'brand' do
- = render file: Rails.root.join('app', 'javascript', 'images', 'logo_transparent.svg')
+ = link_to svg_logo, root_url, class: 'brand'
.column-3
%h4= site_hostname
%ul