Sha256: 252c733dbc90b0f0c65960efc15f41afae66b04b184e592327c335969ae6cdad

Contents?: true

Size: 1.27 KB

Versions: 9

Compression:

Stored size: 1.27 KB

Contents

module PageflowScrolled
  # @api private
  module FaviconHelper
    include ThemesHelper

    def scrolled_favicons_for_entry(entry, entry_mode: :published)
      render(
        'pageflow_scrolled/favicons/entry',
        manifest_path: entry_mode == :published && pageflow.entry_manifest_path(
          entry,
          format: 'webmanifest'
        ),

        svg_path: entry.theme.files.dig(:favicon, :original),

        png_16_path: scrolled_theme_asset_path(
          entry.theme,
          'favicons/favicon-16x16.png',
          theme_file_role: :favicon_png,
          theme_file_style: :w16
        ),
        png_32_path: scrolled_theme_asset_path(
          entry.theme,
          'favicons/favicon-32x32.png',
          theme_file_role: :favicon_png,
          theme_file_style: :w32
        ),

        apple_touch_icon_path: scrolled_theme_asset_path(
          entry.theme,
          'favicons/apple-touch-icon.png',
          theme_file_role: :favicon_png,
          theme_file_style: :w180
        ),

        ico_path: scrolled_theme_asset_path(
          entry.theme,
          'favicons/favicon.ico',
          theme_file_role: :favicon_ico,
          theme_file_style: :original
        ),

        theme_color: entry.theme.options[:theme_color]
      )
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pageflow-17.0.4 entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb
pageflow-17.0.3 entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb
pageflow-17.0.2 entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb
pageflow-17.0.1 entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb
pageflow-17.0.0 entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb
pageflow-16.2.0 entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb
pageflow-16.1.0 entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb
pageflow-16.0.0 entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb
pageflow-15.8.0 entry_types/scrolled/app/helpers/pageflow_scrolled/favicon_helper.rb