diff --git a/app/assets/stylesheets/sass/_layout.scss b/app/assets/stylesheets/sass/_layout.scss index 5e493a4..d12de70 100644 --- a/app/assets/stylesheets/sass/_layout.scss +++ b/app/assets/stylesheets/sass/_layout.scss @@ -303,7 +303,7 @@ main { #banner { position: relative; background-size: cover; - background-position: center 66.6667%; + background-position: 25% 66.6667%; //padding-top: 4em; color: $white; overflow: visible; @@ -457,7 +457,7 @@ main { figure { img { - max-height: 100%; + max-height: 75%; } } diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e0beb14..9384062 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,3 +1,4 @@ + module ApplicationHelper @@keyQueue = nil @@translationsOnThisPage = nil @@ -363,7 +364,23 @@ module ApplicationHelper end def p(object, attribute) - ('
' + object.send(attribute.to_s).strip.gsub(/\s*\n+\s*/, '
') + '
').html_safe + content = object.send(attribute.to_s) + result = '' + if content =~ /<(p|span|h\d|div)[^>]*>/ + result = content.gsub(/\s*(style|class|id|width|height|font)=\".*?\"/, '') + .gsub(/ /, ' ') + .gsub(/<(\/)?\s*h\d\s*>/, '<\1h3>') + .gsub(/(.*?)
\s*(
)+/, '
\1
')
+ .gsub(/]*>\s*(.*?)\s*<\/span>/, '\1')
+ .gsub(/ \s*<\/p>/, '')
+ .gsub(/<(\/)?div>/, '<\1p>')
+ if !(result =~ / ]*>/)
+ result = ' ' + result + ' ' + content.strip.gsub(/\s*\n+\s*/, ' ') + '