module Orion::View::AssetTagHelpers

Direct including types

Defined in:

Instance Method Summary

Instance Method Detail

def asset_path(file, *, extname : String? = nil) #

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.


def asset_url(file : String, *, extname : String? = nil) #

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.


def 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.


def image_path(src : String) #

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.


def image_tag(src : String, **attrs) #

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.


def image_url(src : String) #

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.


def javascript_include_tag(src, **attrs) #

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.


def javascript_path(file) #

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.


def javascript_url(file : String) #

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.


def stylesheet_link_tag(href, **attrs) #

Returns a stylesheet link tag for the sources specified as arguments. If you don't specify an extension, .css will be appended automatically.


def stylesheet_path(file) #

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.


def stylesheet_url(file : String) #

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.