Redesign the media assets show page to: * Include sidebar with AI tags and image metadata. * Include next and previous image buttons. * Make the image use 100% of the available screen space and to scroll with the window.
21 lines
705 B
Ruby
21 lines
705 B
Ruby
# frozen_string_literal: true
|
|
|
|
# A component for showing a full-sized image or video for a media asset.
|
|
class MediaAssetComponent < ApplicationComponent
|
|
attr_reader :media_asset, :current_user, :outer_classes, :inner_classes, :dynamic_height
|
|
|
|
delegate :image_width, :image_height, :variant, :is_image?, :is_video?, :is_ugoira?, :is_flash?, to: :media_asset
|
|
|
|
renders_one :header
|
|
renders_one :footer
|
|
|
|
def initialize(media_asset:, current_user:, outer_classes: "", inner_classes: "", dynamic_height: false)
|
|
super
|
|
@media_asset = media_asset
|
|
@current_user = current_user
|
|
@outer_classes = outer_classes
|
|
@inner_classes = inner_classes
|
|
@dynamic_height = dynamic_height
|
|
end
|
|
end
|