module Orion::View::AssetTagHelpers
Direct including types
Defined in:
orion/view/asset_tag_helpers.crInstance Method Summary
-
#asset_path(file, *, extname : String | Nil = nil)
Computes the path to an asset in the assets directory.
-
#asset_url(file : String, *, extname : String | Nil = nil)
Computes the URL to an asset in the assets directory.
-
#auto_discovery_link_tag(type : String, href, **attrs)
Returns a link tag that browsers and feed readers can use to auto-detect an RSS, Atom, or JSON feed.
-
#image_path(src : String)
Computes the path to an image asset in the assets/images directory.
-
#image_tag(src : String, **attrs)
Returns an HTML image tag for the source.
-
#image_url(src : String)
Computes the URL to an image asset in the assets/images directory.
-
#javascript_include_tag(src, **attrs)
Returns an HTML script tag for each of the sources provided.
-
#javascript_path(file)
Computes the path to a JavaScript asset in the assets/javascripts directory.
-
#javascript_url(file : String)
Computes the URL to a JavaScript asset in the assets/javascripts directory.
-
#stylesheet_link_tag(href, **attrs)
Returns a stylesheet link tag for the sources specified as arguments.
-
#stylesheet_path(file)
Computes the path to a stylesheet asset in the assets/stylesheets directory.
-
#stylesheet_url(file : String)
Computes the URL to a stylesheet asset in the assets/stylesheets directory.
Instance Method Detail
Computes the path to an asset in the assets directory. If the source filename has no extension, the provided extnam will be appended. Full paths from the document root will be passed through.
Computes the URL to an asset in the assets directory. This will call asset_path internally and merge with your current host or your asset host.
Returns a link tag that browsers and feed readers can use to auto-detect an RSS, Atom, or JSON feed.
Computes the path to an image asset in the assets/images directory. Full paths from the document root will be passed through. Used internally by image_tag to build the image path.
Returns an HTML image tag for the source. The source can be a full path or a file that exists in your assets/images directory.
Computes the URL to an image asset in the assets/images directory. This will call image_path internally and merge with your current host or your asset host.
Returns an HTML script tag for each of the sources provided. You can pass in the filename (.js extension is optional) of JavaScript files that exist in your assets/javascripts directory for inclusion into the current page or you can pass the full path relative to your document root.
Computes the path to a JavaScript asset in the assets/javascripts directory. If the source filename has no extension, .js will be appended. Full paths from the document root will be passed through. Used internally by javascript_include_tag to build the script path.
Computes the URL to a JavaScript asset in the assets/javascripts directory. This will call javascript_path internally and merge with your current host or your asset host.
Returns a stylesheet link tag for the sources specified as arguments. If you don't specify an extension, .css will be appended automatically.
Computes the path to a stylesheet asset in the assets/stylesheets directory. If the source filename has no extension, .css will be appended. Full paths from the document root will be passed through. Used internally by stylesheet_link_tag to build the stylesheet path.
Computes the URL to a stylesheet asset in the assets/stylesheets directory. This will call stylesheet_path internally and merge with your current host or your asset host.