diff options
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/settings/preferences_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/user_webapp_css_controller.rb | 20 |
2 files changed, 20 insertions, 1 deletions
diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index c0f54b197..eb7d2ca07 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -66,6 +66,7 @@ class Settings::PreferencesController < Settings::BaseController :setting_style_underline_a, :setting_style_css_profile, :setting_style_css_webapp, + :setting_style_wide_media, :setting_publish_in, :setting_unpublish_in, :setting_unpublish_delete, diff --git a/app/controllers/user_webapp_css_controller.rb b/app/controllers/user_webapp_css_controller.rb index 8ad9fbd2e..f00b96be5 100644 --- a/app/controllers/user_webapp_css_controller.rb +++ b/app/controllers/user_webapp_css_controller.rb @@ -41,12 +41,30 @@ class UserWebappCssController < ApplicationController ) end + def css_wide_media + return unless @account.user&.setting_style_wide_media + + %( + .media-gallery + { height: auto !important; } + + .media-gallery__item + { width: 100% !important; } + + .spoiler-button + .media-gallery__item + { height: 5em !important; } + + .spoiler-button--minified + .media-gallery__item + { height: 280px !important; } + ) + end + def css_webapp @account.user&.setting_style_css_webapp_errors.blank? ? (@account.user&.setting_style_css_webapp || '') : '' end def css - "#{css_dashed_nest}\n#{css_underline_a}\n#{css_webapp}".squish + "#{css_dashed_nest}\n#{css_underline_a}\n#{css_wide_media}\n#{css_webapp}".squish end def set_account |