Sha256: 03601c0b974dfd9373ce3a04bfc54b13535b411e25e4d6bbb70cdb6613f10d6b
Contents?: true
Size: 745 Bytes
Versions: 7
Compression:
Stored size: 745 Bytes
Contents
# frozen_string_literal: true module Archangel module Liquid module Tags ## # Theme stylesheet custom tag for Liquid # # Example # {% theme_stylesheet %} # class ThemeStylesheetTag < ApplicationTag ## # Render the stylesheet for the theme # # @param context [Object] the Liquid context # @return [String] the stylesheet for the theme # def render(context) view = context.registers[:view] view.stylesheet_link_tag("#{view.current_theme}/frontend") end end end end end ::Liquid::Template.register_tag("theme_stylesheet", Archangel::Liquid::Tags::ThemeStylesheetTag)
Version data entries
7 entries across 7 versions & 1 rubygems