views: factor out FontAwesome icons.
Factor out FontAwesome icons into a set of helpers. This is so that it's easier to keep track of which icons we're using and easier to change icons globally.
This commit is contained in:
@@ -4,7 +4,7 @@ class PostPreviewComponent < ApplicationComponent
|
||||
with_collection_parameter :post
|
||||
|
||||
attr_reader :post, :tags, :show_deleted, :show_cropped, :link_target, :pool, :pool_id, :favgroup_id, :similarity, :recommended, :compact, :size, :current_user, :options
|
||||
delegate :external_link_to, :time_ago_in_words_tagged, to: :helpers
|
||||
delegate :external_link_to, :time_ago_in_words_tagged, :favorite_icon, to: :helpers
|
||||
|
||||
def initialize(post:, tags: "", show_deleted: false, show_cropped: true, link_target: post, pool: nil, pool_id: nil, favgroup_id: nil, similarity: nil, recommended: nil, compact: nil, size: nil, current_user: CurrentUser.user, **options)
|
||||
@post = post
|
||||
|
||||
Reference in New Issue
Block a user