This commit is contained in:
15
app/helpers/application_helper.rb
Normal file
15
app/helpers/application_helper.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module ApplicationHelper
|
||||
def hide_from_user_style_tag
|
||||
tag.style(<<~CSS.html_safe)
|
||||
[data-hide-from-user-id="#{Current.user.id}"] {
|
||||
display: none!important;
|
||||
}
|
||||
CSS
|
||||
end
|
||||
|
||||
def custom_styles_tag
|
||||
if custom_styles = Current.account&.custom_styles
|
||||
tag.style(custom_styles.to_s.html_safe, data: { turbo_track: "reload" })
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user