0
0
Fork 0

Redesign public profiles and toots (#8068)

This commit is contained in:
Eugen Rochko 2018-07-28 19:25:33 +02:00 committed by GitHub
parent e23b26178a
commit bb71538bb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
93 changed files with 1388 additions and 1423 deletions

View file

@ -5,11 +5,12 @@ module AccountHeader
IMAGE_MIME_TYPES = ['image/jpeg', 'image/png', 'image/gif'].freeze
LIMIT = 2.megabytes
MAX_PIXELS = 750_000 # 1500x500px
class_methods do
def header_styles(file)
styles = { original: { geometry: '700x335#', file_geometry_parser: FastGeometryParser } }
styles[:static] = { geometry: '700x335#', format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
styles = { original: { pixels: MAX_PIXELS, file_geometry_parser: FastGeometryParser } }
styles[:static] = { format: 'png', convert_options: '-coalesce', file_geometry_parser: FastGeometryParser } if file.content_type == 'image/gif'
styles
end