diff options
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 57937353955..8a0a46e6b25 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -318,7 +318,6 @@ module ApplicationHelper class_names << 'with-header' if !show_super_sidebar? || !current_user class_names << 'with-top-bar' if show_super_sidebar? && !@hide_top_bar_padding class_names << system_message_class - class_names << 'logged-out-marketing-header' if !current_user && ::Gitlab.com? && !show_super_sidebar? class_names end @@ -371,6 +370,14 @@ module ApplicationHelper "https://discord.com/users/#{user.discord}" end + def mastodon_url(user) + return '' if user.mastodon.blank? + + url = user.mastodon.match UserDetail::MASTODON_VALIDATION_REGEX + + external_redirect_path(url: "https://#{url[2]}/@#{url[1]}") + end + def collapsed_sidebar? cookies["sidebar_collapsed"] == "true" end |