Class: Www::PublicationCardComponent
- Inherits:
-
ApplicationComponent
- Object
- ViewComponent::Base
- ApplicationComponent
- Www::PublicationCardComponent
- Defined in:
- app/components/www/publication_card_component.rb
Constant Summary collapse
- IMAGE_DEFAULTS =
Prefix => image slug for override thumbnails (matches start_with?)
{ width: 400, thumbnail: true, crop_mode: :auto, focus: :auto }.freeze
- IMAGE_OVERRIDES =
{ 'WARMLYYOURS-ELECTRIC-FLOOR-HEATING-CATALOG' => { slug: 'electric-floor-heating-catalog-318a09', transform_options: {} }, 'FLOOR-PLAN-GRID-REQUEST-FOR-QUOTATION-FORM' => { slug: 'floor-heating-request-quote-form-609a0b', transform_options: {} }, 'DESIGN-HEAT-LOSS-10058' => { slug: 'heat-loss-request-form-e36be6', transform_options: {} } }.freeze
Instance Method Summary collapse
-
#initialize(publication:, col_size: 'col-6 col-sm-4 col-md-3 col-xl-2 mt-4') ⇒ PublicationCardComponent
constructor
A new instance of PublicationCardComponent.
Methods inherited from ApplicationComponent
#cms_link, #fetch_or_fallback, #image_asset_tag, #image_tag, #number_to_currency, #number_with_delimiter, #post_path, #post_url, #strip_tags
Constructor Details
#initialize(publication:, col_size: 'col-6 col-sm-4 col-md-3 col-xl-2 mt-4') ⇒ PublicationCardComponent
Returns a new instance of PublicationCardComponent.
22 23 24 25 26 |
# File 'app/components/www/publication_card_component.rb', line 22 def initialize(publication:, col_size: 'col-6 col-sm-4 col-md-3 col-xl-2 mt-4') super() @publication = publication @col_size = col_size end |